Code

Imported upstream version 1.4~rc2.
authorSebastian Harl <sh@tokkee.org>
Tue, 9 Jun 2009 16:15:44 +0000 (18:15 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 9 Jun 2009 16:15:44 +0000 (18:15 +0200)
320 files changed:
ABOUT-NLS [new file with mode: 0644]
CHANGES
CONTRIBUTORS
COPYRIGHT
Makefile.am
Makefile.in
NEWS
README
TODO
acinclude.m4 [deleted file]
aclocal.m4
autogen.sh [new file with mode: 0755]
bindings/Makefile.am
bindings/Makefile.in
bindings/lua/Makefile.am [new file with mode: 0644]
bindings/lua/Makefile.in [new file with mode: 0644]
bindings/lua/README [new file with mode: 0644]
bindings/lua/compat-5.1r5/compat-5.1.c [new file with mode: 0644]
bindings/lua/compat-5.1r5/compat-5.1.h [new file with mode: 0644]
bindings/lua/compat-5.1r5/compat-5.1.lua [new file with mode: 0644]
bindings/lua/rrdlua.c [new file with mode: 0644]
bindings/lua/test.lua.bottom [new file with mode: 0644]
bindings/perl-piped/RRDp.pm
bindings/perl-shared/RRDs.pm
bindings/perl-shared/RRDs.xs
bindings/python/rrdtoolmodule.c
bindings/ruby/extconf.rb
bindings/ruby/main.c
bindings/tcl/Makefile.am
bindings/tcl/Makefile.in
bindings/tcl/tclrrd.c
compile [new file with mode: 0755]
config.guess
config.rpath [new file with mode: 0755]
config.sub
configure
configure.ac
depcomp
doc/Makefile.am
doc/Makefile.in
doc/RRDp.html
doc/RRDs.html
doc/bin_dec_hex.1
doc/bin_dec_hex.html
doc/bin_dec_hex.txt
doc/cdeftutorial.1
doc/cdeftutorial.html
doc/cdeftutorial.pod
doc/cdeftutorial.txt
doc/librrd.1 [new file with mode: 0644]
doc/librrd.html [new file with mode: 0644]
doc/librrd.pod [new file with mode: 0644]
doc/librrd.txt [new file with mode: 0644]
doc/rpntutorial.1
doc/rpntutorial.html
doc/rpntutorial.txt
doc/rrd-beginners.1
doc/rrd-beginners.html
doc/rrd-beginners.txt
doc/rrdbuild.1
doc/rrdbuild.html
doc/rrdbuild.pod
doc/rrdbuild.txt
doc/rrdcached.1 [new file with mode: 0644]
doc/rrdcached.html [new file with mode: 0644]
doc/rrdcached.pod [new file with mode: 0644]
doc/rrdcached.txt [new file with mode: 0644]
doc/rrdcgi.1
doc/rrdcgi.html
doc/rrdcgi.txt
doc/rrdcreate.1
doc/rrdcreate.html
doc/rrdcreate.txt
doc/rrddump.1
doc/rrddump.html
doc/rrddump.pod
doc/rrddump.txt
doc/rrdfetch.1
doc/rrdfetch.html
doc/rrdfetch.pod
doc/rrdfetch.txt
doc/rrdfirst.1
doc/rrdfirst.html
doc/rrdfirst.txt
doc/rrdflushcached.1 [new file with mode: 0644]
doc/rrdflushcached.html [new file with mode: 0644]
doc/rrdflushcached.pod [new file with mode: 0644]
doc/rrdflushcached.txt [new file with mode: 0644]
doc/rrdgraph.1
doc/rrdgraph.html
doc/rrdgraph.pod
doc/rrdgraph.txt
doc/rrdgraph_data.1
doc/rrdgraph_data.html
doc/rrdgraph_data.txt
doc/rrdgraph_examples.1
doc/rrdgraph_examples.html
doc/rrdgraph_examples.txt
doc/rrdgraph_graph.1
doc/rrdgraph_graph.html
doc/rrdgraph_graph.txt
doc/rrdgraph_libdbi.pod [new file with mode: 0644]
doc/rrdgraph_rpn.1
doc/rrdgraph_rpn.html
doc/rrdgraph_rpn.pod
doc/rrdgraph_rpn.txt
doc/rrdinfo.1
doc/rrdinfo.html
doc/rrdinfo.pod
doc/rrdinfo.txt
doc/rrdlast.1
doc/rrdlast.html
doc/rrdlast.pod
doc/rrdlast.txt
doc/rrdlastupdate.1
doc/rrdlastupdate.html
doc/rrdlastupdate.pod
doc/rrdlastupdate.txt
doc/rrdlua.pod [new file with mode: 0644]
doc/rrdresize.1
doc/rrdresize.html
doc/rrdresize.txt
doc/rrdrestore.1
doc/rrdrestore.html
doc/rrdrestore.txt
doc/rrdthreads.1
doc/rrdthreads.html
doc/rrdthreads.txt
doc/rrdtool.1
doc/rrdtool.html
doc/rrdtool.pod
doc/rrdtool.txt
doc/rrdtune.1
doc/rrdtune.html
doc/rrdtune.txt
doc/rrdtutorial.1
doc/rrdtutorial.html
doc/rrdtutorial.txt
doc/rrdupdate.1
doc/rrdupdate.html
doc/rrdupdate.pod
doc/rrdupdate.txt
doc/rrdxport.1
doc/rrdxport.html
doc/rrdxport.pod
doc/rrdxport.txt
etc/rrdcached-default [new file with mode: 0644]
etc/rrdcached-init [new file with mode: 0644]
examples/Makefile.am
examples/Makefile.in
examples/rrdcached/Makefile.am [new file with mode: 0644]
examples/rrdcached/Makefile.in [new file with mode: 0644]
examples/rrdcached/RRDCached.pm [new file with mode: 0644]
examples/rrdcached/rrdcached-size.pl [new file with mode: 0644]
install-sh
intl/ChangeLog [new file with mode: 0644]
intl/Makefile.in [new file with mode: 0644]
intl/VERSION [new file with mode: 0644]
intl/bindtextdom.c [new file with mode: 0644]
intl/config.charset [new file with mode: 0755]
intl/dcgettext.c [new file with mode: 0644]
intl/dcigettext.c [new file with mode: 0644]
intl/dcngettext.c [new file with mode: 0644]
intl/dgettext.c [new file with mode: 0644]
intl/dngettext.c [new file with mode: 0644]
intl/eval-plural.h [new file with mode: 0644]
intl/explodename.c [new file with mode: 0644]
intl/finddomain.c [new file with mode: 0644]
intl/gettext.c [new file with mode: 0644]
intl/gettextP.h [new file with mode: 0644]
intl/gmo.h [new file with mode: 0644]
intl/hash-string.h [new file with mode: 0644]
intl/intl-compat.c [new file with mode: 0644]
intl/l10nflist.c [new file with mode: 0644]
intl/langprefs.c [new file with mode: 0644]
intl/libgnuintl.h.in [new file with mode: 0644]
intl/loadinfo.h [new file with mode: 0644]
intl/loadmsgcat.c [new file with mode: 0644]
intl/localcharset.c [new file with mode: 0644]
intl/localcharset.h [new file with mode: 0644]
intl/locale.alias [new file with mode: 0644]
intl/localealias.c [new file with mode: 0644]
intl/localename.c [new file with mode: 0644]
intl/log.c [new file with mode: 0644]
intl/ngettext.c [new file with mode: 0644]
intl/os2compat.c [new file with mode: 0644]
intl/os2compat.h [new file with mode: 0644]
intl/osdep.c [new file with mode: 0644]
intl/plural-exp.c [new file with mode: 0644]
intl/plural-exp.h [new file with mode: 0644]
intl/plural.c [new file with mode: 0644]
intl/plural.y [new file with mode: 0644]
intl/printf-args.c [new file with mode: 0644]
intl/printf-args.h [new file with mode: 0644]
intl/printf-parse.c [new file with mode: 0644]
intl/printf-parse.h [new file with mode: 0644]
intl/printf.c [new file with mode: 0644]
intl/ref-add.sin [new file with mode: 0644]
intl/ref-del.sin [new file with mode: 0644]
intl/relocatable.c [new file with mode: 0644]
intl/relocatable.h [new file with mode: 0644]
intl/textdomain.c [new file with mode: 0644]
intl/vasnprintf.c [new file with mode: 0644]
intl/vasnprintf.h [new file with mode: 0644]
intl/vasnwprintf.h [new file with mode: 0644]
intl/wprintf-parse.h [new file with mode: 0644]
intl/xsize.h [new file with mode: 0644]
intltool-extract.in [deleted file]
intltool-merge.in [deleted file]
intltool-update.in [deleted file]
libtool [new file with mode: 0755]
ltmain.sh
m4/acinclude.m4 [new file with mode: 0644]
m4/codeset.m4 [new file with mode: 0644]
m4/gettext.m4 [new file with mode: 0644]
m4/glibc2.m4 [new file with mode: 0644]
m4/glibc21.m4 [new file with mode: 0644]
m4/iconv.m4 [new file with mode: 0644]
m4/intdiv0.m4 [new file with mode: 0644]
m4/intmax.m4 [new file with mode: 0644]
m4/inttypes-pri.m4 [new file with mode: 0644]
m4/inttypes.m4 [new file with mode: 0644]
m4/inttypes_h.m4 [new file with mode: 0644]
m4/isc-posix.m4 [new file with mode: 0644]
m4/lcmessage.m4 [new file with mode: 0644]
m4/lib-ld.m4 [new file with mode: 0644]
m4/lib-link.m4 [new file with mode: 0644]
m4/lib-prefix.m4 [new file with mode: 0644]
m4/libtool.m4 [new file with mode: 0644]
m4/longdouble.m4 [new file with mode: 0644]
m4/longlong.m4 [new file with mode: 0644]
m4/ltoptions.m4 [new file with mode: 0644]
m4/ltsugar.m4 [new file with mode: 0644]
m4/ltversion.m4 [new file with mode: 0644]
m4/lt~obsolete.m4 [new file with mode: 0644]
m4/nls.m4 [new file with mode: 0644]
m4/po.m4 [new file with mode: 0644]
m4/printf-posix.m4 [new file with mode: 0644]
m4/progtest.m4 [new file with mode: 0644]
m4/signed.m4 [new file with mode: 0644]
m4/size_max.m4 [new file with mode: 0644]
m4/stdint_h.m4 [new file with mode: 0644]
m4/uintmax_t.m4 [new file with mode: 0644]
m4/ulonglong.m4 [new file with mode: 0644]
m4/wchar_t.m4 [new file with mode: 0644]
m4/wint_t.m4 [new file with mode: 0644]
m4/xsize.m4 [new file with mode: 0644]
missing
mkinstalldirs [new file with mode: 0755]
po/ChangeLog
po/LINGUAS
po/Makefile.in.in
po/Makevars [new file with mode: 0644]
po/Rules-quot [new file with mode: 0644]
po/boldquot.sed [new file with mode: 0644]
po/de.po [deleted file]
po/en@boldquot.header [new file with mode: 0644]
po/en@quot.header [new file with mode: 0644]
po/insert-header.sin [new file with mode: 0644]
po/quot.sed [new file with mode: 0644]
po/remove-potcdate.sin [new file with mode: 0644]
po/rrdtool.pot [new file with mode: 0644]
po/stamp-po [new file with mode: 0644]
rrd_config.h.in
rrdtool.spec
src/Makefile.am
src/Makefile.in
src/gettext.h [new file with mode: 0644]
src/librrd.sym.in.in
src/pngsize.c
src/rrd.h
src/rrd_cgi.c
src/rrd_client.c [new file with mode: 0644]
src/rrd_client.h [new file with mode: 0644]
src/rrd_create.c
src/rrd_daemon.c [new file with mode: 0644]
src/rrd_diff.c
src/rrd_dump.c
src/rrd_error.c
src/rrd_fetch.c
src/rrd_fetch_libdbi.c [new file with mode: 0644]
src/rrd_first.c
src/rrd_flushcached.c [new file with mode: 0644]
src/rrd_format.c
src/rrd_format.h
src/rrd_getopt.c
src/rrd_getopt.h
src/rrd_getopt1.c
src/rrd_gfx.c
src/rrd_graph.c
src/rrd_graph.h
src/rrd_graph_helper.c
src/rrd_hw.c
src/rrd_hw.h
src/rrd_hw_math.c
src/rrd_hw_update.c
src/rrd_i18n.h
src/rrd_info.c
src/rrd_is_thread_safe.h
src/rrd_last.c
src/rrd_lastupdate.c
src/rrd_not_thread_safe.c
src/rrd_open.c
src/rrd_parsetime.c
src/rrd_resize.c
src/rrd_restore.c
src/rrd_rpncalc.c
src/rrd_rpncalc.h
src/rrd_thread_safe.c
src/rrd_thread_safe_nt.c
src/rrd_tool.c
src/rrd_tool.h
src/rrd_tune.c
src/rrd_update.c
src/rrd_utils.c [new file with mode: 0644]
src/rrd_version.c
src/rrd_xport.c
src/rrd_xport.h
src/rrdupdate.c
win32/config.h

diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644 (file)
index 0000000..ed3565a
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,986 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international!  The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages.  A few packages already provide translations for their
+messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+   When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used.  The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+1.1 Quick configuration advice
+==============================
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+     ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed.  So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation.  Future versions of GNU `gettext' will
+very likely convey even more functionality.  So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+   So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+1.2 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU `gettext'.  Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU `gettext' functions.  If not, the included GNU
+`gettext' library will be used.  This library is wholly contained
+within this package, usually in the `intl/' subdirectory, so prior
+installation of the GNU `gettext' package is _not_ required.
+Installers may use special options at configuration time for changing
+the default behaviour.  The commands:
+
+     ./configure --with-included-gettext
+     ./configure --disable-nls
+
+will, respectively, bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this.  This might not be desirable.  You should use
+the more recent version of the GNU `gettext' library.  I.e. if the file
+`intl/VERSION' shows that the library which comes with this package is
+more recent, you should use
+
+     ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+   The configuration process will not test for the `catgets' function
+and therefore it will not be used.  The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+   Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.3 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination.  Here `LL' is an ISO 639 two-letter language code,
+and `CC' is an ISO 3166 two-letter country code.  For example, let's
+suppose that you speak German and live in Germany.  At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
+locales supported by your system for your country by running the command
+`locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+   In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect.  For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.4 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
+area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation@iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skill are praised more than
+programming skill, here.
+
+1.5 Available Packages
+======================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of April
+2005.  The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am ar az be bg bs ca cs cy da de el en en_GB
+                        +-------------------------------------------------+
+     GNUnet             |                                                 |
+     a2ps               |             []                [] [] []     []   |
+     aegis              |                                  ()             |
+     ant-phone          |                                  ()             |
+     anubis             |                                  []             |
+     ap-utils           |                                                 |
+     aspell             |                         []    [] []        []   |
+     bash               |                      []          []             |
+     batchelor          |                                  []             |
+     bfd                |                                                 |
+     bibshelf           |                                  []             |
+     binutils           |                               []                |
+     bison              |                               [] []             |
+     bluez-pin          | []                      []       [] []          |
+     clisp              |                                  []    []       |
+     console-tools      |                         []       []             |
+     coreutils          |                []    []       [] []             |
+     cpio               |                                                 |
+     cpplib             |                      []       [] []             |
+     darkstat           |                []             () []             |
+     dialog             |                      [] [] [] [] [] []          |
+     diffutils          |                      [] []    [] [] []          |
+     doodle             |                                  []             |
+     e2fsprogs          |                         []       []             |
+     enscript           |                      []       [] []        []   |
+     error              |                      []       [] []        []   |
+     fetchmail          |                      [] ()    [] [] []          |
+     fileutils          |                               [] []             |
+     findutils          |                      []       []    []          |
+     flex               |                      []       [] []             |
+     fslint             |                                  []             |
+     gas                |                                                 |
+     gawk               |                      []       [] []             |
+     gbiff              |                                  []             |
+     gcal               |                      []                         |
+     gcc                |                                  []             |
+     gettext-examples   | []                   []          [] []          |
+     gettext-runtime    |             []       []       [] []             |
+     gettext-tools      |                      []          []             |
+     gimp-print         |                         []    [] []        []   |
+     gip                |                                                 |
+     gliv               |                                  []             |
+     glunarclock        |                                                 |
+     gmult              | []                               []             |
+     gnubiff            |                                  ()             |
+     gnucash            |                         []       () ()     []   |
+     gnucash-glossary   |                               [] ()             |
+     gpe-aerial         |                         []       []             |
+     gpe-beam           |                         []       []             |
+     gpe-calendar       |                         []       []             |
+     gpe-clock          |                         []       []             |
+     gpe-conf           |                         []       []             |
+     gpe-contacts       |                                                 |
+     gpe-edit           |                         []                      |
+     gpe-go             |                         []                      |
+     gpe-login          |                         []       []             |
+     gpe-ownerinfo      |                         []       []             |
+     gpe-sketchbook     |                         []       []             |
+     gpe-su             |                         []       []             |
+     gpe-taskmanager    |                         []       []             |
+     gpe-timesheet      |                         []                      |
+     gpe-today          |                         []       []             |
+     gpe-todo           |                         []       []             |
+     gphoto2            |                         []    [] []        []   |
+     gprof              |                               [] []             |
+     gpsdrive           |                                  ()    ()       |
+     gramadoir          | []                               []             |
+     grep               | []          [] []    []          [] []          |
+     gretl              |                                                 |
+     gsasl              |                                  []             |
+     gss                |                                                 |
+     gst-plugins        | []       []          [] []       []        []   |
+     gstreamer          | []                   [] []       []        []   |
+     gtick              | []                               ()             |
+     gtkspell           |             []                   [] []          |
+     hello              |                      []       [] [] []          |
+     id-utils           |                               [] []             |
+     impost             |                                                 |
+     indent             |                      []          []             |
+     iso_3166           |                                                 |
+     iso_3166_1         |                      [] []    [] [] []          |
+     iso_3166_2         |                                                 |
+     iso_3166_3         |                                  []             |
+     iso_4217           |                                                 |
+     iso_639            |                                                 |
+     jpilot             |                         []                      |
+     jtag               |                                                 |
+     jwhois             |                                                 |
+     kbd                |                         []    [] [] []          |
+     latrine            |                                  ()             |
+     ld                 |                               []                |
+     libc               |                      [] []    [] [] []          |
+     libextractor       |                                                 |
+     libgpewidget       |                         []    [] []             |
+     libgsasl           |                                                 |
+     libiconv           | []                   []       [] [] []          |
+     libidn             |                                                 |
+     lifelines          |                               [] ()             |
+     lilypond           |                                  []             |
+     lingoteach         |                                                 |
+     lynx               |                      [] []    [] []             |
+     m4                 |                         []    [] [] []          |
+     mailutils          |                      []                         |
+     make               |                               [] []             |
+     man-db             |                      [] ()    [] []             |
+     minicom            |                         []       []             |
+     mysecretdiary      |                               [] []             |
+     nano               |                      [] ()       []             |
+     nano_1_0           |                      [] ()    [] []             |
+     opcodes            |                                  []             |
+     parted             |                      [] []    [] []             |
+     psmisc             |                                                 |
+     ptx                |                      []       [] []             |
+     pwdutils           |                                                 |
+     python             |                                                 |
+     radius             |                      []                         |
+     recode             |             []       []       [] [] []          |
+     rpm                |                         []    []                |
+     screem             |                                                 |
+     scrollkeeper       |          [] []       [] [] [] [] []        []   |
+     sed                |                      []          []             |
+     sh-utils           |                               [] []             |
+     shared-mime-info   |                         [] []                   |
+     sharutils          |                      [] []    [] [] []          |
+     silky              |                                                 |
+     skencil            |                               [] ()             |
+     sketch             |                               [] ()             |
+     solfege            |                                  []             |
+     soundtracker       |                               [] []             |
+     sp                 |                                  []             |
+     stardict           |                         []                      |
+     tar                |                                                 |
+     texinfo            |                               [] []             |
+     textutils          |                      []       [] []             |
+     tin                |                                  ()        ()   |
+     tp-robot           |                                  []             |
+     tuxpaint           | []                   [] []    [] [] []     []   |
+     unicode-han-tra... |                                                 |
+     unicode-transla... |                                                 |
+     util-linux         |                      [] []    [] []             |
+     vorbis-tools       |             []          []    []           []   |
+     wastesedge         |                                  ()             |
+     wdiff              |                      []       [] []        []   |
+     wget               |                []    []       [] [] []     []   |
+     xchat              |                      []          [] []     []   |
+     xkeyboard-config   |                                                 |
+     xpad               |                                                 |
+                        +-------------------------------------------------+
+                          af am ar az be bg bs ca cs cy da de el en en_GB
+                          10  0  0  2  7  4  0 41 43  3 52 90 20  1  15
+
+                          eo es et eu fa fi fr  ga gl he hr hu id is it
+                        +-----------------------------------------------+
+     GNUnet             |                                               |
+     a2ps               |       []       [] []                       () |
+     aegis              |                                               |
+     ant-phone          |                   []                          |
+     anubis             |                   []                          |
+     ap-utils           |                   []                          |
+     aspell             |                   []  []                      |
+     bash               | [] []             []              []          |
+     batchelor          |                   []  []                      |
+     bfd                |    []                                         |
+     bibshelf           |    []                 []                   [] |
+     binutils           |    []             []                          |
+     bison              |    [] []          []  []             []    [] |
+     bluez-pin          | []             [] []  []          [] []       |
+     clisp              |    []             []                          |
+     console-tools      |                                               |
+     coreutils          |    [] []       [] []  []                      |
+     cpio               |    []             []                          |
+     cpplib             |    []             []                          |
+     darkstat           |    []             ()  []          [] []       |
+     dialog             |    [] [] []    [] []  []          []       [] |
+     diffutils          | [] []          [] []  [] [] []    [] []    [] |
+     doodle             |                       []                   [] |
+     e2fsprogs          |    []             []                       [] |
+     enscript           |                   []           []             |
+     error              |    []          [] []  []          []          |
+     fetchmail          |    []                                         |
+     fileutils          |    [] []          []  []          []       [] |
+     findutils          |    [] []          []  []                   [] |
+     flex               |    []             []  []                      |
+     fslint             |                   []                          |
+     gas                |    []             []                          |
+     gawk               |    []             []  []    []                |
+     gbiff              |                   []                          |
+     gcal               |    []             []                          |
+     gcc                |    []                                         |
+     gettext-examples   |    []             []  []                   [] |
+     gettext-runtime    |    []          [] []  []             []    [] |
+     gettext-tools      |    []             []                       [] |
+     gimp-print         |    []             []                          |
+     gip                |    []    []       []                          |
+     gliv               |                   ()                          |
+     glunarclock        |                []     []          []          |
+     gmult              |          []       []                       [] |
+     gnubiff            |                   ()                       () |
+     gnucash            |    []                             ()       [] |
+     gnucash-glossary   |    []                                      [] |
+     gpe-aerial         |    []             []                          |
+     gpe-beam           |    []             []                          |
+     gpe-calendar       |    []             []              [] []       |
+     gpe-clock          |    []          [] []                          |
+     gpe-conf           |                   []                          |
+     gpe-contacts       |                   []                          |
+     gpe-edit           |                   []                 []       |
+     gpe-go             |    []             []                          |
+     gpe-login          |    []             []              []          |
+     gpe-ownerinfo      |    []          [] []              [] []       |
+     gpe-sketchbook     |    []             []                          |
+     gpe-su             |    []          [] []                          |
+     gpe-taskmanager    |    []          [] []                          |
+     gpe-timesheet      |    []             []  []             []       |
+     gpe-today          |    []          [] []  []                      |
+     gpe-todo           |    []             []                 []       |
+     gphoto2            |    []          [] []              []       [] |
+     gprof              |    []             []                 []       |
+     gpsdrive           |    ()             ()              []       () |
+     gramadoir          |                   []  []                      |
+     grep               |    [] [] []    [] []  [] [] [] [] [] []    [] |
+     gretl              |    []             []                       [] |
+     gsasl              |          []       []  []                      |
+     gss                |                   []                          |
+     gst-plugins        |                   []              []       [] |
+     gstreamer          |                                            [] |
+     gtick              |          []    [] []  []                   [] |
+     gtkspell           | [] []    []       []  []                   [] |
+     hello              | [] [] [] [] [] [] []  [] [] [] [] [] []    [] |
+     id-utils           |                   []              [] []    [] |
+     impost             |                   []  []                      |
+     indent             | [] [] [] []    [] []  [] []       [] []    [] |
+     iso_3166           | []             [] []                          |
+     iso_3166_1         |    []    []    [] []  []          [] []       |
+     iso_3166_2         |                   []                          |
+     iso_3166_3         |                   []                          |
+     iso_4217           |       []       []        []                   |
+     iso_639            | []          [] [] []                          |
+     jpilot             |    []             []                          |
+     jtag               |                   []                          |
+     jwhois             |    []             []              [] []    [] |
+     kbd                |    []             []                          |
+     latrine            |                   []  []                   [] |
+     ld                 |    []             []                          |
+     libc               |    []          [] []     []       []          |
+     libextractor       |                                               |
+     libgpewidget       |    []             []  []          [] []       |
+     libgsasl           |                   []  []                      |
+     libiconv           | [] [] []       [] []  [] []    [] [] []    [] |
+     libidn             |                   []                       [] |
+     lifelines          |                   ()                          |
+     lilypond           |                   []                          |
+     lingoteach         |                   []                 []    [] |
+     lynx               |       []                          []       [] |
+     m4                 |                   []  [] []          []       |
+     mailutils          |    []             []                          |
+     make               |    []          [] []  [] [] [] []             |
+     man-db             |    ()                                         |
+     minicom            |    []          [] []              []          |
+     mysecretdiary      |    []             []                 []       |
+     nano               |    []    []    () []                       [] |
+     nano_1_0           |    []             []     []          []    [] |
+     opcodes            |    []             []                          |
+     parted             |    []             []     []                [] |
+     psmisc             |          []                                [] |
+     ptx                | [] [] []       [] []  [] []       [] []       |
+     pwdutils           |                                               |
+     python             |                                               |
+     radius             |    []             []                          |
+     recode             | [] []             []     [] []    [] []    [] |
+     rpm                |                   []                          |
+     screem             |                                               |
+     scrollkeeper       |    []          []                 []          |
+     sed                |    [] []          []  []          []          |
+     sh-utils           |    [] []       [] []  []          []       [] |
+     shared-mime-info   | [] []    []    [] []              []          |
+     sharutils          |    [] []       [] []     []       []       [] |
+     silky              |                   []                          |
+     skencil            |    []             []                          |
+     sketch             |    []             []                          |
+     solfege            |                                            [] |
+     soundtracker       |    []             []                       [] |
+     sp                 |                   []                          |
+     stardict           |                                   []          |
+     tar                |    [] []          []  []                   [] |
+     texinfo            | []                []        []                |
+     textutils          |    []             []  [] []       []          |
+     tin                |       []          ()                          |
+     tp-robot           |                   []              []          |
+     tuxpaint           |    []          [] []  []    []    [] [] [] [] |
+     unicode-han-tra... |                                               |
+     unicode-transla... |                   []  []                      |
+     util-linux         |    [] []       [] []              []       [] |
+     vorbis-tools       |    []             []                          |
+     wastesedge         |                   ()                          |
+     wdiff              |    [] []          []  [] []       [] []    [] |
+     wget               |    [] [] []    [] []  [] []    [] []       [] |
+     xchat              |    []    []    [] []                       [] |
+     xkeyboard-config   |                                               |
+     xpad               |    []                 []          []          |
+                        +-----------------------------------------------+
+                          eo es et eu fa fi fr  ga gl he hr hu id is it
+                          13 85 21 15  2 35 115 45 17  8  6 40 27  1 45
+
+                          ja ko ku lg lt lv mk mn ms mt nb nl nn no nso
+                        +-----------------------------------------------+
+     GNUnet             |                                               |
+     a2ps               |    ()                   []       []    ()     |
+     aegis              |                                  ()           |
+     ant-phone          |                                  []           |
+     anubis             |                         []    [] []           |
+     ap-utils           |                                               |
+     aspell             |                      []          []           |
+     bash               |                                  []           |
+     batchelor          |                                  []           |
+     bfd                |                                               |
+     bibshelf           |                                               |
+     binutils           |                                               |
+     bison              |                         []    [] []           |
+     bluez-pin          |                                  []           |
+     clisp              |                                  []           |
+     console-tools      |                                               |
+     coreutils          | []                               []           |
+     cpio               |                                               |
+     cpplib             |                                               |
+     darkstat           |                         []       []           |
+     dialog             |                                  []           |
+     diffutils          | []                      []       []           |
+     doodle             |                                               |
+     e2fsprogs          |                                               |
+     enscript           |                                  []           |
+     error              |                                  []           |
+     fetchmail          | []                               []           |
+     fileutils          | []       []                                   |
+     findutils          |                                  []           |
+     flex               |    []                            []           |
+     fslint             |                                  []           |
+     gas                |                                               |
+     gawk               | []                               []           |
+     gbiff              |                                  []           |
+     gcal               |                                               |
+     gcc                |                                               |
+     gettext-examples   | []                               []           |
+     gettext-runtime    | [] []                            []           |
+     gettext-tools      | [] []                                         |
+     gimp-print         | []                               []           |
+     gip                |                                  []           |
+     gliv               |                                  []           |
+     glunarclock        |                         []       []           |
+     gmult              | []                                            |
+     gnubiff            |                                               |
+     gnucash            | ()                            () []           |
+     gnucash-glossary   |                                  []           |
+     gpe-aerial         |                                  []           |
+     gpe-beam           |                                  []           |
+     gpe-calendar       |                                  []           |
+     gpe-clock          |                                  []           |
+     gpe-conf           |                                  []           |
+     gpe-contacts       |                                               |
+     gpe-edit           |                                  []           |
+     gpe-go             |                                  []           |
+     gpe-login          |                                  []           |
+     gpe-ownerinfo      |                                  []           |
+     gpe-sketchbook     |                                  []           |
+     gpe-su             |                                  []           |
+     gpe-taskmanager    |       []                         []           |
+     gpe-timesheet      |                                  []           |
+     gpe-today          |                                  []           |
+     gpe-todo           |                                  []           |
+     gphoto2            | []                               []           |
+     gprof              |                                               |
+     gpsdrive           | ()                               ()    ()     |
+     gramadoir          |                                  ()           |
+     grep               | []                            [] []           |
+     gretl              |                                               |
+     gsasl              |                                  []           |
+     gss                |                                               |
+     gst-plugins        |                                  []           |
+     gstreamer          |                                  []           |
+     gtick              |                                  []           |
+     gtkspell           |                      []          []           |
+     hello              | [] []          []       []    [] [] [] []     |
+     id-utils           |                                  []           |
+     impost             |                                               |
+     indent             | []                               []           |
+     iso_3166           |                                  []           |
+     iso_3166_1         |                                  []    []     |
+     iso_3166_2         |                                  []           |
+     iso_3166_3         |                                  []           |
+     iso_4217           | []                   []          []           |
+     iso_639            | []                               [] []        |
+     jpilot             | ()                               ()    ()     |
+     jtag               |                                               |
+     jwhois             |                                  []           |
+     kbd                |                                  []           |
+     latrine            |                                  []           |
+     ld                 |                                               |
+     libc               | [] []                         [] []    []     |
+     libextractor       |                                               |
+     libgpewidget       |                                  []           |
+     libgsasl           |                                  []           |
+     libiconv           |                                  []           |
+     libidn             |                                               |
+     lifelines          |                                  []           |
+     lilypond           |                                  []           |
+     lingoteach         |                                  []           |
+     lynx               | []                               []           |
+     m4                 | []                               []           |
+     mailutils          |                                               |
+     make               | [] []                            []           |
+     man-db             | ()                                            |
+     minicom            | []                                            |
+     mysecretdiary      |                                  []           |
+     nano               |                         []    []              |
+     nano_1_0           |                         []    []    []        |
+     opcodes            |                                  []           |
+     parted             | []                                  []        |
+     psmisc             |                               [] []           |
+     ptx                |                               [] []    []     |
+     pwdutils           |                                               |
+     python             |                                               |
+     radius             |                                               |
+     recode             |                                  []           |
+     rpm                | [] []                                         |
+     screem             | []                                            |
+     scrollkeeper       |                               [] [] []        |
+     sed                | []                               []           |
+     sh-utils           | []                            []              |
+     shared-mime-info   |    []                         [] [] []        |
+     sharutils          | []                               []           |
+     silky              |                                  []           |
+     skencil            |                                               |
+     sketch             |                                               |
+     solfege            |                                  []    []     |
+     soundtracker       |                                               |
+     sp                 | ()                                            |
+     stardict           |                   []             []           |
+     tar                | []                               []           |
+     texinfo            | []                            [] []           |
+     textutils          | [] []                         []              |
+     tin                |                                               |
+     tp-robot           |                                  []           |
+     tuxpaint           | [] []       []          []       [] []        |
+     unicode-han-tra... |                                               |
+     unicode-transla... |                                               |
+     util-linux         | []                               []           |
+     vorbis-tools       |                                  []           |
+     wastesedge         |                                  []           |
+     wdiff              |                         []    []              |
+     wget               | []                               []           |
+     xchat              |    []          [] []             []           |
+     xkeyboard-config   |                                  []           |
+     xpad               |                                  []           |
+                        +-----------------------------------------------+
+                          ja ko ku lg lt lv mk mn ms mt nb nl nn no nso
+                          33 11  1  1  1  2  2  3 11  0 15 96  7  5  0
+
+                          or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
+                        +-------------------------------------------------+
+     GNUnet             |                                                 |
+     a2ps               |       ()     []      [] []       []    [] []    |
+     aegis              |                      () ()                      |
+     ant-phone          |                      []                         |
+     anubis             |       []             [] []                      |
+     ap-utils           |       ()                                        |
+     aspell             |                      [] []                      |
+     bash               |              []      [] []                      |
+     batchelor          |                      []                         |
+     bfd                |                                                 |
+     bibshelf           |                                                 |
+     binutils           |                         []                []    |
+     bison              |       []     []      [] []                []    |
+     bluez-pin          |       []     []   [] [] []    []       [] []    |
+     clisp              |                         []                      |
+     console-tools      |                         []                      |
+     coreutils          |       []                []       []       []    |
+     cpio               |       []                                  []    |
+     cpplib             |                                                 |
+     darkstat           |       []     []      []       []       [] []    |
+     dialog             |       [] []  []   [] [] [] []                   |
+     diffutils          |       []     []      [] []             [] []    |
+     doodle             |                                     []          |
+     e2fsprogs          |       []                                  []    |
+     enscript           |              []      [] []                []    |
+     error              |              []      []       []                |
+     fetchmail          |       []     ()         []    []    []          |
+     fileutils          |       []             [] []       []       []    |
+     findutils          |       [] []          []       []       [] []    |
+     flex               |       []     []      [] []                []    |
+     fslint             |              []      []                []       |
+     gas                |                                                 |
+     gawk               |       []     []      []                   []    |
+     gbiff              |                      []                         |
+     gcal               |                                           []    |
+     gcc                |                                                 |
+     gettext-examples   |       []             [] []    []       [] []    |
+     gettext-runtime    |       []             [] []    [] []    [] []    |
+     gettext-tools      |       []             [] []    [] []    [] []    |
+     gimp-print         |                               []          []    |
+     gip                |                   []          []       []       |
+     gliv               |              []      []       []                |
+     glunarclock        |              []      [] []    []       [] []    |
+     gmult              |              []   [] []                []       |
+     gnubiff            |                      ()                   []    |
+     gnucash            |       () []             []    []          []    |
+     gnucash-glossary   |          []                   []          []    |
+     gpe-aerial         |          []  []      [] []             [] []    |
+     gpe-beam           |          []  []      [] []             [] []    |
+     gpe-calendar       |          []  []      [] []    []       [] []    |
+     gpe-clock          |          []  []      [] []    []       [] []    |
+     gpe-conf           |          []  []      [] []    []          []    |
+     gpe-contacts       |                      [] []                []    |
+     gpe-edit           |          []  []      [] []    []       [] []    |
+     gpe-go             |              []      [] []             [] []    |
+     gpe-login          |          []  []      [] []    []       [] []    |
+     gpe-ownerinfo      |          []  []      [] []    []       [] []    |
+     gpe-sketchbook     |          []  []      [] []    []       [] []    |
+     gpe-su             |          []  []      [] []    []       [] []    |
+     gpe-taskmanager    |          []  []      [] []    []       [] []    |
+     gpe-timesheet      |          []  []      [] []    []       [] []    |
+     gpe-today          |          []  []      [] []    []       [] []    |
+     gpe-todo           |          []  []      [] []    []       [] []    |
+     gphoto2            |                      []       []       [] []    |
+     gprof              |              []      []                   []    |
+     gpsdrive           |                      []                         |
+     gramadoir          |                               []                |
+     grep               |       [] []  []      [] []       []    []       |
+     gretl              |       []                                        |
+     gsasl              |       []             []             [] [] []    |
+     gss                |       []             []                   []    |
+     gst-plugins        | []                                  [] [] []    |
+     gstreamer          |                         []          [] [] []    |
+     gtick              |                      [] []                []    |
+     gtkspell           |              []   [] [] []    []       []       |
+     hello              |       []     []      [] []    []       [] []    |
+     id-utils           |              []      [] []                []    |
+     impost             |                                                 |
+     indent             |              []      [] []    []       [] []    |
+     iso_3166           |          []                []       [] [] []    |
+     iso_3166_1         |                               [] [] [] []       |
+     iso_3166_2         |                                                 |
+     iso_3166_3         |                      []    []          []       |
+     iso_4217           |                            []          []       |
+     iso_639            |                            []          [] []    |
+     jpilot             |                                                 |
+     jtag               |                               []                |
+     jwhois             |       []     []      [] ()                ()    |
+     kbd                |       []             []                   []    |
+     latrine            |                      []                   []    |
+     ld                 |                                           []    |
+     libc               |       []     []         []    []          []    |
+     libextractor       |                      []                         |
+     libgpewidget       |          []  []      []       []       [] []    |
+     libgsasl           |       []             []                []       |
+     libiconv           |       []     []   [] [] []    [] [] [] [] []    |
+     libidn             |       []                                  ()    |
+     lifelines          |       []                                  []    |
+     lilypond           |                                           []    |
+     lingoteach         |              []                                 |
+     lynx               |              []         []                []    |
+     m4                 |       []     []      [] []                []    |
+     mailutils          |       []             [] []                      |
+     make               |       []     []         []                []    |
+     man-db             |                      []                   []    |
+     minicom            |       []     []      [] []                      |
+     mysecretdiary      |              []      [] []                []    |
+     nano               |              []      []                   []    |
+     nano_1_0           |       []             [] []                []    |
+     opcodes            |                      []                   []    |
+     parted             |       [] []  []                           []    |
+     psmisc             |       []             []                         |
+     ptx                |       [] []  []      [] []                []    |
+     pwdutils           |       []                                        |
+     python             |                                                 |
+     radius             |       []                []                      |
+     recode             |       []     []      [] []       []       []    |
+     rpm                |       [] []             []                []    |
+     screem             |                                                 |
+     scrollkeeper       |       []             [] []    []    [] [] []    |
+     sed                |       [] []  []      [] []    []       [] []    |
+     sh-utils           |                         []       []    []       |
+     shared-mime-info   |          []  []                     [] [] []    |
+     sharutils          |                         []             [] []    |
+     silky              |                               []                |
+     skencil            |          []  []                           []    |
+     sketch             |          []  []                           []    |
+     solfege            |                                                 |
+     soundtracker       |                               []          []    |
+     sp                 |                                                 |
+     stardict           |                         []    []                |
+     tar                |       []             [] []                []    |
+     texinfo            |       []             [] []                []    |
+     textutils          |                         []       []       []    |
+     tin                |                                                 |
+     tp-robot           |                         []                      |
+     tuxpaint           |       [] []  []      []       []    [] [] []    |
+     unicode-han-tra... |                                                 |
+     unicode-transla... |                                                 |
+     util-linux         |              []         []                []    |
+     vorbis-tools       |                      [] []                      |
+     wastesedge         |                                                 |
+     wdiff              |       []     []      [] []    []          []    |
+     wget               |       [] []  []      [] []    [] []    [] []    |
+     xchat              |                         []    [] [] [] [] []    |
+     xkeyboard-config   |                                                 |
+     xpad               |                                                 |
+                        +-------------------------------------------------+
+                          or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
+                           1  0 48 30  58    6 79 71  5 45 13 12 50 86  0
+
+                          tg th tk tr uk ven vi wa xh zh_CN zh_TW zu
+                        +--------------------------------------------+
+     GNUnet             |                                            |  0
+     a2ps               |          [] []     []                      | 19
+     aegis              |                                            |  0
+     ant-phone          |          []                                |  4
+     anubis             |          []                                |  9
+     ap-utils           |             ()                             |  1
+     aspell             |             []     [] []                   | 13
+     bash               |                                            | 10
+     batchelor          |          []        []                      |  7
+     bfd                |                                            |  1
+     bibshelf           |                    []                      |  5
+     binutils           |          []                                |  6
+     bison              |          []                                | 17
+     bluez-pin          |          [] []     [] []     []            | 24
+     clisp              |                                            |  7
+     console-tools      |          []                                |  4
+     coreutils          |          []                                | 16
+     cpio               |          []        []                      |  6
+     cpplib             |          []        []                      |  7
+     darkstat           |                    []        ()    ()      | 15
+     dialog             |          [] []     []                      | 25
+     diffutils          |          []        []        []    []      | 28
+     doodle             |                    []                      |  5
+     e2fsprogs          |          []                                |  8
+     enscript           |          []                                | 12
+     error              |          []        []              []      | 16
+     fetchmail          |          []                                | 12
+     fileutils          |          []                  []    []      | 18
+     findutils          |          []        []                      | 17
+     flex               |          []        []                      | 15
+     fslint             |                    []                      |  7
+     gas                |          []                                |  3
+     gawk               |          []                                | 14
+     gbiff              |                                            |  4
+     gcal               |          []                                |  5
+     gcc                |          []                                |  3
+     gettext-examples   |          [] []     []        []            | 20
+     gettext-runtime    |          [] []     []        []    []      | 25
+     gettext-tools      |          [] []               []            | 17
+     gimp-print         |             []                             | 11
+     gip                |                    []                      |  8
+     gliv               |          []                                |  6
+     glunarclock        |                    [] []                   | 13
+     gmult              |          []        []        []            | 13
+     gnubiff            |                    []                      |  3
+     gnucash            |          ()                        []      | 10
+     gnucash-glossary   |                                    []      |  8
+     gpe-aerial         |                    []        []            | 13
+     gpe-beam           |                    []        []            | 13
+     gpe-calendar       |                    [] []     []    []      | 18
+     gpe-clock          |          []        [] []     []            | 17
+     gpe-conf           |                    []        []            | 12
+     gpe-contacts       |                    []        []            |  6
+     gpe-edit           |          []        [] []           []      | 15
+     gpe-go             |          []        []                      | 11
+     gpe-login          |          []        [] []     []    []      | 18
+     gpe-ownerinfo      |          []        []        []    []      | 19
+     gpe-sketchbook     |          []        []                      | 14
+     gpe-su             |          []        []        []            | 16
+     gpe-taskmanager    |          []        []        []            | 17
+     gpe-timesheet      |          []        []        []    []      | 17
+     gpe-today          |          []        [] []     []    []      | 19
+     gpe-todo           |                    [] []           []      | 16
+     gphoto2            |             []               []            | 17
+     gprof              |          []        []                      | 10
+     gpsdrive           |                                            |  2
+     gramadoir          |                    []                      |  6
+     grep               |          [] []     []              []      | 32
+     gretl              |                                            |  4
+     gsasl              |                    []        []            | 12
+     gss                |                    []                      |  5
+     gst-plugins        |             []     []                      | 16
+     gstreamer          |          [] []     []                      | 14
+     gtick              |                    []                      | 11
+     gtkspell           |                    [] []     []            | 20
+     hello              |          [] []     []        []            | 37
+     id-utils           |          []        []                      | 13
+     impost             |                    []                      |  3
+     indent             |          []        []        []            | 24
+     iso_3166           |       [] []        []                      | 12
+     iso_3166_1         |          []           []                   | 20
+     iso_3166_2         |                                            |  2
+     iso_3166_3         |                       []     []            |  8
+     iso_4217           |          []        []                      | 10
+     iso_639            |                    [] []                   | 12
+     jpilot             |          [] []               []            |  6
+     jtag               |                                            |  2
+     jwhois             |          []        []              []      | 12
+     kbd                |          []        []                      | 12
+     latrine            |          []        []                      |  8
+     ld                 |          []                                |  5
+     libc               |          []                  []            | 22
+     libextractor       |                                            |  1
+     libgpewidget       |                    [] []                   | 17
+     libgsasl           |                    []                      |  7
+     libiconv           |          [] []     [] []     []            | 32
+     libidn             |                    []        []            |  5
+     lifelines          |                                            |  4
+     lilypond           |          []                                |  5
+     lingoteach         |                                            |  5
+     lynx               |          [] []                             | 14
+     m4                 |                    []        []            | 17
+     mailutils          |             []                             |  7
+     make               |          []                  []            | 18
+     man-db             |                                            |  5
+     minicom            |                                            | 11
+     mysecretdiary      |          []        []                      | 12
+     nano               |                                            | 11
+     nano_1_0           |          [] []                             | 17
+     opcodes            |          []                                |  7
+     parted             |          [] []               []            | 17
+     psmisc             |                    []                      |  7
+     ptx                |          []                  []            | 23
+     pwdutils           |                                            |  1
+     python             |                                            |  0
+     radius             |             []                             |  6
+     recode             |          []        []                      | 22
+     rpm                |          [] []                             | 11
+     screem             |                                            |  1
+     scrollkeeper       |          [] []                             | 23
+     sed                |          []        []                      | 19
+     sh-utils           |          []                                | 15
+     shared-mime-info   |             []               []            | 19
+     sharutils          |          []        []              []      | 20
+     silky              |                                            |  3
+     skencil            |                                            |  6
+     sketch             |                                            |  6
+     solfege            |                                            |  4
+     soundtracker       |          []                                |  8
+     sp                 |          []                                |  3
+     stardict           |             []     []        []    []      | 10
+     tar                |          [] []                             | 13
+     texinfo            |          []                  []            | 14
+     textutils          |          []                  []    []      | 17
+     tin                |                                            |  1
+     tp-robot           |                              []    []      |  7
+     tuxpaint           |          []        [] []     []            | 34
+     unicode-han-tra... |                                            |  0
+     unicode-transla... |                                            |  2
+     util-linux         |          [] []                             | 17
+     vorbis-tools       |             []                             | 10
+     wastesedge         |                                            |  1
+     wdiff              |          []        []                      | 22
+     wget               |          [] []               []    []      | 31
+     xchat              |             []     []        []            | 22
+     xkeyboard-config   |                                            |  1
+     xpad               |                    []                      |  5
+                        +--------------------------------------------+
+       72 teams           tg th tk tr uk ven vi wa xh zh_CN zh_TW zu
+      147 domains          0  0  1 78 29  0  71 16  0  41    20    0  1711
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If April 2005 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
+matrix with full percentage details can be found at
+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
+
+1.6 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package.  Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library.  This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
+`translation@iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
diff --git a/CHANGES b/CHANGES
index a8eeb6b570a7590624f7b7d395dfc892a662cbb9..108b086003b624f36922de278bc6d6da7d12b94e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
-2009-05-19 13:45  oetiker
-
-       * branches/1.3/program/bindings/perl-piped/RRDp.pm,
-         branches/1.3/program/bindings/perl-shared/RRDs.pm,
-         branches/1.3/program/configure.ac,
-         branches/1.3/program/doc/rrdbuild.pod,
-         branches/1.3/program/rrdtool.spec,
-         branches/1.3/program/src/pngsize.c,
-         branches/1.3/program/src/rrd.h,
-         branches/1.3/program/src/rrd_cgi.c,
-         branches/1.3/program/src/rrd_create.c,
-         branches/1.3/program/src/rrd_datalang.c,
-         branches/1.3/program/src/rrd_diff.c,
-         branches/1.3/program/src/rrd_dump.c,
-         branches/1.3/program/src/rrd_error.c,
-         branches/1.3/program/src/rrd_fetch.c,
-         branches/1.3/program/src/rrd_first.c,
-         branches/1.3/program/src/rrd_format.c,
-         branches/1.3/program/src/rrd_format.h,
-         branches/1.3/program/src/rrd_gfx.c,
-         branches/1.3/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph_helper.c,
-         branches/1.3/program/src/rrd_hw.c,
-         branches/1.3/program/src/rrd_hw.h,
-         branches/1.3/program/src/rrd_i18n.h,
-         branches/1.3/program/src/rrd_info.c,
-         branches/1.3/program/src/rrd_is_thread_safe.h,
-         branches/1.3/program/src/rrd_last.c,
-         branches/1.3/program/src/rrd_lastupdate.c,
-         branches/1.3/program/src/rrd_not_thread_safe.c,
-         branches/1.3/program/src/rrd_open.c,
-         branches/1.3/program/src/rrd_resize.c,
-         branches/1.3/program/src/rrd_restore.c,
-         branches/1.3/program/src/rrd_rpncalc.c,
-         branches/1.3/program/src/rrd_rpncalc.h,
-         branches/1.3/program/src/rrd_thread_safe.c,
-         branches/1.3/program/src/rrd_thread_safe_nt.c,
-         branches/1.3/program/src/rrd_tool.c,
-         branches/1.3/program/src/rrd_tool.h,
-         branches/1.3/program/src/rrd_tune.c,
-         branches/1.3/program/src/rrd_update.c,
-         branches/1.3/program/src/rrd_version.c,
-         branches/1.3/program/src/rrd_xport.c,
-         branches/1.3/program/src/rrd_xport.h,
-         branches/1.3/program/src/rrdupdate.c: prepare for the release of
-         rrdtool-1.3.8
-
-2009-05-18 14:23  oetiker
-
-       * branches/1.3/program/bindings/python/rrdtoolmodule.c,
-         bindings/python/rrdtoolmodule.c: integrated fix for debian bug
-         #529291 as supplied by Anders Hammarquist
-
-2009-05-11 21:25  oetiker
-
-       * branches/1.3/program/configure.ac,
-         branches/1.3/program/src/rrd_getopt.c, configure.ac,
-         src/rrd_getopt.c: fix rrd_getops use of external variables (optarg
-         and friends) ... most prominently is kills a segfault when using
-         rrdtool perl bindings on solaris ... thanks to Ihsan Dogan for
-         helping with tracking this down and providing access to sparc
-         solaris boxes.
-
-2009-04-29 07:17  oetiker
-
-       * branches/1.3/website/rrdworld/index.wml,
-         branches/1.3/website/rrdworld/zerod.xml: added zerod
-
-2009-04-29 06:52  oetiker
-
-       * branches/1.3/program/CONTRIBUTORS,
-         branches/1.3/program/doc/rrdgraph_data.pod, CONTRIBUTORS,
-         doc/rrdgraph_data.pod: added some remarks on CDEF versus VDEF to
-         the docs -- Pablo Sanchez
-
-2009-04-17 09:53  oetiker
-
-       * branches/1.3/program/src/rrd_tool.c, src/rrd_tool.c: add
-         documentation for graph-render-mode
-
-2009-04-15 07:05  oetiker
-
-       * branches/1.3/program/src/rrd_restore.c, src/rrd_restore.c: fix
-         comments and error messages in rrd_restore patch
-
-2009-04-15 07:02  oetiker
-
-       * branches/1.3/program/src/rrd_restore.c, src/rrd_restore.c: Fix
-         casting issues in rrd_restore. The bug manifested when compiled on
-         sparc v9 as explained in #218. Patch based in input provided by
-         poster of #218.
-
-2009-04-14 13:55  oetiker
-
-       * branches/1.2/program/bindings/ruby/main.c,
-         branches/1.3/program/bindings/ruby/main.c, bindings/ruby/main.c:
-         make ruby bindings compile with newer ruby versions ... fix for
-         #217 patch provided by rrd trac user.
-
-2009-04-14 07:51  oetiker
-
-       * branches/1.3/program/bindings/perl-piped/RRDp.pm,
-         bindings/perl-piped/RRDp.pm: Generate an error message when using
-         RRDp with graph - this can not work reliably. (Debian Bug#251701)
-         -- Sebastian Harl
-
-2009-04-09 15:04  oetiker
-
-       * branches/1.3/program/doc/rrdtutorial.pod, doc/rrdtutorial.pod:
-         added missing newline -- by sebastian harl
-
-2009-04-07 08:40  oetiker
-
-       * branches/1.3/website/index.wml: added feed updates
-
-2009-04-07 07:31  oetiker
-
-       * branches/1.3/program/bindings/perl-piped/RRDp.pm,
-         branches/1.3/program/bindings/perl-shared/RRDs.pm,
-         branches/1.3/program/configure.ac,
-         branches/1.3/program/doc/rrdbuild.pod,
-         branches/1.3/program/rrdtool.spec,
-         branches/1.3/program/src/pngsize.c,
-         branches/1.3/program/src/rrd.h,
-         branches/1.3/program/src/rrd_cgi.c,
-         branches/1.3/program/src/rrd_create.c,
-         branches/1.3/program/src/rrd_datalang.c,
-         branches/1.3/program/src/rrd_diff.c,
-         branches/1.3/program/src/rrd_dump.c,
-         branches/1.3/program/src/rrd_error.c,
-         branches/1.3/program/src/rrd_fetch.c,
-         branches/1.3/program/src/rrd_first.c,
-         branches/1.3/program/src/rrd_format.c,
-         branches/1.3/program/src/rrd_format.h,
-         branches/1.3/program/src/rrd_gfx.c,
-         branches/1.3/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph_helper.c,
-         branches/1.3/program/src/rrd_hw.c,
-         branches/1.3/program/src/rrd_hw.h,
-         branches/1.3/program/src/rrd_i18n.h,
-         branches/1.3/program/src/rrd_info.c,
-         branches/1.3/program/src/rrd_is_thread_safe.h,
-         branches/1.3/program/src/rrd_last.c,
-         branches/1.3/program/src/rrd_lastupdate.c,
-         branches/1.3/program/src/rrd_not_thread_safe.c,
-         branches/1.3/program/src/rrd_open.c,
-         branches/1.3/program/src/rrd_resize.c,
-         branches/1.3/program/src/rrd_restore.c,
-         branches/1.3/program/src/rrd_rpncalc.c,
-         branches/1.3/program/src/rrd_rpncalc.h,
-         branches/1.3/program/src/rrd_thread_safe.c,
-         branches/1.3/program/src/rrd_thread_safe_nt.c,
-         branches/1.3/program/src/rrd_tool.c,
-         branches/1.3/program/src/rrd_tool.h,
-         branches/1.3/program/src/rrd_tune.c,
-         branches/1.3/program/src/rrd_update.c,
-         branches/1.3/program/src/rrd_version.c,
-         branches/1.3/program/src/rrd_xport.c,
-         branches/1.3/program/src/rrd_xport.h,
-         branches/1.3/program/src/rrdupdate.c: prepare for the release of
-         rrdtool-1.3.7
-
-2009-04-07 07:25  oetiker
-
-       * branches/1.3/website/.htaccess,
-         branches/1.3/website/gallery/index.en.html,
-         branches/1.3/website/gallery/miszek.xml,
-         branches/1.3/website/inc/template.inc,
-         branches/1.3/website/rrdworld/index.wml,
-         branches/1.3/website/rrdworld/tacLOG_RRD.png,
-         branches/1.3/website/rrdworld/tacLOG_RRD.xml,
-         branches/1.3/website/site-sync: sync up
-
-2009-04-07 07:23  oetiker
-
-       * branches/1.3/program/doc/rrdbuild.pod: fix build docs
-
-2009-04-07 07:21  oetiker
-
-       * branches/1.3/program/m4: provide have m4 macros go here
-
-2009-04-07 07:20  oetiker
-
-       * branches/1.3/program/configure.ac: set helper directory
-
-2009-04-07 07:20  oetiker
-
-       * branches/1.3/program/src/rrd_graph.c: fix lazy fix ... syntax
-         error
-
-2009-04-07 07:19  oetiker
-
-       * branches/1.3/program/Makefile.am: update ACLOCAL flags
-
-2009-04-07 06:37  oetiker
-
-       * branches/1.3/program/doc/rrdgraph.pod,
-         branches/1.3/program/src/rrd_graph.c, NEWS, doc/rrdgraph.pod,
-         src/rrd_graph.c: fix for #213 restore old behaviour of --lazy.
-         Even in lazy mode all the data calculation elements are run. The
-         main time saving comes from the fact that the graph is not being
-         drawn and the image does not have to be compressed.
-
-2009-04-07 06:03  oetiker
-
-       * branches/1.3/program/src/rrd_dump.c, src/rrd_dump.c: make sure
-         rrd_dump outputs numbers with C locale so that . does not suddenly
-         become , this fixes #212
-
-2009-04-06 14:12  oetiker
-
-       * branches/1.3/program/src/rrd_update.c, src/rrd_update.c: printf
-         for time_t with %lli can easily cause a segfault since on many
-         platforms time_t is only 32bit ... by adding (long long) to the
-         time value this gets fixed.
-
-2009-03-21 10:44  oetiker
-
-       * branches/1.3/program/src/rrd_hw.c: removed more rrd_flush
-         instances
-
-2009-03-21 09:55  oetiker
-
-       * branches/1.3/program/src/rrd_hw.c: rrd_flush is not necessary here
-         this used to ba a call to fflush which is something different
-         anyway.
-
-2009-03-08 08:02  oetiker
-
-       * branches/1.2/program/WIN32-BUILD-TIPS.txt,
-         branches/1.2/program/bindings/Makefile.am,
-         branches/1.2/program/bindings/perl-shared/MANIFEST,
-         branches/1.2/program/bindings/perl-shared/ntmake-build,
-         branches/1.2/program/bindings/perl-shared/ntmake.PL,
-         branches/1.3/program/WIN32-BUILD-TIPS.txt,
-         branches/1.3/program/bindings/Makefile.am,
-         branches/1.3/program/bindings/perl-shared/MANIFEST,
-         branches/1.3/program/bindings/perl-shared/ntmake-build,
-         branches/1.3/program/bindings/perl-shared/ntmake.PL,
-         WIN32-BUILD-TIPS.txt, bindings/Makefile.am,
-         bindings/perl-shared/MANIFEST, bindings/perl-shared/ntmake-build,
-         bindings/perl-shared/ntmake.PL: Renaming ntmake.pl to ntmake.PL
-         (r1742) had unforseen side effects. At least on freebsd ntmake.PL
-         gets called automatically during build. This is not desired. I
-         renamed the file to ntmake-build sinc it gets called explicilty on
-         windows anyway. Reported by Kevin modified by Tobi
-
-2009-03-06 05:51  oetiker
-
-       * branches/1.3/program/src/rrd_xport.c, src/rrd_xport.c: there were
-         two lines of debug info printed by rrd_xport, messing up the xml
-         code. Fix by Alejandro Galue.
-
-2009-03-06 05:40  oetiker
-
-       * branches/1.3/program/configure.ac,
-         branches/1.3/program/src/rrd_thread_safe.c: Even though POSIX/XSI
-         requires "strerror_r" to return an "int", some systems (e.g. the
-         GNU libc) return a "char *" _and_ ignore the second argument (user
-         provided buffer). The configure script now checks for that
-         behavior using AC_FUNC_STRERROR_R. rrd_strerror() in
-         rrd_thread_safe.c has been updated to (hopefully) handle all
-         possible cases. Previously, rrd_strerror() would have returned
-         "strerror_r failed. sorry!" in mostly any cases when using glibc,
-         since "if (strerror_r())" had been used to check for errors which
-         evaluates to true if a (non-NULL) pointer was returned. Now, we,
-         at least, return the error number in case anything else fails.
-         Thanks to Alessandro Iurlano for reporting this issue after
-         spotting it in collectd <http://collectd.org>. patch by Sebastian
-         Harl
-
-2009-02-21 09:46  oetiker
-
-       * branches/1.3/website/rrdworld/index.wml,
-         branches/1.3/website/rrdworld/observer.png,
-         branches/1.3/website/rrdworld/observer.xml,
-         branches/1.3/website/rrdworld/observernms.jpg,
-         branches/1.3/website/rrdworld/observernms.xml: update observer
-         entry
-
-2009-02-21 09:43  oetiker
-
-       * branches/1.2/program/doc/bin_dec_hex.pod,
-         branches/1.2/program/doc/cdeftutorial.pod,
-         branches/1.2/program/doc/rrdgraph.pod,
-         branches/1.2/program/doc/rrdgraph_data.pod,
-         branches/1.2/program/doc/rrdgraph_examples.pod,
-         branches/1.2/program/doc/rrdgraph_graph.pod,
-         branches/1.2/program/doc/rrdgraph_rpn.pod,
-         branches/1.2/program/doc/rrdresize.pod,
-         branches/1.2/program/doc/rrdtutorial.es.pod,
-         branches/1.2/program/doc/rrdtutorial.pod,
-         branches/1.3/program/doc/bin_dec_hex.pod,
-         branches/1.3/program/doc/cdeftutorial.pod,
-         branches/1.3/program/doc/rrdgraph.pod,
-         branches/1.3/program/doc/rrdgraph_data.pod,
-         branches/1.3/program/doc/rrdgraph_examples.pod,
-         branches/1.3/program/doc/rrdgraph_graph.pod,
-         branches/1.3/program/doc/rrdgraph_rpn.pod,
-         branches/1.3/program/doc/rrdresize.pod,
-         branches/1.3/program/doc/rrdtutorial.es.pod,
-         branches/1.3/program/doc/rrdtutorial.pod, doc/bin_dec_hex.pod,
-         doc/cdeftutorial.pod, doc/rrdgraph.pod, doc/rrdgraph_data.pod,
-         doc/rrdgraph_examples.pod, doc/rrdgraph_graph.pod,
-         doc/rrdgraph_rpn.pod, doc/rrdresize.pod, doc/rrdtutorial.es.pod,
-         doc/rrdtutorial.pod: Misc documentation fixes by Alex van den
-         Bogaerdt
-
-2009-02-21 09:22  oetiker
-
-       * branches/1.3/program/doc/rrdgraph.pod,
-         branches/1.3/program/doc/rrdgraph_rpn.pod: Documentation fixes by
-         Bernhard Reutner-Fischer
-
-2009-01-26 05:59  oetiker
-
-       * branches/1.3/website/inc/design.css: fix css to not mutilate trac
-         layout
-
-2009-01-25 22:39  oetiker
-
-       * branches/1.3/program/doc/rrdgraph.pod, doc/rrdgraph.pod: added doc
-         on new graphv graph_start und graph_end info variables
-
-2009-01-25 22:02  oetiker
-
-       * branches/1.2/program/src/rrd_dump.c,
-         branches/1.2/program/src/rrd_first.c,
-         branches/1.3/program/src/rrd_dump.c,
-         branches/1.3/program/src/rrd_first.c,
-         branches/1.3/program/src/rrd_graph.c, src/rrd_dump.c,
-         src/rrd_first.c, src/rrd_graph.c: fix type conversion error (on
-         windows) unsigned/signed affecting timestamps on rrd_dump.
-
-2009-01-25 21:52  oetiker
-
-       * branches/1.2/program/bindings/Makefile.am,
-         branches/1.2/program/bindings/perl-shared/ntmake.PL,
-         branches/1.2/program/bindings/perl-shared/ntmake.pl,
-         branches/1.3/program/bindings/Makefile.am,
-         branches/1.3/program/bindings/perl-shared/ntmake.PL,
-         branches/1.3/program/bindings/perl-shared/ntmake.pl,
-         bindings/Makefile.am, bindings/perl-shared/ntmake.PL,
-         bindings/perl-shared/ntmake.pl: rename ntmake.pl to ntmake.PL so
-         that it does not get installed
-
-2009-01-25 15:49  oetiker
-
-       * branches/1.3/website/download.wml,
-         branches/1.3/website/gallery/index.wml,
-         branches/1.3/website/gallery/miszek.png,
-         branches/1.3/website/gallery/miszek.xml,
-         branches/1.3/website/index.wml,
-         branches/1.3/website/rrdworld/index.wml,
-         branches/1.3/website/rrdworld/lpar2rrd.png,
-         branches/1.3/website/rrdworld/lpar2rrd.xml,
-         branches/1.3/website/sponsor.wml: misc web updates
-
-2009-01-22 15:43  oetiker
-
-       * branches/1.3/program/src/rrd_open.c: Missed to include utime.h.
-         #207.
-
-2009-01-19 14:27  oetiker
-
-       * branches/1.3/program/bindings/perl-piped/RRDp.pm,
-         branches/1.3/program/bindings/perl-shared/RRDs.pm,
-         branches/1.3/program/configure.ac,
-         branches/1.3/program/doc/rrdbuild.pod,
-         branches/1.3/program/rrdtool-1.3-release,
-         branches/1.3/program/rrdtool.spec,
-         branches/1.3/program/src/pngsize.c,
-         branches/1.3/program/src/rrd.h,
-         branches/1.3/program/src/rrd_cgi.c,
-         branches/1.3/program/src/rrd_create.c,
-         branches/1.3/program/src/rrd_datalang.c,
-         branches/1.3/program/src/rrd_diff.c,
-         branches/1.3/program/src/rrd_dump.c,
-         branches/1.3/program/src/rrd_error.c,
-         branches/1.3/program/src/rrd_fetch.c,
-         branches/1.3/program/src/rrd_first.c,
-         branches/1.3/program/src/rrd_format.c,
-         branches/1.3/program/src/rrd_format.h,
-         branches/1.3/program/src/rrd_gfx.c,
-         branches/1.3/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph_helper.c,
-         branches/1.3/program/src/rrd_hw.c,
-         branches/1.3/program/src/rrd_hw.h,
-         branches/1.3/program/src/rrd_i18n.h,
-         branches/1.3/program/src/rrd_info.c,
-         branches/1.3/program/src/rrd_is_thread_safe.h,
-         branches/1.3/program/src/rrd_last.c,
-         branches/1.3/program/src/rrd_lastupdate.c,
-         branches/1.3/program/src/rrd_not_thread_safe.c,
-         branches/1.3/program/src/rrd_open.c,
-         branches/1.3/program/src/rrd_resize.c,
-         branches/1.3/program/src/rrd_restore.c,
-         branches/1.3/program/src/rrd_rpncalc.c,
-         branches/1.3/program/src/rrd_rpncalc.h,
-         branches/1.3/program/src/rrd_thread_safe.c,
-         branches/1.3/program/src/rrd_thread_safe_nt.c,
-         branches/1.3/program/src/rrd_tool.c,
-         branches/1.3/program/src/rrd_tool.h,
-         branches/1.3/program/src/rrd_tune.c,
-         branches/1.3/program/src/rrd_update.c,
-         branches/1.3/program/src/rrd_version.c,
-         branches/1.3/program/src/rrd_xport.c,
-         branches/1.3/program/src/rrd_xport.h,
-         branches/1.3/program/src/rrdupdate.c: prepare for the release of
-         rrdtool-1.3.6
-
-2009-01-14 08:14  oetiker
-
-       * branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: In
-         rrd_graph: the width/height values are written into
-         rrd_infoval_t's u_cnt but read out of u_int (u_long vs. int). This
-         breaks on LP64BE. Patch by Rafal Boni rafal pobox.com
-
-2009-01-09 06:14  oetiker
-
-       * branches/1.3/website/download.wml,
-         branches/1.3/website/sponsor.wml,
-         branches/1.3/website/tut/index.wml: added links
-
-2009-01-06 16:32  oetiker
-
-       * branches/1.3/program/src/rrd_resize.c, src/rrd_resize.c: with MMAP
-         enabled rrd resize GROW was broken ... this fixes it ...
-
-2009-01-06 15:45  oetiker
-
-       * branches/1.2/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: TICK with
-         negative numbers should 'start from the top of the graph' looking
-         down ... now it does.
-
-2009-01-06 14:54  oetiker
-
-       * branches/1.2/program/src/rrd_cgi.c,
-         branches/1.3/program/src/rrd_cgi.c, src/rrd_cgi.c: fix for
-         segfault in rrd_cgi: caused by freeing a invalid address when
-         printing an error message.
-
-2008-12-26 08:05  oetiker
-
-       * branches/1.3/program/configure.ac,
-         branches/1.3/program/src/rrd_graph.h, configure.ac,
-         src/rrd_graph.h: Include libgen.h to get prototype for basename in
-         a POSIX conformant way. Fix for #202.
-
-2008-12-26 08:03  oetiker
-
-       * branches/1.3/program/doc/rrdbuild.pod, doc/rrdbuild.pod:
-         improvements for build docs by Zorzoli, Pablo
-
-2008-12-22 21:23  oetiker
-
-       * branches/1.3/program/src/rrd_fetch.c, src/rrd_fetch.c: should free
-         memory after a successful fetch too ...
-
-2008-12-22 21:23  oetiker
-
-       * branches/1.3/program/bindings/perl-shared/RRDs.pm,
-         bindings/perl-shared/RRDs.pm: documentation fixes
-
-2008-12-22 10:25  oetiker
-
-       * branches/1.3/website/logos/asdasd_101x51.png: fixed size
-
-2008-12-22 07:21  oetiker
-
-       * branches/1.3/program/doc/rrdgraph.pod, doc/rrdgraph.pod: Fix for
-         POD error by Sebasian Harl
-
-2008-12-22 07:20  oetiker
-
-       * branches/1.3/program/doc/bin_dec_hex.pod,
-         branches/1.3/program/doc/rpntutorial.pod,
-         branches/1.3/program/doc/rrdbuild.pod,
-         branches/1.3/program/doc/rrdcgi.pod,
-         branches/1.3/program/doc/rrdgraph-old.pod,
-         branches/1.3/program/doc/rrdgraph.pod,
-         branches/1.3/program/doc/rrdgraph_data.pod,
-         branches/1.3/program/doc/rrdgraph_examples.pod,
-         branches/1.3/program/doc/rrdgraph_graph.pod,
-         branches/1.3/program/doc/rrdtool.pod,
-         branches/1.3/program/doc/rrdtutorial.pod, doc/bin_dec_hex.pod,
-         doc/rpntutorial.pod, doc/rrdbuild.pod, doc/rrdcgi.pod,
-         doc/rrdgraph-old.pod, doc/rrdgraph.pod, doc/rrdgraph_data.pod,
-         doc/rrdgraph_examples.pod, doc/rrdgraph_graph.pod,
-         doc/rrdgraph_libdbi.pod, doc/rrdtool.pod, doc/rrdtutorial.pod:
-         Fixes some typos by Sebastian Harl.
-
-2008-12-19 14:26  oetiker
-
-       * branches/1.3/program/src/Makefile.am,
-         branches/1.3/program/src/plbasename.c,
-         branches/1.3/program/src/plbasename.h,
-         branches/1.3/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_update.c,
-         branches/1.3/program/win32/rrdlib.vcproj, src/Makefile.am,
-         src/plbasename.c, src/plbasename.h, src/rrd_graph.c,
-         src/rrd_update.c, win32/rrdlib.vcproj: win32 fixes by Stefan .
-         Ludewig . exitgames . com * added portable plbasename since
-         basename is not available on stock win32 * rrd_update was using %d
-         to show a timestamp ... %lli is better since it also will show
-         64bit time_t correctly.
-
-2008-12-18 23:56  oetiker
-
-       * branches/1.3/program/Makefile.am, Makefile.am: fix extra dist to
-         include missing win32 files
-
-2008-12-18 07:34  oetiker
-
-       * branches/1.3/website/index.wml,
-         branches/1.3/website/logos/hitmeister.gif,
-         branches/1.3/website/sponsor.wml: added hitmeister sponsor
-
-2008-12-16 08:04  oetiker
-
-       * branches/1.3/website/inc/trac.css: special css for trac
-
-2008-12-15 22:06  oetiker
-
-       * branches/1.3/program/bindings/perl-piped/RRDp.pm,
-         branches/1.3/program/bindings/perl-shared/RRDs.pm,
-         branches/1.3/program/configure.ac,
-         branches/1.3/program/doc/rrdbuild.pod,
-         branches/1.3/program/rrdtool.spec,
-         branches/1.3/program/src/pngsize.c,
-         branches/1.3/program/src/rrd.h,
-         branches/1.3/program/src/rrd_cgi.c,
-         branches/1.3/program/src/rrd_create.c,
-         branches/1.3/program/src/rrd_datalang.c,
-         branches/1.3/program/src/rrd_diff.c,
-         branches/1.3/program/src/rrd_dump.c,
-         branches/1.3/program/src/rrd_error.c,
-         branches/1.3/program/src/rrd_fetch.c,
-         branches/1.3/program/src/rrd_first.c,
-         branches/1.3/program/src/rrd_format.c,
-         branches/1.3/program/src/rrd_format.h,
-         branches/1.3/program/src/rrd_gfx.c,
-         branches/1.3/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph_helper.c,
-         branches/1.3/program/src/rrd_hw.c,
-         branches/1.3/program/src/rrd_hw.h,
-         branches/1.3/program/src/rrd_i18n.h,
-         branches/1.3/program/src/rrd_info.c,
-         branches/1.3/program/src/rrd_is_thread_safe.h,
-         branches/1.3/program/src/rrd_last.c,
-         branches/1.3/program/src/rrd_lastupdate.c,
-         branches/1.3/program/src/rrd_not_thread_safe.c,
-         branches/1.3/program/src/rrd_open.c,
-         branches/1.3/program/src/rrd_resize.c,
-         branches/1.3/program/src/rrd_restore.c,
-         branches/1.3/program/src/rrd_rpncalc.c,
-         branches/1.3/program/src/rrd_rpncalc.h,
-         branches/1.3/program/src/rrd_thread_safe.c,
-         branches/1.3/program/src/rrd_thread_safe_nt.c,
-         branches/1.3/program/src/rrd_tool.c,
-         branches/1.3/program/src/rrd_tool.h,
-         branches/1.3/program/src/rrd_tune.c,
-         branches/1.3/program/src/rrd_update.c,
-         branches/1.3/program/src/rrd_version.c,
-         branches/1.3/program/src/rrd_xport.c,
-         branches/1.3/program/src/rrd_xport.h,
-         branches/1.3/program/src/rrdupdate.c: prepare for the release of
-         rrdtool-1.3.5
-
-2008-12-11 14:31  oetiker
-
-       * branches/1.2/program/src/rrd_fetch.c,
-         branches/1.3/program/src/rrd_fetch.c, src/rrd_fetch.c: fixed
-         another seek issue ...
-
-2008-12-11 10:01  oetiker
-
-       * branches/1.2/program/rrdtool.spec,
-         branches/1.3/program/rrdtool.spec, rrdtool.spec: The spec file for
-         building the rrdtool as an RPM that comes with the release is not
-         "friendly" to older versions of RHEL and derivatives. -- Martin
-         Sperl <rrdtool@martin.sperl.org>
-
-2008-12-10 13:18  oetiker
-
-       * branches/1.3/program/src/rrd_restore.c, src/rrd_restore.c: On some
-         architectures, strtod does not turn "NaN" into 'Not A Number
-         (NAN)' se we better provide our own code here.
-
-2008-12-10 13:16  oetiker
-
-       * branches/1.3/website/sponsor.wml: integrated new sponsors on
-         website
-
-2008-12-09 18:30  oetiker
-
-       * branches/1.3/program/doc/rrdgraph.pod,
-         branches/1.3/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph.h,
-         branches/1.3/program/src/rrd_tool.c, doc/rrdgraph.pod,
-         src/rrd_graph.c, src/rrd_graph.h, src/rrd_tool.c: * forward ported
-         right axis patch from 1.2 branche * fixed --full-size-mode sizing
-         issue when used in combination with --title the work in the axis
-         patch has been sponsored by VoltWerk.
-
-2008-12-08 16:07  oetiker
-
-       * branches/1.3/program/bindings/ruby/main.c,
-         branches/1.3/program/bindings/ruby/test.rb, bindings/ruby/main.c,
-         bindings/ruby/test.rb: Fix for last method in ruby bindings --
-         Hiroyuki Ikezoe
-
-2008-12-05 15:39  oetiker
-
-       * branches/1.3/program/bindings/perl-shared/Makefile.PL,
-         bindings/perl-shared/Makefile.PL: integrate osx build hints as
-         indicated in #192
-
-2008-12-05 15:25  oetiker
-
-       * branches/1.3/program/src/rrd_open.c: accidentely removed #endif
-         restored
-
-2008-12-05 15:18  oetiker
-
-       * branches/1.3/program/acinclude.m4,
-         branches/1.3/program/configure.ac,
-         branches/1.3/program/src/rrd_open.c, acinclude.m4, configure.ac,
-         src/rrd_open.c: check for broken implementations of msync /
-         MS_ASYNC where the mtime does not get updated. warn and explicitly
-         call utime in rrd_open when a file is opened rw.
-
-2008-12-04 16:01  oetiker
-
-       * branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: Legends
-         should NOT be placed in reverse order when using --full-size-mode
-         ... this fixed #198.
-
-2008-12-04 09:03  oetiker
-
-       * branches/1.2/program/src/rrd_graph_helper.c,
-         branches/1.3/program/src/rrd_graph_helper.c,
-         src/rrd_graph_helper.c: Catch CDEF:tot= and raise and error to fix
-         #199. Thanks to Jeron Massar for reporting this.
-
-2008-12-04 07:02  oetiker
-
-       * branches/1.3/program/CONTRIBUTORS,
-         branches/1.3/program/WIN32-BUILD-TIPS.txt,
-         branches/1.3/program/src/rrd_tool.c,
-         branches/1.3/program/win32/rrd.sln,
-         branches/1.3/program/win32/rrdtool.vcproj, CONTRIBUTORS,
-         WIN32-BUILD-TIPS.txt, src/rrd_tool.c, win32/rrd.sln,
-         win32/rrdtool.vcproj: Update to WIN32-BUILD-TIPS.txt and VC
-         project files so that the rrdtool.exe can be built too. -- Stefan
-         Ludewig Stefan.Ludewig exitgames.com
+------------------------------------------------------------------------
+r1857 | oetiker | 2009-06-08 07:12:26 +0200 | 2 lines
 
-2008-12-03 11:08  oetiker
+make config.h a symlink to rrd_config.h so that intl/Makefile is happy
 
-       * branches/1.2/program/src/rrd_fetch.c,
-         branches/1.3/program/src/rrd_fetch.c, src/rrd_fetch.c: When
-         fetching data from 'past' an rra, rrd_fetch was seeking past the
-         rrd file. This did cause seek errors in some setups. Fixed. Thanks
-         to Daniel Pocock for finding the problem.
+------------------------------------------------------------------------
+r1856 | oetiker | 2009-06-08 06:56:56 +0200 | 4 lines
 
-2008-12-03 10:46  oetiker
+Relax automake requirements and make 1.11 features optional -- kevin brintnall
 
-       * branches/1.3/website/sponsor.wml: extra sponsors
 
-2008-12-03 10:42  oetiker
 
-       * branches/1.3/program/CONTRIBUTORS: added extra contributor
+------------------------------------------------------------------------
+r1855 | oetiker | 2009-06-07 22:48:39 +0200 | 2 lines
 
-2008-12-02 22:04  oetiker
+fix some missing rrd_flushcached instances -- kevin
 
-       * branches/1.3/program/Makefile.am, branches/1.3/program/src/rrd.h,
-         branches/1.3/program/src/rrd_create.c,
-         branches/1.3/program/src/rrd_diff.c,
-         branches/1.3/program/src/rrd_dump.c,
-         branches/1.3/program/src/rrd_error.c,
-         branches/1.3/program/src/rrd_fetch.c,
-         branches/1.3/program/src/rrd_first.c,
-         branches/1.3/program/src/rrd_format.c,
-         branches/1.3/program/src/rrd_getopt.c,
-         branches/1.3/program/src/rrd_getopt.h,
-         branches/1.3/program/src/rrd_getopt1.c,
-         branches/1.3/program/src/rrd_gfx.c,
-         branches/1.3/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph.h,
-         branches/1.3/program/src/rrd_hw.c,
-         branches/1.3/program/src/rrd_hw_math.c,
-         branches/1.3/program/src/rrd_hw_update.c,
-         branches/1.3/program/src/rrd_info.c,
-         branches/1.3/program/src/rrd_lastupdate.c,
-         branches/1.3/program/src/rrd_open.c,
-         branches/1.3/program/src/rrd_parsetime.c,
-         branches/1.3/program/src/rrd_resize.c,
-         branches/1.3/program/src/rrd_restore.c,
-         branches/1.3/program/src/rrd_rpncalc.c,
-         branches/1.3/program/src/rrd_thread_safe_nt.c,
-         branches/1.3/program/src/rrd_tune.c,
-         branches/1.3/program/src/rrd_update.c,
-         branches/1.3/program/src/rrd_xport.c,
-         branches/1.3/program/win32/config.h,
-         branches/1.3/program/win32/rrdlib.vcproj: make rrdtool compile on
-         windows with cv++. check out win32/rrdlib.vcproj. --
-         Christof.Wegmann with exitgames.com
+------------------------------------------------------------------------
+r1854 | oetiker | 2009-06-07 16:46:21 +0200 | 2 lines
 
-2008-12-02 12:35  oetiker
+switch to the rrd_flushcached interface
 
-       * branches/1.2/program/doc/rrdbuild.pod,
-         branches/1.3/program/doc/rrdbuild.pod, doc/rrdbuild.pod: fixed
-         solaris build instructions
+------------------------------------------------------------------------
+r1853 | oetiker | 2009-06-07 16:45:55 +0200 | 2 lines
 
-2008-11-18 08:42  oetiker
+consider fgets return value
 
-       * branches/1.3/website/rrdworld/index.wml: fixed myysqlbind
+------------------------------------------------------------------------
+r1852 | oetiker | 2009-06-07 16:33:06 +0200 | 2 lines
 
-2008-11-17 16:35  oetiker
+do not try to mess with autopoints files
 
-       * branches/1.3/website/download.wml: addedsolaris download
+------------------------------------------------------------------------
+r1851 | oetiker | 2009-06-07 16:27:52 +0200 | 2 lines
 
-2008-11-17 15:25  oetiker
+check return value from write
 
-       * branches/1.3/website/download.wml, branches/1.3/website/index.wml,
-         branches/1.3/website/rrdworld/index.wml,
-         branches/1.3/website/rrdworld/nhawk_description.xml,
-         branches/1.3/website/rrdworld/nhawk_icon.png: monir upates
+------------------------------------------------------------------------
+r1850 | oetiker | 2009-06-07 16:19:04 +0200 | 2 lines
 
-2008-11-09 19:19  oetiker
+check return values of dup and ftruncate
 
-       * branches/1.3/program/configure.ac, configure.ac: be even more
-         liberal with NOT using isfinite on solaris2.8
+------------------------------------------------------------------------
+r1849 | oetiker | 2009-06-07 16:12:28 +0200 | 2 lines
 
-2008-11-09 00:00  oetiker
+fix some warnings
 
-       * branches/1.2/program/src/rrd_graph.c,
-         branches/1.2/program/src/rrd_graph.h,
-         branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: use
-         basename to determine filename for imginfo as suggested by
-         sebastian
-
-2008-11-07 22:46  oetiker
-
-       * branches/1.2/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: fixed
-         --font TITLE:12: problem -- tobi
-
-2008-11-07 13:36  oetiker
-
-       * branches/1.3/program/rrdtool.spec: added librrd.pc to spec file as
-         requested byu Bernard Li
-
-2008-10-30 14:32  oetiker
-
-       * branches/1.3/program/doc/cdeftutorial.pod: fix from alex
-
-2008-10-28 08:47  oetiker
-
-       * branches/1.3/website/rrdtool-dump.xsd: added xsd for rrdtoool
-
-2008-10-27 18:40  oetiker
-
-       * branches/1.3/website/gallery/charles.png,
-         branches/1.3/website/gallery/charles.xml,
-         branches/1.3/website/gallery/index.en.html,
-         branches/1.3/website/gallery/index.wml,
-         branches/1.3/website/index.wml,
-         branches/1.3/website/logos/digicomp.gif,
-         branches/1.3/website/rrdworld/index.wml,
-         branches/1.3/website/rrdworld/yacketystats.xml,
-         branches/1.3/website/sponsor.wml: misc updates
-
-2008-10-27 05:35  oetiker
-
-       * branches/1.3/program/configure.ac: missed checkin for librrd.sym
-         fix
-
-2008-10-26 15:16  oetiker
-
-       * branches/1.3/program/src/Makefile.am,
-         branches/1.3/program/src/librrd.sym.in,
-         branches/1.3/program/src/librrd.sym.in.in: fix for osx porability
-         ... the # in librrd.sym did not work well there
-
-2008-10-24 06:20  oetiker
-
-       * branches/1.2/program/doc/rrdpython.pod,
-         branches/1.3/program/doc/rrdpython.pod, doc/rrdpython.pod: fixed
-         typo ... GAUGE not GUAGE
-
-2008-10-17 05:44  oetiker
-
-       * branches/1.3/program/src/rrd_graph.c, src/rrd_graph.c: use double
-         for legend positioning to fight wiggle
-
-2008-10-16 21:32  oetiker
-
-       * branches/1.3/program/doc/rrdbuild.pod: fix version numbers
+------------------------------------------------------------------------
+r1848 | oetiker | 2009-06-07 15:57:17 +0200 | 2 lines
 
-2008-10-15 22:34  oetiker
+added a copy to svn since it is changed from the original
 
-       * branches/1.3/program/doc/rrdbuild.pod: improved docu
+------------------------------------------------------------------------
+r1847 | oetiker | 2009-06-07 15:53:10 +0200 | 2 lines
 
-2008-10-07 15:38  oetiker
+changed from original version, so include it ... 
 
-       * branches/1.3/program/src/rrd_open.c: Daniel Pocock reported that
-         the argument may be NULL in low-diskspace situations, so check for
-         that here to prevent a segmentation fault. -- Florian Forster
+------------------------------------------------------------------------
+r1846 | oetiker | 2009-06-07 15:42:39 +0200 | 2 lines
 
-2008-10-04 16:04  oetiker
+include libtool with the distro
 
-       * branches/1.3/program/bindings/perl-piped/RRDp.pm,
-         branches/1.3/program/bindings/perl-shared/RRDs.pm,
-         branches/1.3/program/configure.ac,
-         branches/1.3/program/doc/rrdbuild.pod,
-         branches/1.3/program/rrdtool.spec,
-         branches/1.3/program/src/Makefile.am,
-         branches/1.3/program/src/librrd.pc.in,
-         branches/1.3/program/src/pngsize.c,
-         branches/1.3/program/src/rrd.h,
-         branches/1.3/program/src/rrd_cgi.c,
-         branches/1.3/program/src/rrd_create.c,
-         branches/1.3/program/src/rrd_datalang.c,
-         branches/1.3/program/src/rrd_diff.c,
-         branches/1.3/program/src/rrd_dump.c,
-         branches/1.3/program/src/rrd_error.c,
-         branches/1.3/program/src/rrd_fetch.c,
-         branches/1.3/program/src/rrd_first.c,
-         branches/1.3/program/src/rrd_format.c,
-         branches/1.3/program/src/rrd_format.h,
-         branches/1.3/program/src/rrd_gfx.c,
-         branches/1.3/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph_helper.c,
-         branches/1.3/program/src/rrd_hw.c,
-         branches/1.3/program/src/rrd_hw.h,
-         branches/1.3/program/src/rrd_i18n.h,
-         branches/1.3/program/src/rrd_info.c,
-         branches/1.3/program/src/rrd_is_thread_safe.h,
-         branches/1.3/program/src/rrd_last.c,
-         branches/1.3/program/src/rrd_lastupdate.c,
-         branches/1.3/program/src/rrd_not_thread_safe.c,
-         branches/1.3/program/src/rrd_open.c,
-         branches/1.3/program/src/rrd_resize.c,
-         branches/1.3/program/src/rrd_restore.c,
-         branches/1.3/program/src/rrd_rpncalc.c,
-         branches/1.3/program/src/rrd_rpncalc.h,
-         branches/1.3/program/src/rrd_thread_safe.c,
-         branches/1.3/program/src/rrd_thread_safe_nt.c,
-         branches/1.3/program/src/rrd_tool.c,
-         branches/1.3/program/src/rrd_tool.h,
-         branches/1.3/program/src/rrd_tune.c,
-         branches/1.3/program/src/rrd_update.c,
-         branches/1.3/program/src/rrd_version.c,
-         branches/1.3/program/src/rrd_xport.c,
-         branches/1.3/program/src/rrd_xport.h,
-         branches/1.3/program/src/rrdupdate.c: prepare for the release of
-         rrdtool-1.3.4
-
-2008-10-04 15:50  oetiker
-
-       * branches/1.3/program/configure.ac: finite broken on solaris 9 too
-         ?
-
-2008-10-04 13:34  oetiker
-
-       * branches/1.3/program/src/rrd_resize.c, src/rrd_resize.c,
-         trunk/tutorial/lisa2008/rrd-by-example/ex/hw-demo.pl: * rrd_resize
-         fixed so that it does NOT alter the original file (mmap side
-         effect) * rrd_resize can can deal with version 4 files, so let it
-
-2008-10-03 22:53  oetiker
-
-       * branches/1.3/program/src/rrd_open.c, src/rrd_open.c: The patch
-         fixs rrdtools behaviour when presented with trunkated rrd files. *
-         Make sure that we do not extend past the end of the file when
-         reading the header. * Makes sure that the data portion of the file
-         is large enough, based on the ds_cnt and the total number of RRA
-         rows -- kevin brintnall
-
-2008-09-28 19:24  oetiker
-
-       * branches/1.3/program/MakeMakefile: Attached is a patch to lower
-         the version requirements of libtool and automake. I have tested
-         this on CentOS 4.x with the specified versions of libtool and
-         automake and was able to build RRDTool fine. I did *not* test
-         building with PHP, tcl, ruby or Python though. I also abstracted
-         the version numbers of all the dependencies such that editing them
-         in the future will be easier. -- Bernard Li
-
-2008-09-28 19:15  oetiker
-
-       * branches/1.3/program/rrdtool.spec: Attached is a patch against the
-         spec file shipped with rrdtool-1.3.3.spec which will make it
-         buildable (at least it works on my CentOS 4.x system). -- Bernard
-         Li
-
-2008-09-28 15:01  oetiker
-
-       * branches/1.2/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_tool.c, src/rrd_graph.c,
-         src/rrd_tool.c: vdef calc was using end_orig to determine for
-         which range it should do its calculations which is odd, since orig
-         is only the requested range as invocation time and not the data
-         range deliverd by fetch. It does fall completely flat when
-         shifting since shifting does not affect the original data. Bug
-         #177 reported by hokiel
-
-2008-09-27 11:44  oetiker
-
-       * branches/1.2/program/src/rrd_xport.c,
-         branches/1.3/program/src/rrd_xport.c, src/rrd_xport.c: rrdxport
-         was completely broken for exporting datasources that did not have
-         a uniform step size. Thanks to Peter Valdemar Mørch for finding
-         this.
-
-2008-09-23 07:57  oetiker
-
-       * branches/1.3/website/gallery/index.en.html,
-         branches/1.3/website/gallery/index.wml,
-         branches/1.3/website/gallery/pings.png,
-         branches/1.3/website/gallery/pings.xml: fixed ping image
-
-2008-09-22 06:34  oetiker
-
-       * branches/1.3/program/MakeMakefile,
-         branches/1.3/program/configure.ac: fixed destdir for default
-         install of language bindings and removed sepp preference
-
-2008-09-22 05:38  oetiker
-
-       * branches/1.2/program/configure.ac,
-         branches/1.3/program/configure.ac, configure.ac: use default
-         prefix for ruby install if no user defined prefix is available
-
-2008-09-22 05:37  oetiker
-
-       * branches/1.3/website/index.wml: fix layout
-
-2008-09-19 20:34  oetiker
-
-       * branches/1.3/program/bindings/perl-shared/Makefile.PL,
-         bindings/perl-shared/Makefile.PL: Bsd lirary path switch added to
-         perl bindings makefile -- as suggested by Kevin Brintnall
-
-2008-09-18 13:30  oetiker
-
-       * branches/1.3/program/src/rrd_open.c, src/rrd_open.c: Fix for
-         debian bug 498183 ... never *advise after the end of the file. On
-         sparc this causes a segfault. Thanks to Sebastian Harl and Jurij
-         Smakov for finding this.
-
-2008-09-14 20:33  oetiker
-
-       * branches/1.3/program/src/rrd_config_bottom.h: added missing bottom
-         config
-
-2008-09-14 20:32  oetiker
-
-       * branches/1.3/program/bindings/perl-piped/RRDp.pm,
-         branches/1.3/program/bindings/perl-shared/RRDs.pm,
-         branches/1.3/program/configure.ac,
-         branches/1.3/program/doc/rrdbuild.pod,
-         branches/1.3/program/rrdtool.spec,
-         branches/1.3/program/src/pngsize.c,
-         branches/1.3/program/src/rrd.h,
-         branches/1.3/program/src/rrd_cgi.c,
-         branches/1.3/program/src/rrd_create.c,
-         branches/1.3/program/src/rrd_datalang.c,
-         branches/1.3/program/src/rrd_diff.c,
-         branches/1.3/program/src/rrd_dump.c,
-         branches/1.3/program/src/rrd_error.c,
-         branches/1.3/program/src/rrd_fetch.c,
-         branches/1.3/program/src/rrd_first.c,
-         branches/1.3/program/src/rrd_format.c,
-         branches/1.3/program/src/rrd_format.h,
-         branches/1.3/program/src/rrd_gfx.c,
-         branches/1.3/program/src/rrd_graph.c,
-         branches/1.3/program/src/rrd_graph_helper.c,
-         branches/1.3/program/src/rrd_hw.c,
-         branches/1.3/program/src/rrd_hw.h,
-         branches/1.3/program/src/rrd_i18n.h,
-         branches/1.3/program/src/rrd_info.c,
-         branches/1.3/program/src/rrd_is_thread_safe.h,
-         branches/1.3/program/src/rrd_last.c,
-         branches/1.3/program/src/rrd_lastupdate.c,
-         branches/1.3/program/src/rrd_not_thread_safe.c,
-         branches/1.3/program/src/rrd_open.c,
-         branches/1.3/program/src/rrd_resize.c,
-         branches/1.3/program/src/rrd_restore.c,
-         branches/1.3/program/src/rrd_rpncalc.c,
-         branches/1.3/program/src/rrd_rpncalc.h,
-         branches/1.3/program/src/rrd_thread_safe.c,
-         branches/1.3/program/src/rrd_thread_safe_nt.c,
-         branches/1.3/program/src/rrd_tool.c,
-         branches/1.3/program/src/rrd_tool.h,
-         branches/1.3/program/src/rrd_tune.c,
-         branches/1.3/program/src/rrd_update.c,
-         branches/1.3/program/src/rrd_version.c,
-         branches/1.3/program/src/rrd_xport.c,
-         branches/1.3/program/src/rrd_xport.h,
-         branches/1.3/program/src/rrdupdate.c: prepare for the release of
-         rrdtool-1.3.3
-
-2008-09-14 20:31  oetiker
-
-       * branches/1.3/program/rrdtool-1.3-release: fix release script for
-         1.3 branche
-
-2008-09-14 00:42  oetiker
-
-       * branches/1.3/program/configure.ac,
-         branches/1.3/program/doc/rrdgraph.pod,
-         branches/1.3/program/src/Makefile.am,
-         branches/1.3/program/src/rrd_format.h,
-         branches/1.3/program/src/rrd_graph.c: resync with trunk since
-         these are fixes
-
-2008-09-08 22:14  oetiker
-
-       * branches/1.3/website/navbar.inc: added forum
-
-2008-09-08 22:14  oetiker
-
-       * branches/1.3/website/award-white.png,
-         branches/1.3/website/bin/pod2wml.classic.sh,
-         branches/1.3/website/forum.wml,
-         branches/1.3/website/gallery/index.en.html,
-         branches/1.3/website/inc/favicon.ico,
-         branches/1.3/website/inc/happy-tobi.png,
-         branches/1.3/website/inc/rrdtool-gold.png,
-         branches/1.3/website/inc/template.inc,
-         branches/1.3/website/oscon-120x60.gif,
-         branches/1.3/website/stream-pop.png: added more bits
-
-2008-09-08 22:08  oetiker
-
-       * branches/1.3/website/.wmkrc, branches/1.3/website/.wmlrc: they
-         should be in svn I guess
-
-2008-09-08 22:04  oetiker
-
-       * branches/1.3/website/download.wml,
-         branches/1.3/website/inc/template.inc: clean up mirror list
-
-2008-09-07 10:23  oetiker
-
-       * branches/1.3/program: branching for 1.3
-
-2008-09-07 10:22  oetiker
-
-       * branches/1.3/website: branche website
-
-2008-09-07 10:21  oetiker
-
-       * branches/1.3: prepare for branching
+------------------------------------------------------------------------
+r1845 | oetiker | 2009-06-07 13:36:20 +0200 | 2 lines
 
+another ID tag
+
+------------------------------------------------------------------------
+r1844 | oetiker | 2009-06-07 13:35:52 +0200 | 2 lines
+
+more id tags added
+
+------------------------------------------------------------------------
+r1843 | oetiker | 2009-06-07 13:34:39 +0200 | 2 lines
+
+updated for release
+
+------------------------------------------------------------------------
+r1842 | oetiker | 2009-06-07 13:34:22 +0200 | 2 lines
+
+updated for release
+
+------------------------------------------------------------------------
+r1841 | oetiker | 2009-06-07 13:20:15 +0200 | 2 lines
+
+added $Id:$
+
+------------------------------------------------------------------------
+r1840 | oetiker | 2009-06-07 13:16:07 +0200 | 2 lines
+
+initial news
+
+------------------------------------------------------------------------
+r1839 | oetiker | 2009-06-02 15:55:40 +0200 | 2 lines
+
+Mention that negative time values should be separated by '--' in rrdupdate.pod -- Sebastian Harl
+
+------------------------------------------------------------------------
+r1837 | oetiker | 2009-06-01 16:01:51 +0200 | 2 lines
+
+Make rrdtool compile on GNU/kFreeBSD. Fix for Debian bug 494874. Patch by Petr Salinger.
+
+------------------------------------------------------------------------
+r1836 | oetiker | 2009-06-01 15:58:58 +0200 | 4 lines
+
+make negative update times work as diescribed in the documentation (-5 is NOW-5seconds)
+this takes care of debian bug 332766
+
+
+------------------------------------------------------------------------
+r1834 | oetiker | 2009-05-28 07:25:32 +0200 | 2 lines
+
+madvise hints may not be ORed since they are enumerated ... #224
+
+------------------------------------------------------------------------
+r1833 | oetiker | 2009-05-27 18:23:40 +0200 | 1 line
+
+back to 0.14.4
+------------------------------------------------------------------------
+r1830 | oetiker | 2009-05-27 18:21:15 +0200 | 2 lines
+
+get the latest gettext
+
+------------------------------------------------------------------------
+r1826 | oetiker | 2009-05-27 18:03:01 +0200 | 2 lines
+
+added gettext.h to dist
+
+------------------------------------------------------------------------
+r1825 | oetiker | 2009-05-27 17:00:04 +0200 | 2 lines
+
+added missing gettext.h
+
+------------------------------------------------------------------------
+r1824 | oetiker | 2009-05-27 16:59:47 +0200 | 2 lines
+
+we don't have any translations ... so  do not pretend
+
+------------------------------------------------------------------------
+r1823 | oetiker | 2009-05-27 16:31:31 +0200 | 2 lines
+
+reduce gettext version requirements
+
+------------------------------------------------------------------------
+r1820 | oetiker | 2009-05-27 16:14:10 +0200 | 2 lines
+
+fix path
+
+------------------------------------------------------------------------
+r1819 | oetiker | 2009-05-27 15:39:44 +0200 | 9 lines
+
+the get ready for 1.4rc patch
+
+* updated to automake 1.11 with silet build, with this warnings stand out much better in the build process.
+  use make V=1 to see all as before
+* switched from intltoolize to autopoint for gettext support
+* moved m4 bits into their own subdirectory
+
+--tobi
+
+------------------------------------------------------------------------
+r1818 | oetiker | 2009-05-27 15:11:22 +0200 | 2 lines
+
+Only include libgen.h when we have it. use pbbasename if we do not. Also fixes #223.
+
+------------------------------------------------------------------------
+r1817 | oetiker | 2009-05-26 17:25:41 +0200 | 2 lines
+
+update flush to flushcached
+
+------------------------------------------------------------------------
+r1816 | oetiker | 2009-05-26 17:24:26 +0200 | 2 lines
+
+bindings should invoke new rrd_flushcached (instead of rrd_cmd_flush) -- kevin
+
+------------------------------------------------------------------------
+r1815 | oetiker | 2009-05-26 17:20:05 +0200 | 2 lines
+
+"ulong" is not portable. must be unsigned long -- kevin
+
+------------------------------------------------------------------------
+r1814 | oetiker | 2009-05-26 10:55:50 +0200 | 2 lines
+
+update flush document name
+
+------------------------------------------------------------------------
+r1813 | oetiker | 2009-05-26 09:14:58 +0200 | 2 lines
+
+rename rrd_flush.c to rrd_flushcached.c in Makefile.am
+
+------------------------------------------------------------------------
+r1812 | oetiker | 2009-05-26 09:13:52 +0200 | 11 lines
+
+resolve the "flush inconsistency":
+
+* rrd_flush (a leftover from when rrdtool was using stream based io) is turned into a no-op
+  but still exported to preserve library compatibility.
+
+* rrd_cmd_flush (the implementation of "rrdtool flush") is renamed to rrd_flushcached
+  along with its command line invocation which is now rrdtool flushcached
+
+--tobi
+  
+
+------------------------------------------------------------------------
+r1811 | oetiker | 2009-05-26 00:23:06 +0200 | 16 lines
+
+While restoring, rrd_restore uses between 30 and 40 times as much memory as
+the size of the rrd file to be restored. This is due to the use of libxml2
+for parsing the the whole file prior to turning it into rrd structs.
+
+This patch switches rrd_restore to using the xmlTextReader interface for
+incremental consumtion of xml files. This reduces the memory requirements to
+about twice the size of the rrd file which should be quite manageable for
+most cases.
+
+The parsing is about 25% less efficient than with the original libxml2
+version of rrd_restore. This could be in part due to the more liberal use of
+malloced memory. Optimizing this is for another day though.
+
+--tobi
+
+
+------------------------------------------------------------------------
+r1809 | oetiker | 2009-05-25 08:05:55 +0200 | 2 lines
+
+only include utime.h when necessary
+
+------------------------------------------------------------------------
+r1808 | oetiker | 2009-05-24 12:31:44 +0200 | 11 lines
+
+* in 1.3: Changed types used in rrd_file_t from off_t to size_t to prevent: warning: comparison between signed and unsigned
+* Misc other off_t -> size_t changes to prevent signed warning
+* in 1.3: Added rrd_dump_opt_r declaration to prevent undef warning
+* Explicit cast to time_t of check in rrd_fetch to prevent signed warning
+* Added vasprintf path to sprintf_alloc to prevent excessive mallocing
+* in 1.3: fixed STRERROR_R_CHAR_P undef warning
+
+patch by Steven Hartland killing multiplay.co.uk
+
+
+
+------------------------------------------------------------------------
+r1806 | oetiker | 2009-05-22 16:54:21 +0200 | 2 lines
+
+reset errno right befor the call I want to test
+
+------------------------------------------------------------------------
+r1805 | oetiker | 2009-05-22 15:55:46 +0200 | 2 lines
+
+inline is something for the compiler to figure ... 
+
+------------------------------------------------------------------------
+r1804 | oetiker | 2009-05-22 13:32:21 +0200 | 2 lines
+
+fix error messages on the road to fix #222
+
+------------------------------------------------------------------------
+r1803 | oetiker | 2009-05-21 07:20:50 +0200 | 2 lines
+
+fix text organisation
+
+------------------------------------------------------------------------
+r1800 | oetiker | 2009-05-18 16:23:23 +0200 | 2 lines
+
+integrated fix for debian bug #529291 as supplied by Anders Hammarquist
+
+------------------------------------------------------------------------
+r1799 | oetiker | 2009-05-11 23:25:57 +0200 | 6 lines
+
+fix rrd_getops use of external variables (optarg and friends) ... most
+prominently is kills a segfault when using rrdtool perl bindings on
+solaris ... thanks to Ihsan Dogan for helping with tracking this down and providing
+access to sparc solaris boxes.
+
+
+------------------------------------------------------------------------
+r1797 | oetiker | 2009-04-29 08:52:25 +0200 | 2 lines
+
+added some remarks on CDEF versus VDEF to the docs -- Pablo Sanchez
+
+------------------------------------------------------------------------
+r1796 | oetiker | 2009-04-20 08:48:01 +0200 | 9 lines
+
+This patch includes utility functions to support dynamically sized arrays.
+This simplifies the code that manages some of the dynamic structures
+inside rrdcached. 
+
+A few data types have been changed to size_t.
+
+-- kevin
+
+
+------------------------------------------------------------------------
+r1795 | oetiker | 2009-04-20 08:46:47 +0200 | 3 lines
+
+introduced header_property in info output -- Daniel.Pocock barclayscapital.com
+
+
+------------------------------------------------------------------------
+r1794 | oetiker | 2009-04-17 11:53:57 +0200 | 2 lines
+
+add documentation for graph-render-mode
+
+------------------------------------------------------------------------
+r1793 | oetiker | 2009-04-15 09:05:58 +0200 | 2 lines
+
+fix comments and error messages in rrd_restore patch
+
+------------------------------------------------------------------------
+r1792 | oetiker | 2009-04-15 09:02:04 +0200 | 4 lines
+
+Fix casting issues in rrd_restore. The bug manifested when compiled on sparc v9 as explained in #218.
+Patch based in input provided by poster of #218.
+
+
+------------------------------------------------------------------------
+r1791 | oetiker | 2009-04-14 15:55:29 +0200 | 3 lines
+
+make ruby bindings compile with newer ruby versions ... fix for #217
+patch provided by rrd trac user.
+
+------------------------------------------------------------------------
+r1790 | oetiker | 2009-04-14 09:51:20 +0200 | 3 lines
+
+Generate an error message when using RRDp with graph - this can not work reliably. (Debian Bug#251701) -- Sebastian Harl
+
+
+------------------------------------------------------------------------
+r1789 | oetiker | 2009-04-14 08:10:21 +0200 | 7 lines
+
+rrd_random() is a wrapper around random() that ensures the PRNG is seeded
+exactly ONCE per process.
+
+rrd_utils.c is introduced for functions that do not have a better home. --kevin
+
+
+
+------------------------------------------------------------------------
+r1788 | oetiker | 2009-04-10 10:52:34 +0200 | 13 lines
+
+This patch consolidates several aspects of the command handling in
+rrdcached:
+
+ * all commands, help, and context information is reduced to a single data
+   structure.
+
+ * all checks for command validity (context and permission) are handled in
+   the main dispatch routine
+
+This removes duplicate help/syntax text, and long if..elseif..else chains.
+It facilitates the addition of new commands. -- kevin
+
+
+------------------------------------------------------------------------
+r1787 | oetiker | 2009-04-09 17:07:05 +0200 | 3 lines
+
+The bookkeeping of all threads is not necessary, since we cannot pthread_join() them anyway. We only need to know when the last one has exited. -- kevin
+
+
+------------------------------------------------------------------------
+r1786 | oetiker | 2009-04-09 17:05:41 +0200 | 2 lines
+
+added missing docs -- kevin
+
+------------------------------------------------------------------------
+r1785 | oetiker | 2009-04-09 17:04:27 +0200 | 2 lines
+
+added missing newline -- by sebastian harl
+
+------------------------------------------------------------------------
+r1778 | oetiker | 2009-04-07 09:23:20 +0200 | 2 lines
+
+make sure an empty m4 is in the checkout
+
+------------------------------------------------------------------------
+r1773 | oetiker | 2009-04-07 08:37:17 +0200 | 6 lines
+
+fix for #213 restore old behaviour of --lazy. Even in lazy mode all the data
+calculation elements are run. The main time saving comes from the fact that
+the graph is not being drawn and the image does not have to be compressed.
+
+
+
+------------------------------------------------------------------------
+r1772 | oetiker | 2009-04-07 08:03:49 +0200 | 2 lines
+
+make sure rrd_dump outputs numbers with C locale so that . does not suddenly become , this fixes #212
+
+------------------------------------------------------------------------
+r1771 | oetiker | 2009-04-06 16:49:03 +0200 | 3 lines
+
+I thought that it would be nice to be able to pass
+parameters to python bindings as a list (array) of strings. -- Vytautas Zdanavicius vytaszd at yahoo.com
+
+------------------------------------------------------------------------
+r1770 | oetiker | 2009-04-06 16:14:31 +0200 | 2 lines
+
+use %lld with (long long) conversion when printing time.
+
+------------------------------------------------------------------------
+r1769 | oetiker | 2009-04-06 16:12:21 +0200 | 4 lines
+
+printf for time_t with %lli can easily cause a segfault since on many platforms
+time_t is only 32bit ... by adding (long long) to the time value this gets fixed.
+
+
+------------------------------------------------------------------------
+r1768 | oetiker | 2009-04-06 16:08:16 +0200 | 2 lines
+
+lets have an error message when creating the graph fails
+
+------------------------------------------------------------------------
+r1764 | oetiker | 2009-03-21 11:45:40 +0100 | 2 lines
+
+remove excess flush calls ... 
+
+------------------------------------------------------------------------
+r1762 | oetiker | 2009-03-21 10:56:43 +0100 | 2 lines
+
+remove flush symbol
+
+------------------------------------------------------------------------
+r1760 | oetiker | 2009-03-21 10:53:30 +0100 | 5 lines
+
+the call to rrd_flush has appeared when rrd_open was fleshed out. It used to be an fflush call
+which is something entirely different than the current rrd_flush implementation with fdatasync was ... 
+
+we can safely drop this and gain performance for holt winters in the process ... -- tobi
+
+------------------------------------------------------------------------
+r1759 | oetiker | 2009-03-18 18:12:09 +0100 | 2 lines
+
+New rrd_graph functions for legend  placement control added -- Patch by Melchior Rabe rrdtool mrab.de
+
+------------------------------------------------------------------------
+r1758 | oetiker | 2009-03-08 12:12:41 +0100 | 3 lines
+
+rrd_flush.c: Provide a more useful error message.
+by Sebastian Harl
+
+------------------------------------------------------------------------
+r1757 | oetiker | 2009-03-08 09:02:38 +0100 | 6 lines
+
+Renaming ntmake.pl to ntmake.PL (r1742) had unforseen side effects. At least
+on freebsd ntmake.PL gets called automatically during build. This is not
+desired. I renamed the file to ntmake-build sinc it gets called
+explicilty on windows anyway. Reported by Kevin modified by Tobi
+
+
+------------------------------------------------------------------------
+r1756 | oetiker | 2009-03-07 11:31:51 +0100 | 4 lines
+
+This 2-patch series exposes 'flush' methods to the various language
+bindings.
+
+
+------------------------------------------------------------------------
+r1754 | oetiker | 2009-03-06 06:51:34 +0100 | 2 lines
+
+there were two lines of debug info printed by rrd_xport, messing up the xml code. Fix by Alejandro Galue.
+
+------------------------------------------------------------------------
+r1752 | oetiker | 2009-03-06 06:39:37 +0100 | 18 lines
+
+Even though POSIX/XSI requires "strerror_r" to return an "int", some systems
+(e.g. the GNU libc) return a "char *" _and_ ignore the second argument (user
+provided buffer). The configure script now checks for that behavior using
+AC_FUNC_STRERROR_R. rrd_strerror() in rrd_thread_safe.c has been updated to
+(hopefully) handle all possible cases.
+
+Previously, rrd_strerror() would have returned "strerror_r failed. sorry!" in
+mostly any cases when using glibc, since "if (strerror_r())" had been used to
+check for errors which evaluates to true if a (non-NULL) pointer was returned.
+
+Now, we, at least, return the error number in case anything else fails.
+
+Thanks to Alessandro Iurlano for reporting this issue after spotting it in
+collectd <http://collectd.org>.
+
+patch by Sebastian Harl
+
+
+------------------------------------------------------------------------
+r1751 | oetiker | 2009-03-06 06:30:08 +0100 | 2 lines
+
+Make sure we use correct sizes for vsnprintf (sizeof) and strncpy (sizeof-1). -- kevin
+
+------------------------------------------------------------------------
+r1749 | oetiker | 2009-02-21 10:43:58 +0100 | 2 lines
+
+Misc documentation fixes by Alex van den Bogaerdt
+
+------------------------------------------------------------------------
+r1748 | oetiker | 2009-02-21 10:23:04 +0100 | 2 lines
+
+Documentation fixes by  Bernhard Reutner-Fischer 
+
+------------------------------------------------------------------------
+r1745 | oetiker | 2009-01-25 23:39:34 +0100 | 2 lines
+
+added doc on new graphv graph_start und graph_end info variables
+
+------------------------------------------------------------------------
+r1744 | oetiker | 2009-01-25 23:02:57 +0100 | 2 lines
+
+fix type conversion error (on windows) unsigned/signed affecting timestamps on rrd_dump.
+
+------------------------------------------------------------------------
+r1742 | oetiker | 2009-01-25 22:52:25 +0100 | 2 lines
+
+rename ntmake.pl to ntmake.PL so that it does not get installed
+
+------------------------------------------------------------------------
+r1741 | oetiker | 2009-01-25 19:38:34 +0100 | 2 lines
+
+define cwd where we need it and not outside
+
+------------------------------------------------------------------------
+r1733 | oetiker | 2009-01-14 09:14:31 +0100 | 5 lines
+
+In rrd_graph: the width/height values are written into rrd_infoval_t's u_cnt
+but read out of u_int (u_long vs. int). This breaks on LP64BE. Patch by
+Rafal Boni rafal pobox.com
+
+
+------------------------------------------------------------------------
+r1732 | oetiker | 2009-01-14 08:22:09 +0100 | 2 lines
+
+added percentnan (VDEF PERCENT variant that ignores NAN) -- patch by Martin Sperl
+
+------------------------------------------------------------------------
+r1726 | oetiker | 2009-01-06 17:32:16 +0100 | 2 lines
+
+with MMAP enabled rrd resize GROW was broken ... this fixes it ...
+
+------------------------------------------------------------------------
+r1725 | oetiker | 2009-01-06 16:45:53 +0100 | 2 lines
+
+TICK with negative numbers should 'start from the top of the graph' looking down ... now it does.
+
+------------------------------------------------------------------------
+r1724 | oetiker | 2009-01-06 15:54:41 +0100 | 2 lines
+
+fix for segfault in rrd_cgi: caused by freeing a invalid address when printing an error message.
+
+------------------------------------------------------------------------
+r1723 | oetiker | 2008-12-26 09:05:03 +0100 | 2 lines
+
+Include libgen.h to get prototype for basename in a POSIX conformant way. Fix for #202.
+
+------------------------------------------------------------------------
+r1722 | oetiker | 2008-12-26 09:03:06 +0100 | 2 lines
+
+improvements for build docs by Zorzoli, Pablo
+
+------------------------------------------------------------------------
+r1721 | oetiker | 2008-12-22 22:23:49 +0100 | 2 lines
+
+should free memory after a successful fetch too ...
+
+------------------------------------------------------------------------
+r1720 | oetiker | 2008-12-22 22:23:04 +0100 | 2 lines
+
+documentation fixes
+
+------------------------------------------------------------------------
+r1718 | oetiker | 2008-12-22 08:21:46 +0100 | 2 lines
+
+Fix for POD error by Sebasian Harl
+
+------------------------------------------------------------------------
+r1717 | oetiker | 2008-12-22 08:20:17 +0100 | 2 lines
+
+Fixes some typos by Sebastian Harl.
+
+------------------------------------------------------------------------
+r1716 | oetiker | 2008-12-19 15:26:47 +0100 | 8 lines
+
+win32 fixes by Stefan . Ludewig . exitgames . com
+
+* added portable plbasename since basename is not available on stock win32
+* rrd_update was using %d to show a timestamp ... %lli is better
+  since it also will show 64bit time_t correctly.
+
+
+
+------------------------------------------------------------------------
+r1715 | oetiker | 2008-12-19 00:56:52 +0100 | 2 lines
+
+fix extra dist to include missing win32 files
+
+------------------------------------------------------------------------
+r1708 | oetiker | 2008-12-11 15:31:16 +0100 | 2 lines
+
+fixed another seek issue ... 
+
+------------------------------------------------------------------------
+r1707 | oetiker | 2008-12-11 11:01:33 +0100 | 5 lines
+
+The spec file for building the rrdtool as an RPM that comes with the 
+release is not "friendly" to older versions of RHEL and derivatives.
+-- Martin Sperl <rrdtool@martin.sperl.org>
+
+
+------------------------------------------------------------------------
+r1706 | oetiker | 2008-12-11 10:59:10 +0100 | 2 lines
+
+include luapod into distro
+
+------------------------------------------------------------------------
+r1705 | oetiker | 2008-12-10 14:18:10 +0100 | 4 lines
+
+On some architectures, strtod does not turn "NaN" into 'Not A Number (NAN)'
+se we better provide our own code here.
+
+
+------------------------------------------------------------------------
+r1703 | oetiker | 2008-12-10 13:42:46 +0100 | 4 lines
+
+rrdtool dump is now backward compatible with rrdtool 1.3 dump again. Default is --header=dtd and
+--no-header is an alias for --header=none
+
+
+------------------------------------------------------------------------
+r1702 | oetiker | 2008-12-10 09:29:38 +0100 | 2 lines
+
+minichange
+
+------------------------------------------------------------------------
+r1701 | oetiker | 2008-12-09 19:30:43 +0100 | 4 lines
+
+* forward ported right axis patch from 1.2 branche
+* fixed --full-size-mode sizing issue when used in combination with --title
+the work in the axis patch has been sponsored by VoltWerk.
+
+------------------------------------------------------------------------
+r1700 | oetiker | 2008-12-08 17:07:27 +0100 | 2 lines
+
+Fix for last method in ruby bindings -- Hiroyuki Ikezoe
+
+------------------------------------------------------------------------
+r1699 | oetiker | 2008-12-05 16:39:55 +0100 | 2 lines
+
+integrate osx build hints as indicated in #192
+
+------------------------------------------------------------------------
+r1697 | oetiker | 2008-12-05 16:23:45 +0100 | 2 lines
+
+deleted a bit much from rrd_open ... merged back in
+
+------------------------------------------------------------------------
+r1696 | oetiker | 2008-12-05 16:18:11 +0100 | 4 lines
+
+check for broken implementations of msync / MS_ASYNC where
+the mtime does not get updated. warn and explicitly call utime
+in rrd_open when a file is opened rw.
+
+------------------------------------------------------------------------
+r1695 | oetiker | 2008-12-05 11:23:46 +0100 | 2 lines
+
+added rrdcached examples to extra_dist to make sure they get distributed
+
+------------------------------------------------------------------------
+r1694 | oetiker | 2008-12-04 17:01:37 +0100 | 2 lines
+
+Legends should NOT be placed in reverse order when using --full-size-mode ... this fixed #198.
+
+------------------------------------------------------------------------
+r1693 | oetiker | 2008-12-04 16:49:11 +0100 | 2 lines
+
+add de-referencing to step in fetch check
+
+------------------------------------------------------------------------
+r1692 | oetiker | 2008-12-04 16:48:39 +0100 | 2 lines
+
+fix merg error with win32 port
+
+------------------------------------------------------------------------
+r1691 | oetiker | 2008-12-04 10:03:48 +0100 | 2 lines
+
+Catch CDEF:tot= and raise and error to fix #199. Thanks to Jeron Massar for reporting this.
+
+------------------------------------------------------------------------
+r1690 | oetiker | 2008-12-04 08:02:56 +0100 | 4 lines
+
+Update to WIN32-BUILD-TIPS.txt and VC project files so that the rrdtool.exe can be built too.
+-- Stefan Ludewig Stefan.Ludewig exitgames.com
+
+
+------------------------------------------------------------------------
+r1689 | oetiker | 2008-12-03 12:08:48 +0100 | 4 lines
+
+When fetching data from 'past' an rra, rrd_fetch was seeking past the rrd
+file. This did cause seek errors in some setups. Fixed. Thanks to Daniel Pocock for finding the problem.
+
+
+------------------------------------------------------------------------
+r1686 | oetiker | 2008-12-03 10:54:09 +0100 | 2 lines
+
+integrated rrdcached examples into build process
+
+------------------------------------------------------------------------
+r1685 | oetiker | 2008-12-03 09:47:56 +0100 | 2 lines
+
+add rrdcached examples -- kevin
+
+------------------------------------------------------------------------
+r1683 | oetiker | 2008-12-02 13:35:02 +0100 | 2 lines
+
+fixed solaris build instructions
+
+------------------------------------------------------------------------
+r1682 | oetiker | 2008-12-01 12:05:52 +0100 | 2 lines
+
+added libdbi doc to extradist
+
+------------------------------------------------------------------------
+r1678 | oetiker | 2008-11-20 14:04:38 +0100 | 27 lines
+
+Attached a patch for the rrd-tool LIBDBI integration with the following improvements:
+
+a) correct error handling in case of libdbi being unable to load the driver
+   was producing segmentation faults.
+
+b) better parsing of datasources
+
+   * until now timestamp fields had to be integer and had to contain a unix
+     timestamp - now you can now also use DateTime fields (you still need to
+     specify it, as the time-range needs to be defined correctly)
+
+   * data fields are now no longer limited to (var)char or DOUBLE fields -
+     FLOAT, INTEGER,... are now also supported.
+
+c) there is a bug with at least LIBDBI 0.8.1 in conjunction with mysql that
+   can result in segmentation faults when BINARY/BLOB fields are accessed -
+   rrdtool will now tell you about this fact before dying ;)
+
+d) also the value of rrdderivemaxstep only gets applied if derive has been
+   selected correctly.
+
+e) "GROUP BY timestamp" has been removed from SQL statement.
+
+f) "ORDER BY timestamp" will be added only in the case of fetching "derived" data.
+
+-- Martin Sperl
+
+------------------------------------------------------------------------
+r1677 | oetiker | 2008-11-18 18:19:17 +0100 | 5 lines
+
+win32 portability patch and win32/rrdlib.vcproj file for the source
+-- christof wegmann Christof.Wegmann with exitgames.com
+some fixes to make the result work on unix again ...
+
+
+------------------------------------------------------------------------
+r1674 | oetiker | 2008-11-18 08:14:10 +0100 | 2 lines
+
+missing , added to  help string
+
+------------------------------------------------------------------------
+r1672 | oetiker | 2008-11-17 17:21:41 +0100 | 2 lines
+
+added build instruction for libdbi docu
+
+------------------------------------------------------------------------
+r1670 | oetiker | 2008-11-16 23:24:44 +0100 | 2 lines
+
+missing pod files
+
+------------------------------------------------------------------------
+r1669 | oetiker | 2008-11-15 15:35:51 +0100 | 2 lines
+
+switch tu using AS_HELP_STRING for formatting ...
+
+------------------------------------------------------------------------
+r1668 | oetiker | 2008-11-15 15:15:38 +0100 | 3 lines
+
+fix typo in handle_request_help
+--kevin
+
+------------------------------------------------------------------------
+r1667 | oetiker | 2008-11-15 15:14:19 +0100 | 8 lines
+
+doc fixups for rrdcacehd
+
+ * documented the -p option
+ * added nbsp between option and argument
+ * layout one option per line
+
+--kevin
+
+------------------------------------------------------------------------
+r1666 | oetiker | 2008-11-11 17:36:45 +0100 | 2 lines
+
+make basename work
+
+------------------------------------------------------------------------
+r1665 | oetiker | 2008-11-11 17:36:13 +0100 | 14 lines
+
+This patch allows for multiple RRD writer threads to service the queue.
+
+Now, rrdcached can have more simultaneous I/O requests into the kernel.
+This may allow the kernel to re-order disk writes, resulting in better
+disk throughput.  In practice, throughput is increased by 2-3x.
+
+The flush (-f) timer maintenance has been moved from queue_thread_main
+into its own thread.
+
+Be more careful about when to use pthread_cond_signal vs _broadcast, since
+multiple threads may be waiting on &queue_cond.
+
+--kevin
+
+------------------------------------------------------------------------
+r1663 | oetiker | 2008-11-09 20:19:48 +0100 | 2 lines
+
+be even more liberal with NOT using isfinite on solaris2.8
+
+------------------------------------------------------------------------
+r1662 | oetiker | 2008-11-09 01:00:33 +0100 | 2 lines
+
+use basename to determine filename for imginfo as suggested by sebastian
+
+------------------------------------------------------------------------
+r1661 | oetiker | 2008-11-08 23:57:38 +0100 | 3 lines
+
+ rrdcached: move queue length decrement into remove_from_queue
+-- kevin
+
+------------------------------------------------------------------------
+r1660 | oetiker | 2008-11-08 23:57:18 +0100 | 3 lines
+
+rrdcached: examine the current queue with the "QUEUE" command
+-- kevin
+
+------------------------------------------------------------------------
+r1659 | oetiker | 2008-11-08 23:50:51 +0100 | 4 lines
+
+This helps with portability on platforms where realloc doesn't handle NULL.
+-- kevin
+
+
+------------------------------------------------------------------------
+r1658 | oetiker | 2008-11-08 19:01:33 +0100 | 3 lines
+
+document the "QUIT" command -- kevin
+
+
+------------------------------------------------------------------------
+r1657 | oetiker | 2008-11-08 19:01:01 +0100 | 4 lines
+
+rrdcached: journal_replay default failure reason, just in case
+avoids a "may be used uninitialized" warning -- kevin
+
+
+------------------------------------------------------------------------
+r1656 | oetiker | 2008-11-08 19:00:21 +0100 | 3 lines
+
+added "quit" command -- kevin
+
+
+------------------------------------------------------------------------
+r1655 | oetiker | 2008-11-08 18:57:32 +0100 | 9 lines
+
+rrdcached now frees all of its resources correctly.  This facilitates
+memory debugging.  g_tree now knows how to free the nodes when it removes
+them.
+
+Also, use g_tree_replace instead of g_tree_insert.  This fixes a bug
+triggered when the same file was simultaneously inserted by two clients.
+
+--kevin
+
+------------------------------------------------------------------------
+r1654 | oetiker | 2008-11-08 18:56:48 +0100 | 2 lines
+
+do not quit when libdbi is missing
+
+------------------------------------------------------------------------
+r1653 | oetiker | 2008-11-07 23:46:40 +0100 | 2 lines
+
+fixed --font TITLE:12: problem -- tobi
+
+------------------------------------------------------------------------
+r1652 | oetiker | 2008-11-07 23:23:16 +0100 | 2 lines
+
+fix scaling issue -- Martin
+
+------------------------------------------------------------------------
+r1651 | oetiker | 2008-11-07 15:09:29 +0100 | 2 lines
+
+extra file to make libdbi patch work
+
+------------------------------------------------------------------------
+r1650 | oetiker | 2008-11-07 15:07:53 +0100 | 38 lines
+
+As some of you may know that I have created  a patch for rrdtool 1.2 a few years ago, so that a database could be queried  for
+values for graphing.
+
+The patch has been mostly rewritten and the following changes have been made:
+
+   * high dependency on mysql has been reduced by avoiding the
+     temporary tables (which was bad for mysql replication)
+   * The number of executed SQL-Statements for one CDEF has been
+     reduced to 1 compared to 11 SQLs (including CREATE TEMPORARY
+     TABLE) - for patch against version 1.2
+   * All consolidation is done in rrdtool itself (MIN,MAX,AVERAGE)
+   * Additional consolidation functions are COUNT and SIGMA, which give
+     information on statistics on a per "time-bin" basis.
+   * All these consolidation values are always returned as separate
+     columns, that are returned by RRD and the consolidation function
+     given as Argument is ignored.
+     Main reason is that this way there is only one call to rrd_fetcht
+     and thus the database even if we need to fetch for example min,
+     avg and max. Compare this to 3 calls in case of different
+     consolidation functions - and if you want to get SIGMA and COUNT
+     as well it is still only one call to the backend and the database.
+   * Some previous existing features have been taken out at the moment
+     to allow for this reduced set of SQL queries.
+         o prediction using the values from the last X days at the same
+           time
+         o the corresponding sigma calculation
+   * The idea is to create generic CDEF's that will do the same thing,
+     but that is also available when using RRD-files (similar to TREND,
+     but with another scope)
+     This will get posted as a separate patch.
+   * Overall performance should be much better and the patch as a whole
+     simpler.
+   * The patch also includes modifications to the configuration
+     infrastructure, to make libdbi support optional.
+
+-- Martin Sperl
+
+
+------------------------------------------------------------------------
+r1649 | oetiker | 2008-11-07 15:02:09 +0100 | 3 lines
+
+new CDEF functions for predictions PREDICT and PREDICTSIGMA
+-- Martin Sperl
+
+------------------------------------------------------------------------
+r1648 | oetiker | 2008-11-07 14:51:24 +0100 | 10 lines
+
+Much simpler handling of timestamp errors.  Return an error to the user
+when any of the time stamp values are invalid.  This is similar to
+RRDTool's normal behavior.  Removed the complex logic previously used to
+return error codes to the user.
+
+This solves a bug where non-advancing timestamps could have produced
+incorrect error output during "BATCH" mode.  The bug was cause by using
+the sock->wbuf pointer for the error output. -- kevin brintnall
+
+
+------------------------------------------------------------------------
+r1647 | oetiker | 2008-11-07 14:45:34 +0100 | 4 lines
+
+rrdcached: pull in rrd_config.h so we can use its defines
+... particularly HAVE_VSNPRINTF --  kevin brintnall 
+
+
+------------------------------------------------------------------------
+r1645 | oetiker | 2008-11-04 08:12:46 +0100 | 15 lines
+
+I realize now that the problem is the line
+
+    test -f lua/Makefile && cd lua && $(MAKE) install || true
+
+in the target "install-data-local", in bindings/Makefile.am. It forces
+execution of bindings/lua/Makefile independently of lua being found or
+not. I added that line in my first patch, following perl, python and
+ruby build style, but it's not needed after I switched to automake. The
+make recursion is controlled by SUBDIRS, which will only contain "lua"
+if BUILD_LUA is true.
+
+-- Fidelis Assis
+
+
+
+------------------------------------------------------------------------
+r1644 | oetiker | 2008-11-02 18:25:36 +0100 | 2 lines
+
+fix build process for systems without lua
+
+------------------------------------------------------------------------
+r1643 | oetiker | 2008-11-02 18:09:36 +0100 | 3 lines
+
+PTHREAD_COND_INITIALIZER may only be used to initialize static cond variables.
+-- Sebastian Harl
+
+------------------------------------------------------------------------
+r1642 | oetiker | 2008-11-02 16:25:48 +0100 | 2 lines
+
+reverting non build makefile patch ... we need to lua makefile for building the ditribution
+
+------------------------------------------------------------------------
+r1641 | oetiker | 2008-11-01 10:09:07 +0100 | 2 lines
+
+do not create the lua makefile if lua is not to be compiled.
+
+------------------------------------------------------------------------
+r1638 | oetiker | 2008-10-30 15:32:09 +0100 | 2 lines
+
+fix from alex
+
+------------------------------------------------------------------------
+r1637 | oetiker | 2008-10-28 09:57:13 +0100 | 5 lines
+
+- remove the spaccing between the elements
+- add xsd support to dump output
+- change the argument "[--no-header|-n]" to [--header|-h {xsd,dtd}]
+-- tobias.lindenmann 1und1.de
+
+------------------------------------------------------------------------
+r1632 | oetiker | 2008-10-26 16:18:33 +0100 | 2 lines
+
+make compilation on older OSX versios work by removing the # from the librrd.sym file
+
+------------------------------------------------------------------------
+r1628 | oetiker | 2008-10-24 08:20:21 +0200 | 2 lines
+
+fixed typo ... GAUGE not GUAGE
+
+------------------------------------------------------------------------
+r1627 | oetiker | 2008-10-22 22:41:59 +0200 | 4 lines
+
+The previous code relied on the assumption that pthread_cond_init(&cond)
+was equivalent to memset(&cond,0).  This may not be true on all platforms.
+-- kevin
+
+------------------------------------------------------------------------
+r1626 | oetiker | 2008-10-22 08:02:23 +0200 | 15 lines
+
+remove_cache_item() did not check whether a file was in queue before
+modifying the cache head/tail pointers.  Therefore, the process of
+flushing old files may perturb the cache_queue_head pointer.  This caused
+some nodes with CI_FLAGS_IN_QUEUE to be un-linked from the queue list.
+
+Thereafter, they would not be flushed by any periodic process (although
+they could be revived with FLUSH or UPDATE).  This caused a slow memory
+leak for files that are no longer updated.  Pending updates for these
+"abandoned" files would remain in memory ad infinitum.
+
+With this patch, remove_from_queue() will check that the item is queued
+before modifying the head/tail pointers.  This restores the intended
+behavior.
+--kevin
+
+------------------------------------------------------------------------
+r1625 | oetiker | 2008-10-22 07:08:47 +0200 | 2 lines
+
+this was replaced by Makefile.am
+
+------------------------------------------------------------------------
+r1624 | oetiker | 2008-10-21 08:10:32 +0200 | 2 lines
+
+guess one needs that in svn too for luabindings to work
+
+------------------------------------------------------------------------
+r1623 | oetiker | 2008-10-21 07:42:50 +0200 | 13 lines
+
+ * Open all listen sockets in daemonize(), while we still have stderr.
+   Changed open_listen_socket_* routines to complain to stderr.  Now, any
+   errors in binding to the listen sockets are much more obvious.
+
+ * Simplified exit of parent after fork()
+
+ * PID file will be correctly cleaned up if there is a failure in daemonize().
+
+ * unlink the unix socket before trying to bind()
+   (after we're sure we have the PID file)
+
+-- kevin
+
+------------------------------------------------------------------------
+r1622 | oetiker | 2008-10-20 13:46:08 +0200 | 9 lines
+
+rrd_notify_row patch:
+
+ - Delegate choice of starting row for newly created RRD  files to the  rrd_open.c API.
+ - Introduce the rrd_notify_row() function so that an implementation can choose to align the rows of new RRDs with existing  RRDs, if desirable.
+ - Maintain the existing behaviour (random starting row) by default.
+
+-- Daniel.Pocock
+
+
+------------------------------------------------------------------------
+r1621 | oetiker | 2008-10-20 08:06:16 +0200 | 4 lines
+
+- Lua module build and install process rewritten using automake+libtool
+- improved check for compat-5.1 availability
+-- Fidelis Assis
+
+------------------------------------------------------------------------
+r1620 | oetiker | 2008-10-19 00:32:19 +0200 | 6 lines
+
+rrd_open should not create files with restrictive masks
+
+Removed unnecessary "mode" varaible.  The mode is only used when O_CREAT is
+specified, where we want to use 0666 (as rrd_create_fn did r<=1612).
+--kevin
+
+------------------------------------------------------------------------
+r1619 | oetiker | 2008-10-18 17:50:07 +0200 | 7 lines
+
+- encapsulate fd and mmap related variables within a private data
+structure
+- rrd_file_t keeps a pointer to the private data structure of type
+void*, so that other block storage implementations can store their
+internal data with rrd_file_t
+-- Daniel.Pocock
+
+------------------------------------------------------------------------
+r1618 | oetiker | 2008-10-17 07:50:22 +0200 | 3 lines
+
+rrdc_flush_if_daemon should not clobber error message -- kevin (as suggested by Sebastian)
+
+
+------------------------------------------------------------------------
+r1617 | oetiker | 2008-10-17 07:44:09 +0200 | 2 lines
+
+use double for legend positioning to fight wiggle
+
+------------------------------------------------------------------------
+r1616 | oetiker | 2008-10-16 23:33:08 +0200 | 5 lines
+
+fix version numbers in compile instructions
+tobi
+
+
+
+------------------------------------------------------------------------
+r1614 | oetiker | 2008-10-16 23:30:17 +0200 | 4 lines
+
+In almost all cases where rrdc_flush can fail, it will leave a more
+descriptive error message anyway..  better not overwrite it.
+-- kevin
+
+------------------------------------------------------------------------
+r1613 | oetiker | 2008-10-16 23:12:27 +0200 | 14 lines
+
+- rrd_open() calculates file size for new files and calls mmap once for
+the whole file
+
+- rrd_resize() cleaned up, no longer passing a size through the cookie
+argument
+
+- rrd_init(&my_rrd) must be called before rrd_open() - if people are
+calling rrd_open directly from application code, this might be
+troublesome.  Alternative solutions: creating an additional function,
+rrd_open_create(), or adding an extra argument to rrd_open() for setting
+the file size
+
+-- Daniel Pocock
+
+------------------------------------------------------------------------
+r1612 | oetiker | 2008-10-16 23:05:51 +0200 | 2 lines
+
+move rrd_lock into rrd_open where the general rrd_file ops are located. -- Daniel Pocock
+
+------------------------------------------------------------------------
+r1610 | oetiker | 2008-10-16 08:11:54 +0200 | 3 lines
+
+error reporting caused crash in journal replay
+
+
+------------------------------------------------------------------------
+r1609 | oetiker | 2008-10-16 08:11:44 +0200 | 2 lines
+
+better build docs
+
+------------------------------------------------------------------------
+r1607 | oetiker | 2008-10-15 07:29:41 +0200 | 2 lines
+
+reverted r1601 and r1606 since r1601 introduced a non portable mremap and r1606 has a dependency on r1601.
+
+------------------------------------------------------------------------
+r1606 | oetiker | 2008-10-14 22:14:35 +0200 | 15 lines
+
+This moves selection of the initial RRA row into the rrd_open.c API
+
+The current implementation (random row) is used by default.  However, it
+now provides an opportunity for alternative implementations to integrate
+with rrdtool in a single place.
+
+Maybe there are other places in rrdtool where I should insert calls to
+the function rrd_notify_row()?
+
+This has been tested with rrdtool create and rrdtool info to verify that
+random rows are selected by default (existing behaviour preserved).
+
+-- Daniel Pocock
+
+
+------------------------------------------------------------------------
+r1605 | oetiker | 2008-10-14 21:23:24 +0200 | 8 lines
+
+Under most circumstances, rrdcached can detect a stale pid file.
+
+If the process in the pid file does not exist, or cannot be signalled by
+the rrdcached owner, then rrdcached will replace the pid file and start
+normally.  Otherwise, it will complain verbosely to STDERR.
+
+--kevin
+
+------------------------------------------------------------------------
+r1604 | oetiker | 2008-10-14 21:08:56 +0200 | 12 lines
+
+ * this preserves principle of least surprise when dealing with files that
+   are reachable via many path strings.  i.e. when $PWD=/base/dir the
+   following files are the same:
+
+        /base/dir/x.rrd
+        x.rrd
+        ../dir/x.rrd
+
+ * for performance, absolute paths (starting with '/') are not resolved.
+   this reduces the number of stat(2) system calls.
+
+
+------------------------------------------------------------------------
+r1603 | oetiker | 2008-10-14 21:08:36 +0200 | 15 lines
+
+Now, the daemon will check that a base directory is NOT reached via
+symbolic link.  Documentation added to illustrate the restriction.
+
+This allows several simplifying (and performance-enhancing) assumptions to
+be made elsewhere in the code:
+
+ * it ensures that paths resolved in the client via realpath() will match
+   our data structure keys
+
+ * it's possible to generate the correct absolute path when given a
+   relative path by simply prepending the base directory
+
+ * it's not necessary to resolve paths that begin with '/'
+ -- kevin
+
+------------------------------------------------------------------------
+r1602 | oetiker | 2008-10-14 21:08:00 +0200 | 2 lines
+
+rrdcached treats relative and absolute paths the same -- kevin
+
+------------------------------------------------------------------------
+r1601 | oetiker | 2008-10-14 13:33:37 +0200 | 13 lines
+
+Some observations I made while implementing this:
+
+- In rrd_open(), the call to rrd_init() clobbers values already populated in
+rrd_create.c
+
+- The logic for newfile_size in rrd_open() wasn't really able to cope with the
+logic for a file starting with size 0
+
+I've tried to deal with these issues, but maybe there is a more elegant solution.
+
+-- Daniel Pocock
+
+
+------------------------------------------------------------------------
+r1600 | oetiker | 2008-10-14 08:37:19 +0200 | 3 lines
+
+clearer way of advancing the flush time
+-- kevin
+
+------------------------------------------------------------------------
+r1599 | oetiker | 2008-10-14 00:07:14 +0200 | 18 lines
+
+This patch reduces the number of time()/gettimeofday() system calls when
+doing high volume processing.  This enables about 25% speed increase
+during journal replay and "BATCH" processing.  (this is a function of
+syscall overhead).
+
+ * note when "BATCH" processing or journal replay starts, use that
+   timestamp for all commands
+
+ * use the batch start time to detect when we're in batch mode.  no longer
+   need a separate boolean.
+
+ * pass the time_t into handle_request
+
+ * pass the time_t through to the commands that need it
+
+-- kevin brintnall
+
+
+------------------------------------------------------------------------
+r1598 | oetiker | 2008-10-13 20:41:12 +0200 | 3 lines
+
+fixed bad folding marker (on handle_request_flush)
+-- kevin
+
+------------------------------------------------------------------------
+r1597 | oetiker | 2008-10-11 11:53:40 +0200 | 4 lines
+
+this ensures that the response is protocol-compliant even if additional
+info has been added to the write buffer during processing.
+-- kevin brintnall
+
+------------------------------------------------------------------------
+r1596 | oetiker | 2008-10-11 11:37:53 +0200 | 10 lines
+
+This patch introduces a feature whereby rrdcached will disallow updates
+that do not advance the update time.  This prevents the updates from being
+discarded later by rrd_update_r.
+
+This patch attempts to make the most of the protocol's limited ability to
+return error text when using a -1 return code.
+
+-- kevin brintnall 
+
+
+------------------------------------------------------------------------
+r1595 | oetiker | 2008-10-10 07:21:19 +0200 | 5 lines
+
+This patch ensures that when rrdcached is stopped, it cleans up the
+pid file.  Apparently this is necessary if RRDCACHED_USER is not the
+default "rrdcached".
+-- Bernard Li
+
+------------------------------------------------------------------------
+r1594 | oetiker | 2008-10-10 07:21:01 +0200 | 4 lines
+
+The patch I submitted for rrdtool.spec introduced a bug where there
+are two ldconfig calls in the %postun section.  This patch fixes that.
+--  Bernard Li 
+
+------------------------------------------------------------------------
+r1593 | oetiker | 2008-10-10 07:19:06 +0200 | 11 lines
+
+This patch does two things:
+
+- remove the --pidfile check, for compatibility with older RHEL/Centos
+  systems
+
+- update the username used by the init script, to remain consistent with
+  Bernard's changes to the spec file
+
+-- Daniel.Pocock
+
+
+------------------------------------------------------------------------
+r1592 | oetiker | 2008-10-08 22:47:04 +0200 | 2 lines
+
+Split-out rrd-cached subpackage -- Bernard Li
+
+------------------------------------------------------------------------
+r1591 | oetiker | 2008-10-08 07:49:24 +0200 | 5 lines
+
+This patch updates the spec file and includes the librrd.pc file in
+the -devel subpackage so that you can build the RPM again.
+-- Bernard
+
+
+------------------------------------------------------------------------
+r1590 | oetiker | 2008-10-08 07:47:39 +0200 | 2 lines
+
+fix crash reported by Bernard Li - connection_thread_main: avoid double calls to close_connection -- kevin
+
+------------------------------------------------------------------------
+r1589 | oetiker | 2008-10-08 07:46:21 +0200 | 1 line
+
+fixed typo
+------------------------------------------------------------------------
+r1588 | oetiker | 2008-10-07 23:10:54 +0200 | 7 lines
+
+This patch introduces two new commands for cache management:
+
+ PENDING: shows any un-written updates for a file
+ FORGET : remove a file completely from cache
+
+-- kevin brintnall
+
+------------------------------------------------------------------------
+r1587 | oetiker | 2008-10-07 23:08:30 +0200 | 15 lines
+
+This patch moves the permission handling code around a bit.
+
+ * moved privilege checks into the command handler functions
+   (possible now that we pass the sock data structures around)
+
+ * on UPDATE, delay journal_write until after check_file_access().
+   previously, it was possible for a high-priv socket to introduce
+   commands into the journal that could be replayed if they were
+   still in the journal at next startup.
+
+ * moved has_privilege() further up in the file to avoid need
+   for prototype.
+
+--  kevin brintnall
+
+------------------------------------------------------------------------
+r1586 | oetiker | 2008-10-07 18:28:24 +0200 | 24 lines
+
+This patch introduces some extra safety checks in journal processing,
+and cleans up the code a little bit.
+
+ * moved journal initialization to its own function; main() is cleaner
+
+ * any time we process a file, log the results
+   (previous code only loggded if there was a valid entry)
+
+ * After reading journals at startup, only trigger full flush out to disk
+   if the user specified -F.  Avoids unnecessary IO on startup unless the
+   user also wants unnecessary IO on shutdown.
+
+ * journal_replay is much more careful about files it will open
+     * must be a regular file
+     * must be owned by daemon user
+     * must not be group/other writable
+
+ * Ensure that the journal gets created with the right permissions.
+    ... even when the daemon is invoked with a permissive umask.
+    equivalent to "chmod a-x,go-w"
+
+-- kevin
+
+
+------------------------------------------------------------------------
+r1584 | oetiker | 2008-10-07 17:37:34 +0200 | 4 lines
+
+aniel Pocock reported that the argument may be NULL in low-diskspace
+situations, so check for that here to prevent a segmentation fault.
+-- Florian Forster
+
+------------------------------------------------------------------------
+r1583 | oetiker | 2008-10-06 21:14:17 +0200 | 2 lines
+
+Makefile.lua is now generated
+
+------------------------------------------------------------------------
+r1582 | oetiker | 2008-10-06 21:13:30 +0200 | 2 lines
+
+added missing file from lua 5.0 integration patch
+
+------------------------------------------------------------------------
+r1581 | oetiker | 2008-10-06 21:05:47 +0200 | 12 lines
+
+This patch introduces "BATCH" mode.
+
+In this mode, a client can feed multiple commands to rrdcached without
+waiting for acknowledgement.  This permits multiple commands to be sent
+for each read()/write().  This can dramatically increase the command
+throughput by increasing the amount of work done per system call.
+
+It enables over 100k updates/second with no CPU
+utilization due to the reduced system calls.
+
+-- kevin brintnall
+
+------------------------------------------------------------------------
+r1580 | oetiker | 2008-10-06 21:04:48 +0200 | 15 lines
+
+This patch introduces buffered I/O to rrdcached.  Now, rrdcached can
+interpret as many commands as arrive in a single read(), and it will use
+fewer write()s when there are multiple output lines.
+
+All routines now pass around listen_socket_t objects instead of file
+descriptors.
+
+All I/O is now contained in two routines.  It's no longer necessary to
+specify the line count in multi-line outputs, since that is calculated
+automatically.
+
+This is the foundation for accepting batched commands.
+-- kevin brintnall
+
+
+------------------------------------------------------------------------
+r1579 | oetiker | 2008-10-06 07:05:19 +0200 | 2 lines
+
+Support to Lua 5.0 -- Fidelis Assis
+
+------------------------------------------------------------------------
+r1575 | oetiker | 2008-10-04 18:05:11 +0200 | 3 lines
+
+initial librrd file added ... this will need more love since it does
+not pick up any -rpath settings
+
+------------------------------------------------------------------------
+r1571 | oetiker | 2008-10-04 15:34:54 +0200 | 3 lines
+
+* rrd_resize fixed so that it does NOT alter the original file (mmap side effect)
+* rrd_resize can can deal with version 4 files, so let it
+
+------------------------------------------------------------------------
+r1570 | oetiker | 2008-10-04 00:53:28 +0200 | 11 lines
+
+The patch fixs rrdtools behaviour when presented with trunkated rrd files.
+
+  * Make sure that we do not extend past the end of the
+    file when reading the header.
+
+  * Makes sure that the data portion of the file is large enough, based on
+    the ds_cnt and the total number of RRA rows
+
+-- kevin brintnall
+
+
+------------------------------------------------------------------------
+r1567 | oetiker | 2008-10-02 21:17:18 +0200 | 2 lines
+
+folding fix
+
+------------------------------------------------------------------------
+r1566 | oetiker | 2008-10-02 21:08:30 +0200 | 3 lines
+
+missing spaces in extconf.rb caused compile failure -- kevin
+
+
+------------------------------------------------------------------------
+r1565 | oetiker | 2008-10-02 19:17:58 +0200 | 2 lines
+
+permission fix for rrdcached socket -- Daniel.Pocock
+
+------------------------------------------------------------------------
+r1559 | oetiker | 2008-10-01 22:22:57 +0200 | 3 lines
+
+since rrdcached uses pthread functions, use the threadsafe version of librrd as well. This will
+also reasolve build problems on boxes there the ptherad functions must be linked explicitly.
+
+------------------------------------------------------------------------
+r1558 | oetiker | 2008-10-01 22:04:47 +0200 | 2 lines
+
+Clearer explanation on which paths are permitted when -B is supplied -- kevin
+
+------------------------------------------------------------------------
+r1557 | oetiker | 2008-10-01 22:01:43 +0200 | 26 lines
+
+Fixes for the following compiler warnings:
+
+ - unused variable
+ - unused parameter
+ - assignment / argument discards qualifiers from pointer target type
+ - comparison between signed and unsigned
+ - too many arguments to function
+ - assignment makes pointer from integer without a cast
+ - incompatible pointer type
+ - differ in signedness
+ - implicit declaration of function
+ - enumeration value not handled in switch
+ - value computed is not used
+
+Most notably, a possible segfault in the Rrd_Lastupdate() code of the TCL
+bindings has been fixed.
+
+Also, -Wundef (warn if an undefined identifier is evaluated in an #if
+directive) has been removed from CFLAGS. I don't see any problem with letting
+undefined identifiers evaluate to "false" in rrdtool. Keeping that option
+would produce a lot of (imho unnecessary) errors which would need to be fixed
+using ugly preprocessor statements like '#if defined(FOO) && FOO'.
+
+-- Sebastian Harl 
+
+
+------------------------------------------------------------------------
+r1556 | oetiker | 2008-10-01 21:48:15 +0200 | 15 lines
+
+I've adapted an init script for rrdcached, and also incorporated it into
+the spec file so that it is deployed with the RPM.
+
+There are also some other changes to the spec file so that I could build
+an RPM successfully from trunk.  I'm happy to tidy up the spec file some
+more if no one else wants to mandate the best way to do it.
+
+By default, rrdcached runs as nobody.  I've tested this on a server
+running Ganglia gmetad.
+
+Regards,
+
+Daniel
+
+
+------------------------------------------------------------------------
+r1555 | oetiker | 2008-10-01 21:44:36 +0200 | 11 lines
+
+Now, moving a value to the head of the queue is O(1).  Before it was
+O(queue size).  This improves performance of individual flushes when
+there is a large number of files in the queue.  As a result, we don't
+hold the cache_lock as much.
+
+Revamped enqueue_cache_item to take advantage of the new structure.
+
+Renamed _wipe_ci_values to look nicer with other code.
+
+--kevin
+
+------------------------------------------------------------------------
+r1552 | oetiker | 2008-10-01 18:53:56 +0200 | 2 lines
+
+lcd is actually gcd!
+
+------------------------------------------------------------------------
+r1551 | oetiker | 2008-09-30 20:44:03 +0200 | 4 lines
+
+When -B is specified, the daemon will only operate on files within the
+base directory.  Symlink detection is omitted for performance reasons (if
+a user can create a symlink, they can probably overwrite the RRDs anyway). -- kevin
+
+------------------------------------------------------------------------
+r1550 | oetiker | 2008-09-30 20:43:15 +0200 | 2 lines
+
+ check permissions before writing to journal -- kevin
+
+------------------------------------------------------------------------
+r1549 | oetiker | 2008-09-30 20:42:34 +0200 | 3 lines
+
+The daemon should behave the same way w/r/t files whether we "-g" or not.
+-- kevin
+
+------------------------------------------------------------------------
+r1548 | oetiker | 2008-09-29 22:00:34 +0200 | 6 lines
+
+This bug caused the last line in each journal file to be processed a
+second time.  Since it had been modified due to tokenizing, it failed
+syntax check.  The daemon would always record one failed line at
+end-of-journal as a result.  No data loss incurred by this bug. -- kevin
+
+
+------------------------------------------------------------------------
+r1547 | oetiker | 2008-09-29 21:58:34 +0200 | 13 lines
+
+This patch introduces the concept of socket privilege levels.  "UPDATE"
+and "FLUSHALL" commands are restricted to high-privilege sockets.  "FLUSH"
+commands can be executed on any socket.  This is ideal for multi-user
+installations where only certain users need write access to the RRD files.
+
+Now, nearly all socket information is passed around the daemon in
+listen_socket_t data structures.  In case there is other per-socket state
+(i.e. if we add authentication) we can put it there.
+
+Also, I created a new "open_listen_socket_network" and removed the network
+setup from "open_listen_socket". -- kevin
+
+
+------------------------------------------------------------------------
+r1546 | oetiker | 2008-09-29 21:56:10 +0200 | 6 lines
+
+This patch provides better error messages to the client when something
+goes wrong with the daemon.  When possible, the daemon error message is
+passed through to rrd_set_error() on the client.  Prior to this patch,
+most error conditions would result in "Internal error", which is not very
+helpful. -- kevin brintnall
+
+------------------------------------------------------------------------
+r1543 | oetiker | 2008-09-28 23:37:46 +0200 | 2 lines
+
+spelling fix -- kevin
+
+------------------------------------------------------------------------
+r1542 | oetiker | 2008-09-28 23:36:46 +0200 | 4 lines
+
+This patch removes an extra "SIGNALS" section in the rrdcached.pod and
+merges "[BUG] fixed hang in flush_file() introduced by per-file flush
+condition". --  kevin brintnall
+
+------------------------------------------------------------------------
+r1541 | oetiker | 2008-09-28 21:27:45 +0200 | 3 lines
+
+a few missing {{{ folding }}} markers added
+-- kevin brintnall
+
+------------------------------------------------------------------------
+r1540 | oetiker | 2008-09-28 21:26:39 +0200 | 3 lines
+
+This patch introduces "fast shutdown" mode and two new signals.
+-- kevin brintnall 
+
+------------------------------------------------------------------------
+r1539 | oetiker | 2008-09-28 21:25:40 +0200 | 4 lines
+
+Moved signal handler setup out of daemonize().  Coalesced common code
+in preparation for new signals.  Documented behavior of existing signals.
+-- kevin brintnall
+
+------------------------------------------------------------------------
+r1537 | oetiker | 2008-09-28 21:23:23 +0200 | 9 lines
+
+Attached is a patch to lower the version requirements of libtool and
+automake.  I have tested this on CentOS 4.x with the specified
+versions of libtool and automake and was able to build RRDTool fine.
+I did *not* test building with PHP, tcl, ruby or Python though.
+
+I also abstracted the version numbers of all the dependencies such
+that editing them in the future will be easier.
+-- Bernard Li
+
+------------------------------------------------------------------------
+r1535 | oetiker | 2008-09-28 21:12:22 +0200 | 2 lines
+
+added support for FLUSHALL command -- kevin brintnall
+
+------------------------------------------------------------------------
+r1534 | oetiker | 2008-09-28 21:10:57 +0200 | 1 line
+
+move cache broadcast into enqueue_cache_item -- kevin brintnall
+------------------------------------------------------------------------
+r1533 | oetiker | 2008-09-28 21:10:15 +0200 | 6 lines
+
+When -z <jitter> is specified, some updates may be timestamped up to
+<jitter> seconcds in the future.  Therefore, a timeout of now+1 may not be
+sufficient.  Set abs_timeout past the point where any updates are
+currently specified. -- kevin brintnall
+
+
+------------------------------------------------------------------------
+r1532 | oetiker | 2008-09-28 21:09:34 +0200 | 15 lines
+
+The PID file is created with open() in the parent process, while we still
+have STDERR open.  If it cannot be created, it complains verbosely to
+stderr.
+
+The PID file is written in the child process.  The only way the fdopen()
+will fail on a fd that is already open is if you're completely out of
+memory.  As in other places in the code, I didn't consider this a case
+that required a very verbose message.  (Search for "strdup failed").  If
+you still think a more verbose message is called for, please suggest one.
+
+The attached patch corrects the error message to complain about fdopen()
+vs fopen().  I hadn't noticed that until you brought it up.
+
+--  kevin brintnall
+
+------------------------------------------------------------------------
+r1531 | oetiker | 2008-09-28 21:08:41 +0200 | 2 lines
+
+ rrd.h, librrd.sym: Define and export rrd_info_r() --  Sebastian Harl 
+
+------------------------------------------------------------------------
+r1530 | oetiker | 2008-09-28 17:01:43 +0200 | 7 lines
+
+vdef calc was using end_orig to determine for which range it should do its
+calculations which is odd, since orig is only the requested range as
+invocation time and not the data range deliverd by fetch. It does fall
+completely flat when shifting since shifting does not affect the original
+data. Bug #177 reported by hokiel
+
+
+------------------------------------------------------------------------
+r1529 | oetiker | 2008-09-27 13:44:58 +0200 | 2 lines
+
+rrdxport was completely broken for exporting datasources that did not have a uniform step size. Thanks to Peter Valdemar Mørch for finding this.
+
+------------------------------------------------------------------------
+r1528 | oetiker | 2008-09-26 07:11:32 +0200 | 2 lines
+
+create the pid file before forking, so we can complain to stderr  --  kevin brintnall
+
+------------------------------------------------------------------------
+r1527 | oetiker | 2008-09-26 07:10:25 +0200 | 8 lines
+
+This patch ensures that the "FLUSH" command will write the updates out to
+RRD before returning to the user.  Before, it returned when the update was
+"dequeued"; updates were not necessarily on disk.
+
+Also, for new nodes, the cache_lock is not held while we are setting up
+the new node.  We don't want to be holding the lock if the stat() blocks.
+--  kevin brintnal
+
+------------------------------------------------------------------------
+r1526 | oetiker | 2008-09-25 23:07:35 +0200 | 2 lines
+
+Use the same IPv6/IPv4 as for the client as Florian did for the server -- kevin brintnall
+
+------------------------------------------------------------------------
+r1525 | oetiker | 2008-09-25 22:31:29 +0200 | 10 lines
+
+This fixes a couple problems when exiting due to signal:
+
+ * connection threads exit without closing client socket
+   (so client blocks waiting for response that never comes)
+
+ * listen_queue_thread blocks on poll() until a new connection comes in
+   (because no poll timeout specified)
+
+-- kevin brintnall
+
+------------------------------------------------------------------------
+r1524 | oetiker | 2008-09-25 22:11:43 +0200 | 2 lines
+
+set SO_REUSEADDR on the listen socket -- kevin brintnall
+
+------------------------------------------------------------------------
+r1523 | oetiker | 2008-09-25 22:10:17 +0200 | 17 lines
+
+Support for IPv6 has been broken with revision 1522: Because IPv6-addresses
+contain colons, simply checking for a colon and using everything after it does
+destroy correctly formatted IPv6-addresses.
+
+This patch checks for dots '.' in the address. If the address contains at least
+one dot, it is considered to be a hostname or an IPv4-address and a simple
+search for a colon is done.
+
+If no dot is found, the code will check for an opening square bracket '[' at
+the beginning of the address. If one if found, the format
+  [address]:port
+is assumed.
+
+If neither applies, the default port will be used.
+-- Florian Forster
+
+
+------------------------------------------------------------------------
+r1522 | oetiker | 2008-09-25 17:25:51 +0200 | 4 lines
+
+This adds support for <address>:<port> in the rrd client library.
+Obviously this is required to take advantage of the server's ability to
+bind to a non-standard port -- kevin brintnall
+
+------------------------------------------------------------------------
+r1521 | oetiker | 2008-09-25 00:21:21 +0200 | 2 lines
+
+Allow ports to be specified with -l addr:port also. --  kevin brintnall
+
+------------------------------------------------------------------------
+r1520 | oetiker | 2008-09-25 00:07:33 +0200 | 2 lines
+
+the rrdlua.pod is in the doc directory
+
+------------------------------------------------------------------------
+r1519 | oetiker | 2008-09-24 08:04:26 +0200 | 2 lines
+
+added section on error reporting -- Florian Forster
+
+------------------------------------------------------------------------
+r1517 | oetiker | 2008-09-22 08:35:26 +0200 | 3 lines
+
+I finally finished the first version of the patch (attached) --  Fidelis Assis fidelis pobox.com
+(this does not seem to quite work yet at least not in my hardy setup)
+
+------------------------------------------------------------------------
+r1515 | oetiker | 2008-09-22 07:38:28 +0200 | 2 lines
+
+use default prefix for ruby install if no user defined prefix is available
+
+------------------------------------------------------------------------
+r1513 | oetiker | 2008-09-19 22:34:42 +0200 | 2 lines
+
+Bsd lirary path switch added to perl bindings makefile -- as suggested by Kevin Brintnall
+
+------------------------------------------------------------------------
+r1512 | oetiker | 2008-09-18 15:30:48 +0200 | 3 lines
+
+Fix for debian bug 498183 ... never *advise after the end of the
+file. On sparc this causes a segfault. Thanks to Sebastian Harl and Jurij Smakov for finding this.
+
+------------------------------------------------------------------------
+r1507 | oetiker | 2008-09-14 17:30:43 +0200 | 2 lines
+
+fix RRDCacheD documentation -- Florian Forster
+
+------------------------------------------------------------------------
+r1506 | oetiker | 2008-09-14 17:28:34 +0200 | 13 lines
+
+The previous code was broken: The response was read using `read(2)'. If
+the server wasn't sending fast enough, the client would stop reading
+before the entire message had been read.
+
+This patch changes the communication code to use the (line based)
+`fgets' function rather than the lower level `read' function. After
+reading the first line (which contains the total number of line to be
+expected), this precise number of lines is read - blocking if necessary.
+
+Also, the missing four new statistic values have been added to
+`rrdc_stats_get'.
+--Folorian Forester
+
+------------------------------------------------------------------------
+r1505 | oetiker | 2008-09-14 12:35:51 +0200 | 2 lines
+
+did not pick up all the changes for rrdcached in the first round ... so here is the second batch.
+
+------------------------------------------------------------------------
+r1504 | oetiker | 2008-09-14 11:49:03 +0200 | 4 lines
+
+RRDcached patch. This implements an infrastructure, where rrd updates can be
+sent to a daemon which caches them prior to bulk-updateing rrd files. See the rrdcached manual page.
+-- Created by Florian Forster with some help from Kevin Brintnall.
+
+------------------------------------------------------------------------
+r1502 | oetiker | 2008-09-13 13:42:08 +0200 | 7 lines
+
+regarding #183:
+* move part of rrd_config.h out to a separate file, so that
+  autoconf is not confused by the more complex expressions.
+* fix configure variable name to allow caching
+* another attemt at fixing solaris 2.8 compile so that it
+  works out of the box.
+
+------------------------------------------------------------------------
+r1501 | oetiker | 2008-09-13 12:56:40 +0200 | 2 lines
+
+fix graph docs
+
+------------------------------------------------------------------------
+r1500 | oetiker | 2008-09-11 22:27:47 +0200 | 3 lines
+
+fixed processing of custom fonts René GARCIA <rene@margar.fr>
+
+
+------------------------------------------------------------------------
+r1499 | oetiker | 2008-09-11 09:01:30 +0200 | 2 lines
+
+no , on the last member in C
+
+------------------------------------------------------------------------
+r1488 | oetiker | 2008-09-07 09:19:03 +0200 | 5 lines
+
+The attached patch eliminates the many places where the rra_current pointer was maintained; the existing write/seek mechanisms update rrd_file->pos correctly.
+Also, the seek at the front of process_arg is not necessary; write_to_rras will now take care to correct the file position at every update cycle.
+This eliminates unnecessary rrd_seek() calls when MMAP is not enabled. -- kevin brintnall  kbrint rufus.net
+
+
+------------------------------------------------------------------------
+r1484 | oetiker | 2008-09-06 16:24:43 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3.2
+------------------------------------------------------------------------
+r1483 | oetiker | 2008-09-06 13:46:41 +0200 | 2 lines
+
+we need rrd_format.h here for things to compile properly
+
+------------------------------------------------------------------------
+r1482 | oetiker | 2008-09-06 13:43:10 +0200 | 2 lines
+
+updated opensolaris build instructions
+
+------------------------------------------------------------------------
+r1481 | oetiker | 2008-09-06 12:43:07 +0200 | 4 lines
+
+only link build and use rrd_getopt if there is no getopt_long provided by
+by the os ... this should also fix problems for solaris 2.8 and other
+non getopt_long oses who were not taken care of anymore after the intriduction of librrd.sym
+
+------------------------------------------------------------------------
+r1480 | oetiker | 2008-09-06 12:39:29 +0200 | 1 line
+
+fix for multi update - data corruption bug as reported (and patched) in #178 by kevin brintnall
+------------------------------------------------------------------------
+r1479 | oetiker | 2008-09-06 12:32:57 +0200 | 2 lines
+
+make pod checker happy
+
+------------------------------------------------------------------------
+r1478 | oetiker | 2008-09-06 10:58:18 +0200 | 4 lines
+
+inline functions are not supported in c99 ... lets remove this.
+the compiler will foture it out if they are important.
+
+
+------------------------------------------------------------------------
+r1477 | oetiker | 2008-09-04 23:45:44 +0200 | 2 lines
+
+introduced a persistant fontmap ... this makes our pango rendering 6 times faster starting from the second graph we draw.
+
+------------------------------------------------------------------------
+r1476 | oetiker | 2008-09-01 01:42:02 +0200 | 2 lines
+
+now the results actually look as they did with the old code only things are FASTER
+
+------------------------------------------------------------------------
+r1475 | oetiker | 2008-09-01 00:53:49 +0200 | 3 lines
+
+Improve performance by keeping multiple pango font descriptions. For the first invocation we are about 20% times as fast
+for the second one about 4-5 times faster ... 
+
+------------------------------------------------------------------------
+r1474 | oetiker | 2008-08-31 12:55:24 +0200 | 3 lines
+
+trying to improve the pango performance I added facilities to cache layout,context and more in between invocations of
+the text function, unfortunately it does not seem to help all that much.
+
+------------------------------------------------------------------------
+r1473 | oetiker | 2008-08-31 12:52:49 +0200 | 1 line
+
+use the standart info free function
+------------------------------------------------------------------------
+r1471 | oetiker | 2008-08-28 07:49:02 +0200 | 2 lines
+
+fix handling of error conditions in rrd_tool.c ... errno is not for detection, only for information AFTER detection.
+
+------------------------------------------------------------------------
+r1470 | oetiker | 2008-08-28 06:13:39 +0200 | 2 lines
+
+free the linebuffer if you don't return it!
+
+------------------------------------------------------------------------
+r1469 | oetiker | 2008-08-28 00:06:43 +0200 | 2 lines
+
+some more leak plugging
+
+------------------------------------------------------------------------
+r1468 | oetiker | 2008-08-27 23:48:50 +0200 | 2 lines
+
+drop the dummy surface prior to creating the real one
+
+------------------------------------------------------------------------
+r1467 | oetiker | 2008-08-27 23:46:01 +0200 | 2 lines
+
+added some freeing for error conditions
+
+------------------------------------------------------------------------
+r1466 | oetiker | 2008-08-27 23:25:43 +0200 | 2 lines
+
+fixed indentation  ... gnu indent results are not realy beautifl. I might switch to uncrustify.
+
+------------------------------------------------------------------------
+r1465 | oetiker | 2008-08-27 23:25:04 +0200 | 2 lines
+
+Many rrd_create memory leaks patched ... based on valgrind analysis by Sven Engelhardt. Thanks!
+
+------------------------------------------------------------------------
+r1464 | oetiker | 2008-08-27 23:18:46 +0200 | 2 lines
+
+fix indentation
+
+------------------------------------------------------------------------
+r1463 | oetiker | 2008-08-27 08:52:33 +0200 | 3 lines
+
+added  sparc-sun-solaris2.8 to list of broken isfinite implementations
+
+
+------------------------------------------------------------------------
+r1462 | oetiker | 2008-08-23 00:04:37 +0200 | 2 lines
+
+it is rb_rrd_infocall not rrd_infocall ... 
+
+------------------------------------------------------------------------
+r1461 | oetiker | 2008-08-16 09:13:01 +0200 | 5 lines
+
+When in lazy mode, and the graph does not get regenerated, then there are no
+results from PRINT either. Fix for #163.
+
+
+
+------------------------------------------------------------------------
+r1460 | oetiker | 2008-08-16 09:11:46 +0200 | 1 line
+
+documentation updates
+------------------------------------------------------------------------
+r1459 | oetiker | 2008-08-12 08:48:37 +0200 | 2 lines
+
+make sure imageinfo only reports the filename and not the whole path. This is a regression from 1.2.x where this was implemented properly.
+
+------------------------------------------------------------------------
+r1457 | oetiker | 2008-08-04 22:35:45 +0200 | 12 lines
+
+The attached patch converts the given string to UTF-8 using glib's
+g_locale_to_utf8() function. This function expects the string to be
+encoded as specified by the locale settings, so this will fail if e.g.
+you're using some script which is encoded in some way incompatible to
+the locale settings. In this case, the patch falls back to use the
+original string as provided by the user as there is no way to tell how
+to interpret that string. So, in this case, you will still get the old
+behavior (that pango warning and messed up strings in the graph).
+However, imho this is perfectly fine since it should be up to the user
+to take care of a sane environment. -- Sebastian Harl
+
+
+------------------------------------------------------------------------
+r1456 | oetiker | 2008-07-29 16:42:08 +0200 | 2 lines
+
+newer perlapi docu suggests to  use SV * instead of void for managed returns
+
+------------------------------------------------------------------------
+r1455 | oetiker | 2008-07-29 07:08:46 +0200 | 2 lines
+
+fixed some c++ style lines -- David Masterson
+
+------------------------------------------------------------------------
+r1454 | oetiker | 2008-07-28 09:23:15 +0200 | 2 lines
+
+spelling fix
+
+------------------------------------------------------------------------
+r1453 | oetiker | 2008-07-23 17:03:43 +0200 | 3 lines
+
+forward ported patch for rra cur_row randomization in rrd_restore from 1.2.28 to 1.3.1
+
+
+------------------------------------------------------------------------
+r1447 | oetiker | 2008-07-23 15:02:26 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3.1
+------------------------------------------------------------------------
+r1446 | oetiker | 2008-07-23 14:45:52 +0200 | 3 lines
+
+added support for restoring rrdtool 1.0.x files ... removed support for old HW patched rrd format created by an early patched version of 1.0.x
+
+
+------------------------------------------------------------------------
+r1445 | oetiker | 2008-07-22 17:15:44 +0200 | 2 lines
+
+Fix for #167 - rrdcreate is arguably missing a check for 'step>=1' for RRAs with AVERAGE as a CF. I ran into this when specifying 0.6 as a step value, assuming floats were also accepted. Patch attached here. -- Bogdan
+
+------------------------------------------------------------------------
+r1444 | oetiker | 2008-07-01 08:35:54 +0200 | 1 line
+
+header-fix
+------------------------------------------------------------------------
+r1443 | oetiker | 2008-07-01 08:34:24 +0200 | 2 lines
+
+improve layout
+
+------------------------------------------------------------------------
+r1441 | oetiker | 2008-06-29 18:23:50 +0200 | 2 lines
+
+added rrd filename to illegal update message -- he at uninett.no
+
+------------------------------------------------------------------------
+r1440 | oetiker | 2008-06-29 16:08:51 +0200 | 2 lines
+
+rrdtool.spec fix by Anton Blanchard to build without php patch 
+
+------------------------------------------------------------------------
+r1439 | oetiker | 2008-06-29 15:57:00 +0200 | 2 lines
+
+make sure image-with and image-height get returned even when rrdtool is called with --lazy as reported in bug #163
+
+------------------------------------------------------------------------
+r1436 | oetiker | 2008-06-19 15:18:04 +0200 | 3 lines
+
+rrdtool.fetch is returning an extra, bogus, data point.  Attached is a
+patch to correct this. - Gilad Raphaelli. Fix for #161
+
+------------------------------------------------------------------------
+r1435 | oetiker | 2008-06-12 15:54:23 +0200 | 2 lines
+
+added note on %S
+
+------------------------------------------------------------------------
+r1434 | oetiker | 2008-06-11 17:49:24 +0200 | 2 lines
+
+made news the same as the announcement
+
+------------------------------------------------------------------------
+r1432 | oetiker | 2008-06-11 01:12:55 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3.0
+------------------------------------------------------------------------
+r1428 | oetiker | 2008-06-10 18:38:10 +0200 | 2 lines
+
+oops it is 1.3.0 not 1.4.0 yet
+
+------------------------------------------------------------------------
+r1427 | oetiker | 2008-06-10 18:37:39 +0200 | 2 lines
+
+preparing for 1.3
+
+------------------------------------------------------------------------
+r1426 | oetiker | 2008-06-10 18:32:34 +0200 | 4 lines
+
+document the 'internal' functions in rrd.h but mark them as deprecated, so
+that anyone using them will see that they should not be doing it.
+
+
+------------------------------------------------------------------------
+r1425 | oetiker | 2008-06-10 13:16:40 +0200 | 2 lines
+
+flip check for row_count with setting for better code logic
+
+------------------------------------------------------------------------
+r1424 | oetiker | 2008-06-10 11:35:03 +0200 | 2 lines
+
+check row count in RRAs to be > 0 ... by Sebastian Harl
+
+------------------------------------------------------------------------
+r1423 | oetiker | 2008-06-10 09:18:02 +0200 | 2 lines
+
+for windows we must open files in O_BINARY mode
+
+------------------------------------------------------------------------
+r1421 | oetiker | 2008-06-09 18:10:39 +0200 | 6 lines
+
+do NOT export lowlevel functions, since I have no intention supporting these
+interfaces across versions. The symbols are in the library, so if someone
+WANTS to code to them, they are free todo so, but they will have to use our
+internal header files.
+
+
+------------------------------------------------------------------------
+r1420 | oetiker | 2008-06-09 17:49:54 +0200 | 2 lines
+
+add all lowlevel file access functions from the rrd_open interface to the export list.
+
+------------------------------------------------------------------------
+r1419 | oetiker | 2008-06-09 07:12:27 +0200 | 2 lines
+
+fixed indenting
+
+------------------------------------------------------------------------
+r1418 | oetiker | 2008-06-09 07:11:39 +0200 | 1 line
+
+update to rpm spec from Jarod Wilson
+------------------------------------------------------------------------
+r1417 | oetiker | 2008-06-08 23:15:32 +0200 | 2 lines
+
+export some more symbols from librrd
+
+------------------------------------------------------------------------
+r1416 | oetiker | 2008-06-08 23:06:35 +0200 | 2 lines
+
+windows should use a windows font
+
+------------------------------------------------------------------------
+r1415 | oetiker | 2008-06-08 23:05:50 +0200 | 2 lines
+
+drop special case windows font code ... it makes no sense with the new setup
+
+------------------------------------------------------------------------
+r1413 | oetiker | 2008-06-08 19:08:47 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc9
+------------------------------------------------------------------------
+r1412 | oetiker | 2008-06-08 19:08:11 +0200 | 2 lines
+
+fixed pango markup switch ... we still want the text to show even if no markup is enabled
+
+------------------------------------------------------------------------
+r1411 | oetiker | 2008-06-08 18:47:22 +0200 | 2 lines
+
+rrd_freemem has to be exported as well ... 
+
+------------------------------------------------------------------------
+r1409 | oetiker | 2008-06-08 18:23:39 +0200 | 2 lines
+
+fix for ticket #121 jmpbuf on aix is a problem it seems, maybe this makes it better.
+
+------------------------------------------------------------------------
+r1407 | oetiker | 2008-06-08 17:59:20 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc8
+------------------------------------------------------------------------
+r1406 | oetiker | 2008-06-08 17:55:54 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc8
+------------------------------------------------------------------------
+r1405 | oetiker | 2008-06-08 17:55:09 +0200 | 62 lines
+
+From: Sebastian Harl sh tokkee.org
+Date: Sun, 8 Jun 2008 15:01:05 +0200
+Subject: [PATCH] Cleanup the symbols exported by librrd.
+
+Up to know librrd exported a lot of symbols, most of which are to be
+regarded as private symbols. This somewhat pollutes the API as the symbols
+could, in theory, be used by external software and, more importantly,
+makes symbol based dependencies (as recently introduced in e.g. Debian)
+somewhat harder to implement.
+
+This patch does a somewhat large-scale cleanup of the exported symbols:
+
+ * Introduced a librrd.sym file which contains all symbols that are to be
+   exported. This file is then passed to libtool using the -export-symbols
+   option which tells the linker to export the given symbols only (note:
+   according to the libtool manual, this has no effect on some
+   architectures - however, I assume that most architectures in use today
+   do support it).
+
+   librrd.sym contains all symbols originally defined in rrd.h sans
+   LockRRD() (which has been moved to rrd_tool.h). The following functions
+   have been added to rrd.h and the list of exported symbols (some of them
+   have been renamed, see below):
+   - rrd_info()
+   - rrd_info_free()
+   - rrd_info_print()
+   - rrd_info_push()
+   - rrd_lastupdate()
+   - rrd_update_v()
+   - rrd_strerror()
+
+ * Prefixed all public functions and types with "rrd_" to avoid name
+   clashes with other libraries. Also, while I was at it, I introduced
+   typedefs for all custom types and prefixed the time names with "_t" to
+   improve consistency:
+   - enum info_type -> rrd_info_type_t
+   - enum timetype -> rrd_timetype_t
+
+   - union infoval -> rrd_infoval_t
+
+   - struct info_t -> rrd_info_t
+   - struct rrd_context -> rrd_context_t
+   - struct rrd_time_value -> rrd_time_value_t
+
+   - info_free() -> rrd_info_free()
+   - info_free() -> rrd_info_free()
+   - info_print() -> rrd_info_print()
+   - info_push() -> rrd_info_push()
+   - LockRRD() -> rrd_lock() (not public though)
+   - parsetime() -> rrd_parsetime()
+     (and: src/parsetime.c -> src/rrd_parsetime.c)
+   - proc_start_end() -> rrd_proc_start_end()
+   - set_to_DINF() -> rrd_set_to_DINF()
+   - set_to_DNAN() -> rrd_set_to_DNAN()
+
+ * Moved readfile() from rrd_open.c to rrd_cgi.c and declared it static.
+   This function is used in rrd_cgi.c only.
+
+ * rrd_lock() (f.k.a. LockRRD()) now accepts a rrd_file_t pointer instead
+   of an integer to increase encapsulation.
+
+
+------------------------------------------------------------------------
+r1404 | oetiker | 2008-06-07 16:35:03 +0200 | 2 lines
+
+don't bother with don't need when there is neither madvise not fadvise calls
+
+------------------------------------------------------------------------
+r1403 | oetiker | 2008-06-06 18:38:25 +0200 | 2 lines
+
+fix for --font bug (font names wer not being picked up at all). Bug reported by  Dmitry B. Bigunayk
+
+------------------------------------------------------------------------
+r1402 | oetiker | 2008-06-05 22:56:24 +0200 | 2 lines
+
+added pango markup name
+
+------------------------------------------------------------------------
+r1401 | oetiker | 2008-06-05 21:59:18 +0200 | 2 lines
+
+fixed indenting
+
+------------------------------------------------------------------------
+r1400 | oetiker | 2008-06-05 21:59:01 +0200 | 1 line
+
+disable pango markup by default. added --pango-markup option for explicit enablement.
+------------------------------------------------------------------------
+r1399 | oetiker | 2008-06-05 21:58:51 +0200 | 1 line
+
+disable pango markup by default. added --pango-markup option for explicit enablement.
+------------------------------------------------------------------------
+r1398 | oetiker | 2008-06-05 21:57:25 +0200 | 1 line
+
+fixed indenting
+------------------------------------------------------------------------
+r1397 | oetiker | 2008-06-04 18:18:42 +0200 | 2 lines
+
+enable new building for newer tcl versions
+
+------------------------------------------------------------------------
+r1396 | oetiker | 2008-06-02 08:46:57 +0200 | 2 lines
+
+updated documentation of library versioning system
+
+------------------------------------------------------------------------
+r1395 | oetiker | 2008-06-02 08:43:43 +0200 | 3 lines
+
+Had to reset the interface version number due to the change in the rrd_context implementation.
+
+
+------------------------------------------------------------------------
+r1394 | oetiker | 2008-06-02 08:21:42 +0200 | 2 lines
+
+use DNAN instead of NAN since there seem to be issues with gcc on solaris and the NAN experession (and we use DNAN everywhere else anyway).
+
+------------------------------------------------------------------------
+r1393 | oetiker | 2008-06-01 23:12:26 +0200 | 2 lines
+
+integrated gentoo bits and spell fixes by Peter Volkov
+
+------------------------------------------------------------------------
+r1392 | oetiker | 2008-06-01 22:44:01 +0200 | 3 lines
+
+Patch for rrd_context system by sebastian harl, making it simpler and less error prone. Removing one buffer overflow in the process.
+
+
+------------------------------------------------------------------------
+r1389 | oetiker | 2008-05-31 17:58:45 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc7
+------------------------------------------------------------------------
+r1388 | oetiker | 2008-05-31 17:57:39 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc7
+------------------------------------------------------------------------
+r1387 | oetiker | 2008-05-31 17:56:37 +0200 | 2 lines
+
+added pkgconfig build instructions
+
+------------------------------------------------------------------------
+r1386 | oetiker | 2008-05-31 14:28:11 +0200 | 2 lines
+
+make sure vdef calcs only calc as far as originally requested.
+
+------------------------------------------------------------------------
+r1385 | oetiker | 2008-05-28 00:24:32 +0200 | 3 lines
+
+fixed maxlength for sprintf_alloc 50 was not enough ... 1024+strlen(fmt) is much better. This
+makes imginfo work even when there are long image paths.
+
+------------------------------------------------------------------------
+r1382 | oetiker | 2008-05-26 13:45:15 +0200 | 2 lines
+
+updated todo list
+
+------------------------------------------------------------------------
+r1380 | oetiker | 2008-05-26 10:56:58 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc6
+------------------------------------------------------------------------
+r1379 | oetiker | 2008-05-26 09:46:35 +0200 | 2 lines
+
+added notes about new grid lines
+
+------------------------------------------------------------------------
+r1378 | oetiker | 2008-05-26 09:45:19 +0200 | 5 lines
+
+* make y-axis labels NOT run into each other (classic and alt)
+* space horizontal grid lines and lables a bit further apart for tight
+  layouts.
+* let horizontal lines and y axis labels run a little closer for classic grid
+
+------------------------------------------------------------------------
+r1377 | oetiker | 2008-05-25 23:17:30 +0200 | 2 lines
+
+fixed calculation of space at the bottom of the graph
+
+------------------------------------------------------------------------
+r1375 | oetiker | 2008-05-25 22:02:23 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc5
+------------------------------------------------------------------------
+r1374 | oetiker | 2008-05-25 22:00:45 +0200 | 2 lines
+
+fix update compatibility with rrd-1.0.x files
+
+------------------------------------------------------------------------
+r1373 | oetiker | 2008-05-21 00:22:27 +0200 | 2 lines
+
+droped rrd_extra.h from the distro with the python update ... must remove it from the Makefile too
+
+------------------------------------------------------------------------
+r1372 | oetiker | 2008-05-19 23:14:36 +0200 | 5 lines
+
+fixed python bindings:
+* info call isnnow aequivalent to rrdtool info (the same as in the perl and ruby bindings)
+* graphv and updatev calls added
+
+
+------------------------------------------------------------------------
+r1371 | oetiker | 2008-05-19 00:11:56 +0200 | 3 lines
+
+* document tabwidth option
+* fix \t -> tab expansion
+
+------------------------------------------------------------------------
+r1370 | oetiker | 2008-05-18 17:39:41 +0200 | 2 lines
+
+ytr boundery checking ... this is from the GD days ... we don't need this anymore
+
+------------------------------------------------------------------------
+r1369 | oetiker | 2008-05-18 17:11:52 +0200 | 2 lines
+
+fix indenting
+
+------------------------------------------------------------------------
+r1368 | oetiker | 2008-05-18 17:11:42 +0200 | 2 lines
+
+pdf, svg and ps formats were not being created
+
+------------------------------------------------------------------------
+r1366 | oetiker | 2008-05-18 15:06:44 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc4
+------------------------------------------------------------------------
+r1365 | oetiker | 2008-05-18 15:04:36 +0200 | 2 lines
+
+fix year
+
+------------------------------------------------------------------------
+r1364 | oetiker | 2008-05-18 14:53:01 +0200 | 2 lines
+
+PRINT returns from rrd_graph did not work due to an off by one error
+
+------------------------------------------------------------------------
+r1363 | oetiker | 2008-05-18 10:42:18 +0200 | 2 lines
+
+updated build instructions to latest libraries
+
+------------------------------------------------------------------------
+r1362 | oetiker | 2008-05-18 08:37:43 +0200 | 2 lines
+
+improved handling of libintl issues
+
+------------------------------------------------------------------------
+r1360 | oetiker | 2008-05-16 14:29:42 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc3
+------------------------------------------------------------------------
+r1359 | oetiker | 2008-05-16 14:28:37 +0200 | 2 lines
+
+added --no-header to documentation and fixed implementation 
+
+------------------------------------------------------------------------
+r1358 | oetiker | 2008-05-16 14:20:05 +0200 | 2 lines
+
+fixed dump_opt implementation
+
+------------------------------------------------------------------------
+r1357 | oetiker | 2008-05-16 14:18:05 +0200 | 2 lines
+
+added no-header option to rrd_dump
+
+------------------------------------------------------------------------
+r1356 | oetiker | 2008-05-16 14:07:58 +0200 | 2 lines
+
+fix handling of values <= zero for logarithmic display
+
+------------------------------------------------------------------------
+r1354 | oetiker | 2008-05-16 00:39:55 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc2
+------------------------------------------------------------------------
+r1353 | oetiker | 2008-05-16 00:39:09 +0200 | 1 line
+
+prepare for the release of rrdtool-1.3rc2
+------------------------------------------------------------------------
+r1352 | oetiker | 2008-05-16 00:37:26 +0200 | 2 lines
+
+fix portability to mac osx and freebsd -- tobi
+
+------------------------------------------------------------------------
+r1351 | oetiker | 2008-05-13 01:10:59 +0200 | 2 lines
+
+add solaris pod2man location last
+
+------------------------------------------------------------------------
+r1350 | oetiker | 2008-05-13 01:03:04 +0200 | 2 lines
+
+some changes to make things work on opensolaris 2008.05
+
+------------------------------------------------------------------------
+r1349 | oetiker | 2008-05-13 00:42:25 +0200 | 2 lines
+
+for some reason tclrrd.c does not get picked up using $< at least on opensolaris
+
+------------------------------------------------------------------------
+r1348 | oetiker | 2008-05-13 00:23:19 +0200 | 3 lines
+
+allow rrd_rpncalc to build without cairo dependencies ...
+fix warnings
+
+------------------------------------------------------------------------
+r1346 | oetiker | 2008-05-12 23:14:12 +0200 | 2 lines
+
+add intltool*in files to dist
+
+------------------------------------------------------------------------
+r1345 | oetiker | 2008-05-12 18:15:25 +0200 | 2 lines
+
+fixed indenting
+
+------------------------------------------------------------------------
+r1344 | oetiker | 2008-05-12 18:15:02 +0200 | 2 lines
+
+removed c++ comments // 
+
+------------------------------------------------------------------------
+r1343 | oetiker | 2008-05-12 18:09:02 +0200 | 2 lines
+
+added notes about rewrites in this release
+
+------------------------------------------------------------------------
+r1342 | oetiker | 2008-05-12 18:08:40 +0200 | 2 lines
+
+improved handling of library versioning
+
+------------------------------------------------------------------------
+r1341 | oetiker | 2008-05-12 17:35:40 +0200 | 2 lines
+
+should not leave debug enabled
+
+------------------------------------------------------------------------
+r1340 | oetiker | 2008-05-12 17:33:31 +0200 | 10 lines
+
+Fixed handling of unknown data at PDP build time. There was a long standing
+(even documented) missfeature in rrdtool which caused uknown-data to be
+accepted as long as it was less than the mrhb. This was never the intended
+behaviour and had interesting side effects
+(http://oss.oetiker.ch/rrdtool-trac/ticket/125): If you have a 60 Second
+step with 59s unknown data and 1 second of known data the whole become known
+data as long as the mrhb was > step. The intended behaviour was that a step
+should become unknown as soon as it contains more than 50% of unknown data.
+The patch fixes both the documentation and the code.
+
+------------------------------------------------------------------------
+r1339 | oetiker | 2008-05-12 15:22:26 +0200 | 2 lines
+
+the last_ds value fuer unknown is 'U' and not 'UNKN'
+
+------------------------------------------------------------------------
+r1338 | oetiker | 2008-05-04 20:59:20 +0200 | 2 lines
+
+fix for sun sudio 11 incompatibility http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=38555
+
+------------------------------------------------------------------------
+r1335 | oetiker | 2008-05-02 01:23:35 +0200 | 1 line
+
+indenting fixes
+------------------------------------------------------------------------
+r1334 | oetiker | 2008-05-02 01:23:25 +0200 | 1 line
+
+make sure properties are shown via graph_v even in --graph-only mode
+------------------------------------------------------------------------
+r1333 | oetiker | 2008-05-01 08:56:32 +0200 | 2 lines
+
+Make the MakeMakefile script a bit more robust
+
+------------------------------------------------------------------------
+r1332 | oetiker | 2008-04-22 23:40:45 +0200 | 2 lines
+
+fix for #148
+
+------------------------------------------------------------------------
+r1331 | oetiker | 2008-04-21 00:46:39 +0200 | 7 lines
+
+Introduced a alternated interface to rrd_graph using rrd_info style return
+values: rrd_graph_v The graph_v interface returnes additional information
+about the graph including the location of the graphing area within the
+image. When called with '-' as filename it will even return the image data.
+The new interface is supported in the rrdtool command line, RRDs perl and
+ruby bindings.
+
+------------------------------------------------------------------------
+r1329 | oetiker | 2008-04-17 07:35:16 +0200 | 2 lines
+
+indent fix
+
+------------------------------------------------------------------------
+r1328 | oetiker | 2008-04-17 07:35:01 +0200 | 2 lines
+
+do not reset the last_ds store unless the data source type is actually changed.
+
+------------------------------------------------------------------------
+r1327 | oetiker | 2008-04-16 17:50:59 +0200 | 2 lines
+
+fixed 2. x-grid example ... since the lable is valid for the whole day, it must be 86400 wide. --tobi
+
+------------------------------------------------------------------------
+r1324 | oetiker | 2008-04-12 11:29:10 +0200 | 2 lines
+
+alter order of header inclusion for FreeBSD 4.8 compatibility
+
+------------------------------------------------------------------------
+r1323 | oetiker | 2008-04-12 11:21:31 +0200 | 3 lines
+
+do not mess with dst status after running localtime, the system gets confused otherwhise when it comes to times during the switch over periode as DST changes to non DST.
+-- tobi
+
+------------------------------------------------------------------------
+r1322 | oetiker | 2008-03-26 00:02:32 +0100 | 2 lines
+
+added missing " escapes to xml header in rrd_tool.c
+
+------------------------------------------------------------------------
+r1321 | oetiker | 2008-03-25 23:59:49 +0100 | 2 lines
+
+added Florian octo Forster to contrib list
+
+------------------------------------------------------------------------
+r1320 | oetiker | 2008-03-25 23:59:30 +0100 | 2 lines
+
+added missing =back for propper pod syntax
+
+------------------------------------------------------------------------
+r1319 | oetiker | 2008-03-25 23:58:16 +0100 | 2 lines
+
+fix indent
+
+------------------------------------------------------------------------
+r1318 | oetiker | 2008-03-25 23:58:08 +0100 | 2 lines
+
+fix broken header comment section -- Florian octo Forster
+
+------------------------------------------------------------------------
+r1317 | oetiker | 2008-03-25 23:57:42 +0100 | 2 lines
+
+cast size_t to int to avoid warning -- Florian octo Forster
+
+------------------------------------------------------------------------
+r1316 | oetiker | 2008-03-25 23:56:41 +0100 | 2 lines
+
+do not declare DEBUG functions unless compiled in DEBUG mode -- Florian octo Forster
+
+------------------------------------------------------------------------
+r1315 | oetiker | 2008-03-25 23:55:56 +0100 | 2 lines
+
+make helptexts read only memory
+
+------------------------------------------------------------------------
+r1314 | oetiker | 2008-03-25 23:55:13 +0100 | 2 lines
+
+stop complaints about unused variables if not running DEBUG
+
+------------------------------------------------------------------------
+r1313 | oetiker | 2008-03-25 23:49:47 +0100 | 5 lines
+
+Added check for intltool version.
+Use Makefile for cleanup.
+-- Florian octo Forster
+
+
+------------------------------------------------------------------------
+r1311 | oetiker | 2008-03-23 14:43:22 +0100 | 2 lines
+
+added pointer to florian forsters dtd to the rrd dumpt
+
+------------------------------------------------------------------------
+r1310 | oetiker | 2008-03-20 00:36:26 +0100 | 2 lines
+
+fix pkgconfig file name
+
+------------------------------------------------------------------------
+r1306 | oetiker | 2008-03-15 11:39:48 +0100 | 3 lines
+
+reindent
+aded id keyword substitution
+
+------------------------------------------------------------------------
+r1305 | oetiker | 2008-03-15 11:32:10 +0100 | 2 lines
+
+reat nan as FALSE in an IF CDEF
+
+------------------------------------------------------------------------
+r1303 | oetiker | 2008-03-07 09:57:01 +0100 | 10 lines
+
+a nan-safe add operator (ADDNAN) into rrd. I used it to add several incomplete graphs.
+
+NaN + NaN => NaN
+ x + NaN => x
+ NaN + y => y
+ x + y => x + y
+
+-- Timo Stripf tstripf gmx.de
+
+
+------------------------------------------------------------------------
+r1301 | oetiker | 2008-03-02 16:38:05 +0100 | 2 lines
+
+Fix error "cairo_restore without matching cairo_save" when zero-time point is out of graph
+
+------------------------------------------------------------------------
+r1300 | oetiker | 2008-02-25 08:11:00 +0100 | 2 lines
+
+Ignore RRA-end when comparing. coverage.
+
+------------------------------------------------------------------------
+r1298 | oetiker | 2008-02-24 15:27:34 +0100 | 2 lines
+
+fix indents gone out of kileter by patching ... 
+
+------------------------------------------------------------------------
+r1297 | oetiker | 2008-02-24 15:26:46 +0100 | 2 lines
+
+get rid of a few type cast warnings
+
+------------------------------------------------------------------------
+r1296 | oetiker | 2008-02-24 15:26:16 +0100 | 2 lines
+
+fix one segfault while trying to restore an invalid xml file. -- tobi
+
+------------------------------------------------------------------------
+r1294 | oetiker | 2008-02-21 08:20:49 +0100 | 2 lines
+
+make ruby obey destdir
+
+------------------------------------------------------------------------
+r1293 | oetiker | 2008-02-21 08:18:58 +0100 | 2 lines
+
+initial
+
+------------------------------------------------------------------------
+r1292 | oetiker | 2008-02-21 08:12:27 +0100 | 2 lines
+
+make inbternationalized version actually build
+
+------------------------------------------------------------------------
+r1291 | oetiker | 2008-02-21 07:59:19 +0100 | 2 lines
+
+added missing bits from internationalization
+
+------------------------------------------------------------------------
+r1290 | oetiker | 2008-02-19 13:56:44 +0100 | 12 lines
+
+Generate a random cur_row for each RRA during
+create/restore operations. This effectively randomizes the block crossings
+among RRDs created around the same time. Previously, RRDs that were
+created/restored en masse would cross block boundaries simultaneously, which
+is sub-optimal.
+
+Also, this patch enables the user to see the RRA's cur_row pointer via
+rrdinfo. This was useful during debugging.
+
+-- kevin brintnall kbrint qwest.net
+
+
+------------------------------------------------------------------------
+r1289 | oetiker | 2008-02-18 16:04:42 +0100 | 2 lines
+
+Added I18N support for messages printed by rrd_tool.c -- http://oss.oetiker.ch/rrdtool-trac/ticket/144
+
+------------------------------------------------------------------------
+r1285 | oetiker | 2008-02-15 09:49:07 +0100 | 2 lines
+
+check for pdf as well
+
+------------------------------------------------------------------------
+r1284 | oetiker | 2008-02-15 09:44:04 +0100 | 2 lines
+
+check for cairo-ps and cairo-svg explicitly
+
+------------------------------------------------------------------------
+r1280 | oetiker | 2008-02-06 01:12:27 +0100 | 2 lines
+
+ready for beta 4
+
+------------------------------------------------------------------------
+r1279 | oetiker | 2008-02-06 01:10:33 +0100 | 4 lines
+
+* replaced strtok with strtok_r for thread safety
+* fixed im initialization broken after the introduction of dashes ...
+
+
+------------------------------------------------------------------------
+r1278 | oetiker | 2008-02-04 23:34:56 +0100 | 2 lines
+
+in rrd_create we do not use mmaping and thus need to free rrd struct members in any case ... 
+
+------------------------------------------------------------------------
+r1277 | oetiker | 2008-02-04 23:16:14 +0100 | 2 lines
+
+this should help with the memory leak
+
+------------------------------------------------------------------------
+r1276 | oetiker | 2008-02-04 19:18:07 +0100 | 2 lines
+
+added zpl 2.1 to floss exception
+
+------------------------------------------------------------------------
+r1274 | oetiker | 2008-02-01 07:52:56 +0100 | 2 lines
+
+fixed parsing of fontnames with embeded spaces
+
+------------------------------------------------------------------------
+r1272 | oetiker | 2008-01-14 18:11:50 +0100 | 2 lines
+
+remove c++ warnings flag .. this is not c++ after all
+
+------------------------------------------------------------------------
+r1271 | oetiker | 2008-01-14 17:52:49 +0100 | 2 lines
+
+fixed indenting
+
+------------------------------------------------------------------------
+r1270 | oetiker | 2008-01-14 17:51:42 +0100 | 2 lines
+
+fix indents
+
+------------------------------------------------------------------------
+r1269 | oetiker | 2008-01-14 17:50:51 +0100 | 5 lines
+
+* fixed madvise/fadvise detection
+* fixed many compiler warnings
+-- Peter Breitenlohner peb mppmu.mpg.de
+
+
+------------------------------------------------------------------------
+r1266 | oetiker | 2008-01-12 19:37:10 +0100 | 1 line
+
+weekday and time are too tight
+------------------------------------------------------------------------
+r1264 | oetiker | 2008-01-04 23:53:46 +0100 | 2 lines
+
+fontmap resolution was not matching scaled_font resolution ... this killed layouting ... much better now
+
+------------------------------------------------------------------------
+r1263 | oetiker | 2008-01-03 22:30:59 +0100 | 2 lines
+
+get rid of DASHED, only use dashes syntax. less redundancy -- thomas.gutzler gmail.com
+
+------------------------------------------------------------------------
+r1262 | oetiker | 2008-01-02 23:11:26 +0100 | 2 lines
+
+support for dashed lines in graphs
+
+------------------------------------------------------------------------
+r1261 | oetiker | 2008-01-02 23:06:24 +0100 | 2 lines
+
+fix indenting
+
+------------------------------------------------------------------------
+r1260 | oetiker | 2008-01-02 23:06:16 +0100 | 2 lines
+
+ignore errors with txt doc building
+
+------------------------------------------------------------------------
+r1255 | oetiker | 2007-12-12 00:41:21 +0100 | 2 lines
+
+building the docs depends on the presence of pod2man ... which does not seem to be installed necessarily
+
+------------------------------------------------------------------------
+r1253 | oetiker | 2007-12-08 23:15:22 +0100 | 2 lines
+
+added shared library locations into the docs
+
+------------------------------------------------------------------------
+r1252 | oetiker | 2007-12-08 22:35:51 +0100 | 2 lines
+
+include stdlib since putenv is in there on solaris
+
+------------------------------------------------------------------------
+r1251 | oetiker | 2007-12-08 17:57:04 +0100 | 6 lines
+
+fixing solaris portability
+* isinf and isnan definitions fixed
+* check if rt must be linked
+* ordering must be read write in getopt
+* updated build instructions
+
+------------------------------------------------------------------------
+r1247 | oetiker | 2007-11-26 21:12:11 +0100 | 2 lines
+
+fix libdir for python build
+
+------------------------------------------------------------------------
+r1244 | oetiker | 2007-11-21 11:51:48 +0100 | 2 lines
+
+fixed NetBSD spelling
+
+------------------------------------------------------------------------
+r1241 | oetiker | 2007-11-21 07:56:19 +0100 | 2 lines
+
+define bsd source to get access to chroot
+
+------------------------------------------------------------------------
+r1240 | oetiker | 2007-11-21 07:47:17 +0100 | 2 lines
+
+make perlbuild more portable
+
+------------------------------------------------------------------------
+r1238 | oetiker | 2007-11-20 23:22:31 +0100 | 2 lines
+
+enable madvise defines in netbsd
+
+------------------------------------------------------------------------
+r1234 | oetiker | 2007-11-20 01:08:20 +0100 | 3 lines
+
+remove last traces of rrd_nan_inf.h
+fix handling of min==max where min < 0
+
+------------------------------------------------------------------------
+r1228 | oetiker | 2007-11-15 15:39:56 +0100 | 2 lines
+
+re-indented files that have gone out of indent-style over the last few weeks
+
+------------------------------------------------------------------------
+r1227 | oetiker | 2007-11-15 15:36:39 +0100 | 2 lines
+
+integrate rrd_nan_inf header
+
+------------------------------------------------------------------------
+r1226 | oetiker | 2007-11-15 15:35:15 +0100 | 2 lines
+
+Improve layout of documentation. -- Bernhard Fischer
+
+------------------------------------------------------------------------
+r1225 | oetiker | 2007-11-15 15:34:14 +0100 | 5 lines
+
+*  rrd_update(): Unify error path.
+*  parse_template(): Likewise.
+*  allocate_data_structures(): Make error strings use consistent punctuation.
+-- bernhard fischer
+
+------------------------------------------------------------------------
+r1224 | oetiker | 2007-11-15 15:32:37 +0100 | 2 lines
+
+make sure this compiles with aix
+
+------------------------------------------------------------------------
+r1213 | oetiker | 2007-11-08 11:16:27 +0100 | 2 lines
+
+fixed start end time in ruby fetch and added step size -- Mike Perham mperham gmail
+
+------------------------------------------------------------------------
+r1211 | oetiker | 2007-11-06 22:27:52 +0100 | 2 lines
+
+updated build instructions
+
+------------------------------------------------------------------------
+r1209 | oetiker | 2007-11-04 22:56:19 +0100 | 2 lines
+
+handle errors properly ... in RRDp read call 
+
+------------------------------------------------------------------------
+r1204 | oetiker | 2007-09-16 17:35:11 +0200 | 2 lines
+
+no reason to die when posixfadvise is not sucessful
+
+------------------------------------------------------------------------
+r1203 | oetiker | 2007-09-11 08:28:15 +0200 | 4 lines
+
+Allow to the the smoothing window size other thatn the default 5%.
+-- Evan Miller emiller imvu.com
+
+
+------------------------------------------------------------------------
+r1202 | oetiker | 2007-09-11 08:16:52 +0200 | 2 lines
+
+added msync before unmap
+
+------------------------------------------------------------------------
+r1201 | oetiker | 2007-09-08 07:23:23 +0200 | 3 lines
+
+added STDEV aggregation function for VDEF. -- Patrick J Cherry patrick bytemark.co.uk
+
+
+------------------------------------------------------------------------
+r1200 | oetiker | 2007-09-08 00:53:41 +0200 | 2 lines
+
+a few leanups -- Bernhard Fischer
+
+------------------------------------------------------------------------
+r1199 | oetiker | 2007-09-06 11:06:04 +0200 | 2 lines
+
+added missing ;
+
+------------------------------------------------------------------------
+r1198 | oetiker | 2007-09-06 10:42:22 +0200 | 3 lines
+
+* mimic write() and read() even better -- Bernhard Fischer
+
+
+------------------------------------------------------------------------
+r1197 | oetiker | 2007-09-06 10:40:36 +0200 | 5 lines
+
+rrd_open.c (rrd_read): Mimicing read() behaviour for EOF case and NULL buffer case.
+-- Bernhard Fischer
+
+
+
+------------------------------------------------------------------------
+r1196 | oetiker | 2007-09-02 18:55:01 +0200 | 3 lines
+
+fixed speling of horizon
+
+
+------------------------------------------------------------------------
+r1194 | oetiker | 2007-08-29 08:43:16 +0200 | 2 lines
+
+a better performance tester
+
+------------------------------------------------------------------------
+r1193 | oetiker | 2007-08-16 09:31:53 +0200 | 2 lines
+
+added holt winters example back into the examples documentation
+
+------------------------------------------------------------------------
+r1192 | oetiker | 2007-08-14 23:59:31 +0200 | 18 lines
+
+Fix for HoltWinters phase-shift bug described below.
+
+When one or more primary data point times were missed, the SEASONAL and
+DEVSEASONAL archives were marked as being up-to-date, so that they would not
+be written to. It was correct not to write to these archives, but the code
+failed to advance the pointers within the SEASONAL and DEVSEASONAL archives
+so that future updates would go to the correct location in the archives.
+
+Rather than mark these archives as up-to-date (by setting
+rra_step_cnt[rra_idx] = 0), my patch allocates a new "skip_update" array
+that is set to 1 for SEASONAL and DEVSEASONAL archives that have missed one
+or more primary data points. When an RRA is written to, the cur_row pointer
+advancement happens for all archives, but the skip_update array is checked
+just before actually writing out the changes.
+
+Please give it a whirl!
+-- Evan Miller emiller imvu.com
+
+------------------------------------------------------------------------
+r1191 | oetiker | 2007-08-13 22:06:10 +0200 | 3 lines
+
+Refactored rrd_update code in preparation of finding the HW update
+problem -- Evan Miller
+
+------------------------------------------------------------------------
+r1190 | oetiker | 2007-08-07 17:02:08 +0200 | 2 lines
+
+updated build instructions for 1.3
+
+------------------------------------------------------------------------
+r1185 | oetiker | 2007-08-03 21:46:17 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.99907080300
+------------------------------------------------------------------------
+r1184 | oetiker | 2007-08-03 21:45:01 +0200 | 2 lines
+
+remove some things we do not need anymore in 1.3
+
+------------------------------------------------------------------------
+r1183 | oetiker | 2007-08-03 21:43:47 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.99907080300
+------------------------------------------------------------------------
+r1182 | oetiker | 2007-08-03 21:43:21 +0200 | 2 lines
+
+prepare for 1.3 beta 1
+
+------------------------------------------------------------------------
+r1181 | oetiker | 2007-08-03 21:26:41 +0200 | 2 lines
+
+continue with the revision numbering
+
+------------------------------------------------------------------------
+r1180 | oetiker | 2007-08-03 21:17:13 +0200 | 2 lines
+
+added notes on pango inline formatting
+
+------------------------------------------------------------------------
+r1178 | oetiker | 2007-08-01 17:29:09 +0200 | 2 lines
+
+only release cairo stuff if we ever initialized it.
+
+------------------------------------------------------------------------
+r1177 | oetiker | 2007-08-01 17:28:03 +0200 | 2 lines
+
+fix for 64bit portability problem ... unsigned long is not int
+
+------------------------------------------------------------------------
+r1175 | oetiker | 2007-07-31 06:53:04 +0200 | 2 lines
+
+reindented
+
+------------------------------------------------------------------------
+r1173 | oetiker | 2007-07-25 22:38:37 +0200 | 2 lines
+
+fixed indenting
+
+------------------------------------------------------------------------
+r1172 | oetiker | 2007-07-25 22:38:26 +0200 | 2 lines
+
+make sure we check input even when the previous update was a 'U' ... and some indenting fixes
+
+------------------------------------------------------------------------
+r1169 | oetiker | 2007-07-22 17:51:39 +0200 | 2 lines
+
+new consolidation functions must be added last or this will break binary compatibility
+
+------------------------------------------------------------------------
+r1168 | oetiker | 2007-07-22 17:50:21 +0200 | 2 lines
+
+don't force data out ... let cache management do this
+
+------------------------------------------------------------------------
+r1167 | oetiker | 2007-07-22 11:47:53 +0200 | 1 line
+
+Only create version 4 rrd files if the new holtwinters MHW.. CF is used.
+------------------------------------------------------------------------
+r1166 | oetiker | 2007-07-21 21:55:00 +0200 | 5 lines
+
+* remove some experimental code from rrd_open
+* rrd_dontneed will release all data except for header blocks and RRA hot blocks 
+  which are going to be updated withing 10 minutes.
+
+
+------------------------------------------------------------------------
+r1165 | oetiker | 2007-07-21 21:53:52 +0200 | 3 lines
+
+for now, do not release fetched data ... in the future we may call rrd_dontneed and let the users decied with an option
+if they want to keep the data in cache ... 
+
+------------------------------------------------------------------------
+r1164 | oetiker | 2007-07-21 21:52:17 +0200 | 2 lines
+
+the fonts are now taken from the system. we do not distribute them anympore
+
+------------------------------------------------------------------------
+r1163 | oetiker | 2007-07-21 21:37:50 +0200 | 2 lines
+
+not on update rrd version
+
+------------------------------------------------------------------------
+r1162 | oetiker | 2007-07-21 00:20:18 +0200 | 2 lines
+
+we have a new holtwinders aggregation fucntion, so we have a new version ...
+
+------------------------------------------------------------------------
+r1161 | oetiker | 2007-07-21 00:19:53 +0200 | 2 lines
+
+check for fadvise all the time
+
+------------------------------------------------------------------------
+r1160 | oetiker | 2007-07-21 00:16:36 +0200 | 2 lines
+
+better docs on the aggregate functions
+
+------------------------------------------------------------------------
+r1159 | oetiker | 2007-07-19 00:02:18 +0200 | 2 lines
+
+added note on locale
+
+------------------------------------------------------------------------
+r1158 | oetiker | 2007-07-18 23:59:10 +0200 | 2 lines
+
+some more piechart removed
+
+------------------------------------------------------------------------
+r1157 | oetiker | 2007-07-18 23:47:26 +0200 | 1 line
+
+make sure all ascii to float parsing uses LC_NUMERIC = C so that we do not stuble on locales confusing the , with a .
+------------------------------------------------------------------------
+r1156 | oetiker | 2007-07-18 02:30:49 +0200 | 9 lines
+
+* rrd_open: rrd_close does not purge file from cache
+* rrd_open: new function rrd_dontneed for purging un-needed pages from core
+* rrd_open: in linux at least only fadivse DONTNEED has the power to purge
+  pages from cache, so letst call madvise as well as fadvise
+* rrd_create: uses open/write/close now, flushes file to disk and keeps only hot pages in core
+* rrd_update: keeps only hot pages in core
+* configure enables FADVISE even when mmap is in use
+
+
+------------------------------------------------------------------------
+r1155 | oetiker | 2007-07-17 23:46:00 +0200 | 2 lines
+
+added comment on float cookie
+
+------------------------------------------------------------------------
+r1154 | oetiker | 2007-07-16 08:37:07 +0200 | 2 lines
+
+fix for fetch in ruby bindings and support for info added.
+
+------------------------------------------------------------------------
+r1149 | oetiker | 2007-07-12 22:33:47 +0200 | 2 lines
+
+improve wording
+
+------------------------------------------------------------------------
+r1148 | oetiker | 2007-07-12 22:33:37 +0200 | 2 lines
+
+fix tcl build settup
+
+------------------------------------------------------------------------
+r1146 | oetiker | 2007-07-12 01:08:47 +0200 | 2 lines
+
+usr rrd_free for freeing the rrd structs ... vito caputo
+
+------------------------------------------------------------------------
+r1141 | oetiker | 2007-07-05 17:19:27 +0200 | 2 lines
+
+prevent potential segfaults on boxes where time_t is not long
+
+------------------------------------------------------------------------
+r1134 | oetiker | 2007-06-18 20:25:35 +0200 | 2 lines
+
+fix indentation
+
+------------------------------------------------------------------------
+r1133 | oetiker | 2007-06-18 18:05:07 +0200 | 8 lines
+
+Bernhard Fischer:
+
+- move several static struct option out of loops and makes them
+  non-static
+- moves some functions from old-style definitions into new-style
+  definitions
+
+
+------------------------------------------------------------------------
+r1132 | oetiker | 2007-06-17 01:20:23 +0200 | 2 lines
+
+Bernhard is not Benrard
+
+------------------------------------------------------------------------
+r1130 | oetiker | 2007-06-15 23:49:52 +0200 | 1 line
+
+notes on evans contribs
+------------------------------------------------------------------------
+r1129 | oetiker | 2007-06-15 23:41:54 +0200 | 3 lines
+
+rrdtool.spec from Jarod "redhat" Wilson
+
+
+------------------------------------------------------------------------
+r1127 | oetiker | 2007-06-15 10:09:13 +0200 | 2 lines
+
+updated contributors
+
+------------------------------------------------------------------------
+r1126 | oetiker | 2007-06-15 10:01:04 +0200 | 2 lines
+
+added note on TEXTALIGN
+
+------------------------------------------------------------------------
+r1125 | oetiker | 2007-06-15 09:59:01 +0200 | 46 lines
+
+There are two popular variants of the Holt-Winters forecasting method; RRDtool
+supports the "additive" method, which means that seasonal variation is simply
+added to the baseline. For our application, it would be more appropriate to use
+the "multiplicative" Holt-Winters method, where seasonal variation is a
+coefficient multiplied by the baseline.  Quick example to illustrate the
+difference: if the average doubles season-over-season, the additive method
+would predict the delta between min and max to be constant, whereas the
+multiplicative method would predict the delta to double as well.
+
+Attached is a patch against trunk to support the multiplicative method.  I've
+done this with a new consolidation function, MHWPREDICT, which is essentially
+interchangeable with HWPREDICT. There is a noticeable improvement in prediction
+deviations for certain types of functions; the attachments show HWPREDICT and
+MHWPREDICT predictions for a function with an x*sin(x) component.
+
+Because HWPREDICT and MHWPREDICT differ only in their equations, I've factored
+out their math into rrd_hw_math.c. The appropriate smoothing functions are
+passed to the update functions in a container of function pointers, which are
+called where appropriate. Thus the additive and multiplicative methods use the
+same update functions, and the right equations are evaluated without having
+flag checks everywhere. This approach, I think, makes the algorithms quite
+clear, with minimal duplicate code.
+
+I have moved update_hwpredict, update_seasonal, update_devpredict,
+update_devseasonal, and update_failures into a separate file, rrd_hw_update.c,
+with some slight refactoring related to rrd_hw_math.c. I ran some
+regression tests against trunk to make sure I didn't break anything with
+the existing HWPREDICT code.
+
+MHWPREDICT uses the same deviation smoothing and failure detection algorithms
+as HWPREDICT.
+
+Some helpful references on the multiplicative Holt-Winters method:
+
+http://www.it.iitb.ac.in/~praj/acads/seminar/04329008_ExponentialSmoothing.pdf
+(a student's quick overview of additive vs. multiplicative HW)
+
+http://ideas.repec.org/p/msh/ebswps/1999-1.html (paper on variations to the
+multiplicative Holt-Winters, including variance calculations; FYI, my
+implementation uses "Model 1")
+
+My employer and the owner of this patch (IMVU, Inc.) is happy to license it
+under the same terms as RRDtool, i.e. give it to the project.
+-- Evan Miller emiller imvu.com
+
+
+------------------------------------------------------------------------
+r1124 | oetiker | 2007-06-15 08:43:36 +0200 | 2 lines
+
+oops missed to update the in memory output interface here
+
+------------------------------------------------------------------------
+r1123 | oetiker | 2007-06-15 08:28:47 +0200 | 3 lines
+
+added interface to get rendered image via a pointer to allocated memory ... Evan Miller emmiller gmail.com
+
+
+------------------------------------------------------------------------
+r1122 | oetiker | 2007-06-15 08:12:55 +0200 | 2 lines
+
+improve fontnaming
+
+------------------------------------------------------------------------
+r1121 | oetiker | 2007-06-14 22:30:13 +0200 | 2 lines
+
+fixed indentation
+
+------------------------------------------------------------------------
+r1120 | oetiker | 2007-06-14 22:28:44 +0200 | 1 line
+
+added TEXTALIGN command to change the default text alignment
+------------------------------------------------------------------------
+r1119 | oetiker | 2007-06-13 18:53:32 +0200 | 2 lines
+
+fixed tcl includes
+
+------------------------------------------------------------------------
+r1118 | oetiker | 2007-06-13 18:51:06 +0200 | 2 lines
+
+be more helpful when raising rb_eTypeError in string_arr string_arr_new(VALUE rb_strings). This patch indicates which index is in error as well as the type you are erroneously passing. -- anonymous
+
+------------------------------------------------------------------------
+r1116 | oetiker | 2007-06-12 22:36:50 +0200 | 6 lines
+
+Bernhard Fischer:
+- fix nulling the updvals
+- cosmetic change to move the option struct out of the loop.
+- need to operate on a copy of optarg
+
+
+------------------------------------------------------------------------
+r1115 | oetiker | 2007-06-11 21:45:42 +0200 | 2 lines
+
+added TRENDNAN function -- Timo Stripf
+
+------------------------------------------------------------------------
+r1114 | oetiker | 2007-06-11 21:45:16 +0200 | 1 line
+
+allow output to stdout -- Timo Stripf
+------------------------------------------------------------------------
+r1113 | oetiker | 2007-06-11 18:49:01 +0200 | 2 lines
+
+added more news
+
+------------------------------------------------------------------------
+r1112 | oetiker | 2007-06-11 18:34:51 +0200 | 2 lines
+
+fixed indentation, added documentation note on gridfitting.
+
+------------------------------------------------------------------------
+r1111 | oetiker | 2007-06-11 18:33:59 +0200 | 2 lines
+
+fix arrow locations
+
+------------------------------------------------------------------------
+r1110 | oetiker | 2007-06-11 18:20:20 +0200 | 2 lines
+
+disable gridfitting for vector formats
+
+------------------------------------------------------------------------
+r1109 | oetiker | 2007-06-11 18:14:40 +0200 | 2 lines
+
+make pdf output work
+
+------------------------------------------------------------------------
+r1108 | oetiker | 2007-06-11 17:32:41 +0200 | 1 line
+
+added detail
+------------------------------------------------------------------------
+r1107 | oetiker | 2007-06-11 17:11:10 +0200 | 5 lines
+
+--font-render-mode is back, and there is also
+--graph-render-mode now. It allows to enable
+mono graphs that look strikingly like rrdtool 1.0.x 
+--tobi
+
+------------------------------------------------------------------------
+r1106 | oetiker | 2007-06-11 15:36:40 +0200 | 5 lines
+
+Bernhard Fischer:
+- NEWS mention the new file accessors
+- rrd_update.c: remove unused some cruft
+
+
+------------------------------------------------------------------------
+r1105 | oetiker | 2007-06-11 12:09:54 +0200 | 7 lines
+
+Bernhard Fischer:
+
+- fix maintaining our file-pos when we have to wrap the rra_ptr in
+  update().
+- no need to update the header-data a second time for the mmap case.
+
+
+------------------------------------------------------------------------
+r1104 | oetiker | 2007-06-11 02:23:51 +0200 | 2 lines
+
+updated news
+
+------------------------------------------------------------------------
+r1103 | oetiker | 2007-06-11 02:22:23 +0200 | 4 lines
+
+* added some documentation
+* updated version number
+
+
+------------------------------------------------------------------------
+r1102 | oetiker | 2007-06-11 01:55:13 +0200 | 2 lines
+
+switched graphics library from arts to cairo+pango
+
+------------------------------------------------------------------------
+r1101 | oetiker | 2007-06-04 13:15:11 +0200 | 3 lines
+
+Bernhard Fischer:
+- new configure option --enable-static-programs
+
+------------------------------------------------------------------------
+r1100 | oetiker | 2007-06-01 21:11:49 +0200 | 5 lines
+
+Bernhard:
+- implement resize SHRINK for FD (mmap is to be done)
+- indent
+
+
+------------------------------------------------------------------------
+r1099 | oetiker | 2007-06-01 19:59:25 +0200 | 2 lines
+
+--full-size-mode with and without --no-legend should work now -- Matthew Chambers
+
+------------------------------------------------------------------------
+r1098 | oetiker | 2007-06-01 19:35:46 +0200 | 4 lines
+
+Bernhard
+- fill the file with DNAN and add the remaining data in after the fact ... 
+
+
+------------------------------------------------------------------------
+r1097 | oetiker | 2007-06-01 19:34:15 +0200 | 3 lines
+
+Bernhard Fischer 
+- implement resize, growing part. truncation is to be done.
+
+------------------------------------------------------------------------
+r1096 | oetiker | 2007-06-01 11:10:33 +0200 | 6 lines
+
+Bernhard Fischer
+- use 'z' length modifier when printing size_t
+- add a cast to __rrd_read and document why it is there
+- add RANDOM hint for the header
+
+
+------------------------------------------------------------------------
+r1095 | oetiker | 2007-05-31 20:47:13 +0200 | 7 lines
+
+Bernhard:
+- plug tiny mem-leak in error path of rrd_close where freeing the
+  rrd_file was forgotten.
+- improve two error messages
+- use CHECK_MADVISE_OVERLAPS per default
+
+
+------------------------------------------------------------------------
+r1094 | oetiker | 2007-05-30 21:56:34 +0200 | 2 lines
+
+fix rrd_write -- Bernhard Fischer
+
+------------------------------------------------------------------------
+r1093 | oetiker | 2007-05-30 14:41:39 +0200 | 1 line
+
+fix indenting ... again
+------------------------------------------------------------------------
+r1092 | oetiker | 2007-05-30 14:39:30 +0200 | 6 lines
+
+From Bernhard Fischer
+
+- rrd_close(): call close on the file and use rrd_close consistently
+- clean up some error paths. The fadvise error path is leaking memory (see XXX in these spots).
+
+
+------------------------------------------------------------------------
+r1089 | oetiker | 2007-05-30 07:23:07 +0200 | 3 lines
+
+switch for rrd_graph to specify the outer-size of the graph and not just the
+size of the canvas: --full-size-mode -- matthew.chambers vanderbilt.edu
+
+------------------------------------------------------------------------
+r1088 | oetiker | 2007-05-29 23:29:17 +0200 | 22 lines
+
+More updates from Bernhard Fischer
+
+- flag rrd_resize's old file with RRD_COPY
+- cleanup error-handling pathes in rrd_update and fix a few typos in
+  comments
+- rrd_close(): implement printing mincore results for the rrd if
+  DEBUG=2 was defined
+- rrd_open(): madvise start addresses need to be page-aligned; implement
+  alternative path to the fine-grained (i.e. exact) madvise by flagging
+  just the first two pages as needed (see TWO_PAGES). Implement
+  alternative path that records the last madvise()ed area to avoid
+  redundant calls to madvise() on identical areas (due to
+  page-alignment constraints) -- see CHECK_MADVISE_OVERLAPS. Implement
+  path for USE_DIRECT_IO.
+- configure: add check for O_DIRECT flag to open(2). Add option
+  --enable-direct-io. Add _GNU_SOURCE to CFLAGS to silence warnings
+  about chroot which is marked LEGACY since SUSv2 and is a non POSIX
+  extension. Make checks for posix_fadvise() dependant on
+  --disable-mmap, since we do not need fadvise for the mmap case.
+
+
+
+------------------------------------------------------------------------
+r1086 | oetiker | 2007-05-25 17:24:32 +0200 | 2 lines
+
+tobis old cruft removal program ...
+
+------------------------------------------------------------------------
+r1085 | oetiker | 2007-05-25 15:14:35 +0200 | 8 lines
+
+updates from Bernhard Fischer rep dot nop gmail com
+- add some more rrd_sterror calls to failure paths.
+- make rrdtool updatev work like 1.2.23 (i.e. multiple values are still
+  broken, but at least updating a single value works; see
+  http://oss.oetiker.ch/rrdtool-trac/ticket/8)
+- indent touched files.
+
+
+------------------------------------------------------------------------
+r1084 | oetiker | 2007-05-25 15:12:07 +0200 | 19 lines
+
+Updates from Bernhard Fischer rep dot nop gmail com
+- fix typo in rrd_fetch where rrd_read result was checked against an
+  incorrect size.
+- in rrd_fetch, drop rrd_head_size in favour of rrd_file->header_len
+- in rrd_fetch, make the message "post fetch" unambiguous (now past vs.
+  post).
+- change usage of param rdwr of rrd_open: allow for RRD_READONLY,
+  RRD_READWRITE, RRD_CREAT, RRD_READAHEAD; adjust callers accordingly:
+  + rrd_resize needs CREAT
+  + rrd_dump may want READAHEAD
+- implement FD based I/O in rrd_open, rrd_read, rrd_write, rrd_seek.
+- in rrd_update, unify write_RRA_row().
+- sort | uniq the -T in .indent.pro (info_t was duplicated)
+- add stub of an option to use O_DIRECT to the configury
+- in Makefile.am, simplify the "indent" invocation of find:
+  My find may not support "-o" resp. "-or" nor braces.
+  Using -name "*.[ch]" works everywhere, AFAIK.
+
+
+------------------------------------------------------------------------
+r1083 | oetiker | 2007-05-24 10:26:39 +0200 | 2 lines
+
+use proper preprocessor directives for the config-checks. -- tobi
+
+------------------------------------------------------------------------
+r1082 | oetiker | 2007-05-24 09:21:48 +0200 | 2 lines
+
+fixed version number for development
+
+------------------------------------------------------------------------
+r1081 | oetiker | 2007-05-24 08:16:01 +0200 | 3 lines
+
+indent all the rest of the code, and add some typedefs to indent.pro
+there is now a indent makefile target
+
+------------------------------------------------------------------------
+r1080 | oetiker | 2007-05-23 23:40:21 +0200 | 2 lines
+
+removed superfluouse code
+
+------------------------------------------------------------------------
+r1079 | oetiker | 2007-05-23 23:39:58 +0200 | 2 lines
+
+added more indenting rules
+
+------------------------------------------------------------------------
+r1078 | oetiker | 2007-05-23 23:33:45 +0200 | 3 lines
+
+reindented everything according to .indent.pro
+
+
+------------------------------------------------------------------------
+r1077 | oetiker | 2007-05-23 22:57:43 +0200 | 2 lines
+
+profile must be in the source directory to work
+
+------------------------------------------------------------------------
+r1076 | oetiker | 2007-05-23 22:57:24 +0200 | 2 lines
+
+tabs be gone!
+
+------------------------------------------------------------------------
+r1075 | oetiker | 2007-05-23 22:42:13 +0200 | 4 lines
+
+* progress in moving all the fileaccess over to a wrapper system that can do fd based and mmap based fileaccess transparently ... 
+* small fixes left and right to improve code quality and stability.
+-- Bernhard Fischer rep dot nop gmail com
+
+------------------------------------------------------------------------
+r1074 | oetiker | 2007-05-23 18:10:23 +0200 | 2 lines
+
+we are going to use indent from now on to keep code indenting consistent throughout the project
+
+------------------------------------------------------------------------
+r1073 | oetiker | 2007-05-23 18:08:14 +0200 | 2 lines
+
+new trunk based on current 1.2
+
+------------------------------------------------------------------------
+r1071 | oetiker | 2007-05-22 22:46:25 +0200 | 2 lines
+
+fixed spelling
+
+------------------------------------------------------------------------
+r1070 | oetiker | 2007-05-22 22:44:57 +0200 | 4 lines
+
+* better tests for madvise, fadvise and fdatasync 
+* fix inclusion of fcntl.h
+* clenups for configure.ac -- Bernhard Fischer rep dot nop gmail com
+
+------------------------------------------------------------------------
+r1067 | oetiker | 2007-05-19 07:47:29 +0200 | 2 lines
+
+update defines according to manual pageentry
+
+------------------------------------------------------------------------
+r1066 | oetiker | 2007-05-18 18:40:55 +0200 | 2 lines
+
+added madvise MADV_RANDOM is rrd_update uses mmap
+
+------------------------------------------------------------------------
+r1065 | oetiker | 2007-05-18 13:56:34 +0200 | 5 lines
+
+* dropping in rrd_update is probably overkill since we may be dropping too much.
+* in create we have to flush before dropping.
+* read fcntl.h after defining the __USE_XOPEN2K
+* fix drop code in fetch ... 
+
+------------------------------------------------------------------------
+r1064 | oetiker | 2007-05-17 13:38:54 +0200 | 2 lines
+
+now the fadvise code actually compiles ... let the testing begin.
+
+------------------------------------------------------------------------
+r1063 | oetiker | 2007-05-17 10:44:26 +0200 | 2 lines
+
+new better ? performance test ... work in progress
+
+------------------------------------------------------------------------
+r1062 | oetiker | 2007-05-17 10:44:06 +0200 | 7 lines
+
+added posix_fadvise support (untested) ... this should help performance by
+stopping read-ahead and droping buffer cache for all rrd data except the
+file header portion. Newly created files are fdsynced to disk and released
+from cache after creation, to soften the blow on buffer cache by creating
+new rrds.
+
+
+------------------------------------------------------------------------
+r1061 | oetiker | 2007-05-16 22:35:56 +0200 | 2 lines
+
+remove tabs and replace with 8 spaces
+
+------------------------------------------------------------------------
+r1060 | oetiker | 2007-05-15 10:39:17 +0200 | 2 lines
+
+use libdir instead of exec_prefix/lib ... maybe someone wants their libraries in another place
+
+------------------------------------------------------------------------
+r1059 | oetiker | 2007-05-15 10:36:52 +0200 | 2 lines
+
+yet another attempt to make the python build environment REALY cool
+
+------------------------------------------------------------------------
+r1057 | oetiker | 2007-05-09 17:26:57 +0200 | 3 lines
+
+make sure the python extension gets the final resting place of the rrdlibrary compiled in ... 
+
+
+------------------------------------------------------------------------
+r1056 | oetiker | 2007-05-08 17:10:21 +0200 | 3 lines
+
+ruby complained about finding a previous copy of the rrdtool extension ... very odd thing actually ...
+adding RUBYARCHDIR= seems to help ... 
+
+------------------------------------------------------------------------
+r1055 | oetiker | 2007-05-06 21:38:22 +0200 | 2 lines
+
+don't use round since it is c99 ... use floor(x+0.5) for positive numbers instead.
+
+------------------------------------------------------------------------
+r1054 | oetiker | 2007-05-06 10:50:11 +0200 | 2 lines
+
+print the name of the HW cf in debug mode -- Helge Oldach
+
+------------------------------------------------------------------------
+r1053 | oetiker | 2007-05-03 14:49:44 +0200 | 2 lines
+
+added some more rounding for int to float comparisons
+
+------------------------------------------------------------------------
+r1052 | oetiker | 2007-05-03 14:43:15 +0200 | 2 lines
+
+Testing an double and an integer for equality is bound to produce odd results on times. Don't do it! -- rrdtool@oldach.net
+
+------------------------------------------------------------------------
+r1050 | oetiker | 2007-05-02 20:06:05 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.23
+------------------------------------------------------------------------
+r1049 | oetiker | 2007-05-02 20:05:37 +0200 | 2 lines
+
+fix python install for virgin systems
+
+------------------------------------------------------------------------
+r1047 | oetiker | 2007-05-02 17:31:29 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.22
+------------------------------------------------------------------------
+r1046 | oetiker | 2007-05-02 17:31:05 +0200 | 2 lines
+
+fixed old urls in code
+
+------------------------------------------------------------------------
+r1045 | oetiker | 2007-05-02 17:23:34 +0200 | 2 lines
+
+fix python for staged installs
+
+------------------------------------------------------------------------
+r1044 | oetiker | 2007-05-02 07:08:21 +0200 | 2 lines
+
+fixed path to rrd_format.h in tcl bindings
+
+------------------------------------------------------------------------
+r1042 | oetiker | 2007-05-01 22:41:59 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.21
+------------------------------------------------------------------------
+r1041 | oetiker | 2007-05-01 22:40:15 +0200 | 2 lines
+
+if the graph goes 'down' minval must be hanged instead
+
+------------------------------------------------------------------------
+r1039 | oetiker | 2007-05-01 18:36:02 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.20
+------------------------------------------------------------------------
+r1038 | oetiker | 2007-05-01 18:24:03 +0200 | 2 lines
+
+updated win32 and netware Makefiles -- Guenter Knauf
+
+------------------------------------------------------------------------
+r1037 | oetiker | 2007-05-01 18:23:19 +0200 | 2 lines
+
+added some const casts
+
+------------------------------------------------------------------------
+r1036 | oetiker | 2007-05-01 18:19:47 +0200 | 3 lines
+
+added --alt-autoscale-min (see --alt-autoscale-max) -- Helge Oldach
+
+
+------------------------------------------------------------------------
+r1032 | oetiker | 2007-04-10 07:43:34 +0200 | 2 lines
+
+untabified rrd_graph.c
+
+------------------------------------------------------------------------
+r1031 | oetiker | 2007-04-10 07:41:50 +0200 | 2 lines
+
+use the shorthand for vidx ... 
+
+------------------------------------------------------------------------
+r1030 | oetiker | 2007-04-10 07:27:04 +0200 | 2 lines
+
+the rrd_graph_check_vname function is not used anywhere in the code ... 
+
+------------------------------------------------------------------------
+r1029 | oetiker | 2007-04-06 09:28:33 +0200 | 2 lines
+
+release font resources after thy have been used ... -- Travis Spencer
+
+------------------------------------------------------------------------
+r1028 | oetiker | 2007-04-02 08:21:19 +0200 | 6 lines
+
+new function rrd_fetch_r() (and make the
+strings const char* instead of char*).  The only difference between
+rrd_fetch_r() and rrd_fetch_fn() is that rrd_fetch_r() receives the
+consolidation function as a string (instead of an enum cf_en) and is thread-safe -- Sam Umbach
+
+
+------------------------------------------------------------------------
+r1027 | oetiker | 2007-04-02 08:18:15 +0200 | 2 lines
+
+make xml2rrd more robust on invalid input -- Florian Forster
+
+------------------------------------------------------------------------
+r1026 | oetiker | 2007-03-29 21:08:26 +0200 | 2 lines
+
+added vardef
+
+------------------------------------------------------------------------
+r1021 | oetiker | 2007-03-15 22:10:18 +0100 | 2 lines
+
+fix the snprintf call for vtag ... it was using the wrong size -- kili
+
+------------------------------------------------------------------------
+r1020 | oetiker | 2007-03-15 22:03:51 +0100 | 2 lines
+
+fixed strerror_r usage ... #85
+
+------------------------------------------------------------------------
+r1019 | oetiker | 2007-03-11 14:08:31 +0100 | 2 lines
+
+fix netware and win32 makefiles for new getopt names
+
+------------------------------------------------------------------------
+r1018 | oetiker | 2007-03-11 14:04:41 +0100 | 2 lines
+
+enable ID keyword in all source files
+
+------------------------------------------------------------------------
+r1017 | oetiker | 2007-03-11 13:57:38 +0100 | 2 lines
+
+do not use gnuisms in Makefile rules ($<)
+
+------------------------------------------------------------------------
+r1016 | oetiker | 2007-03-11 13:41:46 +0100 | 2 lines
+
+use Guenters latest Netware Makefile ... 
+
+------------------------------------------------------------------------
+r1014 | oetiker | 2007-03-10 18:44:12 +0100 | 2 lines
+
+axe the double quotes on $perlcc in configure to allow for program names with arguments.
+
+------------------------------------------------------------------------
+r1013 | oetiker | 2007-03-10 18:36:32 +0100 | 2 lines
+
+integers can be negative ... fixed the test for this in rrd_update -- rians cc usu edu
+
+------------------------------------------------------------------------
+r1012 | oetiker | 2007-03-03 12:03:38 +0100 | 4 lines
+
+* build extensions last since this seems to be most likely to fail
+* do more testing before building the ruby extension
+
+
+------------------------------------------------------------------------
+r1010 | oetiker | 2007-02-24 18:23:02 +0100 | 2 lines
+
+fix memmory problem in rrd_dump.c
+
+------------------------------------------------------------------------
+r1008 | oetiker | 2007-02-14 19:54:29 +0100 | 2 lines
+
+new operator ABS added -- 
+
+------------------------------------------------------------------------
+r1007 | oetiker | 2007-02-14 19:48:21 +0100 | 2 lines
+
+renamed getopt to rrd_getopt to avoid confusion on some systems ... 
+
+------------------------------------------------------------------------
+r1006 | oetiker | 2007-02-14 19:47:41 +0100 | 2 lines
+
+cosmetic fix for usage message -- günter knauff
+
+------------------------------------------------------------------------
+r1005 | oetiker | 2007-02-14 19:46:56 +0100 | 2 lines
+
+added new win32 component to the release tarball
+
+------------------------------------------------------------------------
+r1004 | oetiker | 2007-02-14 19:46:16 +0100 | 2 lines
+
+updates to the windows build system by guenter knauff
+
+------------------------------------------------------------------------
+r1003 | oetiker | 2007-02-14 07:53:01 +0100 | 2 lines
+
+allow --units-length to reserve label space even when --y-grid=none is in effect [#75], tobi
+
+------------------------------------------------------------------------
+r1002 | oetiker | 2007-02-14 07:33:49 +0100 | 3 lines
+
+parsing absolute time should not send us 30,000 years into the future -- Tatsuki Makino tatsuki_makino hotmail.com
+
+
+------------------------------------------------------------------------
+r1001 | oetiker | 2007-02-14 07:31:52 +0100 | 3 lines
+
+Printstrftime on rrd_cgi.c returns an illegal value. It causes segmentation fault error. -- Tatsuki Makino tatsuki_makino hotmail.com
+
+
+------------------------------------------------------------------------
+r998 | oetiker | 2007-02-09 23:19:48 +0100 | 2 lines
+
+more build patches from Günter Knauf
+
+------------------------------------------------------------------------
+r997 | oetiker | 2007-02-08 07:01:43 +0100 | 2 lines
+
+updates for Win32 and NW Makefiles -- Guenter Knauf 
+
+------------------------------------------------------------------------
+r996 | oetiker | 2007-02-08 06:54:23 +0100 | 2 lines
+
+added get_ver.awk to release
+
+------------------------------------------------------------------------
+r995 | oetiker | 2007-02-08 06:51:48 +0100 | 2 lines
+
+there is no Makefile.in for python anymore!
+
+------------------------------------------------------------------------
+r994 | oetiker | 2007-02-07 22:35:39 +0100 | 2 lines
+
+DPRINTF may not be the ideal define ... use something more RRDish ... like RRDPRINTF
+
+------------------------------------------------------------------------
+r993 | oetiker | 2007-02-07 22:35:07 +0100 | 2 lines
+
+use setup.py for python install and build work instad of trying todo it on our own
+
+------------------------------------------------------------------------
+r992 | oetiker | 2007-02-07 22:31:33 +0100 | 2 lines
+
+added Makefile targets for python
+
+------------------------------------------------------------------------
+r991 | oetiker | 2007-02-07 22:30:18 +0100 | 2 lines
+
+python does no get built externally
+
+------------------------------------------------------------------------
+r990 | oetiker | 2007-02-02 19:22:34 +0100 | 2 lines
+
+added IBM Public License to the list of Exceptions
+
+------------------------------------------------------------------------
+r989 | oetiker | 2007-02-02 13:19:12 +0100 | 2 lines
+
+increasse portability (no // comment, no ... arguments for cpp)
+
+------------------------------------------------------------------------
+r988 | oetiker | 2007-02-01 23:00:23 +0100 | 3 lines
+
+we should use the headers from the local rrdtool setup and not the system ones!
+
+
+------------------------------------------------------------------------
+r986 | oetiker | 2007-02-01 06:51:34 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.19
+------------------------------------------------------------------------
+r985 | oetiker | 2007-02-01 06:45:03 +0100 | 3 lines
+
+libtool builds shared libraries anyway, no need for extra LDFLAGS
+that bite non GNU ld versions
+
+------------------------------------------------------------------------
+r979 | oetiker | 2007-01-29 17:47:28 +0100 | 2 lines
+
+resolve snprintf overflow warning by using sizeof -- Anna Bernathova suse cz
+
+------------------------------------------------------------------------
+r977 | oetiker | 2007-01-23 21:54:46 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.18
+------------------------------------------------------------------------
+r976 | oetiker | 2007-01-23 21:52:35 +0100 | 4 lines
+
+the change from R920 to fetch was not helping ... no low res got prefered in
+non full coverage situations ..
+
+
+------------------------------------------------------------------------
+r975 | oetiker | 2007-01-23 18:30:27 +0100 | 2 lines
+
+another control sequence that got lost ... 
+
+------------------------------------------------------------------------
+r974 | oetiker | 2007-01-23 09:28:56 +0100 | 2 lines
+
+read up to full potential length of gdp->rrd 
+
+------------------------------------------------------------------------
+r972 | oetiker | 2007-01-22 17:34:55 +0100 | 2 lines
+
+added missing B formatting instruction
+
+------------------------------------------------------------------------
+r971 | oetiker | 2007-01-22 11:49:19 +0100 | 2 lines
+
+create non version link
+
+------------------------------------------------------------------------
+r969 | oetiker | 2007-01-22 11:33:30 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.17
+------------------------------------------------------------------------
+r968 | oetiker | 2007-01-22 11:29:11 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.17
+------------------------------------------------------------------------
+r967 | oetiker | 2007-01-22 11:28:39 +0100 | 6 lines
+
+introduced \n as an alias for \l since people seem to be using it despite
+the documentation not talking about this ... so now it is official and I bet
+there will soon be people asking why this was only working at the end of a
+line. -- tobi
+
+
+------------------------------------------------------------------------
+r966 | oetiker | 2007-01-21 23:22:30 +0100 | 2 lines
+
+removed mentiones of \n ... 
+
+------------------------------------------------------------------------
+r962 | oetiker | 2007-01-20 23:54:25 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.16
+------------------------------------------------------------------------
+r961 | oetiker | 2007-01-20 23:48:37 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.16
+------------------------------------------------------------------------
+r960 | oetiker | 2007-01-20 23:22:10 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.16
+------------------------------------------------------------------------
+r959 | oetiker | 2007-01-20 21:19:13 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.16
+------------------------------------------------------------------------
+r958 | oetiker | 2007-01-20 21:17:31 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.16
+------------------------------------------------------------------------
+r957 | oetiker | 2007-01-20 21:16:15 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.16
+------------------------------------------------------------------------
+r956 | oetiker | 2007-01-20 21:03:14 +0100 | 2 lines
+
+this did not compile after integrating the new fetchlast command  -- Andy Riebs
+
+------------------------------------------------------------------------
+r955 | oetiker | 2007-01-20 17:41:15 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.16
+------------------------------------------------------------------------
+r954 | oetiker | 2007-01-20 17:39:32 +0100 | 2 lines
+
+get ready for 1.2.16 release
+
+------------------------------------------------------------------------
+r953 | oetiker | 2007-01-19 00:43:26 +0100 | 2 lines
+
+aargh another missing bit from lastupdate added ...
+
+------------------------------------------------------------------------
+r952 | oetiker | 2007-01-18 00:35:01 +0100 | 2 lines
+
+finish integration of lastupdate commmand ... 
+
+------------------------------------------------------------------------
+r951 | oetiker | 2007-01-17 22:31:23 +0100 | 4 lines
+
+New functions lastupdate to efficiently get the last values fed into the rrd ... this also changes that the last values
+get stored even for ABSOLUTE and GAUGE data sources ... -- andy.riebs hp.com
+
+
+------------------------------------------------------------------------
+r938 | oetiker | 2006-12-16 17:14:43 +0100 | 2 lines
+
+add missing \0 to the end of several strncpy strings
+
+------------------------------------------------------------------------
+r937 | oetiker | 2006-12-16 17:13:53 +0100 | 5 lines
+
+replace malloc/strncpy by strdup
+add \0 to the end of several strncpy strings
+add missing free
+fix error string rendering :... makes no sense here
+
+------------------------------------------------------------------------
+r936 | oetiker | 2006-12-16 17:11:46 +0100 | 2 lines
+
+move headers around to make more sense
+
+------------------------------------------------------------------------
+r935 | oetiker | 2006-12-16 17:10:58 +0100 | 2 lines
+
+init the context on first call
+
+------------------------------------------------------------------------
+r934 | oetiker | 2006-12-16 17:05:07 +0100 | 2 lines
+
+make sure there is ample space in the static strings
+
+------------------------------------------------------------------------
+r933 | oetiker | 2006-12-16 17:04:05 +0100 | 2 lines
+
+oops 99 is the last item
+
+------------------------------------------------------------------------
+r932 | oetiker | 2006-12-16 17:02:43 +0100 | 3 lines
+
+it is sufficient to set the last item to 0
+
+
+------------------------------------------------------------------------
+r931 | oetiker | 2006-12-16 17:02:00 +0100 | 2 lines
+
+getopt is required for rrdupdate too (there are platforms where this is not in libc ... eg solaris)
+
+------------------------------------------------------------------------
+r930 | oetiker | 2006-12-16 17:01:25 +0100 | 2 lines
+
+we have 2006 now
+
+------------------------------------------------------------------------
+r929 | oetiker | 2006-12-16 16:56:26 +0100 | 4 lines
+
+it makes no sense allocating an array and then asiging it to a fixed string ... 
+this caused stuff to crash badly as long error strings were assigned.
+
+
+------------------------------------------------------------------------
+r927 | oetiker | 2006-12-11 20:11:36 +0100 | 2 lines
+
+added note on alternate CFLAGS for Forte
+
+------------------------------------------------------------------------
+r925 | oetiker | 2006-12-07 20:51:59 +0100 | 2 lines
+
+c is a valid formatting character
+
+------------------------------------------------------------------------
+r922 | oetiker | 2006-11-19 12:15:32 +0100 | 2 lines
+
+fixed typo
+
+------------------------------------------------------------------------
+r920 | oetiker | 2006-11-06 07:53:13 +0100 | 4 lines
+
+when fetching, don't pick a higher res rra just because it's coverage at the 'end' of the
+requested range is better ... -- Sebastian Pachuta seba123 seba123.webd.pl
+
+
+------------------------------------------------------------------------
+r919 | oetiker | 2006-10-27 16:03:22 +0200 | 2 lines
+
+use integer time
+
+------------------------------------------------------------------------
+r918 | oetiker | 2006-10-27 00:26:31 +0200 | 2 lines
+
+added perftest tool
+
+------------------------------------------------------------------------
+r917 | oetiker | 2006-10-25 19:19:46 +0200 | 2 lines
+
+do not distribute windows files anymore ... 
+
+------------------------------------------------------------------------
+r916 | oetiker | 2006-10-25 19:18:27 +0200 | 2 lines
+
+distribute win32 and netware build files too
+
+------------------------------------------------------------------------
+r915 | oetiker | 2006-10-25 19:17:07 +0200 | 2 lines
+
+do not remove Makefiles from win32 and netware build dirs
+
+------------------------------------------------------------------------
+r914 | oetiker | 2006-10-25 19:12:22 +0200 | 3 lines
+
+fix build procedure for ruby (clean target)
+don't run autoreconf at the end of MakeMakefiles as this has a tendency todo the wrong things
+
+------------------------------------------------------------------------
+r913 | oetiker | 2006-10-25 18:39:31 +0200 | 2 lines
+
+added path to sepp
+
+------------------------------------------------------------------------
+r912 | oetiker | 2006-10-25 18:30:39 +0200 | 2 lines
+
+aclocal expects a space after -I ... 
+
+------------------------------------------------------------------------
+r911 | oetiker | 2006-10-25 18:24:44 +0200 | 2 lines
+
+tell aclocal where to find its config ... 
+
+------------------------------------------------------------------------
+r910 | oetiker | 2006-10-25 18:11:57 +0200 | 2 lines
+
+aclocal show know where it's stuff is ... 
+
+------------------------------------------------------------------------
+r908 | oetiker | 2006-10-22 23:20:45 +0200 | 8 lines
+
+make time paring more robust ... it can now deal with
+
+time date
+date time
+time date + xxx
+date time + xxx
+
+
+------------------------------------------------------------------------
+r907 | oetiker | 2006-10-22 23:09:27 +0200 | 2 lines
+
+check if valid control codes are in use
+
+------------------------------------------------------------------------
+r906 | oetiker | 2006-10-22 18:01:42 +0200 | 2 lines
+
+fixed ruby demo
+
+------------------------------------------------------------------------
+r905 | oetiker | 2006-10-22 18:01:32 +0200 | 2 lines
+
+fixed address
+
+------------------------------------------------------------------------
+r903 | oetiker | 2006-10-03 09:52:51 +0200 | 2 lines
+
+added missing file
+
+------------------------------------------------------------------------
+r902 | oetiker | 2006-09-28 14:38:34 +0200 | 2 lines
+
+fixed doc regarding site install
+
+------------------------------------------------------------------------
+r901 | oetiker | 2006-09-27 23:48:05 +0200 | 2 lines
+
+added ruby bindings ... thanks to Loïs LHERBIER lois.lherbier covadis.ch
+
+------------------------------------------------------------------------
+r900 | oetiker | 2006-09-27 23:46:23 +0200 | 2 lines
+
+make rrdupdate realy light as it was intended in the first place -- Peter Breitenlohner peb mppmu.mpg.de
+
+------------------------------------------------------------------------
+r899 | oetiker | 2006-09-27 23:45:47 +0200 | 1 line
+
+tod can come after the date as well as before the date
+------------------------------------------------------------------------
+r898 | oetiker | 2006-09-18 07:45:16 +0200 | 2 lines
+
+fix faild netware makefile merge -- Guenter Knauf
+
+------------------------------------------------------------------------
+r897 | oetiker | 2006-09-17 23:08:29 +0200 | 2 lines
+
+make mvs stop complaining about uninitialized variables ... -- norman wheeler bigpond.com
+
+------------------------------------------------------------------------
+r896 | oetiker | 2006-09-17 23:05:18 +0200 | 2 lines
+
+fixed spelling -- Peter Breitenlohner
+
+------------------------------------------------------------------------
+r895 | oetiker | 2006-09-17 22:46:17 +0200 | 3 lines
+
+fix generation of cgi-demo.cgi --  Peter Breitenlohner peb mppmu.mpg.de
+
+
+------------------------------------------------------------------------
+r894 | oetiker | 2006-09-17 22:31:26 +0200 | 4 lines
+
+make rrdtool use rrd_config.h instead of config.h since this is just bound to lead to confusion when the wrong config.h gets sourced --  Guenter Knauf
+fix clean target in bindings directory
+
+
+------------------------------------------------------------------------
+r893 | oetiker | 2006-09-10 21:30:22 +0200 | 2 lines
+
+the msvc files need dos file endings ... 
+
+------------------------------------------------------------------------
+r892 | oetiker | 2006-09-10 21:26:05 +0200 | 2 lines
+
+we want an int, so lets tell the compiler to make it not complain
+
+------------------------------------------------------------------------
+r891 | oetiker | 2006-09-10 21:20:59 +0200 | 2 lines
+
+netware und win32 fixes from guenter
+
+------------------------------------------------------------------------
+r890 | oetiker | 2006-09-05 21:55:36 +0200 | 2 lines
+
+we do not need an extra echo there
+
+------------------------------------------------------------------------
+r889 | oetiker | 2006-09-05 20:34:47 +0200 | 2 lines
+
+put all the architecture specific stuff in separate subdirectories ... one for netwara and one for win32 -- Guenter Knauf
+
+------------------------------------------------------------------------
+r888 | oetiker | 2006-09-05 20:19:02 +0200 | 3 lines
+
+noone needs this anymore
+
+
+------------------------------------------------------------------------
+r887 | oetiker | 2006-09-04 23:10:55 +0200 | 1 line
+
+in logarithmic mode minval must not be <= 0
+------------------------------------------------------------------------
+r883 | oetiker | 2006-08-24 06:14:54 +0200 | 2 lines
+
+add more submission encuragement -- alex
+
+------------------------------------------------------------------------
+r882 | oetiker | 2006-08-21 13:41:57 +0200 | 2 lines
+
+updated windows build instructions from guenter
+
+------------------------------------------------------------------------
+r881 | oetiker | 2006-08-16 08:07:26 +0200 | 2 lines
+
+contain a potential problem with log grid painting Bug #54
+
+------------------------------------------------------------------------
+r880 | oetiker | 2006-08-15 07:51:04 +0200 | 1 line
+
+do not loose filedescriptors when rrd_first errors out
+------------------------------------------------------------------------
+r879 | oetiker | 2006-08-15 07:44:54 +0200 | 2 lines
+
+catch empty XXXX: commands in graph
+
+------------------------------------------------------------------------
+r878 | oetiker | 2006-08-15 07:24:39 +0200 | 2 lines
+
+windows is not NT anymore ... lets call it WIN32
+
+------------------------------------------------------------------------
+r877 | oetiker | 2006-08-13 18:41:23 +0200 | 2 lines
+
+use unix fileendings here!
+
+------------------------------------------------------------------------
+r876 | oetiker | 2006-08-13 18:40:17 +0200 | 2 lines
+
+new version added by Guenter Knauf
+
+------------------------------------------------------------------------
+r875 | oetiker | 2006-08-13 18:25:00 +0200 | 3 lines
+
+added new rrdstrversion function -- Guenter Knauf
+
+
+------------------------------------------------------------------------
+r874 | oetiker | 2006-08-13 18:22:53 +0200 | 3 lines
+
+use th OS provided timezone names for %Z this should make things more flexile
+will only work on windows, but since we are using strftime.c on windows only this should not be a problem -- Guenter Knauf
+
+------------------------------------------------------------------------
+r873 | oetiker | 2006-08-13 18:13:13 +0200 | 2 lines
+
+include strftime.h for windows builds -- Guenter Knauff
+
+------------------------------------------------------------------------
+r872 | oetiker | 2006-08-13 18:10:23 +0200 | 2 lines
+
+removed mscv defines to confignt/config.h completely -- Guenter Knauf
+
+------------------------------------------------------------------------
+r871 | oetiker | 2006-08-13 18:09:25 +0200 | 2 lines
+
+working windows config.h 
+
+------------------------------------------------------------------------
+r870 | oetiker | 2006-08-13 18:07:36 +0200 | 3 lines
+
+can't define new variables in the middle of the code (unless everyone was using c99 which is not the case)
+
+
+------------------------------------------------------------------------
+r869 | oetiker | 2006-08-13 17:21:12 +0200 | 3 lines
+
+added special labeling for LONGTERM graphs -- Paul Boven p.boven sara.nl
+
+
+------------------------------------------------------------------------
+r867 | oetiker | 2006-08-10 09:46:22 +0200 | 2 lines
+
+it seems some headers have nan predefined ... so lets just use other variable names 
+
+------------------------------------------------------------------------
+r866 | oetiker | 2006-08-04 17:06:18 +0200 | 2 lines
+
+copy of the solaris isnan hack from configure.ac
+
+------------------------------------------------------------------------
+r865 | oetiker | 2006-08-04 00:21:37 +0200 | 3 lines
+
+solaris 10 has isnan defined as a sun forte builtin ... gcc can not deal with this
+this will replace isnan with an fpclass expression hopefully working around the problem
+
+------------------------------------------------------------------------
+r864 | oetiker | 2006-08-02 17:05:36 +0200 | 3 lines
+
+fixing python bindings ...  Jarod Wilson jwilson redhat.com
+
+
+------------------------------------------------------------------------
+r863 | oetiker | 2006-08-01 15:08:33 +0200 | 2 lines
+
+unknownaszero was not a good idea ... bye bye
+
+------------------------------------------------------------------------
+r862 | oetiker | 2006-08-01 00:48:45 +0200 | 2 lines
+
+new options --enumds and --unknwonaszero for xport
+
+------------------------------------------------------------------------
+r860 | oetiker | 2006-07-14 14:11:16 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.15
+------------------------------------------------------------------------
+r859 | oetiker | 2006-07-14 14:06:09 +0200 | 1 line
+
+we were leaking directory handles ... 
+------------------------------------------------------------------------
+r858 | oetiker | 2006-07-14 13:34:23 +0200 | 1 line
+
+remove an excess =over
+------------------------------------------------------------------------
+r857 | oetiker | 2006-07-14 13:32:39 +0200 | 2 lines
+
+added missing =over
+
+------------------------------------------------------------------------
+r855 | oetiker | 2006-07-14 13:12:45 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.14
+------------------------------------------------------------------------
+r854 | oetiker | 2006-07-14 11:47:34 +0200 | 2 lines
+
+do not reset im->gdes[i].step blindly. We initialize it to im->step at allocation time already ... the fix in r291 was over the top. -- niels weaklogic.com
+
+------------------------------------------------------------------------
+r853 | oetiker | 2006-07-14 10:56:28 +0200 | 3 lines
+
+added pwd command for remote server
+reset errno to zero before each loop  -- Damien.Stuart usi.net
+
+------------------------------------------------------------------------
+r852 | oetiker | 2006-07-13 10:44:47 +0200 | 2 lines
+
+fixed makefiles without libcgi ... guenter knauf
+
+------------------------------------------------------------------------
+r851 | oetiker | 2006-07-08 00:37:20 +0200 | 2 lines
+
+added first function to python bindings ... --  Ulf Lilleengen lulf pvv.ntnu.no
+
+------------------------------------------------------------------------
+r850 | oetiker | 2006-07-06 00:00:25 +0200 | 2 lines
+
+we have no cgilib anymore ....
+
+------------------------------------------------------------------------
+r849 | oetiker | 2006-07-04 23:04:12 +0200 | 2 lines
+
+let rrdtool  understand <?xml ...?> headers in rrdtool restore input
+
+------------------------------------------------------------------------
+r847 | oetiker | 2006-06-18 23:21:56 +0200 | 3 lines
+
+Added AVG function to CDEF language. Martin Sperl martin sperl.org
+
+
+------------------------------------------------------------------------
+r846 | oetiker | 2006-06-16 00:16:04 +0200 | 2 lines
+
+fixed libpng link
+
+------------------------------------------------------------------------
+r845 | oetiker | 2006-06-15 09:44:22 +0200 | 2 lines
+
+added hint for RHEL
+
+------------------------------------------------------------------------
+r843 | oetiker | 2006-06-13 23:20:36 +0200 | 2 lines
+
+added missing tcl files
+
+------------------------------------------------------------------------
+r842 | oetiker | 2006-06-07 23:01:35 +0200 | 2 lines
+
+fix calc of fahrenheit ... 
+
+------------------------------------------------------------------------
+r841 | oetiker | 2006-06-06 15:25:32 +0200 | 2 lines
+
+additional AIX hints from zoran.majcenic inet.hr
+
+------------------------------------------------------------------------
+r840 | oetiker | 2006-06-06 10:16:05 +0200 | 3 lines
+
+new, working rrdtool.spec file from Jarod Wilson jwilson redhat.com
+
+
+------------------------------------------------------------------------
+r839 | oetiker | 2006-05-27 07:44:15 +0200 | 2 lines
+
+python uses the name of the module for loding, so this should better match up -- Duncan Webb  duncan dwebb ch
+
+------------------------------------------------------------------------
+r838 | oetiker | 2006-05-25 17:13:56 +0200 | 2 lines
+
+addeed AIX instructions
+
+------------------------------------------------------------------------
+r837 | oetiker | 2006-05-23 08:52:22 +0200 | 2 lines
+
+adjust label spacing to make sure labels don't overlap for the default font.
+
+------------------------------------------------------------------------
+r836 | oetiker | 2006-05-22 00:14:27 +0200 | 2 lines
+
+add note about variable name picking as suggested by alex
+
+------------------------------------------------------------------------
+r835 | oetiker | 2006-05-22 00:07:02 +0200 | 1 line
+
+another Makefile update from guenter
+------------------------------------------------------------------------
+r834 | oetiker | 2006-05-22 00:06:17 +0200 | 2 lines
+
+tiny updates to netware and win32 makefiles -- Guenter Knauf
+
+------------------------------------------------------------------------
+r833 | oetiker | 2006-05-21 23:53:57 +0200 | 2 lines
+
+fixed type hte->the
+
+------------------------------------------------------------------------
+r832 | oetiker | 2006-05-21 23:47:23 +0200 | 3 lines
+
+make vdef time part available in the data_calc stage so that the legend printer
+can decide properly
+
+------------------------------------------------------------------------
+r831 | oetiker | 2006-05-21 23:15:39 +0200 | 2 lines
+
+new GPRINT option :strftime to print time associated with a VDEF value
+
+------------------------------------------------------------------------
+r830 | oetiker | 2006-05-21 22:20:11 +0200 | 2 lines
+
+make configure test which flags gcc actually accepts ... 
+
+------------------------------------------------------------------------
+r829 | oetiker | 2006-05-21 15:08:46 +0200 | 2 lines
+
+don't deprecate HRULE anymore
+
+------------------------------------------------------------------------
+r828 | oetiker | 2006-05-21 14:37:12 +0200 | 2 lines
+
+allow DS names starting with the same letters as operators
+
+------------------------------------------------------------------------
+r827 | oetiker | 2006-05-12 15:26:00 +0200 | 2 lines
+
+we wan't to dist thread_save_nt too
+
+------------------------------------------------------------------------
+r826 | oetiker | 2006-05-11 13:11:04 +0200 | 2 lines
+
+make DNAN and DINF faster by caching the result of the first calculation -- pascal.gloor spale.com
+
+------------------------------------------------------------------------
+r825 | oetiker | 2006-05-11 09:37:58 +0200 | 2 lines
+
+tell Makefile.PL how to store an rpath under aix
+
+------------------------------------------------------------------------
+r824 | oetiker | 2006-05-10 22:51:09 +0200 | 2 lines
+
+improved scaling for --logarithmic mode ... -- beat.zahnd space.unibe.ch
+
+------------------------------------------------------------------------
+r823 | oetiker | 2006-05-09 20:46:14 +0200 | 2 lines
+
+don't panic if the user forgets to specify the name of the rrd file
+
+------------------------------------------------------------------------
+r822 | oetiker | 2006-05-07 12:46:24 +0200 | 2 lines
+
+make legend spacing more reliable. handle the fact that some graph comands do not contribute to the legend -- tobi
+
+------------------------------------------------------------------------
+r821 | oetiker | 2006-05-06 15:29:33 +0200 | 3 lines
+
+lets have index.html -- Peter Breitenlohner <peb mppmu.mpg.de>
+
+
+------------------------------------------------------------------------
+r820 | oetiker | 2006-05-06 15:28:57 +0200 | 4 lines
+
+Avoid gcc warning (discards qualifier) in tclrrd.c -- Peter Breitenlohner <peb mppmu.mpg.de>
+
+
+
+------------------------------------------------------------------------
+r819 | oetiker | 2006-05-06 15:28:16 +0200 | 2 lines
+
+Avoid gcc warning ("static not first") -- Peter Breitenlohner <peb mppmu.mpg.de>
+
+------------------------------------------------------------------------
+r818 | oetiker | 2006-05-06 15:24:23 +0200 | 3 lines
+
+Avoid gcc warnings about use of "long long" -- Peter Breitenlohner <peb mppmu.mpg.de>
+
+
+------------------------------------------------------------------------
+r817 | oetiker | 2006-05-06 15:21:42 +0200 | 2 lines
+
+Use tclpkgdir instead of pkglibdir in order to avoid automake warning --  Peter Breitenlohner <peb mppmu.mpg.de>
+
+------------------------------------------------------------------------
+r816 | oetiker | 2006-05-06 15:20:26 +0200 | 4 lines
+
+The rrdtoolmodule.so should be installed in pyexecdir instead of pythondir (they differ if prefix!=exec_prefix) -- Peter Breitenlohner <peb mppmu.mpg.de>
+
+
+
+------------------------------------------------------------------------
+r815 | oetiker | 2006-05-04 22:41:51 +0200 | 3 lines
+
+fix for debian bug 359071 ... reporting the long cdef in the error message was too much ...
+plus some other small cleanups in this context
+
+------------------------------------------------------------------------
+r813 | oetiker | 2006-05-04 15:26:21 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.13
+------------------------------------------------------------------------
+r812 | oetiker | 2006-05-04 15:24:16 +0200 | 2 lines
+
+fix my mail address
+
+------------------------------------------------------------------------
+r811 | oetiker | 2006-05-04 15:12:01 +0200 | 2 lines
+
+fewer double frees ... -- slamb slamb.org
+
+------------------------------------------------------------------------
+r810 | oetiker | 2006-05-04 15:02:26 +0200 | 4 lines
+
+* fixed argument parsing for long options
+* no more doublefree on abort
+* enable restore of xml dumps created with rrdtool 1.0.x
+
+------------------------------------------------------------------------
+r809 | oetiker | 2006-05-04 14:11:09 +0200 | 3 lines
+
+if end % step == 0 we should still fetch a full step ... no need
+for special handling
+
+------------------------------------------------------------------------
+r808 | oetiker | 2006-05-04 09:48:04 +0200 | 4 lines
+
+updated handling of subsecond resolution in connection with unknown data ... bugreport #38 pointed out
+that the old handling where the seconds were rounded could lead to cases where the data stored was higher than the data input ...
+now I always floor the unknown seconds and this will lead to the same or lower data but not higher ... -- tobi
+
+------------------------------------------------------------------------
+r806 | oetiker | 2006-05-02 22:52:46 +0200 | 2 lines
+
+variables should be defined at the bein of the block ... else we loose portability!
+
+------------------------------------------------------------------------
+r805 | oetiker | 2006-04-29 10:57:25 +0200 | 2 lines
+
+fixed spelling
+
+------------------------------------------------------------------------
+r804 | oetiker | 2006-04-27 08:37:03 +0200 | 2 lines
+
+new units=si option -- wim.heirmann elis.urgent.be
+
+------------------------------------------------------------------------
+r802 | oetiker | 2006-04-25 23:00:09 +0200 | 2 lines
+
+compile without multibyte support
+
+------------------------------------------------------------------------
+r801 | oetiker | 2006-04-25 22:59:41 +0200 | 2 lines
+
+lets have proper dependencies
+
+------------------------------------------------------------------------
+r800 | oetiker | 2006-04-24 17:14:10 +0200 | 2 lines
+
+make sure things are initialised ... 
+
+------------------------------------------------------------------------
+r796 | oetiker | 2006-04-18 07:29:34 +0200 | 2 lines
+
+shared should be share !
+
+------------------------------------------------------------------------
+r795 | oetiker | 2006-04-17 22:25:33 +0200 | 3 lines
+
+Add a second label to the Y axis if there is only going to be one -- Jason A. Smith smithj4 X bnl.gov
+
+
+------------------------------------------------------------------------
+r790 | oetiker | 2006-04-14 12:17:28 +0200 | 2 lines
+
+no more people links!
+
+------------------------------------------------------------------------
+r788 | oetiker | 2006-04-14 11:22:00 +0200 | 2 lines
+
+remove people references
+
+------------------------------------------------------------------------
+r785 | oetiker | 2006-04-07 16:37:52 +0200 | 2 lines
+
+add solaris hint to bild procedure
+
+------------------------------------------------------------------------
+r784 | oetiker | 2006-04-04 20:46:08 +0200 | 2 lines
+
+allow for input lines of arbitrary length in rrdtool pipe mode -- roger.meier terreactive.ch
+
+------------------------------------------------------------------------
+r782 | oetiker | 2006-04-01 17:36:05 +0200 | 1 line
+
+watermartk feature for rrdgraph by Ronan Mullally
+------------------------------------------------------------------------
+r781 | oetiker | 2006-03-26 16:36:35 +0200 | 2 lines
+
+vnames can be up to MAX_VNAME_LEN long ... not only 30 chars ... --  Ulf Harnhammar metaur telia.com
+
+------------------------------------------------------------------------
+r780 | oetiker | 2006-03-26 16:29:53 +0200 | 2 lines
+
+potential bufferoverflow throught large windir avoided
+
+------------------------------------------------------------------------
+r776 | oetiker | 2006-03-14 15:59:57 +0100 | 2 lines
+
+added note on the fact that no OK will be printed in rrdtool pipe mode if an error occures.
+
+------------------------------------------------------------------------
+r775 | oetiker | 2006-03-14 08:11:00 +0100 | 2 lines
+
+RRDtool in remote mode will either print an ERROR line or an OK line not both.
+
+------------------------------------------------------------------------
+r774 | oetiker | 2006-03-14 00:21:27 +0100 | 2 lines
+
+in pipe mode, make rrd_tool send errors to STDOUT (most of the time) -- tobi
+
+------------------------------------------------------------------------
+r772 | oetiker | 2006-03-06 08:15:45 +0100 | 2 lines
+
+at least freebsd will not do utf8 bits properly without this
+
+------------------------------------------------------------------------
+r769 | oetiker | 2006-03-04 00:11:55 +0100 | 3 lines
+
+* simplify code for STACK function ... there were two code paths (new as well as legacy from 1.0.x)
+* make TICK work for negative fractions
+
+------------------------------------------------------------------------
+r768 | oetiker | 2006-03-04 00:10:46 +0100 | 2 lines
+
+remove ~ from my wishlist address ... 
+
+------------------------------------------------------------------------
+r767 | oetiker | 2006-03-04 00:10:14 +0100 | 2 lines
+
+make this compile even when HAVE_MBSTOWCS is not set
+
+------------------------------------------------------------------------
+r766 | oetiker | 2006-02-23 08:26:28 +0100 | 3 lines
+
+separate matching of full and partial match evaluation for better result stability. The fetch result was dependent on the RRA ordering before.  -- Jo Rhett jrhett svcolo.com
+
+
+------------------------------------------------------------------------
+r764 | oetiker | 2006-02-20 07:20:37 +0100 | 2 lines
+
+YYYYMMDDhhmm is not supported ... only YYYYMMDD
+
+------------------------------------------------------------------------
+r761 | oetiker | 2006-02-08 12:35:10 +0100 | 2 lines
+
+OS and COPYRIGHT removed from the rrdcgi INTERNAL function since we do not have this info
+
+------------------------------------------------------------------------
+r760 | oetiker | 2006-02-06 20:49:23 +0100 | 1 line
+
+new rrdcgi function RRD::INTERNAL for accessing VERSION, COPYRIGHT, COMPILETIME, OS -- Guenter Knauf gk gknw.de
+------------------------------------------------------------------------
+r759 | oetiker | 2006-02-06 20:46:26 +0100 | 2 lines
+
+we have 2006 now so let's show it
+
+------------------------------------------------------------------------
+r755 | oetiker | 2006-01-30 00:28:21 +0100 | 1 line
+
+more makefile cleanup from Guenter Knauf gk gknw.de
+------------------------------------------------------------------------
+r752 | oetiker | 2006-01-25 20:09:12 +0100 | 2 lines
+
+allow RRDp  to catch errors
+
+------------------------------------------------------------------------
+r751 | oetiker | 2006-01-22 13:02:47 +0100 | 3 lines
+
+clarified the documentation of xff -- Michael Bunk  mb computer-leipzig.com
+
+
+------------------------------------------------------------------------
+r750 | oetiker | 2006-01-22 12:00:18 +0100 | 2 lines
+
+the operator in the example is * not + -- Nick Sharp njsharp bigpond.net.au
+
+------------------------------------------------------------------------
+r748 | oetiker | 2006-01-15 14:31:12 +0100 | 2 lines
+
+make sure we pickup the correct config.h ... -- Blair Zajac blair orcaware.com
+
+------------------------------------------------------------------------
+r747 | oetiker | 2006-01-15 13:31:03 +0100 | 2 lines
+
+make sure the image size only gets printed from rrd_tool when --imageinfo is NOT set.
+
+------------------------------------------------------------------------
+r746 | oetiker | 2006-01-15 13:25:36 +0100 | 2 lines
+
+make sure gcc does not thing gridind may be undefined
+
+------------------------------------------------------------------------
+r745 | oetiker | 2006-01-15 12:12:51 +0100 | 2 lines
+
+HWPREDICT without reference number will implicitly create the other Holt-Winters RRAs.
+
+------------------------------------------------------------------------
+r744 | oetiker | 2006-01-15 10:03:30 +0100 | 2 lines
+
+updated NetWare and Cygwin Builds
+
+------------------------------------------------------------------------
+r743 | oetiker | 2006-01-15 09:55:53 +0100 | 2 lines
+
+make sure gridind is defined under all conditions
+
+------------------------------------------------------------------------
+r742 | oetiker | 2006-01-14 10:10:16 +0100 | 2 lines
+
+add perlbindings and optional export filename to rrd_dump -- Nicola Worthington nicolaw arwen.tfb.net
+
+------------------------------------------------------------------------
+r740 | oetiker | 2006-01-05 21:39:12 +0100 | 2 lines
+
+let the building of the perl extension be more reliable ... 
+
+------------------------------------------------------------------------
+r739 | oetiker | 2006-01-05 21:07:41 +0100 | 2 lines
+
+remove redundant if statement in rrd_gfx pdf code ...  -- NormW
+
+------------------------------------------------------------------------
+r737 | oetiker | 2006-01-04 23:07:46 +0100 | 2 lines
+
+Compile time improvments for NetWare and Win32 -- Guenter Knauf  gk.gknw.de
+
+------------------------------------------------------------------------
+r736 | oetiker | 2006-01-04 21:12:20 +0100 | 2 lines
+
+make sure this actually compiles with HAVE_MBSTOWCS is not defined
+
+------------------------------------------------------------------------
+r735 | oetiker | 2005-12-30 15:36:30 +0100 | 3 lines
+
+only use getuid if it is actually available ...
+
+
+------------------------------------------------------------------------
+r734 | oetiker | 2005-12-26 17:01:40 +0100 | 3 lines
+
+added heartbeat grahics
+
+
+------------------------------------------------------------------------
+r733 | oetiker | 2005-12-19 13:28:55 +0100 | 2 lines
+
+fix tcl issues ... build with pre tcl8.4 ... do not try to install into the tcl tree unless --enable-tcl-site is given -- tobi
+
+------------------------------------------------------------------------
+r729 | oetiker | 2005-12-18 21:30:31 +0100 | 1 line
+
+prepare for the release of rrdtool-1.2.12
+------------------------------------------------------------------------
+r728 | oetiker | 2005-12-18 21:29:51 +0100 | 3 lines
+
+added FLOSS exception from http://www.mysql.com/company/legal/licensing/foss-exception.html
+in order to not end up in license incompatibility hell -- tobi
+
+------------------------------------------------------------------------
+r725 | oetiker | 2005-11-30 10:19:16 +0100 | 3 lines
+
+if called with --lazy we still want to PRINT ... -- Bartek Szady bszx from bszx.eu.org
+
+
+------------------------------------------------------------------------
+r723 | oetiker | 2005-11-28 22:59:15 +0100 | 2 lines
+
+we should still consider the mrhb ... 
+
+------------------------------------------------------------------------
+r722 | oetiker | 2005-11-20 11:16:38 +0100 | 2 lines
+
+improve win32 compilation -- Norm
+
+------------------------------------------------------------------------
+r721 | oetiker | 2005-11-18 21:38:51 +0100 | 2 lines
+
+deal with versions ending in letters
+
+------------------------------------------------------------------------
+r718 | oetiker | 2005-11-16 14:14:25 +0100 | 3 lines
+
+have indivitudal lines for generating output files, so that cygwin does not choke
+
+
+------------------------------------------------------------------------
+r717 | oetiker | 2005-11-15 00:07:30 +0100 | 2 lines
+
+make mmap test a little saver
+
+------------------------------------------------------------------------
+r714 | oetiker | 2005-11-14 12:46:31 +0100 | 2 lines
+
+cygwin can actually do mmap ... -- larryjadams with comcast.net
+
+------------------------------------------------------------------------
+r713 | oetiker | 2005-11-14 08:32:23 +0100 | 2 lines
+
+guess the option should still  be called template :-)
+
+------------------------------------------------------------------------
+r712 | oetiker | 2005-11-13 19:32:10 +0100 | 2 lines
+
+improve screen apperance of configure output as suggested by Dale -- tobi
+
+------------------------------------------------------------------------
+r711 | oetiker | 2005-11-13 19:31:38 +0100 | 2 lines
+
+don't use clean: target ... automake wants this to be clean-local:
+
+------------------------------------------------------------------------
+r710 | oetiker | 2005-11-13 00:36:10 +0100 | 3 lines
+
+add xmlns declaration to svg output -- R.P. Aditya <aditya with grot.org>
+
+
+------------------------------------------------------------------------
+r709 | oetiker | 2005-11-13 00:30:50 +0100 | 2 lines
+
+clean target was broken
+
+------------------------------------------------------------------------
+r708 | oetiker | 2005-11-13 00:10:48 +0100 | 5 lines
+
+* integrate necessary cgi functionality into rrd_cgi.c so that libcgi is not
+  required anymore ...  -- D. Walsh <buildsmart at daleenterprise.com>
+
+* check if we have to include malloc/malloc.h to make malloc work ... -- tobi
+
+------------------------------------------------------------------------
+r707 | oetiker | 2005-11-07 20:12:47 +0100 | 3 lines
+
+the variable template has to generic a name, it clashes with other things
+in some environments.
+
+------------------------------------------------------------------------
+r706 | oetiker | 2005-10-28 07:55:36 +0200 | 3 lines
+
+added openbsd note
+
+
+------------------------------------------------------------------------
+r705 | oetiker | 2005-10-24 22:55:03 +0200 | 2 lines
+
+use multithreded version of librrd -- Oleg Derevenetz <oleg with vsi.ru>
+
+------------------------------------------------------------------------
+r702 | oetiker | 2005-10-11 19:09:09 +0200 | 2 lines
+
+improved error messages for rrd_graph commandline parsing -- Alex
+
+------------------------------------------------------------------------
+r701 | oetiker | 2005-10-11 18:51:50 +0200 | 2 lines
+
+fix file generation
+
+------------------------------------------------------------------------
+r700 | oetiker | 2005-10-11 18:41:15 +0200 | 2 lines
+
+die on error! -- Alex
+
+------------------------------------------------------------------------
+r699 | oetiker | 2005-10-11 18:37:58 +0200 | 2 lines
+
+the images should be written to the current directory ... -- Alex
+
+------------------------------------------------------------------------
+r698 | oetiker | 2005-10-11 18:32:09 +0200 | 2 lines
+
+do not complain about strict aliasing issues -- Alex
+
+------------------------------------------------------------------------
+r697 | oetiker | 2005-10-08 23:58:57 +0200 | 2 lines
+
+allow rrd::graph to write directly to a tcl stream ... by Dave Bodenstab <dave with bodenstab.org>
+
+------------------------------------------------------------------------
+r696 | oetiker | 2005-10-07 09:48:52 +0200 | 2 lines
+
+updates for tcl bindings by -- Dave Bodenstab <dave on bodenstab.org>
+
+------------------------------------------------------------------------
+r695 | oetiker | 2005-10-07 09:48:01 +0200 | 2 lines
+
+included favicon in distro
+
+------------------------------------------------------------------------
+r691 | oetiker | 2005-09-26 22:33:45 +0200 | 2 lines
+
+plugged two memmory leaks happening when a requested font is not found.
+
+------------------------------------------------------------------------
+r690 | oetiker | 2005-09-24 01:06:12 +0200 | 3 lines
+
+hmpf its the gdef step we are talking about not the image step !
+
+
+------------------------------------------------------------------------
+r689 | oetiker | 2005-09-22 22:18:12 +0200 | 2 lines
+
+do not 'reload' data if you already have it!
+
+------------------------------------------------------------------------
+r688 | oetiker | 2005-09-22 22:17:42 +0200 | 3 lines
+
+the -r option should not expect an argument
+
+
+------------------------------------------------------------------------
+r685 | oetiker | 2005-09-19 09:42:17 +0200 | 2 lines
+
+do not free stuff that gets freed later anyway
+
+------------------------------------------------------------------------
+r684 | oetiker | 2005-09-18 20:28:19 +0200 | 2 lines
+
+Netware Build Updates --- Guenter Knauf <gk with gknw.de>
+
+------------------------------------------------------------------------
+r683 | oetiker | 2005-09-18 18:59:34 +0200 | 3 lines
+
+allocate memory for one more row ... fetch can not return 0 reows ... 
+
+
+------------------------------------------------------------------------
+r682 | oetiker | 2005-09-18 17:39:49 +0200 | 2 lines
+
+comparing floating point numbers is dangerouse ... don't do this directly!
+
+------------------------------------------------------------------------
+r681 | oetiker | 2005-09-01 23:23:34 +0200 | 3 lines
+
+since we use firstdir even without CHROOT it should better be defined in any case
+-- Guenter Knauf
+
+------------------------------------------------------------------------
+r680 | oetiker | 2005-08-30 07:52:41 +0200 | 3 lines
+
+When selecting the x-axis label take the length of the time shown in the graph into consideration
+just showing %H:%M in a two day presentation is a problem ... -- LAUKENS Niels <Niels.LAUKENS .. VRT.BE>
+
+------------------------------------------------------------------------
+r679 | oetiker | 2005-08-28 09:33:13 +0200 | 3 lines
+
+fixed location of example scripts
+
+
+------------------------------------------------------------------------
+r678 | oetiker | 2005-08-27 23:29:21 +0200 | 7 lines
+
+resolve subsecond resolution logging and handling of unknown values by
+starting off with an unknown value when building a pdp instead of starting
+out with 0 and then turning it into unknown later on if the number of uknown
+seconds is equal or larger than the interval ...
+
+
+
+------------------------------------------------------------------------
+r677 | oetiker | 2005-08-27 22:55:46 +0200 | 2 lines
+
+the rrdtool binary one more level up the path ... 
+
+------------------------------------------------------------------------
+r676 | oetiker | 2005-08-27 22:52:12 +0200 | 2 lines
+
+update for new prefix setting
+
+------------------------------------------------------------------------
+r675 | oetiker | 2005-08-25 22:43:04 +0200 | 3 lines
+
+when resize converts a v1 rrd to v3 it should also change the version number in the head ... 
+
+
+------------------------------------------------------------------------
+r674 | oetiker | 2005-08-23 23:18:23 +0200 | 3 lines
+
+fixes for compiling rrdtool with win32 mingw and netware -- Guenter Knauf <gk with gknw.de>
+
+
+------------------------------------------------------------------------
+r673 | oetiker | 2005-08-16 07:30:29 +0200 | 3 lines
+
+added notes about VDEF expressions not being general purpose
+
+
+------------------------------------------------------------------------
+r672 | oetiker | 2005-08-11 21:18:36 +0200 | 2 lines
+
+only bomb is there is no chroot and someone tries to use it.
+
+------------------------------------------------------------------------
+r669 | oetiker | 2005-08-04 07:08:04 +0200 | 3 lines
+
+New VDEF functions for least squares slope, intercept & correlation for simple forecasting
+-- Trent Burkard <tburkard with tangentis.com>
+
+------------------------------------------------------------------------
+r668 | oetiker | 2005-08-04 06:59:01 +0200 | 2 lines
+
+fix rounding issues that prevented UNKNOWN to work as soon as subsecond resolution was used
+
+------------------------------------------------------------------------
+r667 | oetiker | 2005-08-04 06:58:11 +0200 | 2 lines
+
+avoid drawing lines where two points are in the same spot. this mai be confusing libart
+
+------------------------------------------------------------------------
+r666 | oetiker | 2005-08-02 17:54:32 +0200 | 2 lines
+
+make sure clean works even when the perl Makefile is broken
+
+------------------------------------------------------------------------
+r665 | oetiker | 2005-07-26 11:13:36 +0200 | 2 lines
+
+initialize font to empty string for deault font case.
+
+------------------------------------------------------------------------
+r663 | oetiker | 2005-07-25 16:12:58 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.11
+------------------------------------------------------------------------
+r662 | oetiker | 2005-07-25 16:07:35 +0200 | 3 lines
+
+prepared for release
+
+
+------------------------------------------------------------------------
+r660 | oetiker | 2005-07-22 15:16:48 +0200 | 2 lines
+
+do not quit so easily when runing in interactive mode
+
+------------------------------------------------------------------------
+r659 | oetiker | 2005-07-22 15:16:18 +0200 | 2 lines
+
+init ytr after all the changes have happened
+
+------------------------------------------------------------------------
+r658 | oetiker | 2005-07-22 15:10:50 +0200 | 2 lines
+
+make --no-gridfit with --only-graph work
+
+------------------------------------------------------------------------
+r657 | oetiker | 2005-07-22 00:23:28 +0200 | 2 lines
+
+when stacking known on unknown, then we asume unknown was zero ... 
+
+------------------------------------------------------------------------
+r654 | oetiker | 2005-07-20 09:20:04 +0200 | 2 lines
+
+make sure gcc-4.0 does not optimize our tests away :-)
+
+------------------------------------------------------------------------
+r653 | oetiker | 2005-07-19 12:00:13 +0200 | 2 lines
+
+fixed some corner cases in drawing code to get the same results as before with way more performance
+
+------------------------------------------------------------------------
+r652 | oetiker | 2005-07-12 00:49:09 +0200 | 2 lines
+
+optimized drawing routines ... up to 6 times faster (in the case of smokeping)
+
+------------------------------------------------------------------------
+r651 | oetiker | 2005-07-07 12:27:55 +0200 | 2 lines
+
+colors start with # not :
+
+------------------------------------------------------------------------
+r650 | oetiker | 2005-07-04 20:49:56 +0200 | 3 lines
+
+make setting just the size and not the font work -- Havard Eidnes <he from uninett.no>
+
+
+------------------------------------------------------------------------
+r649 | oetiker | 2005-06-28 23:03:20 +0200 | 3 lines
+
+* the makefiles should not depend on gnumake features
+* make the perl module compilation environement configurable -- Stan Sinyagin ssinyagin on yahoo.com
+
+------------------------------------------------------------------------
+r646 | oetiker | 2005-06-25 07:24:52 +0200 | 2 lines
+
+added GNUMAKE and EGREP hints
+
+------------------------------------------------------------------------
+r645 | oetiker | 2005-06-20 11:15:10 +0200 | 3 lines
+
+x-axis labels should be aligned to their baseline
+alt-y-grid labels without fractionals should have no fractionals when printed
+
+------------------------------------------------------------------------
+r642 | oetiker | 2005-06-17 11:05:17 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.10
+------------------------------------------------------------------------
+r641 | oetiker | 2005-06-17 00:09:36 +0200 | 2 lines
+
+when building the sgridstep in alt-y-grid mode, take the --base into consideration.
+
+------------------------------------------------------------------------
+r639 | oetiker | 2005-06-13 23:56:48 +0200 | 2 lines
+
+simplify code for generating y axis labels a bit.
+
+------------------------------------------------------------------------
+r638 | oetiker | 2005-06-13 15:20:45 +0200 | 2 lines
+
+wide chars should better be unsigned
+
+------------------------------------------------------------------------
+r637 | oetiker | 2005-06-13 14:56:11 +0200 | 2 lines
+
+fall back to assuming latin1 encoding if mbtowchar conversion fails
+
+------------------------------------------------------------------------
+r636 | oetiker | 2005-06-13 07:43:44 +0200 | 2 lines
+
+allow for VNAMES starting with a number and add documentation -- Alex
+
+------------------------------------------------------------------------
+r635 | oetiker | 2005-06-13 07:43:16 +0200 | 2 lines
+
+add notes about small numbers for --alt-y-grid
+
+------------------------------------------------------------------------
+r634 | oetiker | 2005-06-12 22:01:57 +0200 | 3 lines
+
+kill the last stored counter value if the updates comes after mrhb
+to make sure it does not get taken into account accedenly later on.
+
+------------------------------------------------------------------------
+r633 | oetiker | 2005-06-12 22:00:07 +0200 | 3 lines
+
+make --alt-y-grid work properly in many more cases than before
+
+
+------------------------------------------------------------------------
+r632 | oetiker | 2005-06-11 21:03:46 +0200 | 2 lines
+
+be more careful when checking if a file is an rrdfile
+
+------------------------------------------------------------------------
+r631 | oetiker | 2005-06-11 08:17:02 +0200 | 4 lines
+
+distribute all generated documentation
+install in share and not shared
+drop index.html link
+
+------------------------------------------------------------------------
+r630 | oetiker | 2005-06-11 08:14:25 +0200 | 2 lines
+
+install examples in an rrdtool specific subdirectory if  the prefix does not contain rrd -- Peter Breitenlohner
+
+------------------------------------------------------------------------
+r629 | oetiker | 2005-06-11 07:41:31 +0200 | 3 lines
+
+avoid problems when building with VPATH set and --disable-perl
+fix make test for perl-piped -- Peter Breitenlohner
+
+------------------------------------------------------------------------
+r628 | oetiker | 2005-06-11 07:40:04 +0200 | 2 lines
+
+let 'out-of tree' builds work for everythin but the perl module -- Peter Breitenlohner
+
+------------------------------------------------------------------------
+r627 | oetiker | 2005-06-11 07:37:55 +0200 | 2 lines
+
+defined DPRINTF in a more compatible way -- Peter Breitenlohner
+
+------------------------------------------------------------------------
+r626 | oetiker | 2005-06-11 07:31:22 +0200 | 1 line
+
+link libcgi only against rrd_cgi since it is only needed there -- Peter Breitenlohner
+------------------------------------------------------------------------
+r625 | oetiker | 2005-06-11 07:29:45 +0200 | 1 line
+
+Make sure librrd_th properly depends on libpthread. -- Peter Breitenlohner
+------------------------------------------------------------------------
+r624 | oetiker | 2005-06-11 07:27:08 +0200 | 2 lines
+
+avoid gcc (3.4.3) warnings char format, different type arg -- Peter Breitenlohner
+
+------------------------------------------------------------------------
+r623 | oetiker | 2005-06-11 07:26:13 +0200 | 2 lines
+
+fix various problems with the tcl bindings -- Peter Breitenlohner
+
+------------------------------------------------------------------------
+r622 | oetiker | 2005-06-11 07:22:14 +0200 | 2 lines
+
+added peter breitenlohner
+
+------------------------------------------------------------------------
+r621 | oetiker | 2005-06-11 07:20:59 +0200 | 2 lines
+
+remove various gcc (3.4.3) warnings such as discards qualifier all due to 'char **' vs. 'const char **' discrepancies. -- Peter Breitenlohner peb with mppmu.mpg.de
+
+------------------------------------------------------------------------
+r620 | oetiker | 2005-06-11 07:15:37 +0200 | 2 lines
+
+re-innitializing sort of defeats the purpose
+
+------------------------------------------------------------------------
+r619 | oetiker | 2005-06-11 07:03:33 +0200 | 2 lines
+
+be more carefull in checking for sucessful open
+
+------------------------------------------------------------------------
+r618 | oetiker | 2005-06-10 21:25:36 +0200 | 2 lines
+
+vnames MUST start with a letter
+
+------------------------------------------------------------------------
+r617 | oetiker | 2005-06-10 21:24:06 +0200 | 2 lines
+
+kill another warning
+
+------------------------------------------------------------------------
+r616 | oetiker | 2005-06-10 20:44:40 +0200 | 6 lines
+
+make  --font more flexible:
+
+* TITLE:30:   just alter the size of the title
+* DEFAULT:0:/tmp/funfont.ttf  alter the font but not the size
+
+
+------------------------------------------------------------------------
+r613 | oetiker | 2005-06-10 10:42:44 +0200 | 2 lines
+
+added missing cd and replace one path with a variable
+
+------------------------------------------------------------------------
+r612 | oetiker | 2005-06-08 00:10:01 +0200 | 2 lines
+
+make pdf/eps/svg formats utf8 aware too -- Peter Speck
+
+------------------------------------------------------------------------
+r611 | oetiker | 2005-06-06 07:32:44 +0200 | 2 lines
+
+sync up with Dag Wieers version from http://dag.wieers.com/packages/rrdtool/rrdtool.spec
+
+------------------------------------------------------------------------
+r610 | oetiker | 2005-06-06 00:23:32 +0200 | 3 lines
+
+New functions for CDEF ATAN2 RAD2DEG and DEG2RAD
+-- Simon Melhuish <simon mailing from melhuish.info>
+
+------------------------------------------------------------------------
+r605 | oetiker | 2005-05-31 08:22:31 +0200 | 2 lines
+
+fixed epoch
+
+------------------------------------------------------------------------
+r603 | oetiker | 2005-05-28 15:01:43 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.9
+------------------------------------------------------------------------
+r602 | oetiker | 2005-05-28 14:53:13 +0200 | 2 lines
+
+add notes on building on Mac OS X
+
+------------------------------------------------------------------------
+r601 | oetiker | 2005-05-28 14:52:50 +0200 | 3 lines
+
+kill a few warnings
+
+
+------------------------------------------------------------------------
+r600 | oetiker | 2005-05-28 14:52:26 +0200 | 2 lines
+
+make the bindings work on os x
+
+------------------------------------------------------------------------
+r599 | oetiker | 2005-05-27 21:17:17 +0200 | 2 lines
+
+add note on variable names
+
+------------------------------------------------------------------------
+r598 | oetiker | 2005-05-27 21:12:23 +0200 | 2 lines
+
+remove one more warning
+
+------------------------------------------------------------------------
+r597 | oetiker | 2005-05-27 21:12:12 +0200 | 2 lines
+
+there is realy no reason to have the vnames constraind so much
+
+------------------------------------------------------------------------
+r596 | oetiker | 2005-05-27 21:01:53 +0200 | 3 lines
+
+only print ttf font errors when compiled with -DDEBUG
+
+
+------------------------------------------------------------------------
+r593 | oetiker | 2005-05-23 00:29:11 +0200 | 2 lines
+
+don't go into an endless loop upon finding a bad character in a truetype font
+
+------------------------------------------------------------------------
+r591 | oetiker | 2005-05-20 08:20:19 +0200 | 2 lines
+
+go into rrdbuild too if we use tcsh
+
+------------------------------------------------------------------------
+r590 | oetiker | 2005-05-20 07:48:52 +0200 | 2 lines
+
+initial checking
+
+------------------------------------------------------------------------
+r589 | oetiker | 2005-05-20 07:46:52 +0200 | 2 lines
+
+remove extra whitespace at the end of lines
+
+------------------------------------------------------------------------
+r588 | oetiker | 2005-05-20 07:43:27 +0200 | 2 lines
+
+introduce builddir
+
+------------------------------------------------------------------------
+r586 | oetiker | 2005-05-20 07:14:20 +0200 | 2 lines
+
+iconf is not needed so to not check for it
+
+------------------------------------------------------------------------
+r585 | oetiker | 2005-05-20 01:21:51 +0200 | 1 line
+
+added propper numeric version number to version
+------------------------------------------------------------------------
+r584 | oetiker | 2005-05-20 01:21:20 +0200 | 4 lines
+
+add multibyte to wide char conversion ability. Now every string
+users input should should be handled propperly by rrdtool,
+whatever your locale says will work.
+
+------------------------------------------------------------------------
+r583 | oetiker | 2005-05-20 01:19:09 +0200 | 1 line
+
+windows at least stores null terminated char strings in dummychar1 -- Philippe
+------------------------------------------------------------------------
+r581 | oetiker | 2005-05-18 22:20:55 +0200 | 2 lines
+
+make tcl compile again ... don't know if it will work though
+
+------------------------------------------------------------------------
+r580 | oetiker | 2005-05-18 21:43:03 +0200 | 2 lines
+
+fix rrd_version prototype
+
+------------------------------------------------------------------------
+r579 | oetiker | 2005-05-18 21:41:08 +0200 | 2 lines
+
+cleaned up version number code and added new function rrd_version -- partly by Burton Strauss
+
+------------------------------------------------------------------------
+r578 | oetiker | 2005-05-18 21:18:59 +0200 | 3 lines
+
+help building perl on hpux
+
+
+------------------------------------------------------------------------
+r571 | oetiker | 2005-05-16 22:56:09 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.8
+------------------------------------------------------------------------
+r570 | oetiker | 2005-05-16 22:55:29 +0200 | 4 lines
+
+redo --disable-* options for python and tcl
+add some more quotes to protect potentially empty variables in tests which
+should make configure more robust.
+
+------------------------------------------------------------------------
+r569 | oetiker | 2005-05-16 22:04:42 +0200 | 2 lines
+
+if python stuff does not work, do not die, just do not compile python
+
+------------------------------------------------------------------------
+r568 | oetiker | 2005-05-16 22:02:26 +0200 | 2 lines
+
+fix extra argument when testing for PERLCC problem -- Simon Leinen
+
+------------------------------------------------------------------------
+r565 | oetiker | 2005-05-16 14:18:16 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.7
+------------------------------------------------------------------------
+r564 | oetiker | 2005-05-16 14:14:19 +0200 | 3 lines
+
+added note about --alt-y-mrtg
+
+
+------------------------------------------------------------------------
+r563 | oetiker | 2005-05-16 12:12:26 +0200 | 3 lines
+
+fix the color square spacing so that it works regardles of the fontsize
+and with transparend backgrounds.
+
+------------------------------------------------------------------------
+r562 | oetiker | 2005-05-16 11:01:01 +0200 | 2 lines
+
+added alt-y-mrtg option as a dummy so that old apps who use it do not crash when doing so.
+
+------------------------------------------------------------------------
+r561 | oetiker | 2005-05-16 08:33:30 +0200 | 2 lines
+
+reintroduced the FRAME color ... somehow it was lost from 1.0.x
+
+------------------------------------------------------------------------
+r560 | oetiker | 2005-05-15 16:16:15 +0200 | 1 line
+
+make transparent backgrounds work propperly
+------------------------------------------------------------------------
+r559 | oetiker | 2005-05-14 23:57:46 +0200 | 2 lines
+
+it seems that _WIN32 is more commonly defined thatn WIN32 on win32 ... (gifford.hesketh on gmail.com)
+
+------------------------------------------------------------------------
+r558 | oetiker | 2005-05-14 19:32:05 +0200 | 3 lines
+
+added a note to dump old rrd files with a current rrdtool dump to get the upgraded on the fly. Adding 001 support should
+not be all that tough though. Any takers ?
+
+------------------------------------------------------------------------
+r557 | oetiker | 2005-05-14 17:07:35 +0200 | 1 line
+
+check cookie read for success
+------------------------------------------------------------------------
+r556 | oetiker | 2005-05-14 11:35:02 +0200 | 5 lines
+
+if the y value is out of bounds, make it just a wee bit larger or smaller
+than the bound so that the code can detect this by comparing it with the
+bound, but make it so small that it is not visible.
+
+
+------------------------------------------------------------------------
+r555 | oetiker | 2005-05-13 00:27:06 +0200 | 1 line
+
+one sed is quite enough
+------------------------------------------------------------------------
+r554 | oetiker | 2005-05-13 00:22:45 +0200 | 2 lines
+
+[ must be quoted by [ ...
+
+------------------------------------------------------------------------
+r553 | oetiker | 2005-05-13 00:12:56 +0200 | 2 lines
+
+add global option
+
+------------------------------------------------------------------------
+r552 | oetiker | 2005-05-13 00:06:13 +0200 | 2 lines
+
+fox sed line for unsetting header cache
+
+------------------------------------------------------------------------
+r551 | oetiker | 2005-05-13 00:03:33 +0200 | 2 lines
+
+make sure the header gets tested twice
+
+------------------------------------------------------------------------
+r550 | oetiker | 2005-05-13 00:03:01 +0200 | 1 line
+
+add notes on python error, and install location
+------------------------------------------------------------------------
+r549 | oetiker | 2005-05-12 13:32:39 +0200 | 1 line
+
+allow 3/4 component color rrdtool graph --color too -- Alex
+------------------------------------------------------------------------
+r548 | oetiker | 2005-05-12 13:28:13 +0200 | 2 lines
+
+make the areas a little bigger still for propper overlapping
+
+------------------------------------------------------------------------
+r547 | oetiker | 2005-05-12 13:22:11 +0200 | 3 lines
+
+make parsing of DS arguments more robust and give more sensible
+error messages. -- Alex 
+
+------------------------------------------------------------------------
+r546 | oetiker | 2005-05-12 10:38:53 +0200 | 4 lines
+
+make the areas that makeup the graphs a little larger, so that they overlap a bit
+and do not exhibit white lines when touching each other.
+
+
+------------------------------------------------------------------------
+r545 | oetiker | 2005-05-12 07:48:56 +0200 | 2 lines
+
+some more warning fixes
+
+------------------------------------------------------------------------
+r544 | oetiker | 2005-05-12 07:41:09 +0200 | 2 lines
+
+add unused to prevent warnings about self
+
+------------------------------------------------------------------------
+r543 | oetiker | 2005-05-11 20:31:00 +0200 | 2 lines
+
+intial python bindings documentation
+
+------------------------------------------------------------------------
+r541 | oetiker | 2005-05-11 14:09:36 +0200 | 2 lines
+
+fix wording for min/max ... they are not optional
+
+------------------------------------------------------------------------
+r540 | oetiker | 2005-05-10 22:19:55 +0200 | 2 lines
+
+second installment with warning fixes from alan
+
+------------------------------------------------------------------------
+r539 | oetiker | 2005-05-10 20:52:43 +0200 | 2 lines
+
+python bindings add -- Alan Milligan alan from balclutha.org
+
+------------------------------------------------------------------------
+r538 | oetiker | 2005-05-10 20:35:55 +0200 | 2 lines
+
+fix for character escaping in EPS -- Peter Speck
+
+------------------------------------------------------------------------
+r536 | oetiker | 2005-05-10 08:07:41 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.6
+------------------------------------------------------------------------
+r535 | oetiker | 2005-05-10 08:06:49 +0200 | 2 lines
+
+I guess the pdf entities want to be escaped chars not just control caracters with a prepended backslash ... 
+
+------------------------------------------------------------------------
+r534 | oetiker | 2005-05-10 07:18:28 +0200 | 2 lines
+
+we should not use C++ comments in c files
+
+------------------------------------------------------------------------
+r533 | oetiker | 2005-05-10 06:14:17 +0200 | 2 lines
+
+we should distribute unused.h if we use it :-)
+
+------------------------------------------------------------------------
+r531 | oetiker | 2005-05-09 22:15:38 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.5
+------------------------------------------------------------------------
+r530 | oetiker | 2005-05-09 22:13:28 +0200 | 2 lines
+
+silence warnings for UNUSED variables without changeing the funtion interfaces -- Alex
+
+------------------------------------------------------------------------
+r529 | oetiker | 2005-05-09 21:32:12 +0200 | 2 lines
+
+allow decimal positions y axis labels as soon as the max entry is < 10 
+
+------------------------------------------------------------------------
+r528 | oetiker | 2005-05-09 21:11:05 +0200 | 2 lines
+
+fix rendering of the color spots especially when proportional fonts are in use.
+
+------------------------------------------------------------------------
+r526 | oetiker | 2005-05-09 16:01:21 +0200 | 3 lines
+
+EPS/SVG/PDF code ...  more comments and better font finder including removal of hardcoded SVG font.
+-- Peter Speck speck from vitality.dk
+
+------------------------------------------------------------------------
+r525 | oetiker | 2005-05-09 15:22:23 +0200 | 3 lines
+
+* switch to courier if the font is unknown
+* fix font positioning
+
+------------------------------------------------------------------------
+r523 | oetiker | 2005-05-09 07:39:59 +0200 | 2 lines
+
+perls $^O is set to linux not Linux
+
+------------------------------------------------------------------------
+r522 | oetiker | 2005-05-09 00:02:35 +0200 | 2 lines
+
+svg/pdf/eps rendering improvements. There are still issues though ... -- peter speck
+
+------------------------------------------------------------------------
+r521 | oetiker | 2005-05-08 23:25:42 +0200 | 2 lines
+
+added support for getting ascent/descent size info for ps fonts -- Peter Speck
+
+------------------------------------------------------------------------
+r520 | oetiker | 2005-05-08 22:15:18 +0200 | 2 lines
+
+we do not actually need these files ... goodbye
+
+------------------------------------------------------------------------
+r518 | oetiker | 2005-05-08 18:59:20 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.4
+------------------------------------------------------------------------
+r517 | oetiker | 2005-05-08 18:22:25 +0200 | 4 lines
+
+* adjust spacing at the left border of the graph. use less white space
+* increasse minimal grid spacing and label spacing
+
+
+------------------------------------------------------------------------
+r516 | oetiker | 2005-05-08 18:02:28 +0200 | 2 lines
+
+increase minimal vertical spacing for y-axis lables
+
+------------------------------------------------------------------------
+r515 | oetiker | 2005-05-08 18:01:40 +0200 | 2 lines
+
+shorten space for y-axis labels a bit
+
+------------------------------------------------------------------------
+r514 | oetiker | 2005-05-08 17:40:28 +0200 | 2 lines
+
+remove the premature fox for the unused parameter in xport
+
+------------------------------------------------------------------------
+r513 | oetiker | 2005-05-08 17:30:12 +0200 | 2 lines
+
+sync with reality
+
+------------------------------------------------------------------------
+r512 | oetiker | 2005-05-08 17:19:02 +0200 | 2 lines
+
+be more portable with shorter strings
+
+------------------------------------------------------------------------
+r511 | oetiker | 2005-05-08 17:18:47 +0200 | 2 lines
+
+we do not use the affine functions
+
+------------------------------------------------------------------------
+r510 | oetiker | 2005-05-08 17:07:27 +0200 | 2 lines
+
+removed extra $ from from PERLCC test
+
+------------------------------------------------------------------------
+r509 | oetiker | 2005-05-08 10:20:48 +0200 | 2 lines
+
+fix rendering errors by removing single spaces
+
+------------------------------------------------------------------------
+r507 | oetiker | 2005-05-08 01:54:52 +0200 | 1 line
+
+prepare for the release of rrdtool-1.2.3
+------------------------------------------------------------------------
+r506 | oetiker | 2005-05-08 01:26:30 +0200 | 2 lines
+
+fix some more y0, y1 complaints
+
+------------------------------------------------------------------------
+r505 | oetiker | 2005-05-08 01:26:14 +0200 | 3 lines
+
+When encountering an empty legend, do NOT make
+space for drawing the color spats in front of it.
+
+------------------------------------------------------------------------
+r503 | oetiker | 2005-05-07 17:57:55 +0200 | 1 line
+
+prep for 1.2.2 release
+------------------------------------------------------------------------
+r502 | oetiker | 2005-05-07 17:51:47 +0200 | 2 lines
+
+increment library revision
+
+------------------------------------------------------------------------
+r501 | oetiker | 2005-05-07 17:45:52 +0200 | 2 lines
+
+fix these annoying y0 warnings.
+
+------------------------------------------------------------------------
+r500 | oetiker | 2005-05-07 17:45:27 +0200 | 1 line
+
+add rrdtool attribution string back using a transparent version of the font color
+------------------------------------------------------------------------
+r499 | oetiker | 2005-05-07 17:23:41 +0200 | 2 lines
+
+added build instructions
+
+------------------------------------------------------------------------
+r498 | oetiker | 2005-05-07 12:38:34 +0200 | 2 lines
+
+fix for rotation code in pdf,eps,svg formats -- Peter Speck <speck from vitality.dk>
+
+------------------------------------------------------------------------
+r497 | oetiker | 2005-05-07 12:34:48 +0200 | 2 lines
+
+fix handling of PREV(x) command
+
+------------------------------------------------------------------------
+r493 | oetiker | 2005-05-07 01:00:53 +0200 | 5 lines
+
+* added RRDTOOL/TOBI OETIKER back in
+* in riggid mode, cut data and 'min' and 'max' not two above
+* gibt ytop0 a default value
+
+
+------------------------------------------------------------------------
+r492 | oetiker | 2005-05-07 00:59:22 +0200 | 2 lines
+
+fixed documentation strings for rrdgraph
+
+------------------------------------------------------------------------
+r491 | oetiker | 2005-05-07 00:03:16 +0200 | 2 lines
+
+added doc for new slope-mode
+
+------------------------------------------------------------------------
+r490 | oetiker | 2005-05-06 23:52:55 +0200 | 3 lines
+
+since the drawing code is now much simpler we do not need to perturbe the points or rewind the graph anymore
+this saves quite some time ... 
+
+------------------------------------------------------------------------
+r489 | oetiker | 2005-05-06 17:44:11 +0200 | 6 lines
+
+* allow for 3(4) letter color names
+* better debugging code
+* fix tick, line, stack parsing
+--  Alex van den Bogaerdt <alex with ergens.op.het.net>
+
+
+------------------------------------------------------------------------
+r488 | oetiker | 2005-05-06 17:24:27 +0200 | 2 lines
+
+if stacking on nothing we should not try to figure out WHAT we stacked on since this will result in a segfault ... -- Alex van den Bogaerdt <alex at ergens.op.het.net>
+
+------------------------------------------------------------------------
+r485 | oetiker | 2005-05-06 00:15:10 +0200 | 3 lines
+
+clarify LINE/AREA syntax
+-- Alex van den Bogaerdt alex with ergens.op.het.net
+
+------------------------------------------------------------------------
+r484 | oetiker | 2005-05-05 11:07:56 +0200 | 2 lines
+
+better not to write into argv elements ... Henrik Stoerner <henrik from hswn.dk>
+
+------------------------------------------------------------------------
+r483 | oetiker | 2005-05-03 22:23:05 +0200 | 1 line
+
+do not die upon wront input when in remote mode
+------------------------------------------------------------------------
+r482 | oetiker | 2005-05-03 20:10:16 +0200 | 4 lines
+
+install documentation into $PREFIX/shared/doc/rrdtool-$VERSION/{txt,html} but
+drop the rrdtool-$VERSION/ bit if $PREFIX matches on rrd assuming that the tool is being installed into a custom directory anyway.
+
+
+------------------------------------------------------------------------
+r481 | oetiker | 2005-05-03 19:24:50 +0200 | 4 lines
+
+new options to tune how fontsmoothing works: 
+-R/--font-render-mode {normal,light,mono} and -B/--font-smoothing-threshold size
+-- John yffffffff4271ef37 at f4n.org
+
+------------------------------------------------------------------------
+r480 | oetiker | 2005-05-03 19:22:54 +0200 | 2 lines
+
+note about win32comp
+
+------------------------------------------------------------------------
+r478 | oetiker | 2005-05-02 22:27:13 +0200 | 1 line
+
+files that help getting that native windows port going -- Philippe.Simonet with swisscom.com
+------------------------------------------------------------------------
+r477 | oetiker | 2005-05-02 21:47:05 +0200 | 2 lines
+
+when walking the bytes use the pitch not the width
+
+------------------------------------------------------------------------
+r476 | oetiker | 2005-05-02 21:33:53 +0200 | 2 lines
+
+pow is alreay used as a function ... so lets call it power instead
+
+------------------------------------------------------------------------
+r475 | oetiker | 2005-05-02 21:32:49 +0200 | 2 lines
+
+no infinite line width please
+
+------------------------------------------------------------------------
+r472 | oetiker | 2005-05-02 00:07:34 +0200 | 1 line
+
+prep for 1.2.1 release
+------------------------------------------------------------------------
+r471 | oetiker | 2005-05-02 00:04:34 +0200 | 2 lines
+
+add some more vertical space above the graph if no title is available
+
+------------------------------------------------------------------------
+r470 | oetiker | 2005-05-01 23:24:06 +0200 | 2 lines
+
+use the pen to determine string length, do not look at the realy length, or space will get ignored.
+
+------------------------------------------------------------------------
+r469 | oetiker | 2005-05-01 23:16:49 +0200 | 3 lines
+
+DejaVuSansMono-Roman is a variant of VeraMono with lots of added unicode glyphes ... 
+check out http://dejavu.sourceforge.net
+
+------------------------------------------------------------------------
+r468 | oetiker | 2005-05-01 22:49:54 +0200 | 2 lines
+
+fix spaceing ... more space for the title and more space the the left of the yaxis lable
+
+------------------------------------------------------------------------
+r467 | oetiker | 2005-05-01 15:19:39 +0200 | 2 lines
+
+the multibyte support tried did not work ... takeing it out again
+
+------------------------------------------------------------------------
+r466 | oetiker | 2005-05-01 15:18:48 +0200 | 2 lines
+
+update tested library version
+
+------------------------------------------------------------------------
+r465 | oetiker | 2005-05-01 13:02:40 +0200 | 1 line
+
+undef jmpbuf to make compile work on AIX 5.1
+------------------------------------------------------------------------
+r464 | oetiker | 2005-05-01 13:00:36 +0200 | 2 lines
+
+increasse revision of shared library number since the library source code has changed
+
+------------------------------------------------------------------------
+r463 | oetiker | 2005-05-01 13:00:10 +0200 | 2 lines
+
+add wide character support
+
+------------------------------------------------------------------------
+r462 | oetiker | 2005-05-01 12:42:17 +0200 | 3 lines
+
+do not make the graph wider if the title does not fit ... this is wagging the dog
+the graph is not ABOUT the title
+
+------------------------------------------------------------------------
+r461 | oetiker | 2005-05-01 12:37:00 +0200 | 1 line
+
+fix description of VRULE
+------------------------------------------------------------------------
+r460 | oetiker | 2005-05-01 12:23:11 +0200 | 2 lines
+
+reset optind opterr inside the function calls ... 
+
+------------------------------------------------------------------------
+r459 | oetiker | 2005-05-01 12:22:35 +0200 | 2 lines
+
+fixed documentation regarding floating point line width
+
+------------------------------------------------------------------------
+r458 | oetiker | 2005-05-01 12:20:55 +0200 | 4 lines
+
+relax parsing of LINE commands LINE: is valid as well as LINE<double>:
+eg. LINE1.2323: 
+
+
+------------------------------------------------------------------------
+r457 | oetiker | 2005-05-01 11:16:38 +0200 | 2 lines
+
+allow for characters over 127
+
+------------------------------------------------------------------------
+r456 | oetiker | 2005-04-30 11:56:58 +0200 | 3 lines
+
+added notes on escaping colons in COMMENT and put deprecated forms of command to the back and not to the front
+
+
+------------------------------------------------------------------------
+r455 | oetiker | 2005-04-30 11:51:12 +0200 | 2 lines
+
+always open with rb/wb when it is a binary file ... unix and windows will work alike with this ... 
+
+------------------------------------------------------------------------
+r454 | oetiker | 2005-04-30 11:48:49 +0200 | 2 lines
+
+this file is not required ...
+
+------------------------------------------------------------------------
+r453 | oetiker | 2005-04-30 11:41:14 +0200 | 2 lines
+
+even better lets have rb for CYGWIN too ... one never knows it is windows after all.
+
+------------------------------------------------------------------------
+r452 | oetiker | 2005-04-30 11:40:24 +0200 | 2 lines
+
+oops inverted code here ... windows needs rb unix not
+
+------------------------------------------------------------------------
+r451 | oetiker | 2005-04-30 11:38:50 +0200 | 2 lines
+
+let rrd_graph honor the font name (RRD_DEFAULT_FONT) defined in confignt/config.h
+
+------------------------------------------------------------------------
+r450 | oetiker | 2005-04-27 00:08:22 +0200 | 1 line
+
+use pod syntax not html syntax in pod :-)
+------------------------------------------------------------------------
+r449 | oetiker | 2005-04-27 00:04:25 +0200 | 2 lines
+
+more fixes by fritz
+
+------------------------------------------------------------------------
+r443 | oetiker | 2005-04-26 07:33:18 +0200 | 2 lines
+
+obfuscate email addresses
+
+------------------------------------------------------------------------
+r442 | oetiker | 2005-04-26 07:30:22 +0200 | 5 lines
+
+* remove jakes old address
+* add security warning
+
+
+
+------------------------------------------------------------------------
+r440 | oetiker | 2005-04-26 00:55:15 +0200 | 2 lines
+
+remove pdf link
+
+------------------------------------------------------------------------
+r436 | oetiker | 2005-04-26 00:18:15 +0200 | 4 lines
+
+use time_t to improve portability to 64bit systems
+-- John R Mocho <jmocho in royaldc.com>
+
+
+------------------------------------------------------------------------
+r429 | oetiker | 2005-04-25 23:01:22 +0200 | 2 lines
+
+added new state
+
+------------------------------------------------------------------------
+r428 | oetiker | 2005-04-25 22:45:00 +0200 | 1 line
+
+prep for 1.2.0 release
+------------------------------------------------------------------------
+r426 | oetiker | 2005-04-25 21:07:18 +0200 | 2 lines
+
+resolved all XXX situations
+
+------------------------------------------------------------------------
+r425 | oetiker | 2005-04-25 19:31:11 +0200 | 2 lines
+
+another batch of fixes from fritz
+
+------------------------------------------------------------------------
+r423 | oetiker | 2005-04-25 00:21:34 +0200 | 1 line
+
+fixed contributiors listing
+------------------------------------------------------------------------
+r422 | oetiker | 2005-04-24 19:23:57 +0200 | 2 lines
+
+big patch-up for the 1.2. Documents Revisited by Fritz Zaucker
+
+------------------------------------------------------------------------
+r420 | oetiker | 2005-04-22 20:35:15 +0200 | 1 line
+
+prep for 1.2rc9 release
+------------------------------------------------------------------------
+r417 | oetiker | 2005-04-19 23:09:27 +0200 | 1 line
+
+fix titles
+------------------------------------------------------------------------
+r416 | oetiker | 2005-04-19 23:05:39 +0200 | 2 lines
+
+fixed title
+
+------------------------------------------------------------------------
+r414 | oetiker | 2005-04-19 00:39:10 +0200 | 3 lines
+
+src moved back to pod. this include thing was a neat idea but it just adds another twist to things which is not necessary.
+fixed some pod errors
+
+------------------------------------------------------------------------
+r413 | oetiker | 2005-04-19 00:13:20 +0200 | 2 lines
+
+misc fixes for better display
+
+------------------------------------------------------------------------
+r412 | oetiker | 2005-04-18 13:07:02 +0200 | 2 lines
+
+fixed format
+
+------------------------------------------------------------------------
+r411 | oetiker | 2005-04-18 00:43:11 +0200 | 3 lines
+
+fixed many pod bugs while creating the new website
+
+
+------------------------------------------------------------------------
+r410 | oetiker | 2005-04-17 19:29:29 +0200 | 2 lines
+
+make sure argument descriptions comply with Bold = fixed and Italics = variable
+
+------------------------------------------------------------------------
+r409 | oetiker | 2005-04-17 18:26:18 +0200 | 2 lines
+
+fix use of =item commands
+
+------------------------------------------------------------------------
+r408 | oetiker | 2005-04-17 18:25:53 +0200 | 2 lines
+
+allow to build pods (for website)
+
+------------------------------------------------------------------------
+r406 | oetiker | 2005-04-14 00:00:20 +0200 | 4 lines
+
+* draw the axis last to have them always on top
+* use a smaller font for labeling the axis
+
+
+------------------------------------------------------------------------
+r405 | oetiker | 2005-04-13 21:53:41 +0200 | 2 lines
+
+have better default compression
+
+------------------------------------------------------------------------
+r404 | oetiker | 2005-04-13 21:53:16 +0200 | 1 line
+
+tune fontsizes and spacing to be more in line with rrdtool 1.0
+------------------------------------------------------------------------
+r402 | oetiker | 2005-04-12 23:52:18 +0200 | 1 line
+
+prep for 1.2rc8 release
+------------------------------------------------------------------------
+r401 | oetiker | 2005-04-12 23:10:39 +0200 | 1 line
+
+prep for 1.2rc8 release
+------------------------------------------------------------------------
+r400 | oetiker | 2005-04-12 22:56:19 +0200 | 5 lines
+
+* better fix for units-exponent issue ... now the whole scaling happens only at
+  print time ... this is more stable -- tobi
+
+* remove the newline from ctime (%c) in VDEF -- alex
+
+------------------------------------------------------------------------
+r398 | oetiker | 2005-04-12 01:23:59 +0200 | 1 line
+
+prep for 1.2rc7 release
+------------------------------------------------------------------------
+r397 | oetiker | 2005-04-12 01:22:57 +0200 | 6 lines
+
+* adjusted element spacing within the  graph
+* re-intruduced --units-length option
+* stabilized --units-exponent option by jumping to alt-y-grid mode
+  once the default autogrid can not cope with the data anymore.
+
+
+------------------------------------------------------------------------
+r396 | oetiker | 2005-04-12 01:20:52 +0200 | 1 line
+
+added note about incompatible changes
+------------------------------------------------------------------------
+r395 | oetiker | 2005-04-11 14:29:32 +0200 | 2 lines
+
+started change log
+
+------------------------------------------------------------------------
+r394 | oetiker | 2005-04-11 14:17:36 +0200 | 1 line
+
+added notes on INF
+------------------------------------------------------------------------
+r393 | oetiker | 2005-04-11 11:51:22 +0200 | 4 lines
+
+* we are now creating true RGBA pngs
+* removed all memory leeks from rrd_gfx
+
+
+------------------------------------------------------------------------
+r392 | oetiker | 2005-04-11 00:02:10 +0200 | 2 lines
+
+started updating for 1.2 release
+
+------------------------------------------------------------------------
+r391 | oetiker | 2005-04-10 20:11:58 +0200 | 1 line
+
+clarified output -- alex
+------------------------------------------------------------------------
+r390 | oetiker | 2005-04-10 20:10:56 +0200 | 1 line
+
+get the docs ready for the 1.2 release. remove notes about things that never got implemented. -- alex
+------------------------------------------------------------------------
+r389 | oetiker | 2005-04-10 20:05:51 +0200 | 1 line
+
+do not draw AREAS that have no hight (done right). draw an arrow on the positiv y axis.
+------------------------------------------------------------------------
+r388 | oetiker | 2005-04-10 17:35:28 +0200 | 1 line
+
+updated for 1.2 release -- alex
+------------------------------------------------------------------------
+r387 | oetiker | 2005-04-10 16:00:12 +0200 | 1 line
+
+fixed typo -- alex
+------------------------------------------------------------------------
+r386 | oetiker | 2005-04-10 15:57:34 +0200 | 2 lines
+
+G<gt> does not exist E<gt> does 
+
+------------------------------------------------------------------------
+r385 | oetiker | 2005-04-10 14:12:21 +0200 | 2 lines
+
+fixed spelling and working -- Alex van den Bogaerdt alex at ergens.op.het.net
+
+------------------------------------------------------------------------
+r383 | oetiker | 2005-04-10 13:53:01 +0200 | 1 line
+
+added extra strftime.[ch] which supports ISO 8601 week numbers, together with instructions in the NT-BUILD-TIPPS file
+------------------------------------------------------------------------
+r381 | oetiker | 2005-04-10 13:33:10 +0200 | 1 line
+
+prep for 1.2rc6 release
+------------------------------------------------------------------------
+r380 | oetiker | 2005-04-10 13:31:32 +0200 | 2 lines
+
+remove excess comment 
+
+------------------------------------------------------------------------
+r379 | oetiker | 2005-04-10 13:30:14 +0200 | 4 lines
+
+make --disable-perl work
+allow configuration of the default font at configure time
+
+
+------------------------------------------------------------------------
+r378 | oetiker | 2005-04-10 13:29:16 +0200 | 1 line
+
+revamped drawing routines to be less complex and more stable. be kind to libart
+------------------------------------------------------------------------
+r377 | oetiker | 2005-04-10 11:38:38 +0200 | 1 line
+
+allow --color arguments with RRGGBB and not only RRGGBBAA
+------------------------------------------------------------------------
+r376 | oetiker | 2005-04-10 11:16:10 +0200 | 1 line
+
+everyone has other names for their shared libraries, so lets drop the dependency
+------------------------------------------------------------------------
+r375 | oetiker | 2005-04-10 11:15:19 +0200 | 1 line
+
+mention updatev in the synopsis
+------------------------------------------------------------------------
+r374 | oetiker | 2005-04-09 16:21:59 +0200 | 2 lines
+
+we do have 95% 
+
+------------------------------------------------------------------------
+r372 | oetiker | 2005-04-07 23:35:32 +0200 | 1 line
+
+prep for 1.2rc5 release
+------------------------------------------------------------------------
+r371 | oetiker | 2005-04-07 23:31:37 +0200 | 1 line
+
+fix implementation of --only-graph
+------------------------------------------------------------------------
+r370 | oetiker | 2005-04-07 23:31:09 +0200 | 1 line
+
+make libart happy by NOT adjusting coordinates and by using the ART_WIND_RULE_NONZERO winding rule
+------------------------------------------------------------------------
+r369 | oetiker | 2005-04-07 23:30:16 +0200 | 1 line
+
+return propper exit codes
+------------------------------------------------------------------------
+r368 | oetiker | 2005-04-07 22:07:45 +0200 | 2 lines
+
+fix bitpatterns of extraflags so that they do not interfear
+
+------------------------------------------------------------------------
+r366 | oetiker | 2005-04-07 01:58:41 +0200 | 1 line
+
+prep for 1.2rc4 release
+------------------------------------------------------------------------
+r365 | oetiker | 2005-04-07 01:24:35 +0200 | 1 line
+
+prep for 1.2rc4 release
+------------------------------------------------------------------------
+r364 | oetiker | 2005-04-07 01:18:37 +0200 | 2 lines
+
+document RRD_DEFAULT_FONT environment variable 
+
+------------------------------------------------------------------------
+r363 | oetiker | 2005-04-07 00:40:53 +0200 | 2 lines
+
+make sure WIN32 sections do NOT kick in for cygwin compiles
+
+------------------------------------------------------------------------
+r362 | oetiker | 2005-04-06 00:49:55 +0200 | 2 lines
+
+only unwind the areas, the lines should be fine by themselves!
+
+------------------------------------------------------------------------
+r360 | oetiker | 2005-04-05 22:32:39 +0200 | 1 line
+
+prep for 1.2rc3 release
+------------------------------------------------------------------------
+r359 | oetiker | 2005-04-05 22:17:45 +0200 | 4 lines
+
+* fix transparency rendering by rewinding the paths propperly
+* fix x-axis label drawing by considering label precision
+
+
+------------------------------------------------------------------------
+r358 | oetiker | 2005-04-05 21:14:16 +0200 | 1 line
+
+new originaly copy
+------------------------------------------------------------------------
+r357 | oetiker | 2005-04-05 21:12:54 +0200 | 2 lines
+
+fixed propperties to have a RAW font
+
+------------------------------------------------------------------------
+r353 | oetiker | 2005-04-04 23:56:30 +0200 | 1 line
+
+make configure work even when no prefix is specified
+------------------------------------------------------------------------
+r352 | oetiker | 2005-04-04 23:40:11 +0200 | 1 line
+
+prep for 1.2rc2 release
+------------------------------------------------------------------------
+r351 | oetiker | 2005-04-04 23:22:05 +0200 | 1 line
+
+prepared for 1.2rc2 release
+------------------------------------------------------------------------
+r350 | oetiker | 2005-04-04 23:21:43 +0200 | 1 line
+
+prepared for 1.2rc1 release
+------------------------------------------------------------------------
+r349 | oetiker | 2005-04-04 23:12:21 +0200 | 1 line
+
+prepared for 1.2rc1 release
+------------------------------------------------------------------------
+r348 | oetiker | 2005-04-04 23:07:55 +0200 | 1 line
+
+prepared for 1.2rc1 release
+------------------------------------------------------------------------
+r347 | oetiker | 2005-04-04 23:05:32 +0200 | 1 line
+
+prepared for 1.2rc1 release
+------------------------------------------------------------------------
+r345 | oetiker | 2005-04-04 22:56:49 +0200 | 1 line
+
+fixed prefix detection code again
+------------------------------------------------------------------------
+r344 | oetiker | 2005-04-04 22:53:23 +0200 | 1 line
+
+fixed autoprefix
+------------------------------------------------------------------------
+r342 | oetiker | 2005-04-04 22:48:58 +0200 | 2 lines
+
+fixed config script for prefixing
+
+------------------------------------------------------------------------
+r340 | oetiker | 2005-04-04 22:37:26 +0200 | 2 lines
+
+get ready for 1.2
+
+------------------------------------------------------------------------
+r338 | oetiker | 2005-04-04 21:55:30 +0200 | 1 line
+
+branche for 1.2
+------------------------------------------------------------------------
+r336 | oetiker | 2005-04-03 14:44:15 +0200 | 2 lines
+
+update build instructions and configure output.
+
+------------------------------------------------------------------------
+r335 | oetiker | 2005-04-03 13:44:58 +0200 | 2 lines
+
+paramters in SHIFT are separated by : like everywhere else
+
+------------------------------------------------------------------------
+r334 | oetiker | 2005-04-03 13:36:58 +0200 | 3 lines
+
+the piechart code does not produce release ready results ... hide it behind WITH_PIECHART define
+
+
+------------------------------------------------------------------------
+r333 | oetiker | 2005-04-03 13:11:50 +0200 | 2 lines
+
+improve png writing speed by lowering the compression
+
+------------------------------------------------------------------------
+r332 | oetiker | 2005-04-03 13:11:21 +0200 | 2 lines
+
+make sure the font path is shorter than the buffer
+
+------------------------------------------------------------------------
+r331 | oetiker | 2005-04-03 12:10:56 +0200 | 3 lines
+
+fix graph layout ... especially consider text propperties propperly
+
+
+------------------------------------------------------------------------
+r330 | oetiker | 2005-04-03 11:37:08 +0200 | 3 lines
+
+the legend string of a PRINT command gets renderd later by runnning
+it through printf.
+
+------------------------------------------------------------------------
+r329 | oetiker | 2005-04-03 11:35:52 +0200 | 4 lines
+
+MMAP support for rrdtool this is suposed to speed-up uptime 4 times.
+-- Radoslaw Karas <rkaras@tyndall.ie>
+
+
+------------------------------------------------------------------------
+r328 | oetiker | 2005-03-20 22:17:50 +0100 | 1 line
+
+revert to last working version
+------------------------------------------------------------------------
+r327 | oetiker | 2005-03-20 22:11:17 +0100 | 1 line
+
+fix quoting
+------------------------------------------------------------------------
+r326 | oetiker | 2005-03-20 22:00:13 +0100 | 2 lines
+
+quote sed expression
+
+------------------------------------------------------------------------
+r325 | oetiker | 2005-03-20 21:59:31 +0100 | 5 lines
+
+document tabbing support by adding in the textformatting notes
+document --tabwidth argument
+document AXIS color
+
+
+------------------------------------------------------------------------
+r324 | oetiker | 2005-03-20 21:58:28 +0100 | 8 lines
+
+* allow configuration of the default tab width
+* added new configurable color AXIS
+* made tabbing support work with legend elements
+* use propper font for the legend: LEGEND
+* fix apperance by makeing grid more transparent
+* draw axis over the graph not under it.
+
+
+------------------------------------------------------------------------
+r323 | oetiker | 2005-03-20 21:56:16 +0100 | 1 line
+
+added tabbig support
+------------------------------------------------------------------------
+r322 | oetiker | 2005-03-20 21:55:27 +0100 | 1 line
+
+include the thread defs after they have been found not before
+------------------------------------------------------------------------
+r320 | oetiker | 2005-03-13 17:34:27 +0100 | 2 lines
+
+propperly integrate rrd_first
+
+------------------------------------------------------------------------
+r319 | oetiker | 2005-03-13 17:13:49 +0100 | 1 line
+
+autotools still run after configure this is not good ... run autoreconf at the end of MakeMakefile. Maybe this will help
+------------------------------------------------------------------------
+r318 | oetiker | 2005-03-13 17:09:21 +0100 | 1 line
+
+set install patch to version
+------------------------------------------------------------------------
+r317 | oetiker | 2005-03-13 17:08:43 +0100 | 1 line
+
+re-run autotools to make sure dependent dates are correct
+------------------------------------------------------------------------
+r316 | oetiker | 2005-03-13 17:00:51 +0100 | 1 line
+
+reintroduce final header regen
+------------------------------------------------------------------------
+r315 | oetiker | 2005-03-13 16:57:37 +0100 | 1 line
+
+still trying to get the order of calling autotools right
+------------------------------------------------------------------------
+r314 | oetiker | 2005-03-13 16:54:06 +0100 | 1 line
+
+create aclocal.m4 before libtoolize
+------------------------------------------------------------------------
+r313 | oetiker | 2005-03-13 16:51:06 +0100 | 1 line
+
+make the headers first
+------------------------------------------------------------------------
+r312 | oetiker | 2005-03-13 16:16:05 +0100 | 1 line
+
+add the documentation for first
+------------------------------------------------------------------------
+r311 | oetiker | 2005-03-13 16:14:31 +0100 | 1 line
+
+ntconfig is no more
+------------------------------------------------------------------------
+r310 | oetiker | 2005-03-13 16:12:44 +0100 | 2 lines
+
+missed the actual code for  first
+
+------------------------------------------------------------------------
+r309 | oetiker | 2005-03-12 18:06:46 +0100 | 1 line
+
+rrd_first code contributed by Burton Strauss <Burton@ntopSupport.com>
+------------------------------------------------------------------------
+r307 | oetiker | 2005-03-10 18:03:34 +0100 | 17 lines
+
+* Updated perl compile system. It now uses Makefile.PL for everything,
+  but gets it to install the perl module in @prefix@/lib/perl such
+  that you can use the same use lib line for whatever platform and perlversion 
+  you install into this directory. They all live neatly next to each other.
+
+* fixed examples to work with new perl install system. Added a few exec_prefix lines
+  where appropriate
+
+* fixed piped demo
+
+* fixed VeraMono.ttf file. This somehow got damaged by cvs ... 
+
+* added thread defines to normal compile run, so that _r functions to not through errors.
+
+* tested compilation and installation
+
+
+------------------------------------------------------------------------
+r306 | oetiker | 2005-03-05 00:53:39 +0100 | 8 lines
+
+revamped configure system ... lots more stuff is in acinclude now still a
+bit of a mess, but better than before ... if configure does not find the
+dependent libraries and header it will not try to get help from pkg-config.
+
+If you know where your libraries are it is best to just use CPPFLAGS and
+LDFLAGS to specify their location.
+
+
+------------------------------------------------------------------------
+r305 | oetiker | 2005-03-04 01:12:37 +0100 | 15 lines
+
+Big autotool update:
+
+* Upgraded to the latest version of autoconf, automake and libtool
+
+* replaced pthread detection code in configure with a more effective one
+
+* added a test to see if special solaris defines
+  are required for ctime_r to behave posixly correct.
+
+* Fixed lots of warnings from autotools
+
+* started adding support for pkg-config ... this will eventually
+  make the whole library finding much simpler
+
+
+------------------------------------------------------------------------
+r300 | oetiker | 2005-03-03 14:34:53 +0100 | 1 line
+
+ignorelists are a propperty of an svn directory not a file
+------------------------------------------------------------------------
+r298 | oetiker | 2005-02-27 23:00:54 +0100 | 2 lines
+
+do not complain when setting environemnt variable sucessfully. -- hunter@mimuw.edu.pl
+
+------------------------------------------------------------------------
+r297 | oetiker | 2005-02-13 17:13:33 +0100 | 3 lines
+
+let rrd_graph return the actual value range it picked ...
+-- Henrik Stoerner <henrik@hswn.dk>
+
+------------------------------------------------------------------------
+r296 | oetiker | 2005-01-28 15:02:17 +0100 | 2 lines
+
+fix for memory leak. Rene Gallati <security .. draxinusom.ch>
+
+------------------------------------------------------------------------
+r295 | oetiker | 2005-01-03 23:25:37 +0100 | 2 lines
+
+update todo
+
+------------------------------------------------------------------------
+r294 | oetiker | 2004-10-26 00:22:53 +0200 | 2 lines
+
+* fore-rules-legend option -- author name missing
+
+------------------------------------------------------------------------
+r293 | oetiker | 2004-10-26 00:21:19 +0200 | 2 lines
+
+fixed segmentation falt problem in rrd_tool -- Yasuhiro Sumi <yasuhiro.sumi@hde.co.jp>
+
+------------------------------------------------------------------------
+r292 | oetiker | 2004-10-21 21:21:24 +0200 | 2 lines
+
+fix return codes in the error case -- Haroon Rafique <haroon.rafique@utoronto.ca>
+
+------------------------------------------------------------------------
+r291 | oetiker | 2004-09-24 23:11:09 +0200 | 3 lines
+
+misc fixed and TREND and reduce functionality by
+-- David M. Grimes <dgrimes@navisite.com>
+
+------------------------------------------------------------------------
+r290 | oetiker | 2004-08-24 07:26:09 +0200 | 5 lines
+
+CDEF operators SHIFT, SQRT, SORT, and REV (reverse).  See documentation for what
+they do. This included removal of redundant code in the
+rrd_xport path, replaced with a call to rrd_graph_script().
+-- David M. Grimes <dgrimes@navisite.com>
+
+------------------------------------------------------------------------
+r289 | oetiker | 2004-08-09 10:38:55 +0200 | 2 lines
+
+added note on escaping :
+
+------------------------------------------------------------------------
+r288 | oetiker | 2004-08-08 23:54:07 +0200 | 2 lines
+
+port forward of fixes from the stable version of rrd_cgi
+
+------------------------------------------------------------------------
+r287 | oetiker | 2004-08-08 01:46:35 +0200 | 3 lines
+
+when moving the data pointers we should take into account how fahr off they
+are. Found by David M. Grimes <dgrimes@navisite.com>
+
+------------------------------------------------------------------------
+r286 | oetiker | 2004-08-05 23:24:46 +0200 | 2 lines
+
+removed nonexisting files from manifest
+
+------------------------------------------------------------------------
+r285 | jake | 2004-07-30 02:30:13 +0200 | 4 lines
+
+Fix the Win32 build for executable and perl-shared library.
+See NT-BUILD-TIPS.txt for step by step instructions.
+Remove VC++ project files not being maintained by anyone.
+
+------------------------------------------------------------------------
+r284 | oetiker | 2004-07-14 12:55:25 +0200 | 2 lines
+
+added Peter Speck
+
+------------------------------------------------------------------------
+r283 | oetiker | 2004-06-26 11:03:50 +0200 | 3 lines
+
+allow building rpm from cvs where there is not ChangeLog (this gets generated when the
+distribution tar is built) -- Tobi and Mike Slifcak
+
+------------------------------------------------------------------------
+r282 | oetiker | 2004-06-23 22:36:39 +0200 | 4 lines
+
+It's quie enough that the title is placed on the top
+of the graph, there's no need to emphasize it more.
+-- Stanislav Sinyagin <ssinyagin@yahoo.com>
+
+------------------------------------------------------------------------
+r281 | oetiker | 2004-06-23 10:39:44 +0200 | 2 lines
+
+reverted ... $< does not work
+
+------------------------------------------------------------------------
+r280 | oetiker | 2004-06-23 00:09:07 +0200 | 4 lines
+
+The "$^" variable is GNU make-specific, and fails to compile under
+FreeBSD 4.10. Please change it to $<, which is more compatible.
+--  Stanislav Sinyagin <ssinyagin@yahoo.com>
+
+------------------------------------------------------------------------
+r279 | oetiker | 2004-06-18 00:09:24 +0200 | 2 lines
+
+fixed type for text_prop_conv prototype
+
+------------------------------------------------------------------------
+r278 | oetiker | 2004-06-07 21:07:57 +0200 | 3 lines
+
+Fix for debian freetype linking
+-- Peter Hirdina <Peter.Hirdina@gmx.net>
+
+------------------------------------------------------------------------
+r277 | oetiker | 2004-05-27 00:11:12 +0200 | 2 lines
+
+reduce compiler warnings. Many small fixes. -- Mike Slifcak <slif@bellsouth.net>
+
+------------------------------------------------------------------------
+r276 | oetiker | 2004-05-27 00:10:24 +0200 | 2 lines
+
+improve redhat/fedora building -- Mike Slifcak
+
+------------------------------------------------------------------------
+r275 | oetiker | 2004-05-27 00:09:58 +0200 | 2 lines
+
+update debian build instructions -- Mike Slifcak
+
+------------------------------------------------------------------------
+r274 | oetiker | 2004-05-26 00:08:12 +0200 | 3 lines
+
+The counter was the only variable which needed to be an integer.
+-- Mike Slifcak
+
+------------------------------------------------------------------------
+r273 | oetiker | 2004-05-26 00:07:30 +0200 | 10 lines
+
+The rrdtool RPM package was depending on the rrdtool-perl package.
+These changes move the examples, which are primarily perl scripts,
+in with the rrdtool-perl RPM package, thereby de-coupling the
+rest of the RRDtool from Perl.  Perhaps this is silliness ?
+
+If there is no need for rrdtool separate from the Perl modules,
+let me know, then I'll just create an rrdtool and an rrdtool-devel
+RPM package (that would be a cleaner build and scripting, anyway).
+-- Mike Slifcak
+
+------------------------------------------------------------------------
+r272 | oetiker | 2004-05-26 00:03:04 +0200 | 2 lines
+
+added dtd descriptsion s or rrdtool xml output  -- Wolfgang Schrimm <wolfgang{dot}schrimm{at}urz{dot}uni-heidelberg{dot}de>
+
+------------------------------------------------------------------------
+r271 | oetiker | 2004-05-25 23:06:59 +0200 | 2 lines
+
+added dump and restore ... Mike Schilli <b2b@perlmeister.com>
+
+------------------------------------------------------------------------
+r270 | oetiker | 2004-05-25 23:01:50 +0200 | 2 lines
+
+added some contributors
+
+------------------------------------------------------------------------
+r269 | oetiker | 2004-05-25 23:00:48 +0200 | 2 lines
+
+fixed time stamp in example -- Mike Slifcak
+
+------------------------------------------------------------------------
+r268 | oetiker | 2004-05-25 22:59:49 +0200 | 2 lines
+
+more fixes for rpm spec -- Mike Slifcak
+
+------------------------------------------------------------------------
+r267 | oetiker | 2004-05-25 22:58:57 +0200 | 2 lines
+
+single word fix -- Mike Slifcak
+
+------------------------------------------------------------------------
+r266 | oetiker | 2004-05-25 22:57:58 +0200 | 4 lines
+
+Clear out previous legend array contents before freeing legend array.
+Problem could manifest under extreme resource limits.  Not tested.
+-- Mike Slifcak
+
+------------------------------------------------------------------------
+r265 | oetiker | 2004-05-25 22:55:37 +0200 | 2 lines
+
+subordinate term was improperly formed --  Mike Slifcak
+
+------------------------------------------------------------------------
+r264 | oetiker | 2004-05-25 22:53:21 +0200 | 2 lines
+
+prevent small leak when resources are exhausted -- Mike Slifcak
+
+------------------------------------------------------------------------
+r263 | oetiker | 2004-05-25 22:52:16 +0200 | 2 lines
+
+fix spelling and syntax, especially in messages that are printed -- Mike Slifcak
+
+------------------------------------------------------------------------
+r262 | oetiker | 2004-05-25 22:51:49 +0200 | 2 lines
+
+Update displayed copyright messages to be consistent. -- Mike Slifcak
+
+------------------------------------------------------------------------
+r261 | oetiker | 2004-05-25 22:51:12 +0200 | 2 lines
+
+don't process the old rrdgraph single file document -- Mike Slifcak
+
+------------------------------------------------------------------------
+r260 | oetiker | 2004-05-25 22:50:36 +0200 | 2 lines
+
+fix rpm rules --  Mike Slifcak
+
+------------------------------------------------------------------------
+r259 | oetiker | 2004-05-25 22:50:07 +0200 | 2 lines
+
+fixed debian dependencies --  Mike Slifcak
+
+------------------------------------------------------------------------
+r258 | oetiker | 2004-05-25 18:51:49 +0200 | 3 lines
+
+The expression's head was first checking for LT, and then for LTIME,
+and the latter was never reached. -- Stanislav Sinyagin <ssinyagin@yahoo.com>
+
+------------------------------------------------------------------------
+r257 | oetiker | 2004-05-19 07:11:07 +0200 | 2 lines
+
+integrated from debian
+
+------------------------------------------------------------------------
+r256 | oetiker | 2004-05-18 20:54:50 +0200 | 2 lines
+
+its 365 days in a year .... -- Mike Slifcak
+
+------------------------------------------------------------------------
+r255 | oetiker | 2004-05-18 20:53:03 +0200 | 2 lines
+
+big spell checking patch -- slif@bellsouth.net
+
+------------------------------------------------------------------------
+r254 | oetiker | 2004-05-18 20:51:55 +0200 | 2 lines
+
+make force option work
+
+------------------------------------------------------------------------
+r253 | oetiker | 2004-05-18 20:51:02 +0200 | 2 lines
+
+added beginners guide off debian --  slif@bellsouth.net
+
+------------------------------------------------------------------------
+r252 | oetiker | 2004-05-18 20:49:50 +0200 | 2 lines
+
+add 4chars and fix two examples -- Mike Slifcak <slif@bellsouth.net>
+
+------------------------------------------------------------------------
+r251 | oetiker | 2004-05-18 20:40:31 +0200 | 2 lines
+
+initial debian build system added -- Mike Slifcak <slif@bellsouth.net>
+
+------------------------------------------------------------------------
+r250 | oetiker | 2004-05-18 20:36:05 +0200 | 2 lines
+
+fix library numbering  -- Mike Slifcak
+
+------------------------------------------------------------------------
+r249 | oetiker | 2004-05-18 20:25:45 +0200 | 2 lines
+
+better cleaning -- Mike Slifcak
+
+------------------------------------------------------------------------
+r248 | oetiker | 2004-05-12 23:57:53 +0200 | 3 lines
+
+locate the mkinstalldirs script at top level
+accept "configure --mandir=" settings -- Mike Slifcak <slif@bellsouth.net>
+
+------------------------------------------------------------------------
+r247 | oetiker | 2004-05-04 23:01:29 +0200 | 4 lines
+
+Added the ATAN function. This is being used to convert a DS for each vector component of wind direction into a
+single direction for graphing. CDEF:avdir=yavg,xavg,/,ATAN,57.296,*,xavg,0,LT,180,0,IF,+,DUP,0,LT,360,0,IF,+
+-- Daniel Shiels <dan@marge.tofubar.com>
+
+------------------------------------------------------------------------
+r246 | oetiker | 2004-05-04 22:54:47 +0200 | 2 lines
+
+updated spec file -- Chris Adams <cmadams@hiwaay.net>
+
+------------------------------------------------------------------------
+r245 | oetiker | 2004-05-04 07:25:19 +0200 | 3 lines
+
+die only after all the version checks are done and not for each one
+-- Alex van den Bogaerdt <alex@ergens.op.het.net>
+
+------------------------------------------------------------------------
+r244 | oetiker | 2004-05-03 16:05:48 +0200 | 6 lines
+
+* Allows rrdtool 1.1.x (2004-04-29) to compile on freebsd.
+* Add configure options
+  --disable-rrdcgi        disable building of rrdcgi
+  --disable-pthread       disable multithread support
+-- Stanislav Sinyagin <ssinyagin@yahoo.com>
+
+------------------------------------------------------------------------
+r243 | oetiker | 2004-05-02 23:10:59 +0200 | 7 lines
+
+See the patch, attached. It changes the default angle to 90, and
+allows one to change it from configure command line:
+
+./configure RRDGRAPH_YLEGEND_ANGLE=270.0
+
+-- Stanislav Sinyagin <ssinyagin@yahoo.com>
+
+------------------------------------------------------------------------
+r242 | oetiker | 2004-04-18 12:21:31 +0200 | 2 lines
+
+fixed O_BINARY
+
+------------------------------------------------------------------------
+r241 | oetiker | 2004-03-23 22:34:28 +0100 | 2 lines
+
+make sure fole is opened binary on restore ... to make things work on windows -- "Girod, Laurent" <Laurent.Girod@pmintl.com>
+
+------------------------------------------------------------------------
+r240 | oetiker | 2004-03-21 12:40:49 +0100 | 2 lines
+
+Added --only-graph option -- Piotr Kodzis <Piotr.Kodzis@inteligo.pl>
+
+------------------------------------------------------------------------
+r239 | oetiker | 2004-03-14 21:58:32 +0100 | 3 lines
+
+make MakeMaker work on debian and fix some leftovers from the library rip-out transition
+-- Tobi
+
+------------------------------------------------------------------------
+r238 | oetiker | 2004-01-20 00:41:34 +0100 | 2 lines
+
+initial
+
+------------------------------------------------------------------------
+r237 | oetiker | 2004-01-20 00:39:42 +0100 | 2 lines
+
+kill
+
+------------------------------------------------------------------------
+r236 | oetiker | 2004-01-20 00:39:01 +0100 | 2 lines
+
+remove
+
+------------------------------------------------------------------------
+r235 | oetiker | 2004-01-20 00:37:19 +0100 | 2 lines
+
+kill it
+
+------------------------------------------------------------------------
+r234 | oetiker | 2004-01-20 00:35:21 +0100 | 2 lines
+
+killem
+
+------------------------------------------------------------------------
+r233 | oetiker | 2004-01-20 00:27:17 +0100 | 2 lines
+
+all must go
+
+------------------------------------------------------------------------
+r232 | oetiker | 2004-01-20 00:17:00 +0100 | 2 lines
+
+misc fixes to get rrdtool working without included libraries.
+
+------------------------------------------------------------------------
+r231 | oetiker | 2004-01-20 00:16:03 +0100 | 2 lines
+
+modifications for 'no more local libaries'
+
+------------------------------------------------------------------------
+r230 | oetiker | 2004-01-15 19:14:02 +0100 | 2 lines
+
+addition of RRDs::times -- Christophe Kalt <kalt@taranis.org>
+
+------------------------------------------------------------------------
+r229 | oetiker | 2003-12-26 17:54:55 +0100 | 2 lines
+
+using --riggid it is possible to get a case where minval is bigger than maxval ... this breaks the horizontal grid ...
+
+------------------------------------------------------------------------
+r228 | oetiker | 2003-11-27 07:31:38 +0100 | 2 lines
+
+Stop RRDs for segfaulting on invalid graph input -- Ian Holsman <Ian.Holsman@cnet.com>
+
+------------------------------------------------------------------------
+r227 | oetiker | 2003-11-27 07:30:36 +0100 | 2 lines
+
+make rrd_cgi build again ... Ian Holsman <rrd.developers@holsman.net>
+
+------------------------------------------------------------------------
+r226 | oetiker | 2003-11-23 13:55:37 +0100 | 2 lines
+
+New recursive parser for rrdcgi by Arend-Jan Wijtzes <ajwytzes@wise-guys.nl>
+
+------------------------------------------------------------------------
+r225 | oetiker | 2003-11-19 08:06:44 +0100 | 4 lines
+
+Adding attributions:
+* xml fix was by Ian Holsman <rrd.developers@holsman.net>
+* font rotation was by Chris Turbeville <turbo@verio.net>
+
+------------------------------------------------------------------------
+r224 | oetiker | 2003-11-19 07:58:36 +0100 | 2 lines
+
+fixed svg generation
+
+------------------------------------------------------------------------
+r223 | oetiker | 2003-11-17 12:43:56 +0100 | 2 lines
+
+more correct usage added -- Eldad Zack <eldad@stoneshaft.ath.cx>
+
+------------------------------------------------------------------------
+r222 | oetiker | 2003-11-15 00:10:51 +0100 | 2 lines
+
+handle NULL pointers gracefully
+
+------------------------------------------------------------------------
+r221 | oetiker | 2003-11-12 23:14:26 +0100 | 2 lines
+
+allow to pass an open filehandle into rrd_graph as an extra argument
+
+------------------------------------------------------------------------
+r220 | oetiker | 2003-11-12 23:13:55 +0100 | 2 lines
+
+make create much faster .. -- David M. Grimes <dgrimes@navisite.com>
+
+------------------------------------------------------------------------
+r219 | oetiker | 2003-11-11 22:19:52 +0100 | 3 lines
+
+Allow to force overwrite when restoring from xml to rrd.
+-- Eldad Zack <eldad@stoneshaft.ath.cx>
+
+------------------------------------------------------------------------
+r218 | oetiker | 2003-11-11 20:46:21 +0100 | 2 lines
+
+replaced time_value with rrd_time_value as MacOS X introduced a struct of that name in their standard headers
+
+------------------------------------------------------------------------
+r217 | oetiker | 2003-11-11 20:38:03 +0100 | 3 lines
+
+rrd files should NOT change size ever ... bulk update code wa buggy.
+-- David M. Grimes <dgrimes@navisite.com>
+
+------------------------------------------------------------------------
+r216 | oetiker | 2003-11-04 23:20:33 +0100 | 2 lines
+
+20 chars max in a ds name -- Kuba Filipowicz <amo@axit.pl>
+
+------------------------------------------------------------------------
+r215 | oetiker | 2003-10-26 20:29:56 +0100 | 2 lines
+
+added rotation ...
+
+------------------------------------------------------------------------
+r214 | oetiker | 2003-09-04 15:16:12 +0200 | 2 lines
+
+should not assigne but compare ... grrrrr
+
+------------------------------------------------------------------------
+r213 | oetiker | 2003-09-02 23:58:35 +0200 | 2 lines
+
+be pickier about what we accept in rrd_update. Complain if things do not work out
+
+------------------------------------------------------------------------
+r212 | oetiker | 2003-08-28 23:48:53 +0200 | 2 lines
+
+make sure we get only 1 flag -- Chris Turbeville <turbo@verio.net>
+
+------------------------------------------------------------------------
+r211 | oetiker | 2003-07-28 23:59:22 +0200 | 10 lines
+
+I was just taking a look at the development RRDtool build (I'm looking
+forward to SVG support), and had a few problems with an out-of-tree
+build. I find using a separate build directory makes things much
+easier to manage, especially when building for multiple architectures.
+
+I've attached the minor patches for the progress that I made (I couldn't
+get the Perl modules to work, but the main binaries seem okay), and
+would be grateful if you could commit them (or something like them!).
+-- Joseph Walton <joe@kafsemo.org>
+
+------------------------------------------------------------------------
+r210 | jake | 2003-07-24 16:51:46 +0200 | 2 lines
+
+Allow hyphen character in DEF_NAM_FMT to match DS_NAM_FMT.
+
+------------------------------------------------------------------------
+r209 | jake | 2003-07-17 01:41:37 +0200 | 4 lines
+
+Updated MS Visual C++ files from 7.0 to 7.1.
+Add code to rrd_graph.c: rrd_graph_init() to use %windir% environment
+variable to find the default font at runtime.
+
+------------------------------------------------------------------------
+r208 | jake | 2003-07-15 02:58:38 +0200 | 2 lines
+
+Moved OP_COUNT to the end of the enumeration.
+
+------------------------------------------------------------------------
+r207 | oetiker | 2003-05-20 22:51:04 +0200 | 5 lines
+
+I've made a patch to rrdcgi to add <RRD::TIME::STRFTIME ...> which allows
+you to re-format start and end-time at-style times using strftime.  This
+allows easy timespans in the graph (e.g. -2weeks) to be formatted into more
+usual times. -- "Erskine, Thomas" <terskine@NRCan.gc.ca>
+
+------------------------------------------------------------------------
+r206 | oetiker | 2003-05-03 17:41:41 +0200 | 3 lines
+
+small patch to rrd_create.c that corrects problem with the
+version number of the newly created files. -- Sasha Mikheev <sasha@avalon-net.co.il>
+
+------------------------------------------------------------------------
+r205 | oetiker | 2003-04-29 23:56:49 +0200 | 6 lines
+
+readline in rrd_open.c reads the file in 8 KB blocks, and calls realloc for
+each block. realloc is very slow in Mac OS X for huge blocks, e.g. when
+restoring databases from huge xml files. This patch finds the size of the
+file, and starts out with malloc'ing the full size.
+-- Peter Speck <speck@ruc.dk>
+
+------------------------------------------------------------------------
+r204 | oetiker | 2003-04-29 21:37:27 +0200 | 2 lines
+
+added comment on iso
+
+------------------------------------------------------------------------
+r203 | jake | 2003-04-29 21:14:12 +0200 | 3 lines
+
+Change updatev RRA return from index_number to cf_nam, pdp_cnt.
+Also revert accidental addition of -I to aclocal MakeMakefile.
+
+------------------------------------------------------------------------
+r202 | oetiker | 2003-04-26 07:11:27 +0200 | 2 lines
+
+only restore V2 and larger.
+
+------------------------------------------------------------------------
+r201 | jake | 2003-04-25 20:35:08 +0200 | 2 lines
+
+Alternate update interface, updatev. Returns info about CDPs written to disk as result of update. Output format is similar to rrd_info, a hash of key-values.
+
+------------------------------------------------------------------------
+r200 | oetiker | 2003-04-24 00:47:00 +0200 | 2 lines
+
+fixed version checks to only complain if xml version is > than current RRD version
+
+------------------------------------------------------------------------
+r199 | oetiker | 2003-04-11 21:43:44 +0200 | 6 lines
+
+New special value COUNT which allows calculations based on the position of a
+value within a data set. Bug fix in rrd_rpncalc.c. PREV returned erroneus
+value for the second value. Bug fix in rrd_restore.c. Bug causing seek error
+when accesing an RRD restored from an xml that holds an RRD version <3.
+--  Ruben Justo <ruben@ainek.com>
+
+------------------------------------------------------------------------
+r198 | oetiker | 2003-04-04 22:51:21 +0200 | 4 lines
+
+I think I found a very small bug in rrd graph PDF output : the is_stream member of
+pdf_buffer is not initialized, making bad PDF sometimes (I found a case where is_stream was
+!= 0 for the font initialization). -- lhoudard@netcourrier.com
+
+------------------------------------------------------------------------
+r197 | jake | 2003-04-02 00:52:23 +0200 | 2 lines
+
+Fix Win32 build. VC++ 6.0 and 7.0 now use the thread-safe code.
+
+------------------------------------------------------------------------
+r196 | oetiker | 2003-03-31 23:22:12 +0200 | 4 lines
+
+enables RRDtool updates with microsecond or in case of windows millisecond
+precision. This is needed to reduce time measurement error when archive step
+is small. (<30s) --  Sasha Mikheev <sasha@avalon-net.co.il>
+
+------------------------------------------------------------------------
+r195 | oetiker | 2003-03-25 23:29:10 +0100 | 2 lines
+
+use the environment variable VCINSTALLDIR --  Ian Holsman <rrd.developers@holsman.net>
+
+------------------------------------------------------------------------
+r194 | oetiker | 2003-03-24 23:08:20 +0100 | 2 lines
+
+strerror should not turn us recursive here ... --  Peter Stamfest <peter@stamfest.at>
+
+------------------------------------------------------------------------
+r193 | oetiker | 2003-03-24 23:05:26 +0100 | 2 lines
+
+strerror must not become recursive -- Peter Stamfest <peter@stamfest.at>
+
+------------------------------------------------------------------------
+r192 | oetiker | 2003-03-12 21:39:59 +0100 | 2 lines
+
+remove ^M
+
+------------------------------------------------------------------------
+r191 | oetiker | 2003-03-10 01:30:34 +0100 | 3 lines
+
+handle cases with two negative numbers
+--  Sasha Mikheev <sasha@avalon-net.co.il>
+
+------------------------------------------------------------------------
+r190 | oetiker | 2003-03-08 19:44:06 +0100 | 3 lines
+
+don't display legends for [HV]RULEs out of graph bounds (rrdgraph)
+-- Christophe Kalt <kalt@taranis.org>
+
+------------------------------------------------------------------------
+r189 | oetiker | 2003-03-01 23:25:56 +0100 | 2 lines
+
+realy suppress size output when talking to stdout. Patch from Mat Zimmerman @ debian
+
+------------------------------------------------------------------------
+r188 | oetiker | 2003-02-24 19:26:37 +0100 | 2 lines
+
+fix for : in piped demo
+
+------------------------------------------------------------------------
+r187 | oetiker | 2003-02-22 22:57:35 +0100 | 3 lines
+
+Initial checkin
+-- Peter Stamfest <peter@stamfest.at>
+
+------------------------------------------------------------------------
+r186 | oetiker | 2003-02-22 22:57:03 +0100 | 3 lines
+
+a patch to avoid a memory leak and a Makefile.am patch to
+distribute all required source files -- Peter Stamfest <peter@stamfest.at>
+
+------------------------------------------------------------------------
+r185 | oetiker | 2003-02-21 23:40:07 +0100 | 2 lines
+
+colons must be escaped
+
+------------------------------------------------------------------------
+r184 | oetiker | 2003-02-20 22:48:57 +0100 | 3 lines
+
+make the threading work and compile, fix linking to libpng
+and update the timestaps int the files
+
+------------------------------------------------------------------------
+r183 | oetiker | 2003-02-20 22:27:48 +0100 | 4 lines
+
+updated copyrigh dates
+removed error.h from threaded variant
+added compiletime to rrdtool
+
+------------------------------------------------------------------------
+r182 | oetiker | 2003-02-16 13:32:24 +0100 | 2 lines
+
+if output is - there is not need to deref the handler
+
+------------------------------------------------------------------------
+r181 | oetiker | 2003-02-16 13:31:58 +0100 | 2 lines
+
+expect seems to exist on some systems in the system inc files
+
+------------------------------------------------------------------------
+r180 | oetiker | 2003-02-13 08:05:59 +0100 | 12 lines
+
+Find attached the patch I promised to send to you. Please note that there
+are three new source files (src/rrd_is_thread_safe.h, src/rrd_thread_safe.c
+and src/rrd_not_thread_safe.c) and the introduction of librrd_th. This
+library is identical to librrd, but it contains support code for per-thread
+global variables currently used for error information only. This is similar
+to how errno per-thread variables are implemented.  librrd_th must be linked
+alongside of libpthred
+
+There is also a new file "THREADS", holding some documentation.
+
+-- Peter Stamfest <peter@stamfest.at>
+
+------------------------------------------------------------------------
+r179 | oetiker | 2003-02-12 08:06:56 +0100 | 2 lines
+
+improved dist target -- Peter Stamfest <peter@stamfest.at>
+
+------------------------------------------------------------------------
+r178 | oetiker | 2003-02-11 11:16:46 +0100 | 2 lines
+
+removed lg we do not allow this in the code at th moment
+
+------------------------------------------------------------------------
+r177 | oetiker | 2003-02-05 19:16:02 +0100 | 2 lines
+
+rrd resize SHRINK was broken :-) -- Scott Mace <smace@intt.ORG>
+
+------------------------------------------------------------------------
+r176 | oetiker | 2003-01-31 07:46:32 +0100 | 2 lines
+
+The NaN check should only use lastgdes when following a STACK -- Scott Mace <smace@intt.ORG>
+
+------------------------------------------------------------------------
+r175 | oetiker | 2003-01-30 22:39:21 +0100 | 2 lines
+
+fix stak+nan error ... Scott Mace <smace@intt.ORG>
+
+------------------------------------------------------------------------
+r174 | oetiker | 2003-01-29 08:17:23 +0100 | 2 lines
+
+fixed the processing of TICK:vname#color:frac:legend --  Scott Mace <smace@intt.ORG>
+
+------------------------------------------------------------------------
+r173 | oetiker | 2003-01-25 23:50:32 +0100 | 3 lines
+
+added function (--no-minor) to turn off minor gridlines on graphs
+-- Travis Brown <tebrown@csh.rit.edu>
+
+------------------------------------------------------------------------
+r172 | oetiker | 2003-01-17 00:27:54 +0100 | 3 lines
+
+fix border condition in rra selection of rrd_fetch
+-- Stanislav Sinyagin <ssinyagin@yahoo.com>
+
+------------------------------------------------------------------------
+r171 | oetiker | 2003-01-15 20:24:13 +0100 | 2 lines
+
+* single letter variants for all graph options -- James Overbeck <grendel@gmo.jp>
+
+------------------------------------------------------------------------
+r170 | oetiker | 2002-12-14 23:30:41 +0100 | 3 lines
+
+fix rrdtool compile on solaris where CC for perl is "gcc -B/usr/ccs/bin/"
+-- Russell Van Tassell <russell@loosenut.com>
+
+------------------------------------------------------------------------
+r169 | oetiker | 2002-11-29 12:57:17 +0100 | 2 lines
+
+note on info added
+
+------------------------------------------------------------------------
+r168 | oetiker | 2002-11-19 23:33:09 +0100 | 2 lines
+
+added g as valid string format value
+
+------------------------------------------------------------------------
+r167 | oetiker | 2002-11-19 00:37:56 +0100 | 3 lines
+
+check for -OPT:IEEE_NaN_inf=ON on SGI C compiler
+-- Albert Chin-A-Young <china@thewrittenword.com>
+
+------------------------------------------------------------------------
+r166 | oetiker | 2002-11-03 16:07:13 +0100 | 2 lines
+
+fixed
+
+------------------------------------------------------------------------
+r165 | oetiker | 2002-10-24 23:17:51 +0200 | 2 lines
+
+added patch for apache 2 compatibility
+
+------------------------------------------------------------------------
+r164 | oetiker | 2002-10-07 08:22:35 +0200 | 2 lines
+
+keep up with the jhonses
+
+------------------------------------------------------------------------
+r163 | oetiker | 2002-10-07 08:21:22 +0200 | 2 lines
+
+-z does not take an option --  Tomoyuki Murakami <tomoyuki@pobox.com>
+
+------------------------------------------------------------------------
+r162 | oetiker | 2002-09-02 20:41:19 +0200 | 2 lines
+
+fixed leak in VDEF_PERCENT handlin -- Perry Stoll <perry_stoll@yahoo.com>
+
+------------------------------------------------------------------------
+r161 | oetiker | 2002-08-01 07:42:27 +0200 | 3 lines
+
+fix for segfault condition in print_calc
+ -- Paul Clifford <paul.clifford@bbc.co.uk>
+
+------------------------------------------------------------------------
+r160 | oetiker | 2002-07-31 07:42:48 +0200 | 2 lines
+
+improved fetch explanation -- Nenad.Antic@era.ericsson.se
+
+------------------------------------------------------------------------
+r159 | oetiker | 2002-07-13 20:35:37 +0200 | 3 lines
+
+fixed DEF_NAM_FMT definition
+added double include protection the rrd_graph.h and rrd_rpncalc.h
+
+------------------------------------------------------------------------
+r158 | oetiker | 2002-07-12 13:20:32 +0200 | 2 lines
+
+fixed PREV parsing ... Gonzalo Augusto Arana Tagle <garana@uolsinectis.com.ar>
+
+------------------------------------------------------------------------
+r157 | oetiker | 2002-07-06 17:45:15 +0200 | 2 lines
+
+new operators must be added at the END of the sequence ...
+
+------------------------------------------------------------------------
+r156 | oetiker | 2002-07-05 20:57:02 +0200 | 2 lines
+
+new operand on rrdgraph CDEFs: PREV(xxxx) -- Gonzalo Augusto Arana Tagle <garana@uolsinectis.com.ar>
+
+------------------------------------------------------------------------
+r155 | oetiker | 2002-07-05 20:47:46 +0200 | 2 lines
+
+explain tzset
+
+------------------------------------------------------------------------
+r154 | oetiker | 2002-07-02 12:35:23 +0200 | 2 lines
+
+fixed DINF for win32
+
+------------------------------------------------------------------------
+r153 | alex | 2002-06-29 17:33:58 +0200 | 2 lines
+
+Changed DEF:...
+
+------------------------------------------------------------------------
+r152 | alex | 2002-06-29 17:24:26 +0200 | 3 lines
+
+Changed parsing again.
+Added a DEBUG prefix to all grapher commands
+
+------------------------------------------------------------------------
+r151 | alex | 2002-06-29 16:55:47 +0200 | 2 lines
+
+Not needed anymore
+
+------------------------------------------------------------------------
+r150 | alex | 2002-06-27 21:34:25 +0200 | 3 lines
+
+DEF now takes "--start" and "--end"
+LINEx, AREA and such now take parameter "STACK"
+
+------------------------------------------------------------------------
+r149 | alex | 2002-06-24 01:13:53 +0200 | 2 lines
+
+Updated docs for the "DEF ...  :step=nnnn" case
+
+------------------------------------------------------------------------
+r148 | alex | 2002-06-24 00:29:40 +0200 | 3 lines
+
+Added "step=1800" and such to "DEF"
+Cleaned some of the signed vs. unsigned problems
+
+------------------------------------------------------------------------
+r147 | alex | 2002-06-24 00:28:06 +0200 | 2 lines
+
+In stead of a zillion warnings, only one place gives a warning for DNAN
+
+------------------------------------------------------------------------
+r146 | jake | 2002-06-20 02:21:03 +0200 | 2 lines
+
+More Win32 build changes; thanks to Kerry Calvert.
+
+------------------------------------------------------------------------
+r145 | oetiker | 2002-06-14 14:15:12 +0200 | 2 lines
+
+better explanations -- "Shipway, Steve" <steve.shipway@eds.com>
+
+------------------------------------------------------------------------
+r144 | jake | 2002-05-22 17:25:43 +0200 | 2 lines
+
+Changed intercept to slope for beta parameter in rrdtune doc.
+
+------------------------------------------------------------------------
+r143 | oetiker | 2002-05-22 07:35:09 +0200 | 3 lines
+
+VC++ .NET (7.0) project files
+-- Eric Chamberlain <echamber@socrates.Berkeley.EDU>
+
+------------------------------------------------------------------------
+r142 | oetiker | 2002-05-16 21:18:35 +0200 | 2 lines
+
+added -W ... lets have some more warnings ... with gcc 3.1 985
+
+------------------------------------------------------------------------
+r141 | oetiker | 2002-05-15 08:14:40 +0200 | 2 lines
+
+afm fixes -- Peter Speck <speck@ruc.dk>
+
+------------------------------------------------------------------------
+r140 | jake | 2002-05-14 23:52:58 +0200 | 2 lines
+
+Fix Win32 Build compatibility.
+
+------------------------------------------------------------------------
+r139 | oetiker | 2002-05-14 23:48:05 +0200 | 2 lines
+
+double free fixed
+
+------------------------------------------------------------------------
+r138 | oetiker | 2002-05-14 07:28:45 +0200 | 3 lines
+
+make opendir readdir chdir chroot and thus the serverfunctionality
+a conditional compile depending on the presence of the necessary function calls.
+
+------------------------------------------------------------------------
+r137 | oetiker | 2002-05-11 11:09:57 +0200 | 2 lines
+
+make dirent sys/types and sys/stat autoconfable ....
+
+------------------------------------------------------------------------
+r136 | oetiker | 2002-05-08 22:34:56 +0200 | 3 lines
+
+Add funtionality to rrdtool to run it as a 'server'
+-- Hartmut.Vogler@epost.de
+
+------------------------------------------------------------------------
+r135 | oetiker | 2002-05-07 23:58:33 +0200 | 3 lines
+
+new command rrdtool xport integrated
+--  Wolfgang Schrimm <Wolfgang.Schrimm@urz.uni-heidelberg.de>
+
+------------------------------------------------------------------------
+r134 | oetiker | 2002-05-02 15:23:56 +0200 | 2 lines
+
+typo fixed
+
+------------------------------------------------------------------------
+r133 | oetiker | 2002-04-29 19:11:03 +0200 | 2 lines
+
+badformat parser fixed ... for good this time I hope
+
+------------------------------------------------------------------------
+r132 | oetiker | 2002-04-28 21:13:04 +0200 | 2 lines
+
+inserted PRINT checker at the wrong point ...
+
+------------------------------------------------------------------------
+r131 | oetiker | 2002-04-28 16:14:48 +0200 | 5 lines
+
+It's nice and simple, the error checker for the PRINT stuff which is
+passed to printf() is not allowing certain valid printf() style operations
+which make text alignment much more fun.
+-- Richard A Steenbergen <ras@e-gerbil.net>
+
+------------------------------------------------------------------------
+r130 | oetiker | 2002-04-24 23:04:46 +0200 | 2 lines
+
+fixed setlocale issues
+
+------------------------------------------------------------------------
+r129 | oetiker | 2002-04-24 22:54:09 +0200 | 2 lines
+
+fixed adress for wishlist
+
+------------------------------------------------------------------------
+r128 | oetiker | 2002-04-24 22:49:26 +0200 | 2 lines
+
+Patch for supporting PDF as output format
+
+------------------------------------------------------------------------
+r127 | oetiker | 2002-04-24 22:49:00 +0200 | 6 lines
+
+Modification of rrd_graph.c/h so it uses dashes for gridlines much like
+rrdtool 1.0 Avoids drawing minor vertical gridlines where a major gridline
+is to avoid artifacts from having the grey line beneath the red one. Patches
+src/rrd_graph.c and src/rrd_graph.h
+--  Peter Speck <speck@ruc.dk
+
+------------------------------------------------------------------------
+r126 | oetiker | 2002-04-24 22:48:03 +0200 | 3 lines
+
+Improvement of svg/eps dash code so it adjusts dash-lengths for round caps.
+-- Peter Speck <speck@ruc.dk>
+
+------------------------------------------------------------------------
+r125 | oetiker | 2002-04-24 22:43:27 +0200 | 2 lines
+
+fixed setlocale issues
+
+------------------------------------------------------------------------
+r124 | oetiker | 2002-04-16 07:00:07 +0200 | 2 lines
+
+doc for gridfit by peter
+
+------------------------------------------------------------------------
+r123 | oetiker | 2002-04-15 23:29:24 +0200 | 20 lines
+
+Evenly-spaced y-axis gridlines.
+
+I had to split horizontal_grid() into calc_horizontal_grid and
+draw_horizontal_grid as the calculated info is needed in the adjustment
+code. My previous patch had the problem that it adjusted the y-axis too
+late, e.g. after the data lines was drawn.
+The result of the calc is stored in struct ygrid_scale_t which
+image_desc_t has as a member.
+
+--no-gridfit is implemented.
+
+The round-to-integer coordinates for png is moved to the libart code in
+rrd_gfx. The 'close path' code is cleaned up so the node list is left
+unchanged if you want to save the same graph in multiple formats in one
+run. The rounding is done on the scaled coordinates (zoom).
+
+I have made a simple version for logarithmic y scales as such a scale
+might have 5 gridlines with 4 difference spacings. This version only
+uses y = 10^x values for modifying the scale. -- Peter Speck <speck@ruc.dk>
+
+------------------------------------------------------------------------
+r122 | oetiker | 2002-04-09 23:35:49 +0200 | 2 lines
+
+remove boguos description of goodfor and refresh
+
+------------------------------------------------------------------------
+r121 | oetiker | 2002-04-09 23:34:56 +0200 | 2 lines
+
+removed tzset as it is in rrd_graph now
+
+------------------------------------------------------------------------
+r120 | oetiker | 2002-04-09 23:34:13 +0200 | 2 lines
+
+added tzset and setlocale to rrd_graph
+
+------------------------------------------------------------------------
+r119 | oetiker | 2002-04-08 00:07:46 +0200 | 2 lines
+
+added missing files from peters patch
+
+------------------------------------------------------------------------
+r118 | oetiker | 2002-04-07 22:20:27 +0200 | 18 lines
+
+3 patches, #3 depends on #1 as EPS uses AFM for stringwidth too.
+
+src/rrd_afm.[ch], src/rrd_afm_data.[ch] and changes to rrd_gfx.[ch] to
+use AFM for stringwidth in SVG output.
+
+libraries/afm with .afm files for the standard 14 postscript
+fonts and perl script to create src/rrd_afm_data.c Includes small test
+program to show examples of calculated stringwidth and actual
+stringwidth.
+
+Adds EPS output support.
+Modifies rrd_tool.c as rrd_graph() changes the argv pointer, and
+rrd_tool then always wrote the 200x100 output line to the file (which
+probably doesn't do anything for png images, but eps files fail having
+it after the %%EOF marker).
+
+-- Peter Speck <speck@ruc.dk>
+
+------------------------------------------------------------------------
+r117 | alex | 2002-04-06 14:40:59 +0200 | 2 lines
+
+Different default font when WIN32 is defined
+
+------------------------------------------------------------------------
+r116 | alex | 2002-04-06 14:25:29 +0200 | 3 lines
+
+Removed references to GIF
+Changed y0 and such into Y0 and so
+
+------------------------------------------------------------------------
+r115 | jake | 2002-04-06 01:51:21 +0200 | 4 lines
+
+Updated/added MVSC++ 6.0 project files for compilation of
+rrd.lib and rrdtool.exe on Win32. Changes for RRDs compilation
+on Win32. Moved src/ntconfig.h to confignt/config.h.
+
+------------------------------------------------------------------------
+r114 | oetiker | 2002-04-03 16:52:15 +0200 | 23 lines
+
+As gfx_canvas_t now has excatly the same lifespan as image_desc_t, I've
+made 'gfx_canvas_t canvas' a member of image_desc_t and dropped it as a
+separate parameter in all function calls.
+
+imgformat, interlaced and zoom are moved to gfx_canvas_t. I have dropped
+my old fontlib-enum as imgformat contains that information. The
+gfx_render_xxx switch is moved to rrd_gfx so rrd_graph is (almost) only
+bothered with image formats in cmd line parsing.
+
+gfx_close_path is added.
+
+gfx_new_dashed_line is added with 2 new arguments: length of a dash and
+length between dashes. gfx_new_line is still there for plain lines.
+Having dash-length == 0 creates normal line.
+rrd_graph.c is not updated for dashed lines. It's not decided how one
+should specify which and how lines are dashed. An extension of the color
+specification?
+
+svg is updated for dashes and opacity, but libart code is not. I've
+fixed indent in SVG, all lines had a space before func decl. etc.
+Misc small fixes, e.g. sscanf of gfx_color_t, position of x-axis arrow.
+--- Peter Speck <speck@ruc.dk>
+
+------------------------------------------------------------------------
+r113 | oetiker | 2002-04-03 07:32:31 +0200 | 2 lines
+
+i suck.  sorry.  add ,0666 to the open(). -- Paul Vixie <paul@vix.com>
+
+------------------------------------------------------------------------
+r112 | oetiker | 2002-04-02 23:32:15 +0200 | 2 lines
+
+added call to tzset to activate TZ settings -- Paul A Vixie <vixie@vix.com>
+
+------------------------------------------------------------------------
+r111 | oetiker | 2002-04-02 23:31:08 +0200 | 2 lines
+
+aded missing fcntl.h
+
+------------------------------------------------------------------------
+r110 | oetiker | 2002-04-02 21:37:54 +0200 | 2 lines
+
+rrd restore should not burn down existing files -- Paul Vixie <paul@vix.com>
+
+------------------------------------------------------------------------
+r109 | oetiker | 2002-04-01 20:32:17 +0200 | 2 lines
+
+merged svg update
+
+------------------------------------------------------------------------
+r108 | oetiker | 2002-04-01 20:31:22 +0200 | 3 lines
+
+"!" takes a higher preference than "||" this means rrd_update N:: would
+segfault -- Oliver Cook <ollie@uk.clara.net>
+
+------------------------------------------------------------------------
+r107 | jake | 2002-03-28 18:33:49 +0100 | 2 lines
+
+Added comment suggesting use of -I flag with aclocal.
+
+------------------------------------------------------------------------
+r106 | oetiker | 2002-03-26 08:02:28 +0100 | 2 lines
+
+added SVG support -- Peter Speck <speck@ruc.dk>
+
+------------------------------------------------------------------------
+r105 | alex | 2002-03-23 21:41:48 +0100 | 2 lines
+
+Better positioning of the pie when it is alone on the canvas
+
+------------------------------------------------------------------------
+r104 | alex | 2002-03-23 21:01:13 +0100 | 2 lines
+
+Modified rrd_graph
+
+------------------------------------------------------------------------
+r103 | alex | 2002-03-23 20:59:39 +0100 | 2 lines
+
+Changes in rrd_graph; see NEWS
+
+------------------------------------------------------------------------
+r102 | oetiker | 2002-03-23 10:05:32 +0100 | 2 lines
+
+removed reference to GIF
+
+------------------------------------------------------------------------
+r101 | oetiker | 2002-03-23 10:01:43 +0100 | 2 lines
+
+remove all traces of GIF and make PNG the default
+
+------------------------------------------------------------------------
+r100 | oetiker | 2002-03-23 09:53:31 +0100 | 3 lines
+
+Move CDEF start pointers if start of cdef is a step ahead of the start
+of the data -- Ashok Mandala <chakri063@yahoo.com>
+
+------------------------------------------------------------------------
+r99 | oetiker | 2002-03-21 23:39:03 +0100 | 2 lines
+
+fixed color area in legend and fixed color area in 3d border
+
+------------------------------------------------------------------------
+r98 | alex | 2002-03-21 13:00:51 +0100 | 3 lines
+
+Pie charts didn't have anti-aliasing; building them clockwise
+seems to solve this problem.
+
+------------------------------------------------------------------------
+r97 | oetiker | 2002-03-20 23:48:25 +0100 | 3 lines
+
+fixed longstanding bug affection CDEFS where values from
+rrds with different resolutions got mixed ..
+
+------------------------------------------------------------------------
+r96 | alex | 2002-03-17 23:40:18 +0100 | 2 lines
+
+Changed the way circle sections are drawn.
+
+------------------------------------------------------------------------
+r95 | alex | 2002-03-13 03:58:44 +0100 | 2 lines
+
+New, hopefully better, implementation of PART drawing
+
+------------------------------------------------------------------------
+r94 | oetiker | 2002-03-12 08:19:09 +0100 | 2 lines
+
+realy remove zlibe 1.1.3 dir
+
+------------------------------------------------------------------------
+r93 | oetiker | 2002-03-12 08:18:06 +0100 | 2 lines
+
+updated
+
+------------------------------------------------------------------------
+r92 | oetiker | 2002-03-12 08:17:46 +0100 | 2 lines
+
+ignore generated files
+
+------------------------------------------------------------------------
+r91 | oetiker | 2002-03-12 08:16:32 +0100 | 2 lines
+
+missing bits
+
+------------------------------------------------------------------------
+r90 | oetiker | 2002-03-12 07:43:38 +0100 | 2 lines
+
+updated to zlib 1.1.4
+
+------------------------------------------------------------------------
+r89 | oetiker | 2002-03-12 07:42:00 +0100 | 2 lines
+
+replace zlib 1.1.3 with zlib 1.1.4
+
+------------------------------------------------------------------------
+r88 | alex | 2002-03-11 00:08:37 +0100 | 2 lines
+
+Pie chart support added to rrdtool graph
+
+------------------------------------------------------------------------
+r87 | oetiker | 2002-03-10 23:49:24 +0100 | 2 lines
+
+added quotes to echo
+
+------------------------------------------------------------------------
+r86 | alex | 2002-03-10 17:22:28 +0100 | 3 lines
+
+Realigned function rpn_calc()
+Stack checking now done using a macro
+
+------------------------------------------------------------------------
+r85 | alex | 2002-03-10 15:58:30 +0100 | 3 lines
+
+Fixed some typos/errors
+Updated for the NE and ISINF operators in RPN
+
+------------------------------------------------------------------------
+r84 | alex | 2002-03-10 15:53:04 +0100 | 3 lines
+
+Using the font option resulted in a segfault.  Needs more care,
+the current change is just a hack
+
+------------------------------------------------------------------------
+r83 | alex | 2002-03-10 15:48:59 +0100 | 2 lines
+
+Added NE and ISINF operands to RPN
+
+------------------------------------------------------------------------
+r82 | oetiker | 2002-03-10 13:28:38 +0100 | 2 lines
+
+better version check
+
+------------------------------------------------------------------------
+r81 | alex | 2002-03-08 23:14:22 +0100 | 2 lines
+
+Needed to escape a wildcard
+
+------------------------------------------------------------------------
+r80 | alex | 2002-03-08 23:11:37 +0100 | 2 lines
+
+Fixed some typos
+
+------------------------------------------------------------------------
+r79 | oetiker | 2002-02-18 22:52:20 +0100 | 2 lines
+
+added autotools version check to MakeMakefiles
+
+------------------------------------------------------------------------
+r78 | oetiker | 2002-02-09 07:21:11 +0100 | 2 lines
+
+do propper error checking and release memmory when it is not required anymore
+
+------------------------------------------------------------------------
+r77 | oetiker | 2002-02-08 19:40:37 +0100 | 2 lines
+
+allow rrd_cgi to deal with umlauts -- Alexander Schwartz <alexander.schwartz@gmx.net>
+
+------------------------------------------------------------------------
+r76 | oetiker | 2002-02-03 09:10:36 +0100 | 2 lines
+
+fixed spelling
+
+------------------------------------------------------------------------
+r75 | oetiker | 2002-02-02 15:36:14 +0100 | 2 lines
+
+fixed data pointer storage
+
+------------------------------------------------------------------------
+r74 | oetiker | 2002-02-01 21:34:49 +0100 | 2 lines
+
+fixed version number and date/time
+
+------------------------------------------------------------------------
+r73 | oetiker | 2002-02-01 21:29:32 +0100 | 2 lines
+
+*** empty log message ***
+
+------------------------------------------------------------------------
+r72 | oetiker | 2002-01-31 23:44:34 +0100 | 2 lines
+
+this file and all the external libraries configurability was contributed by mat zimmermann
+
+------------------------------------------------------------------------
+r71 | oetiker | 2002-01-31 23:43:13 +0100 | 2 lines
+
+allow use of libraries already installed on the system
+
+------------------------------------------------------------------------
+r70 | oetiker | 2002-01-31 12:56:24 +0100 | 2 lines
+
+make "18:00 yesterday" work  Pavel Mores <pvl@uh.cz>
+
+------------------------------------------------------------------------
+r69 | oetiker | 2002-01-31 08:23:12 +0100 | 2 lines
+
+weeknumber is not %V which is more appropriate than %W
+
+------------------------------------------------------------------------
+r68 | oetiker | 2002-01-31 07:36:27 +0100 | 2 lines
+
+copy ltmain.sh
+
+------------------------------------------------------------------------
+r67 | oetiker | 2002-01-17 21:31:31 +0100 | 2 lines
+
+this also
+
+------------------------------------------------------------------------
+r66 | oetiker | 2002-01-17 21:30:46 +0100 | 2 lines
+
+this is not needed anymore
+
+------------------------------------------------------------------------
+r65 | oetiker | 2002-01-17 21:28:01 +0100 | 2 lines
+
+killing remains
+
+------------------------------------------------------------------------
+r64 | oetiker | 2002-01-17 00:11:11 +0100 | 2 lines
+
+added places for download
+
+------------------------------------------------------------------------
+r63 | oetiker | 2002-01-15 23:58:09 +0100 | 2 lines
+
+ignore irrelevant things
+
+------------------------------------------------------------------------
+r62 | oetiker | 2002-01-15 23:53:19 +0100 | 2 lines
+
+added new .cvsignore files
+
+------------------------------------------------------------------------
+r61 | oetiker | 2002-01-15 23:51:07 +0100 | 15 lines
+
+The BIG graph update
+  * Replace libgd with libart
+  * Added freetype
+  * Updated zlib and libpng
+  * rrd_gfx.c intrduced as libart wrapper
+  * LINE takes now a float as argument
+  * rrdtool uses truetype for fonts
+  * thanks to libart there is now full alpha transparenc
+    and antialiasing.
+  * the new option --font lets customize the font
+    and size for various graph elements
+  * Updated to -> libtool 1.4.2 automake 2.12 autoconf 2.52
+  * new --zoom commandline option for zoom ans shrinking
+  -- tobias oetiker
+
+------------------------------------------------------------------------
+r60 | alex | 2002-01-04 02:11:35 +0100 | 2 lines
+
+Reworked rrd_graph_script()
+
+------------------------------------------------------------------------
+r59 | alex | 2001-12-24 07:51:49 +0100 | 21 lines
+
+A patch of size 44Kbytes... in short:
+
+Found and repaired the off-by-one error in rrd_fetch_fn().
+As a result I had to remove the hacks in rrd_fetch_fn(),
+rrd_tool.c, vdef_calc(), data_calc(), data_proc() and
+reduce_data().  There may be other places which I didn't
+find so be careful.
+
+Enhanced debugging in rrd_fetch_fn(), it shows the RRA selection
+process.
+
+Added the ability to print VDEF timestamps.  At the moment it
+is a hack, I needed it now to fix the off-by-one error.
+If the format string is "%c" (and nothing else!), the time
+will be printed by both ctime() and as a long int.
+
+Moved some code around (slightly altering it) from rrd_graph()
+  initializing     now in rrd_graph_init()
+  options parsing  now in rrd_graph_options()
+  script parsing   now in rrd_graph_script()
+
+------------------------------------------------------------------------
+r58 | alex | 2001-12-22 03:49:23 +0100 | 3 lines
+
+Somehow eight lines were missing from function rrd_graph().
+Also fixed minor bug in vdef_calc().
+
+------------------------------------------------------------------------
+r57 | oetiker | 2001-12-17 13:48:43 +0100 | 2 lines
+
+fix overflow error ...
+
+------------------------------------------------------------------------
+r56 | jake | 2001-12-11 23:55:28 +0100 | 2 lines
+
+Fixed uninitialized ptr causing seg fault invoking info for COMPUTE data sources.
+
+------------------------------------------------------------------------
+r55 | oetiker | 2001-11-18 09:41:16 +0100 | 2 lines
+
+return "" instead of NULL for <RRD::GETENV UNKNOWN_VARIABLE> -- Michael <sysadmin@qsl.net>
+
+------------------------------------------------------------------------
+r54 | oetiker | 2001-11-17 17:57:55 +0100 | 2 lines
+
+fixed path to mkinstalldirs -- Laurent Saehyun Kim?\239?\191?\189<LKim@xo.com>
+
+------------------------------------------------------------------------
+r53 | oetiker | 2001-09-08 20:25:17 +0200 | 2 lines
+
+spelling updates by Martin Schulze <joey@finlandia.infodrom.north.de>
+
+------------------------------------------------------------------------
+r52 | jake | 2001-08-23 00:29:07 +0200 | 13 lines
+
+Contents of this patch:
+(1) Adds/revises documentation for rrd tune in rrd_tool.c and pod files.
+(2) Moves some initialization code from rrd_create.c to rrd_hw.c.
+(3) Adds another pass to smoothing for SEASONAL and DEVSEASONAL RRAs.
+This pass computes the coefficients as deviations from an average; the
+average is added the baseline coefficient of HWPREDICT. Statistical texts
+suggest this to preserve algorithm stability. It will not invalidate
+RRD files created and smoothed with the old code.
+(4) Adds the aberrant-reset flag to rrd tune. This operation, which is
+specified for a single data source, causes the holt-winters algorithm to
+forget everthing it has learned and start over.
+(5) Fixes a few out-of-date code comments.
+
+------------------------------------------------------------------------
+r51 | oetiker | 2001-08-13 20:58:07 +0200 | 2 lines
+
+spell fix for si units (only in comments)
+
+------------------------------------------------------------------------
+r50 | alex | 2001-07-29 00:34:42 +0200 | 2 lines
+
+Removing rrdgraph*.pod from the cvs
+
+------------------------------------------------------------------------
+r49 | alex | 2001-07-29 00:21:44 +0200 | 4 lines
+
+Edited Makefile.am and the rrdgraph_*.src files. By mistake the
+previous update was made on the rrdgraph_*.pod files however they
+are not to be edited. This is now corrected.
+
+------------------------------------------------------------------------
+r48 | alex | 2001-07-26 04:27:46 +0200 | 4 lines
+
+Supporting functions for rrd_graph.  Functions that are used frequently
+and/or from different places should be added here in stead of repeating
+them in rrd_graph.c over and over again.
+
+------------------------------------------------------------------------
+r47 | alex | 2001-07-26 04:25:38 +0200 | 2 lines
+
+Moved most typedefs etc. from rrd_graph.c to this file
+
+------------------------------------------------------------------------
+r46 | alex | 2001-07-26 04:22:18 +0200 | 3 lines
+
+Added VDEF TOTAL
+Moved most typedefs etc. to rrd_graph.h
+
+------------------------------------------------------------------------
+r45 | alex | 2001-07-26 04:19:48 +0200 | 2 lines
+
+Added rrd_graph_helper
+
+------------------------------------------------------------------------
+r44 | alex | 2001-07-26 04:15:02 +0200 | 2 lines
+
+Updated for VDEF TOTAL
+
+------------------------------------------------------------------------
+r43 | alex | 2001-07-26 04:11:46 +0200 | 2 lines
+
+Announce of VDEF in rrd_graph
+
+------------------------------------------------------------------------
+r42 | alex | 2001-07-21 20:17:44 +0200 | 2 lines
+
+Made PRINT and GPRINT aware of VDEF statements
+
+------------------------------------------------------------------------
+r41 | oetiker | 2001-07-21 00:34:29 +0200 | 2 lines
+
+missing documentation ... -- Alex van den Bogaerdt <alex@slot.hollandcasino.nl>
+
+------------------------------------------------------------------------
+r40 | oetiker | 2001-07-21 00:34:06 +0200 | 2 lines
+
+only a comment
+
+------------------------------------------------------------------------
+r39 | oetiker | 2001-07-21 00:33:17 +0200 | 2 lines
+
+small fixes -- Alex van den Bogaerdt <alex@slot.hollandcasino.nl>
+
+------------------------------------------------------------------------
+r38 | oetiker | 2001-07-19 00:30:29 +0200 | 2 lines
+
+VDEF and VRULE are comig along -- Alex van den Bogaerdt <alex@slot.hollandcasino.nl>
+
+------------------------------------------------------------------------
+r37 | oetiker | 2001-06-05 15:42:55 +0200 | 2 lines
+
+spell fix
+
+------------------------------------------------------------------------
+r36 | oetiker | 2001-05-09 07:31:01 +0200 | 5 lines
+
+Bug fix: when update of multiple PDP/CDP RRAs coincided
+with interpolation of multiple PDPs an incorrect value was
+stored as the CDP. Especially evident for GAUGE data sources.
+Minor changes to rrdcreate.pod. -- Jake Brutlag <jakeb@corp.webtv.net>
+
+------------------------------------------------------------------------
+r35 | oetiker | 2001-03-31 17:21:59 +0200 | 3 lines
+
+added 'all' dependancy to site-perl-install rule as many seem to skip
+this step when instaling cricket ... probably an incomplete cricket doku.
+
+------------------------------------------------------------------------
+r34 | oetiker | 2001-03-15 20:43:04 +0100 | 2 lines
+
+added PROJECTS file
+
+------------------------------------------------------------------------
+r33 | oetiker | 2001-03-11 13:03:12 +0100 | 2 lines
+
+reindented
+
+------------------------------------------------------------------------
+r32 | oetiker | 2001-03-11 12:49:28 +0100 | 2 lines
+
+reindented the cource for better readability
+
+------------------------------------------------------------------------
+r31 | oetiker | 2001-03-11 00:54:41 +0100 | 7 lines
+
+Support for COMPUTE data sources (CDEF data sources). Removes the RPN
+parser and calculator from rrd_graph and puts then in a new file,
+rrd_rpncalc.c. Changes to core files rrd_create and rrd_update. Some
+clean-up of aberrant behavior stuff, including a bug fix.
+Documentation update (rrdcreate.pod, rrdupdate.pod). Change xml format.
+-- Jake Brutlag <jakeb@corp.webtv.net>
+
+------------------------------------------------------------------------
+r30 | oetiker | 2001-03-07 22:21:54 +0100 | 4 lines
+
+complete rewrite of rrdgraph documentation. This also includs info
+on upcomming/planned changes to the rrdgraph interface and functionality
+-- Alex van den Bogaerdt <alex@slot.hollandcasino.nl>
+
+------------------------------------------------------------------------
+r28 | oetiker | 2001-03-04 14:50:31 +0100 | 2 lines
+
+fidex jackes adderss
+
+------------------------------------------------------------------------
+r27 | oetiker | 2001-03-04 14:12:44 +0100 | 2 lines
+
+added note on counter vs derive --  Don BAARDA <don.baarda@baesystems.com>
+
+------------------------------------------------------------------------
+r26 | oetiker | 2001-03-04 14:01:56 +0100 | 6 lines
+
+Aberrant Behavior Detection support. A brief overview added to rrdtool.pod.
+Major updates to rrd_update.c, rrd_create.c. Minor update to other core files.
+This is backwards compatible! But new files using the Aberrant stuff are not readable
+by old rrdtool versions. See http://cricket.sourceforge.net/aberrant/rrd_hw.htm
+-- Jake Brutlag <jakeb@corp.webtv.net>
+
+------------------------------------------------------------------------
+r25 | oetiker | 2001-03-04 14:00:25 +0100 | 2 lines
+
+another do not report Makefile and Makefile.in
+
+------------------------------------------------------------------------
+r24 | oetiker | 2001-03-04 13:51:55 +0100 | 2 lines
+
+this file has no purpose
+
+------------------------------------------------------------------------
+r23 | oetiker | 2001-03-04 13:32:07 +0100 | 2 lines
+
+rrdupdate is a generated file it has no place in cvs
+
+------------------------------------------------------------------------
+r21 | oetiker | 2001-03-04 12:31:21 +0100 | 2 lines
+
+repository cleanup
+
+------------------------------------------------------------------------
+r20 | oetiker | 2001-03-04 12:14:26 +0100 | 3 lines
+
+added at-style-time@value:value syntax to rrd_update
+--  Dave Bodenstab <imdave@mcs.net>
+
+------------------------------------------------------------------------
+r19 | oetiker | 2001-03-04 11:29:20 +0100 | 3 lines
+
+fixed filedescriptor leak
+-- Mike Franusich <mike@franusich.com>
+
+------------------------------------------------------------------------
+r18 | oetiker | 2001-03-02 23:48:39 +0100 | 2 lines
+
+added test for hpux. if matched, compile zlib with -fpic instead of -fPIC
+
+------------------------------------------------------------------------
+r17 | oetiker | 2001-03-01 22:37:54 +0100 | 2 lines
+
+added check for the presence of the compiler used to build perl modules
+
+------------------------------------------------------------------------
+r16 | oetiker | 2001-02-26 00:18:40 +0100 | 2 lines
+
+they do not belong into cvs ad they are autogenerated
+
+------------------------------------------------------------------------
+r15 | oetiker | 2001-02-25 23:57:02 +0100 | 2 lines
+
+Fixed ln for modules
+
+------------------------------------------------------------------------
+r14 | oetiker | 2001-02-25 23:53:17 +0100 | 2 lines
+
+fixed compile order ... src before bindings
+
+------------------------------------------------------------------------
+r6 | oetiker | 2001-02-25 23:25:02 +0100 | 2 lines
+
+Initial revision
+
+------------------------------------------------------------------------
index f90d72064ae505aaf9af644a905389e55cef3a45..f76a677de04cb3e920526f1ca5243067afd47db2 100644 (file)
@@ -1,3 +1,5 @@
+$Id: CONTRIBUTORS 1841 2009-06-07 11:20:15Z oetiker $
+
 I would like to thank to following people for helping to
 bring RRDtool into existence.
 
@@ -15,14 +17,15 @@ Bruce Campbell <bruce.campbell with apnic.net>
 Chin-A-Young <china with thewrittenword.com>
 Christophe VG <Christophe.VanGinneken with ubizen.com>
 Christophe Van Ginneken <Christophe.VanGinneken with ubizen.com> (--no-legend)
-Christof Wegmann <Christof.Wegmann with exitgames.com> 1.3 windows porting
 Dan Dunn <dandunn with computer.org>
+Daniel Pocock <daniel in pocock.com.au> rrd_create to mmap port
 Dave Bodenstab <dave@bodenstab.org> AT style time in update, tclfixes
 David Grimes <dgrimes with navisite.com> SQRT/SORT/REV/SHIFT/TREND
 David L. Barker <dave with ncomtech.com> xport function bug fixes
 Evan Miller <emiller with imvu.com> Multiplicative HW Enhancements
 Frank Strauss <strauss with escape.de> TCL bindings
-Florian octo Forster <rrdtool nospam.verplant.org> rrd_restore libxml2 rewrite deprecated function export
+Florian octo Forster <rrdtool nospam.verplant.org> rrd_restore libxml2 rewrite, deprecated function export, rrdcached
+Fidelis Assis <fidelis pobox.com> lua bindings
 Henrik Storner <henrik with hswn.dk> functions for min/max values of data in graph
 Hermann Hueni <hueni with glue.ch> (SunOS porting)
 Jakob Ilves <jilves with se.oracle.com> HPUX 11
@@ -33,9 +36,11 @@ Joel Becker <jlbec with raleigh.ibm.com> AIX
 Joey Miller <joeym with inficad.com>php3 and php4 bindings
 Jost.Krieger <Jost.Krieger with ruhr-uni-bochum.de>
 Kai Siering <kai.siering with mediaways.net>
+Kevin Brintnall <kbrint with rufus.net> bugfixes in and additions to rrdcached, including journaling support
 Larry Leszczynski <larryl with furph.com>
 Mark Plaksin <happy@usg.edu> rrd_graph_v
 Matt Chambers <matthew.chambers with vanderbilt.edu> --full-size-mode for rrdgraph
+Melchior Rabe <rrdtool at mrab.de> -- legend position patch
 McCreary mccreary with xoanon.colorado.edu
 Mike Mitchell <mcm with unx.sas.com>
 Mike Slifcak <slif with bellsouth.net> many rrdtool-1.1.x fixes
@@ -61,8 +66,8 @@ Selena M Brewington <smbrewin with ichips.intel.com> add_ds
 Shane O'Donnell <shaneo with opennms.org>
 Simon Leinen <simon with switch.ch>
 Steen Linden <Steen.Linden with ebone.net>
-Stefan Mueller <s.mueller with computer.org> HPUX 11
 Stefan Ludewig <Stefan.Ludewig at exitgames.com> 1.3 WIN32 Port
+Stefan Mueller <s.mueller with computer.org> HPUX 11
 Steve Harris <steveh with wesley.com.au> AIX portability
 Steve Rader <rader with teak.wiscnet.net> (rrd_cgi debugging and LAST)
 Terminator rAT <karl_schilke with eli.net>
@@ -77,8 +82,10 @@ Wim Heirman <wim.heirman elis.ugent.be> --units=si option
 Wolfgang Schrimm <wschrimm with uni-hd.de> xport function
 Wrolf Courtney <wrolf with wrolf.net> (HP-UX)
 hendrik visage <hvisage with is.co.za>
+Vytautas Zdanavicius <vytaszd@yahoo.com> -- python argument list exander
+Martin Sperl <rrdtool martin.sperl.org> (CDEF prediction functions, libdbi)
 Philippe Simonet <philippe.simonet with swisscom.ch> (Windows Binaries)
-Alexander Lucke (lucke with dns-net.de) 
- of DNS:NET Internet Services (www.dns-net.de) http://rrdtool.org
+Alexander Lucke (lucke with dns-net.de) of DNS:NET Internet Services (www.dns-net.de) http://rrdtool.org
 Hedley Simons <heds@metahusky.net>
 Nicola Worthington <nicolaw@cpan.org>
+Wegmann, Christof <Christof.Wegmann@exitgames.com> 1.3/trunk win32 port
index 22c971f93bab54af116ca63b00a88257a6dbac4d..93cb62b14fedcbd2d8f8c32de48646361821fee9 100644 (file)
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,8 +1,9 @@
+$Id: COPYRIGHT 1843 2009-06-07 11:34:39Z oetiker $
 RRDTOOL - Round Robin Database Tool
 A tool for fast logging of numerical data graphical display
 of this data.
 
-Copyright (c) 1998-2008 Tobias Oetiker
+Copyright (c) 1998-2009 Tobias Oetiker
 All rights reserved.
 
 GNU GPL License
index b703754ef30dce05329957b58f6ca749371e1a2c..c0ca21a7e88d8881890a5b83d643813ba71ca4d8 100644 (file)
@@ -1,23 +1,19 @@
-ACLOCAL_AMFLAGS = -I m4
+# $Id: Makefile.am 1846 2009-06-07 13:42:39Z oetiker $
+
 ## Process this file with automake to produce Makefile.in
 RSYNC = rsync --rsh=ssh
 
 # build the following subdirectories
-if BUILD_LIBINTL
-PO=po
-else
-PO=
-endif
 
-SUBDIRS = $(PO) src examples doc bindings
+SUBDIRS = po src examples doc bindings intl
 
  # the following files are not mentioned in any other Makefile
 EXTRA_DIST = COPYRIGHT CHANGES WIN32-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \
-             intltool-extract.in  intltool-merge.in    intltool-update.in \
-            rrdtool.spec favicon.ico win32/Makefile win32/config.h \
-            win32/rrd.dsp win32/rrd.sln win32/rrd.vcproj \
-            win32/rrd_config.h.msvc win32/rrdlib.vcproj win32/rrdtool.dsp \
-            win32/rrdtool.dsw win32/rrdtool.vcproj netware/Makefile
+            rrdtool.spec favicon.ico  win32/Makefile win32/config.h autogen.sh \
+             win32/rrd.dsp win32/rrd.sln win32/rrd.vcproj libtool \
+             win32/rrd_config.h.msvc win32/rrdlib.vcproj win32/rrdtool.dsp \
+             win32/rrdtool.dsw win32/rrdtool.vcproj netware/Makefile  \
+             etc/rrdcached-default etc/rrdcached-init
 
             
 
@@ -27,7 +23,7 @@ CLEANFILES = config.cache
 AUTOMAKE_OPTIONS= foreign 
 
 # where we keep local rules for automake
-
+ACLOCAL_AMFLAGS=-I m4
 ACLOCAL_M4= $(top_srcdir)/aclocal.m4
 #AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config
 #AUTOCONF = @AUTOCONF@ --localdir=$(top_srcdir)/config
index 861ab9f7ab1ee10a1771d43640c1cf03eaed21c3..84dfb0b09a80184228bc2b163129c89a83c49030 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.11 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
+
+# $Id: Makefile.am 1846 2009-06-07 13:42:39Z oetiker $
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -35,17 +39,42 @@ target_triplet = @target@
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in $(srcdir)/rrd_config.h.in \
-       $(top_srcdir)/configure COPYING NEWS TODO config.guess \
-       config.sub depcomp install-sh ltmain.sh missing
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \
+       ABOUT-NLS COPYING NEWS TODO compile config.guess config.rpath \
+       config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
+       $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
+       $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \
+       $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
+       $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
+       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = rrd_config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = intl/Makefile
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -57,34 +86,64 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        ps-recursive uninstall-recursive
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir dist dist-all distcheck
 ETAGS = etags
 CTAGS = ctags
-DIST_SUBDIRS = po src examples doc bindings
+DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
 ALL_LIBS = @ALL_LIBS@
-ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-CATALOGS = @CATALOGS@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+COMP_LUA = @COMP_LUA@
 COMP_PERL = @COMP_PERL@
 COMP_PYTHON = @COMP_PYTHON@
 COMP_RUBY = @COMP_RUBY@
@@ -103,37 +162,50 @@ ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
+GENCAT = @GENCAT@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_WPRINTF = @HAVE_WPRINTF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
 LIBVERS = @LIBVERS@
-LIB_LIBINTL = @LIB_LIBINTL@
 LIPO = @LIPO@
 LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
+LUA = @LUA@
+LUA_CFLAGS = @LUA_CFLAGS@
+LUA_DEFINES = @LUA_DEFINES@
+LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@
+LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@
+LUA_LFLAGS = @LUA_LFLAGS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
 MSGMERGE = @MSGMERGE@
 MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@
 MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@
@@ -164,10 +236,7 @@ PERL_VERSION = @PERL_VERSION@
 PKGCONFIG = @PKGCONFIG@
 POD2HTML = @POD2HTML@
 POD2MAN = @POD2MAN@
-POFILES = @POFILES@
 POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -199,8 +268,10 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
 TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
 TCL_VERSION = @TCL_VERSION@
 TROFF = @TROFF@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WERROR = @WERROR@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -263,19 +334,16 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-ACLOCAL_AMFLAGS = -I m4
 RSYNC = rsync --rsh=ssh
-@BUILD_LIBINTL_FALSE@PO = 
 
 # build the following subdirectories
-@BUILD_LIBINTL_TRUE@PO = po
-SUBDIRS = $(PO) src examples doc bindings
+SUBDIRS = po src examples doc bindings intl
 EXTRA_DIST = COPYRIGHT CHANGES WIN32-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \
-             intltool-extract.in  intltool-merge.in    intltool-update.in \
-            rrdtool.spec favicon.ico win32/Makefile win32/config.h \
-            win32/rrd.dsp win32/rrd.sln win32/rrd.vcproj \
-            win32/rrd_config.h.msvc win32/rrdlib.vcproj win32/rrdtool.dsp \
-            win32/rrdtool.dsw win32/rrdtool.vcproj netware/Makefile
+            rrdtool.spec favicon.ico  win32/Makefile win32/config.h autogen.sh \
+             win32/rrd.dsp win32/rrd.sln win32/rrd.vcproj libtool \
+             win32/rrd_config.h.msvc win32/rrdlib.vcproj win32/rrdtool.dsp \
+             win32/rrdtool.dsw win32/rrdtool.vcproj netware/Makefile  \
+             etc/rrdcached-default etc/rrdcached-init
 
 CLEANFILES = config.cache
 
@@ -283,6 +351,7 @@ CLEANFILES = config.cache
 AUTOMAKE_OPTIONS = foreign 
 
 # where we keep local rules for automake
+ACLOCAL_AMFLAGS = -I m4
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 all: rrd_config.h
        $(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -294,15 +363,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
-             cd $(srcdir) && $(AUTOMAKE) --foreign  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -318,9 +387,10 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
        $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 rrd_config.h: stamp-h1
        @if test ! -f $@; then \
@@ -332,12 +402,14 @@ stamp-h1: $(srcdir)/rrd_config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status rrd_config.h
 $(srcdir)/rrd_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@
 
 distclean-hdr:
        -rm -f rrd_config.h stamp-h1
+intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -372,7 +444,7 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
@@ -406,16 +478,16 @@ $(RECURSIVE_CLEAN_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done && test -z "$$fail"
 tags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
        done
 ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
        done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -430,7 +502,7 @@ tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES) rrd_config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -442,7 +514,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) rrd_config.h.in $(TAGS_DEPENDENCIES)
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
        list='$(SOURCES) $(HEADERS) rrd_config.h.in $(LISP) $(TAGS_FILES)'; \
@@ -451,36 +523,41 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) rrd_config.h.in $(TAGS_DEPENDENCIES)
          done | \
          $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) rrd_config.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
        list='$(SOURCES) $(HEADERS) rrd_config.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
          $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
        $(am__remove_distdir)
-       test -d $(distdir) || mkdir $(distdir)
+       test -d "$(distdir)" || mkdir "$(distdir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        list='$(DISTFILES)'; \
@@ -496,38 +573,54 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
            || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
                am__remove_distdir=: \
                am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
        done
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
+       || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
        $(am__remove_distdir)
@@ -540,6 +633,10 @@ dist-lzma: distdir
        tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
        $(am__remove_distdir)
 
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__remove_distdir)
@@ -568,6 +665,8 @@ distcheck: dist
          bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
          unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
@@ -579,10 +678,13 @@ distcheck: dist
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           --with-included-gettext \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -603,13 +705,15 @@ distcheck: dist
          && rm -rf "$$dc_destdir" \
          && $(MAKE) $(AM_MAKEFLAGS) dist \
          && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
        $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
+       @$(am__cd) '$(distuninstallcheck_dir)' \
        && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
@@ -652,6 +756,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -672,6 +777,8 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
@@ -680,18 +787,28 @@ install-data-am:
 
 install-dvi: install-dvi-recursive
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-recursive
 
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-recursive
 
+install-pdf-am:
+
 install-ps: install-ps-recursive
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -714,24 +831,24 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
-       install-strip
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+       ctags-recursive install-am install-strip tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am am--refresh check check-am clean clean-generic \
        clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
-       dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
-       distclean distclean-generic distclean-hdr distclean-libtool \
-       distclean-tags distcleancheck distdir distuninstallcheck dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-dvi install-dvi-am \
-       install-exec install-exec-am install-html install-html-am \
-       install-info install-info-am install-man install-pdf \
-       install-pdf-am install-ps install-ps-am install-strip \
-       installcheck installcheck-am installdirs installdirs-am \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags tags-recursive uninstall uninstall-am
+       dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+       distcheck distclean distclean-generic distclean-hdr \
+       distclean-libtool distclean-tags distcleancheck distdir \
+       distuninstallcheck dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags tags-recursive uninstall uninstall-am
 
 
  # the following files are not mentioned in any other Makefile
@@ -765,6 +882,7 @@ site-python-install: all
 # find . -name "*.c" -or -name "*.h" | xargs perl -0777 -n -e 'while (s/typedef\s+(?:unsigned\s+|signed\s+|unival\s+)?\S+\s+\*?([^{}\s;(]+)//){print "-T$1\n"}'
 indent:
        find ./ -name "*.[ch]" | xargs indent
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/NEWS b/NEWS
index 5497a671bc39f122c1484967171ef684873f5e6f..afd2f3d1cd466353a206bbf13f3daed3b828f3ed 100644 (file)
--- a/NEWS
+++ b/NEWS
-RRDTOOL NEWS
-============
+News for RRDtool 1.4
+====================
+$Id: NEWS 1840 2009-06-07 11:16:07Z oetiker $
 
-#####################################
-Major Changes between 1.2.x and 1.3.x
--------------------------------------
+RRD Caching Daemon (rrdcached)
+------------------------------
+by Florian Forster and Kevin Brintnall
 
-NEW Fast file access methods (Bernhard Fischer / Tobi Oetiker)
-----------------------------
-* introduced file-accessor functions rrd_read/rrd_seek/rrd_write
+The RRD Caching Daemon can dramatically improve the 'update' performance
+of your system.  Due to filehandling overheads, the time it takes todo one
+update is virtually the same as to doing two updates in a row.
 
-* implemented full mmap-based file access with madvise hints for
-  improved scalability, much reduced memory-footprint and much less
-  blocking while accessing the disk
+The Cache Daemon intercepts rrdtool update calls, assembling multiple
+updates before writing them to the actual rrd file. When calling rrdtool
+graph in such a setup, the command will tell the daemon to flush out all
+pending updates for the rrd files, required to draw the graph.
 
-* implemented optional full file-descriptor access instead of FILE*
-  access
 
-NEW Graphing (Tobi Oetiker)
-------------
-* libart has been replaced by cairo/pango
+RRD Dumping and Restoring (rrdtool dump/restore)
+------------------------------------------------
+by Tobi Oetiker
 
-* pango markup is supported (--pango-markup)
+The output of rrdtool dump has been adjusted to be simpler to parse by
+existing xml parsers.
 
-* full grid fitting
+The restore core has been completely re-written yet again and is now relying
+on an incremental xml parser. This has the advantage that the memory
+consumtion while restoring xml files is only slighly larger than the
+resulting rrd file. Which is much less than the requirements of the 1.3.
 
-* --graph-render-mode=mono for non anti aliased graphing
-
-* --font-render-mode=mono for non anti aliased fonts
-
-* fonts come through fontconfig, use the Pango font nameing scheme
-  -> 'Times 20' ... it is not possible to use truetype fonts
-  directly anymore.
-
-* Tabs are position independent.
-
-* TRENDNAN filter that ignores NAN values while calculating the
-  TREND data. (Timo Stripf)
-
-* --full-size-mode to specify the outer border of the image and not
-  just of the graphing canvas (Matthew Chambers)
-
-* TEXTALIGN command to alter default text alignment behavior
-
-* C API in-memory graphing with rrd_graph_v (Evan Miller)
-
-* draw dashed lines in graphs (Thomas Gutzler)
-
-* new interface graphv which returns information using the rrd_info
-  interface (Tobi Oetiker and Mark Plaksin)
-
-* improved horizontal grid. Have a bit more grid lines and y-axis
-  labels while keeping them far enough apart to not run into each
-  other.
-
-NEW Forecasting (Evan Miller)
----------------
-* the new MHWPREDICT consolidation function uses a variation of the
-  Holt-Winters method. It is a drop-in replacement for HWPREDICT,
-  and is better suited for data whose seasonal variations grow or
-  shrink in proportion to the average.
-
-* If you create an RRD with the new MHWPREDICT function, the
-  resulting rrd file will be version 0004 and can only be used in
-  rrdtool 1.3.
-
-Rewrites
---------
-* rrd_restore now uses libxml for parsing which makes things much
-  more tolerant towards xml variations. The old code could mostly
-  just parse the XML as it was output by rrdtool dump. See also:
-  the note at the bottom of this document. (by Florian octo
-  Forster)
-
-* rrd_update rewritten to make it more modular. Fixed two
-  longstanding HW bugs in the process (Evan Miller)
-
-Internationalization (Takao Fujiwara and Tobi Oetiker)
---------------------
-* The help output by rrdtool has been internationalized. There are
-  no real translations included with rrdtool yet, contributions are
-  welcome.
-
-* The internationalization will only be compiled if libintl and
-  friends are available on your system. Use the configure option
-  --disable-libintl if you want to disable this feature
-
-Language Bindings
------------------
-* ruby rrd_fetch will return step as a last property -- Mike Perham
-
-RRDtool dump / restore incompatibility
+RRD Graphing functions (rrdtool graph)
 --------------------------------------
-* rrdtool dump 1.3 does emit completely legal XML. Basically this
-  means that it contains an XML header and a DOCTYPE definition.
-  Unfortunately this causes older versions of rrdtool restore to be
-  unhappy.
-
-* To restore a new dump with an old rrdtool restore version, either
-  remove the XML header and the doctype by hand (both on the first
-  line of the dump) or use rrdtool dump --no-header.
-
-
-######################################################################################
-Major Changes between 1.0.x and 1.2.x
-======================================================================================
-Graphing
---------
-
-* rewritten graphics generation based on libart.
-  - anti-aliased output
-  - alpha transparency support
-  - truetype fonts
-* additional graphics formats: EPS, PDF, SVG
-
-* extended multi-part documentation
-
-* VDEF support; define and use variables.  Find, and use, the
-  maximum rate seen by rrdtool; compute and show the average
-
-* Sliding window (trend) analysis
-  Compute a smoother average, for instance over the last 6 CDPs
+by Martin Sperl
 
-* percentile (95th or other)
-  Remove peaks, 95 percent of all rates are at or below the
-  returned value
+* VDEF PERCENTNAN (a PRECENT that ignores NAN)
 
-Logging
--------
-* a second logging interface: rrdtool updatev
-  Verbose updating of the database; show CPDs being created
+* CDEF PREDICT and PREDICTSIGMA functions for on-the-fly
+  data prediction without the need to modify existing rrd files as it is
+  required for HoltWinters.
 
-* Aberrant Behavior Detection with Holt-Winters Forecasting
-  Compare current data with expected data, detect and log when
-  the rates are outside expected levels
+* LibDBI integration provides a path to read data directly of a supported
+  SQL database into rrdtool graph.
 
-* COMPUTE data type for artificial data-sources calculating their
-  input using RPN math and data from the other data-sources.
-Incompatibilities
------------------
-* Colons in COMMENT arguments to rrdtool graph must be escaped with a backslash
+Miscellaneous Changes
+---------------------
 
-* the --alt-y-mrtg option is gone or rather since 1.2.7 it is back but
-  without functionality.
+* graph legends can now be placed left, right or above the graph with the
+  new --legend-direction and --legend-positon placement options. 
+  by Melchior Rabe
 
-* In pipe mode, rrdtool answers with OK only if it was successful with the
-  command. Otherwhise the answer will be ERROR...
+* switched to using automake 1.11 which provides a 'silent' build process,
+  causing errors and warnings to stand out much more than before.
+  by Tobi Oetiker
 
+* switched from intltoolize to autopoint for the i18n configuration.
+  by Tobi Oetiker
 
-Behind the Scenes
------------------
-* In order to support Holt-Winters and Calculated Datasources,
-  the rrdtool data format has changed. While the new version of rrdtool can
-  read files created with rrdtool 1.0.x. It is not possible to read files
-  created by rrdtool-1.2.x with rrdtool-1.0.x
+* lua bindings for rrdtool
+  by Fidelis Assis
 
-* External libraries are not included with rrdtool anymore. This is in line
-  with todays trend of using shared libraries everywhere. With the exception
-  of the cgi library most things required by rrdtool will be found on every recent
-  system.
+* various improvements to rrd_open functions and mmap handling
+  by Daniel Pocock
 
-* Memory Mapped IO support for faster logging.
+for more detail see the CHANGES file.
diff --git a/README b/README
index cba88fd2c8962546cd97f9e43a2c5c6955246fe5..ac18e6c1e18a3d454387074a48f8c16e6944ee57 100644 (file)
--- a/README
+++ b/README
@@ -1,5 +1,6 @@
 Round Robin Database Tools
 ==========================
+$Id: README 1844 2009-06-07 11:35:52Z oetiker $
 
 It is pretty easy to gather status information from all sorts of things,
 ranging from the temperature in your office to the number of octets which
diff --git a/TODO b/TODO
index 00ebc24db0d29beea1d2fd124868f31852bb04de..c18e54302d2db29da984e58c33a2968f1e342427 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,11 +1,6 @@
 Random Feature Ideas for RRDtool
 --------------------------------
-Updated: 2008-06-26
-
-add accessor functions for rrd manipulation
-
-reverse order of stacked graph entries prior to plotting ... this is to make
-plotting order more naturally fit with the ordering of the legend ...
+$Id: TODO 1842 2009-06-07 11:34:22Z oetiker $
 
 make it possible to define order of legend items independant of their order
 on the commandline ...
@@ -16,27 +11,8 @@ micro second precision
 
 2036 stable time
 
-add axis on the right and on top of the graph ... 
-
 add configurable counter wrap
 
-build derivatives while plotting
-
-show trend by building moving average and represent it as an arrow
-
-offer side by side tiny box plots for each succesive hour, or some other
-means of seeing the variation rather than just the mean level
-
-circular periodic plots ... (polar)
-
-analyse data in non time domain ... 
-
-add smothing functions to grapher, using rolling average ... 
-
-make VRULE and HRULE with 123 versions ... 
-
-have configurable role-over limits for counters
-
 align data points not to GMT but some free offset
 
 allow starting through symlinks called rrdcreate rrdtune and the like
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644 (file)
index 5ea34f0..0000000
+++ /dev/null
@@ -1,592 +0,0 @@
-dnl Helper Functions for the RRDtool configure.ac script
-dnl 
-dnl this file gets included into aclocal.m4 when runnning aclocal
-dnl
-dnl
-dnl
-dnl Check for the presence of a particular library and its header files
-dnl if this check fails set the environment variable EX_CHECK_ALL_ERR to YES
-dnl and prints out a helful message
-dnl
-dnl
-dnl EX_CHECK_ALL(library, function, header, pkgconf name, tested-version, homepage, cppflags)
-dnl              $1       $2        $3      $4            $5              $6        $7
-dnl
-dnl
-AC_DEFUN([EX_CHECK_ALL],
-[
- AC_LANG_PUSH(C)
- EX_CHECK_STATE=NO
- ex_check_save_LIBS=${LIBS}
- ex_check_save_CPPFLAGS=${CPPFLAGS}
- ex_check_save_LDFLAGS=${LDFLAGS}
- if test "x$7" != "x"; then
-   CPPFLAGS="$CPPFLAGS -I$7"
- fi
- dnl try compiling naked first
- AC_CHECK_LIB($1,$2, [
-    AC_CHECK_HEADER($3,[LIBS="-l$1 ${LIBS}";EX_CHECK_STATE=YES],[])],[])
- if test $EX_CHECK_STATE = NO; then
-    dnl now asking pkg-config for help
-    AC_CHECK_PROGS(PKGCONFIG,[pkg-config],no)
-    if test "$PKGCONFIG" != "no"; then
-          if $PKGCONFIG --exists $4; then
-             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags $4`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L $4`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other $4`
-             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l $4`
-            dnl remove the cached value and test again
-            unset ac_cv_lib_`echo $1 | sed ['s/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/']`_$2
-             AC_CHECK_LIB($1,$2,[
-                unset ac_cv_header_`echo $3 | sed ['s/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/']`
-                AC_CHECK_HEADER($3,[EX_CHECK_STATE=YES],[])
-            ],[])
-          else
-             AC_MSG_WARN([
-----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no $4.pc file around.
-  You may want to set the PKG_CONFIG_PATH variable to point to its
-  location.
-----------------------------------------------------------------------------
-                       ])
-           fi
-     fi
-  fi  
-
-  if test ${EX_CHECK_STATE} = NO; then
-     AC_MSG_WARN([
-----------------------------------------------------------------------------
-* I could not find a working copy of $4. Check config.log for hints on why
-  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find lib$1 and its header files. If
-  you have not installed $4, you can get it either from its original home on
-
-     $6
-
-  You can find also find an archive copy on
-
-     http://oss.oetiker.ch/rrdtool/pub/libs
-
-  The last tested version of $4 is $5.
-
-       LIBS=$LIBS
-   LDFLAGS=$LDFLAGS
-  CPPFLAGS=$CPPFLAGS
-
-----------------------------------------------------------------------------
-                ])
-       EX_CHECK_ALL_ERR=YES
-       LIBS="${ex_check_save_LIBS}"
-       CPPFLAGS="${ex_check_save_CPPFLAGS}"
-       LDFLAGS="${ex_check_save_LDFLAGS}"
-    fi
-    AC_LANG_POP(C)
-]
-)
-
-dnl
-dnl  Ptherad check from http://autoconf-archive.cryp.to/acx_pthread.m4
-dnl
-dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-dnl
-dnl This macro figures out how to build C programs using POSIX threads.
-dnl It sets the PTHREAD_LIBS output variable to the threads library and
-dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
-dnl C compiler flags that are needed. (The user can also force certain
-dnl compiler flags/libs to be tested by setting these environment
-dnl variables.)
-dnl
-dnl Also sets PTHREAD_CC to any special C compiler that is needed for
-dnl multi-threaded programs (defaults to the value of CC otherwise).
-dnl (This is necessary on AIX to use the special cc_r compiler alias.)
-dnl
-dnl NOTE: You are assumed to not only compile your program with these
-dnl flags, but also link it with them as well. e.g. you should link
-dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
-dnl $LIBS
-dnl
-dnl If you are only building threads programs, you may wish to use
-dnl these variables in your default LIBS, CFLAGS, and CC:
-dnl
-dnl        LIBS="$PTHREAD_LIBS $LIBS"
-dnl        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-dnl        CC="$PTHREAD_CC"
-dnl
-dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
-dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
-dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-dnl
-dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
-dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
-dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
-dnl default action will define HAVE_PTHREAD.
-dnl
-dnl Please let the authors know if this macro fails on any platform, or
-dnl if you have any other suggestions or comments. This macro was based
-dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
-dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
-dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
-dnl We are also grateful for the helpful feedback of numerous users.
-dnl
-dnl @category InstalledPackages
-dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
-dnl @version 2005-01-14
-dnl @license GPLWithACException
-
-AC_DEFUN([ACX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_PUSH(C)
-acx_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
-        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
-        AC_MSG_RESULT($acx_pthread_ok)
-        if test x"$acx_pthread_ok" = xno; then
-                PTHREAD_LIBS=""
-                PTHREAD_CFLAGS=""
-        fi
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important.  Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-#       other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-#      doesn't hurt to check since this sometimes defines pthreads too;
-#      also defines -D_REENTRANT)
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case "${host_cpu}-${host_os}" in
-        *solaris*)
-
-        # On Solaris (at least, for some versions), libc contains stubbed
-        # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthread or
-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-        # a function called by this macro, so we could check for that, but
-        # who knows whether they'll stub that too in a future libc.)  So,
-        # we'll just look for -pthreads and -lpthread first:
-
-        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
-        ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
-        case $flag in
-                none)
-                AC_MSG_CHECKING([whether pthreads work without any flags])
-                ;;
-
-                -*)
-                AC_MSG_CHECKING([whether pthreads work with $flag])
-                PTHREAD_CFLAGS="$flag"
-                ;;
-
-               pthread-config)
-               AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
-               if test x"$acx_pthread_config" = xno; then continue; fi
-               PTHREAD_CFLAGS="`pthread-config --cflags`"
-               PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-               ;;
-
-                *)
-                AC_MSG_CHECKING([for the pthreads library -l$flag])
-                PTHREAD_LIBS="-l$flag"
-                ;;
-        esac
-
-        save_LIBS="$LIBS"
-        save_CFLAGS="$CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
-        AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[pthread_t th; pthread_join(th, 0);
-                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
-                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ]])],[acx_pthread_ok=yes],[])
-
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-        AC_MSG_RESULT($acx_pthread_ok)
-        if test "x$acx_pthread_ok" = xyes; then
-                break;
-        fi
-
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
-        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
-       AC_MSG_CHECKING([for joinable pthread attribute])
-       attr_name=unknown
-       for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-           AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[int attr=$attr;]])],[attr_name=$attr; break],[])
-       done
-        AC_MSG_RESULT($attr_name)
-        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
-                               [Define to necessary symbol if this constant
-                                uses a non-standard name on your system.])
-        fi
-
-        AC_MSG_CHECKING([if more special flags are required for pthreads])
-        x_rflag=no
-        case "${host_cpu}-${host_os}" in
-            *-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";;
-            *solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";;
-            *-linux*)
-            if test x"$PTHREAD_CFLAGS" = "x-pthread"; then
-                # For Linux/gcc "-pthread" implies "-lpthread". We need, however, to make this explicit
-                # in PTHREAD_LIBS such that a shared library to be built properly depends on libpthread.
-                PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
-            fi;;
-        esac
-        AC_MSG_RESULT(${x_rflag})
-        if test "x$x_rflag" != xno; then
-            PTHREAD_CFLAGS="$x_rflag $PTHREAD_CFLAGS"
-        fi
-
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-        # More AIX lossage: must compile with cc_r
-        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
-else
-        PTHREAD_CC="$CC"
-fi
-
-AC_SUBST(PTHREAD_LIBS)
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_CC)
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
-        :
-else
-        acx_pthread_ok=no
-        $2
-fi
-AC_LANG_POP(C)
-])dnl ACX_PTHREAD
-
-
-dnl
-dnl determine how to get IEEE math working
-dnl AC_IEEE(MESSAGE, set rd_cv_ieee_[var] variable, INCLUDES,
-dnl   FUNCTION-BODY, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
-dnl
-
-dnl substitute them in all the files listed in AC_OUTPUT
-AC_SUBST(PERLFLAGS)
-
-AC_DEFUN([AC_IEEE], [
-AC_MSG_CHECKING([if IEEE math works $1])
-AC_CACHE_VAL([rd_cv_ieee_$2],
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[$3
-
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
-
-#if HAVE_FLOAT_H
-#  include <float.h>  
-#endif
-
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
-
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
-
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
-
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
-
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif 
-
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
-#endif
-
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    $4;
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }]])],[rd_cv_ieee_$2=yes],[rd_cv_ieee_$2=no],[:])])
-dnl these we run regardles is cached or not
-if test x${rd_cv_ieee_$2} = "xyes"; then
- AC_MSG_RESULT(yes)
- $5
-else
- AC_MSG_RESULT(no)
- $6
-fi
-
-])
-
-AC_DEFUN([AC_FULL_IEEE],[
-AC_LANG_PUSH(C)
-_cflags=${CFLAGS}
-AC_IEEE([out of the box], works, , , ,
-  [CFLAGS="$_cflags -ieee"
-  AC_IEEE([with the -ieee switch], switch, , , ,
-    [CFLAGS="$_cflags -qfloat=nofold"
-    AC_IEEE([with the -qfloat=nofold switch], nofold, , , ,
-      [CFLAGS="$_cflags -w -qflttrap=enable:zerodivide"
-      AC_IEEE([with the -w -qflttrap=enable:zerodivide], flttrap, , , ,
-       [CFLAGS="$_cflags -mieee"
-       AC_IEEE([with the -mieee switch], mswitch, , , ,
-         [CFLAGS="$_cflags -q float=rndsngl"
-         AC_IEEE([with the -q float=rndsngl switch], qswitch, , , ,
-           [CFLAGS="$_cflags -OPT:IEEE_NaN_inf=ON"
-           AC_IEEE([with the -OPT:IEEE_NaN_inf=ON switch], ieeenaninfswitch, , , ,
-             [CFLAGS="$_cflags -OPT:IEEE_comparisons=ON"
-             AC_IEEE([with the -OPT:IEEE_comparisons=ON switch], ieeecmpswitch, , , ,
-               [CFLAGS=$_cflags
-               AC_IEEE([with fpsetmask(0)], mask,
-                 [#include <floatingpoint.h>], [fpsetmask(0)],
-                 [AC_DEFINE(MUST_DISABLE_FPMASK)
-                PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK"],
-                 [AC_IEEE([with signal(SIGFPE,SIG_IGN)], sigfpe,
-                   [#include <signal.h>], [signal(SIGFPE,SIG_IGN)],
-                   [AC_DEFINE(MUST_DISABLE_SIGFPE)
-                   PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE"],         
-                   AC_MSG_ERROR([
-Your Compiler does not do propper IEEE math ... Please find out how to
-make IEEE math work with your compiler and let me know (tobi@oetiker.ch).
-Check config.log to see what went wrong ...
-]))])])])])])])])])])
-
-AC_LANG_POP(C)
-
-])
-
-
-dnl a macro to check for ability to create python extensions
-dnl  AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
-dnl function also defines PYTHON_INCLUDES
-AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
-[AC_REQUIRE([AM_PATH_PYTHON])
-AC_MSG_CHECKING(for headers required to compile python extensions)
-dnl deduce PYTHON_INCLUDES
-py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
-py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
-if test "$py_prefix" != "$py_exec_prefix"; then
-  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
-fi
-AC_SUBST(PYTHON_INCLUDES)
-dnl check if the headers exist:
-save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
-AC_TRY_CPP([#include <Python.h>],dnl
-[AC_MSG_RESULT(found)
-$1],dnl
-[AC_MSG_RESULT(not found)
-$2])
-CPPFLAGS="$save_CPPFLAGS"
-])
-
-dnl a macro to add some color to the build process.
-dnl CONFIGURE_PART(MESSAGE)
-
-AC_DEFUN([CONFIGURE_PART],[
-case $TERM in
-       #   for the most important terminal types we directly know the sequences
-       xterm|xterm*|vt220|vt220*)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
-       ;;
-       vt100|vt100*|cygwin)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
-       ;;
-       *)
-               T_MD=''
-               T_ME=''
-       ;;
-esac
-  AC_MSG_RESULT()
-  AC_MSG_RESULT([${T_MD}$1${T_ME}])
-])
-
-dnl check 
-
-AC_DEFUN([CHECK_FOR_WORKING_MS_ASYNC], [
-AC_MSG_CHECKING([if msync with MS_ASYNC updates the files mtime])
-AC_CACHE_VAL([rd_cv_ms_async],
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/mman.h>
-#include <stdlib.h>
-#include <utime.h>
-int main(void){
-        int fd;
-        struct stat stbuf;
-        char *addr;
-        int res;
-        char temp[] = "mmaptestXXXXXX";
-        struct utimbuf newtime;
-
-        time_t create_ts;
-        fd = mkstemp(temp);
-        if (fd == -1){
-            perror(temp);
-            return 1;
-        }
-        write(fd,"12345\n", 6);        
-        stat(temp, &stbuf);
-        create_ts = stbuf.st_mtime;
-        newtime.actime = 0;
-        newtime.modtime = 0;
-        utime(temp,&newtime);
-        addr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-        if (addr == MAP_FAILED) {
-            perror("mmap");
-            goto bad_exit;
-        }
-        addr[0]='x';
-        res = msync(addr, 4, MS_ASYNC);
-        if (res == -1) {
-           perror("msync");
-           goto bad_exit;
-        }
-        res = close(fd);        
-        if (res == -1) {
-           perror("close");
-           goto bad_exit;
-        }
-        /* The ASYNC means that we schedule the msync and return immediately.
-           Since we want to see if the modification time is updated upon
-           msync(), we have to make sure that our asynchronous request
-           completes before we stat below. In a real application, the
-           request would be completed at a random time in the future
-           but for this test we do not want to wait an arbitrary amount of
-           time, so force a commit now.  */
-        sync();
-        stat(temp, &stbuf);
-        if (create_ts > stbuf.st_mtime){
-           goto bad_exit;
-        }      
-        unlink(temp);  
-        return 0;
-     bad_exit:
-        unlink(temp);
-        return 1;
-}
-]])],[rd_cv_ms_async=ok],[rd_cv_ms_async=broken],[:])])
-
-
-if test "${rd_cv_ms_async}" = "ok"; then
- AC_MSG_RESULT(yes)
-else
- AC_DEFINE_UNQUOTED(HAVE_BROKEN_MS_ASYNC, 1 , [set to 1 if msync with MS_ASYNC fails to update mtime])
- AC_MSG_RESULT(no)
- AC_MSG_WARN([With mmap access, your platform fails to update the files])
- AC_MSG_WARN([mtime. RRDtool will work around this problem by calling utime on each])
- AC_MSG_WARN([file it opens for rw access.])
- sleep 2
-fi
-
-])
-
index 41265584f72c8d94a2ebae7048b72b3d490002ef..53be74d0da4cbe316317b7bd866840b247ea1662 100644 (file)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.11 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -19,8627 +19,6 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# Copyright (C) 1995-2002 Free Software Foundation, Inc.
-# Copyright (C) 2001-2003,2004 Red Hat, Inc.
-#
-# This file is free software, distributed under the terms of the GNU
-# General Public License.  As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
-# the same distribution terms as the rest of that program.
-#
-# This file can be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-#
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
-#
-# Modified to never use included libintl. 
-# Owen Taylor <otaylor@redhat.com>, 12/15/1998
-#
-# Major rework to remove unused code
-# Owen Taylor <otaylor@redhat.com>, 12/11/2002
-#
-# Added better handling of ALL_LINGUAS from GNU gettext version 
-# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
-#
-# Modified to require ngettext
-# Matthias Clasen <mclasen@redhat.com> 08/06/2004
-#
-# We need this here as well, since someone might use autoconf-2.5x
-# to configure GLib then an older version to configure a package
-# using AM_GLIB_GNU_GETTEXT
-AC_PREREQ(2.53)
-
-dnl
-dnl We go to great lengths to make sure that aclocal won't 
-dnl try to pull in the installed version of these macros
-dnl when running aclocal in the glib directory.
-dnl
-m4_copy([AC_DEFUN],[glib_DEFUN])
-m4_copy([AC_REQUIRE],[glib_REQUIRE])
-dnl
-dnl At the end, if we're not within glib, we'll define the public
-dnl definitions in terms of our private definitions.
-dnl
-
-# GLIB_LC_MESSAGES
-#--------------------
-glib_DEFUN([GLIB_LC_MESSAGES],
-  [AC_CHECK_HEADERS([locale.h])
-    if test $ac_cv_header_locale_h = yes; then
-    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      AC_DEFINE(HAVE_LC_MESSAGES, 1,
-        [Define if your <locale.h> file defines LC_MESSAGES.])
-    fi
-  fi])
-
-# GLIB_PATH_PROG_WITH_TEST
-#----------------------------
-dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
-  /*)
-  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in ifelse([$5], , $PATH, [$5]); do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if [$3]; then
-       ac_cv_path_$1="$ac_dir/$ac_word"
-       break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
-  ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
-  AC_MSG_RESULT([$]$1)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# GLIB_WITH_NLS
-#-----------------
-glib_DEFUN([GLIB_WITH_NLS],
-  dnl NLS is obligatory
-  [USE_NLS=yes
-    AC_SUBST(USE_NLS)
-
-    gt_cv_have_gettext=no
-
-    CATOBJEXT=NONE
-    XGETTEXT=:
-    INTLLIBS=
-
-    AC_CHECK_HEADER(libintl.h,
-     [gt_cv_func_dgettext_libintl="no"
-      libintl_extra_libs=""
-
-      #
-      # First check in libc
-      #
-      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
-        [AC_TRY_LINK([
-#include <libintl.h>
-],
-         [return !ngettext ("","", 1)],
-         gt_cv_func_ngettext_libc=yes,
-          gt_cv_func_ngettext_libc=no)
-        ])
-  
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-             AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
-               [AC_TRY_LINK([
-#include <libintl.h>
-],
-                 [return !dgettext ("","")],
-                 gt_cv_func_dgettext_libc=yes,
-                 gt_cv_func_dgettext_libc=no)
-               ])
-      fi
-  
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-        AC_CHECK_FUNCS(bind_textdomain_codeset)
-      fi
-
-      #
-      # If we don't have everything we want, check in libintl
-      #
-      if test "$gt_cv_func_dgettext_libc" != "yes" \
-        || test "$gt_cv_func_ngettext_libc" != "yes" \
-         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
-        
-        AC_CHECK_LIB(intl, bindtextdomain,
-           [AC_CHECK_LIB(intl, ngettext,
-                   [AC_CHECK_LIB(intl, dgettext,
-                                 gt_cv_func_dgettext_libintl=yes)])])
-
-       if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
-         AC_MSG_CHECKING([if -liconv is needed to use gettext])
-         AC_MSG_RESULT([])
-         AC_CHECK_LIB(intl, ngettext,
-               [AC_CHECK_LIB(intl, dcgettext,
-                      [gt_cv_func_dgettext_libintl=yes
-                       libintl_extra_libs=-liconv],
-                       :,-liconv)],
-               :,-liconv)
-        fi
-
-        #
-        # If we found libintl, then check in it for bind_textdomain_codeset();
-        # we'll prefer libc if neither have bind_textdomain_codeset(),
-        # and both have dgettext and ngettext
-        #
-        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS -lintl $libintl_extra_libs"
-          unset ac_cv_func_bind_textdomain_codeset
-          AC_CHECK_FUNCS(bind_textdomain_codeset)
-          LIBS="$glib_save_LIBS"
-
-          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
-            gt_cv_func_dgettext_libc=no
-          else
-            if test "$gt_cv_func_dgettext_libc" = "yes" \
-               && test "$gt_cv_func_ngettext_libc" = "yes"; then
-              gt_cv_func_dgettext_libintl=no
-            fi
-          fi
-        fi
-      fi
-
-      if test "$gt_cv_func_dgettext_libc" = "yes" \
-       || test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        gt_cv_have_gettext=yes
-      fi
-  
-      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        INTLLIBS="-lintl $libintl_extra_libs"
-      fi
-  
-      if test "$gt_cv_have_gettext" = "yes"; then
-       AC_DEFINE(HAVE_GETTEXT,1,
-         [Define if the GNU gettext() function is already present or preinstalled.])
-       GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
-       if test "$MSGFMT" != "no"; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS $INTLLIBS"
-         AC_CHECK_FUNCS(dcgettext)
-         MSGFMT_OPTS=
-         AC_MSG_CHECKING([if msgfmt accepts -c])
-         GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
-msgid ""
-msgstr ""
-"Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: test 1.0\n"
-"PO-Revision-Date: 2007-02-15 12:01+0100\n"
-"Last-Translator: test <foo@bar.xx>\n"
-"Language-Team: C <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Transfer-Encoding: 8bit\n"
-], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
-         AC_SUBST(MSGFMT_OPTS)
-         AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-         GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-         AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
-                        return _nl_msg_cat_cntr],
-           [CATOBJEXT=.gmo 
-             DATADIRNAME=share],
-           [case $host in
-           *-*-solaris*)
-           dnl On Solaris, if bind_textdomain_codeset is in libc,
-           dnl GNU format message catalog is always supported,
-            dnl since both are added to the libc all together.
-           dnl Hence, we'd like to go with DATADIRNAME=share and
-           dnl and CATOBJEXT=.gmo in this case.
-            AC_CHECK_FUNC(bind_textdomain_codeset,
-             [CATOBJEXT=.gmo 
-               DATADIRNAME=share],
-             [CATOBJEXT=.mo
-               DATADIRNAME=lib])
-           ;;
-           *)
-           CATOBJEXT=.mo
-            DATADIRNAME=lib
-           ;;
-           esac])
-          LIBS="$glib_save_LIBS"
-         INSTOBJEXT=.mo
-       else
-         gt_cv_have_gettext=no
-       fi
-      fi
-    ])
-
-    if test "$gt_cv_have_gettext" = "yes" ; then
-      AC_DEFINE(ENABLE_NLS, 1,
-        [always defined to indicate that i18n is enabled])
-    fi
-
-    dnl Test whether we really found GNU xgettext.
-    if test "$XGETTEXT" != ":"; then
-      dnl If it is not GNU xgettext we define it as : so that the
-      dnl Makefiles still can work.
-      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-        : ;
-      else
-        AC_MSG_RESULT(
-         [found xgettext program is not GNU xgettext; ignore it])
-        XGETTEXT=":"
-      fi
-    fi
-
-    # We need to process the po/ directory.
-    POSUB=po
-
-    AC_OUTPUT_COMMANDS(
-      [case "$CONFIG_FILES" in *po/Makefile.in*)
-        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac])
-
-    dnl These rules are solely for the distribution goal.  While doing this
-    dnl we only have to keep exactly one list of the available catalogs
-    dnl in configure.in.
-    for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
-
-    dnl Make all variables we use known to autoconf.
-    AC_SUBST(CATALOGS)
-    AC_SUBST(CATOBJEXT)
-    AC_SUBST(DATADIRNAME)
-    AC_SUBST(GMOFILES)
-    AC_SUBST(INSTOBJEXT)
-    AC_SUBST(INTLLIBS)
-    AC_SUBST(PO_IN_DATADIR_TRUE)
-    AC_SUBST(PO_IN_DATADIR_FALSE)
-    AC_SUBST(POFILES)
-    AC_SUBST(POSUB)
-  ])
-
-# AM_GLIB_GNU_GETTEXT
-# -------------------
-# Do checks necessary for use of gettext. If a suitable implementation 
-# of gettext is found in either in libintl or in the C library,
-# it will set INTLLIBS to the libraries needed for use of gettext
-# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
-# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
-# on various variables needed by the Makefile.in.in installed by 
-# glib-gettextize.
-dnl
-glib_DEFUN([GLIB_GNU_GETTEXT],
-  [AC_REQUIRE([AC_PROG_CC])dnl
-   AC_REQUIRE([AC_HEADER_STDC])dnl
-   
-   GLIB_LC_MESSAGES
-   GLIB_WITH_NLS
-
-   if test "$gt_cv_have_gettext" = "yes"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       AC_MSG_CHECKING(for catalogs to be installed)
-       NEW_LINGUAS=
-       for presentlang in $ALL_LINGUAS; do
-         useit=no
-         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
-           desiredlanguages="$LINGUAS"
-         else
-           desiredlanguages="$ALL_LINGUAS"
-         fi
-         for desiredlang in $desiredlanguages; do
-          # Use the presentlang catalog if desiredlang is
-           #   a. equal to presentlang, or
-           #   b. a variant of presentlang (because in this case,
-           #      presentlang can be used as a fallback for messages
-           #      which are not translated in the desiredlang catalog).
-           case "$desiredlang" in
-             "$presentlang"*) useit=yes;;
-           esac
-         done
-         if test $useit = yes; then
-           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
-         fi
-       done
-       LINGUAS=$NEW_LINGUAS
-       AC_MSG_RESULT($LINGUAS)
-     fi
-
-     dnl Construct list of names of catalog files to be constructed.
-     if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
-
-   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
-   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
-   dnl Try to locate is.
-   MKINSTALLDIRS=
-   if test -n "$ac_aux_dir"; then
-     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
-   fi
-   if test -z "$MKINSTALLDIRS"; then
-     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-   fi
-   AC_SUBST(MKINSTALLDIRS)
-
-   dnl Generate list of files to be processed by xgettext which will
-   dnl be included in po/Makefile.
-   test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,        $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-       < $srcdir/po/POTFILES.in > po/POTFILES
-  ])
-
-# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
-# -------------------------------
-# Define VARIABLE to the location where catalog files will
-# be installed by po/Makefile.
-glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
-[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
-glib_save_prefix="$prefix"
-glib_save_exec_prefix="$exec_prefix"
-glib_save_datarootdir="$datarootdir"
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-test "x$exec_prefix" = xNONE && exec_prefix=$prefix
-datarootdir=`eval echo "${datarootdir}"`
-if test "x$CATOBJEXT" = "x.mo" ; then
-  localedir=`eval echo "${libdir}/locale"`
-else
-  localedir=`eval echo "${datadir}/locale"`
-fi
-prefix="$glib_save_prefix"
-exec_prefix="$glib_save_exec_prefix"
-datarootdir="$glib_save_datarootdir"
-AC_DEFINE_UNQUOTED($1, "$localedir",
-  [Define the location where the catalogs will be installed])
-])
-
-dnl
-dnl Now the definitions that aclocal will find
-dnl
-ifdef(glib_configure_in,[],[
-AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
-AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
-])dnl
-
-# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
-# 
-# Create a temporary file with TEST-FILE as its contents and pass the
-# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
-# 0 and perform ACTION-IF-FAIL for any other exit status.
-AC_DEFUN([GLIB_RUN_PROG],
-[cat >conftest.foo <<_ACEOF
-$2
-_ACEOF
-if AC_RUN_LOG([$1 conftest.foo]); then
-  m4_ifval([$3], [$3], [:])
-m4_ifvaln([$4], [else $4])dnl
-echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
-sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
-fi])
-
-
-
-dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 40 IT_PROG_INTLTOOL
-AC_DEFUN([IT_PROG_INTLTOOL], [
-AC_PREREQ([2.50])dnl
-AC_REQUIRE([AM_NLS])dnl
-
-case "$am__api_version" in
-    1.[01234])
-       AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
-    ;;
-    *)
-    ;;
-esac
-
-if test -n "$1"; then
-    AC_MSG_CHECKING([for intltool >= $1])
-
-    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
-    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-    ]
-    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
-    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
-       AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
-fi
-
-AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
-AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
-AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
-if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
-    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
-fi
-
-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-
-_IT_SUBST(INTLTOOL_DESKTOP_RULE)
-_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
-_IT_SUBST(INTLTOOL_KEYS_RULE)
-_IT_SUBST(INTLTOOL_PROP_RULE)
-_IT_SUBST(INTLTOOL_OAF_RULE)
-_IT_SUBST(INTLTOOL_PONG_RULE)
-_IT_SUBST(INTLTOOL_SERVER_RULE)
-_IT_SUBST(INTLTOOL_SHEET_RULE)
-_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
-_IT_SUBST(INTLTOOL_UI_RULE)
-_IT_SUBST(INTLTOOL_XAM_RULE)
-_IT_SUBST(INTLTOOL_KBD_RULE)
-_IT_SUBST(INTLTOOL_XML_RULE)
-_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
-_IT_SUBST(INTLTOOL_CAVES_RULE)
-_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
-_IT_SUBST(INTLTOOL_THEME_RULE)
-_IT_SUBST(INTLTOOL_SERVICE_RULE)
-_IT_SUBST(INTLTOOL_POLICY_RULE)
-
-# Check the gettext tools to make sure they are GNU
-AC_PATH_PROG(XGETTEXT, xgettext)
-AC_PATH_PROG(MSGMERGE, msgmerge)
-AC_PATH_PROG(MSGFMT, msgfmt)
-AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
-    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
-fi
-xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
-mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
-mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
-if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
-    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
-fi
-
-AC_PATH_PROG(INTLTOOL_PERL, perl)
-if test -z "$INTLTOOL_PERL"; then
-   AC_MSG_ERROR([perl not found])
-fi
-AC_MSG_CHECKING([for perl >= 5.8.1])
-$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
-if test $? -ne 0; then
-   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
-else
-   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
-   AC_MSG_RESULT([$IT_PERL_VERSION])
-fi
-if test "x$2" != "xno-xml"; then
-   AC_MSG_CHECKING([for XML::Parser])
-   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
-       AC_MSG_RESULT([ok])
-   else
-       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
-   fi
-fi
-
-# Substitute ALL_LINGUAS so we can use it in po/Makefile
-AC_SUBST(ALL_LINGUAS)
-
-# Set DATADIRNAME correctly if it is not set yet
-# (copied from glib-gettext.m4)
-if test -z "$DATADIRNAME"; then
-  AC_LINK_IFELSE(
-    [AC_LANG_PROGRAM([[]],
-                     [[extern int _nl_msg_cat_cntr;
-                       return _nl_msg_cat_cntr]])],
-    [DATADIRNAME=share],
-    [case $host in
-    *-*-solaris*)
-    dnl On Solaris, if bind_textdomain_codeset is in libc,
-    dnl GNU format message catalog is always supported,
-    dnl since both are added to the libc all together.
-    dnl Hence, we'd like to go with DATADIRNAME=share
-    dnl in this case.
-    AC_CHECK_FUNC(bind_textdomain_codeset,
-      [DATADIRNAME=share], [DATADIRNAME=lib])
-    ;;
-    *)
-    [DATADIRNAME=lib]
-    ;;
-    esac])
-fi
-AC_SUBST(DATADIRNAME)
-
-IT_PO_SUBDIR([po])
-
-])
-
-
-# IT_PO_SUBDIR(DIRNAME)
-# ---------------------
-# All po subdirs have to be declared with this macro; the subdir "po" is
-# declared by IT_PROG_INTLTOOL.
-#
-AC_DEFUN([IT_PO_SUBDIR],
-[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
-dnl
-dnl The following CONFIG_COMMANDS should be exetuted at the very end
-dnl of config.status.
-AC_CONFIG_COMMANDS_PRE([
-  AC_CONFIG_COMMANDS([$1/stamp-it], [
-    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
-       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
-    fi
-    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
-    >"$1/stamp-it.tmp"
-    [sed '/^#/d
-        s/^[[].*] *//
-        /^[    ]*$/d
-       '"s|^|  $ac_top_srcdir/|" \
-      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
-    ]
-    [sed '/^POTFILES =/,/[^\\]$/ {
-               /^POTFILES =/!d
-               r $1/POTFILES
-         }
-        ' "$1/Makefile.in" >"$1/Makefile"]
-    rm -f "$1/Makefile.tmp"
-    mv "$1/stamp-it.tmp" "$1/stamp-it"
-  ])
-])dnl
-])
-
-# _IT_SUBST(VARIABLE)
-# -------------------
-# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
-#
-AC_DEFUN([_IT_SUBST],
-[
-AC_SUBST([$1])
-m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
-]
-)
-
-# deprecated macros
-AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
-# A hint is needed for aclocal from Automake <= 1.9.4:
-# AC_DEFUN([AC_PROG_INTLTOOL], ...)
-
-
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 56 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
-       [m4_default([$3],
-                  [m4_fatal([Libtool version $1 or higher is required],
-                            63)])],
-       [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
-  *\ * | *\    *)
-    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    _LT_PATH_MAGIC
-  fi
-  ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
-              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME.  Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
-    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
-       [m4_ifval([$1], [$1], [$2])])
-    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
-    m4_ifval([$4],
-       [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
-    lt_dict_add_subkey([lt_decl_dict], [$2],
-       [tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
-  [0], [m4_fatal([$0: too few arguments: $#])],
-  [1], [m4_fatal([$0: too few arguments: $#: $1])],
-  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
-  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
-  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
-    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
-    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
-     m4_if([$2], [],
-          m4_quote(lt_decl_varnames),
-       m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
-                       lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'.  VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly.  In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
-    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-#    # Some comment about what VAR is for.
-#    visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
-                                          [description])))[]dnl
-m4_pushdef([_libtool_name],
-    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
-    [0], [_libtool_name=[$]$1],
-    [1], [_libtool_name=$lt_[]$1],
-    [2], [_libtool_name=$lt_[]$1],
-    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
-    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'.  Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
-       dnl If the libtool generation code has been placed in $CONFIG_LT,
-       dnl instead of duplicating it all over again into config.status,
-       dnl then we will have config.status run $CONFIG_LT later, so it
-       dnl needs to know what name is stored there:
-        [AC_CONFIG_COMMANDS([libtool],
-            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
-    dnl If the libtool generation code is destined for config.status,
-    dnl expand the accumulated commands and init code now:
-    [AC_CONFIG_COMMANDS([libtool],
-        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
-  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
-  ;;
-esac
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
-exec AS_MESSAGE_LOG_FD>>config.log
-{
-  echo
-  AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
-  -h, --help      print this help, then exit
-  -V, --version   print version number, then exit
-  -q, --quiet     do not print progress messages
-  -d, --debug     don't remove temporary files
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
-  case $[1] in
-    --version | --v* | -V )
-      echo "$lt_cl_version"; exit 0 ;;
-    --help | --h* | -h )
-      echo "$lt_cl_help"; exit 0 ;;
-    --debug | --d* | -d )
-      debug=: ;;
-    --quiet | --q* | --silent | --s* | -q )
-      lt_cl_silent=: ;;
-
-    -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
-    *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
-  esac
-  shift
-done
-
-if $lt_cl_silent; then
-  exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure.  Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
-  lt_cl_success=:
-  test "$silent" = yes &&
-    lt_config_lt_args="$lt_config_lt_args --quiet"
-  exec AS_MESSAGE_LOG_FD>/dev/null
-  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-  exec AS_MESSAGE_LOG_FD>>config.log
-  $lt_cl_success || AS_EXIT(1)
-fi
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars.  Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
-  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
-  m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
-    # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
-      setopt NO_GLOB_SUBST
-    fi
-
-    cfgfile="${ofile}T"
-    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
-    $RM "$cfgfile"
-
-    cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
-  case $host_os in
-  aix3*)
-    cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-_LT_EOF
-    ;;
-  esac
-
-  _LT_PROG_LTMAIN
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  _LT_PROG_XSI_SHELLFNS
-
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" ||
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
-    PACKAGE='$PACKAGE'
-    VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
-    RM='$RM'
-    ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
-  [C],                 [_LT_LANG(C)],
-  [C++],               [_LT_LANG(CXX)],
-  [Java],              [_LT_LANG(GCJ)],
-  [Fortran 77],                [_LT_LANG(F77)],
-  [Fortran],           [_LT_LANG(FC)],
-  [Windows Resource],  [_LT_LANG(RC)],
-  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
-    [_LT_LANG($1)],
-    [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
-  [LT_SUPPORTED_TAG([$1])dnl
-  m4_append([_LT_TAGS], [$1 ])dnl
-  m4_define([_LT_LANG_]$1[_enabled], [])dnl
-  _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
-  [LT_LANG(CXX)],
-  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
-  [LT_LANG(F77)],
-  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
-  [LT_LANG(FC)],
-  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-  [LT_LANG(GCJ)],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-    [LT_LANG(GCJ)],
-    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
-      [LT_LANG(GCJ)],
-      [m4_ifdef([AC_PROG_GCJ],
-       [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([A][M_PROG_GCJ],
-       [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([LT_PROG_GCJ],
-       [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
-  [LT_LANG(RC)],
-  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
-  case $host_os in
-    rhapsody* | darwin*)
-    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
-    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
-    AC_CHECK_TOOL([LIPO], [lipo], [:])
-    AC_CHECK_TOOL([OTOOL], [otool], [:])
-    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
-    _LT_DECL([], [DSYMUTIL], [1],
-      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
-    _LT_DECL([], [NMEDIT], [1],
-      [Tool to change global to local symbols on Mac OS X])
-    _LT_DECL([], [LIPO], [1],
-      [Tool to manipulate fat objects and archives on Mac OS X])
-    _LT_DECL([], [OTOOL], [1],
-      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
-    _LT_DECL([], [OTOOL64], [1],
-      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
-    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
-      [lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
-       # By default we will add the -single_module flag. You can override
-       # by either setting the environment variable LT_MULTI_MODULE
-       # non-empty at configure time, or by adding -multi_module to the
-       # link flags.
-       rm -rf libconftest.dylib*
-       echo "int foo(void){return 1;}" > conftest.c
-       echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
-       $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-         -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
-        _lt_result=$?
-       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
-         lt_cv_apple_cc_single_mod=yes
-       else
-         cat conftest.err >&AS_MESSAGE_LOG_FD
-       fi
-       rm -rf libconftest.dylib*
-       rm -f conftest.*
-      fi])
-    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
-      [lt_cv_ld_exported_symbols_list],
-      [lt_cv_ld_exported_symbols_list=no
-      save_LDFLAGS=$LDFLAGS
-      echo "_main" > conftest.sym
-      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
-      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-       [lt_cv_ld_exported_symbols_list=yes],
-       [lt_cv_ld_exported_symbols_list=no])
-       LDFLAGS="$save_LDFLAGS"
-    ])
-    case $host_os in
-    rhapsody* | darwin1.[[012]])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-       10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-       10.[[012]]*)
-         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-       10.*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
-    ;;
-  esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
-      _lt_dar_single_mod='$single_module'
-    fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
-    else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    if test "$DSYMUTIL" != ":"; then
-      _lt_dsymutil='~$DSYMUTIL $lib || :'
-    else
-      _lt_dsymutil=
-    fi
-    ;;
-  esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
-  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
-  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-  _LT_TAGVAR(hardcode_direct, $1)=no
-  _LT_TAGVAR(hardcode_automatic, $1)=yes
-  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
-  _LT_TAGVAR(link_all_deplibs, $1)=yes
-  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
-  case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
-     *) _lt_dar_can_shared=$GCC ;;
-  esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-    m4_if([$1], [CXX],
-[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
-    fi
-],[])
-  else
-  _LT_TAGVAR(ld_shlibs, $1)=no
-  fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-       /^0/ {
-           s/^0  *\(.*\)$/\1/
-           p
-       }
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-            [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-        [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-[$]*
-_LT_EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-        { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-          test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-          echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-          test "X$echo_testing_string" = "X$echo_test_string"; then
-         # Cool, printf works
-         :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-            test "X$echo_testing_string" = 'X\t' &&
-            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-            test "X$echo_testing_string" = "X$echo_test_string"; then
-         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-         export CONFIG_SHELL
-         SHELL="$CONFIG_SHELL"
-         export SHELL
-         ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-            test "X$echo_testing_string" = 'X\t' &&
-            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-            test "X$echo_testing_string" = "X$echo_test_string"; then
-         ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        else
-         # maybe with a smaller string...
-         prev=:
-
-         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-           if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-           then
-             break
-           fi
-           prev="$cmd"
-         done
-
-         if test "$prev" != 'sed 50q "[$]0"'; then
-           echo_test_string=`eval $prev`
-           export echo_test_string
-           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-         else
-           # Oops.  We lost completely, so just stick with echo.
-           ECHO=echo
-         fi
-        fi
-      fi
-    fi
-  fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(lt_ECHO)
-])
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
-    [An echo program that does not interpret backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-  [AS_HELP_STRING([--disable-libtool-lock],
-    [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-      *ELF-32*)
-       HPUX_IA64_MODE="32"
-       ;;
-      *ELF-64*)
-       HPUX_IA64_MODE="64"
-       ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
-      case `/usr/bin/file conftest.$ac_objext` in
-       *32-bit*)
-         LD="${LD-ld} -melf32bsmip"
-         ;;
-       *N32*)
-         LD="${LD-ld} -melf32bmipn32"
-         ;;
-       *64-bit*)
-         LD="${LD-ld} -melf64bmip"
-       ;;
-      esac
-    else
-      case `/usr/bin/file conftest.$ac_objext` in
-       *32-bit*)
-         LD="${LD-ld} -32"
-         ;;
-       *N32*)
-         LD="${LD-ld} -n32"
-         ;;
-       *64-bit*)
-         LD="${LD-ld} -64"
-         ;;
-      esac
-    fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-      *32-bit*)
-       case $host in
-         x86_64-*kfreebsd*-gnu)
-           LD="${LD-ld} -m elf_i386_fbsd"
-           ;;
-         x86_64-*linux*)
-           LD="${LD-ld} -m elf_i386"
-           ;;
-         ppc64-*linux*|powerpc64-*linux*)
-           LD="${LD-ld} -m elf32ppclinux"
-           ;;
-         s390x-*linux*)
-           LD="${LD-ld} -m elf_s390"
-           ;;
-         sparc64-*linux*)
-           LD="${LD-ld} -m elf32_sparc"
-           ;;
-       esac
-       ;;
-      *64-bit*)
-       case $host in
-         x86_64-*kfreebsd*-gnu)
-           LD="${LD-ld} -m elf_x86_64_fbsd"
-           ;;
-         x86_64-*linux*)
-           LD="${LD-ld} -m elf_x86_64"
-           ;;
-         ppc*-*linux*|powerpc*-*linux*)
-           LD="${LD-ld} -m elf64ppc"
-           ;;
-         s390*-*linux*|s390*-*tpf*)
-           LD="${LD-ld} -m elf64_s390"
-           ;;
-         sparc*-*linux*)
-           LD="${LD-ld} -m elf64_sparc"
-           ;;
-       esac
-       ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)
-       if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
-         LD="${LD-ld} -64"
-       fi
-       ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
-    [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
-    [Commands used to build an old-style archive])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#              [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       $2=yes
-     fi
-   fi
-   $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
-    m4_if([$5], , :, [$5])
-else
-    m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                  [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         $2=yes
-       fi
-     else
-       $2=yes
-     fi
-   fi
-   $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    m4_if([$4], , :, [$4])
-else
-    m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw* | cegcc*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    else
-      # Make teststring a little bigger before we do anything with it.
-      # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
-        teststring=$teststring$teststring
-      done
-      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-      # If test is not a shell built-in, we'll probably end up computing a
-      # maximum length that is only half of the actual maximum length, but
-      # we can't tell.
-      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-                = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
-             test $i != 17 # 1/2 MB should be enough
-      do
-        i=`expr $i + 1`
-        teststring=$teststring$teststring
-      done
-      # Only check the string length outside the loop.
-      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
-      teststring=
-      # Add a significant safety factor because C++ compilers can tack on
-      # massive amounts of additional arguments before passing them to the
-      # linker.  It appears as though 1/2 is a usable value.
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    fi
-    ;;
-  esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
-    [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-  return status;
-}]
-_LT_EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_dlunknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-    ;;
-
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-    ;;
-
-  darwin*)
-  # if libdl is installed we need to link against it
-    AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ])
-    ;;
-
-  *)
-    AC_CHECK_FUNC([shl_load],
-         [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-           [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
-       [AC_CHECK_FUNC([dlopen],
-             [lt_cv_dlopen="dlopen"],
-         [AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-           [AC_CHECK_LIB([svld], [dlopen],
-                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-             [AC_CHECK_LIB([dld], [dld_link],
-                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
-             ])
-           ])
-         ])
-       ])
-      ])
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-         lt_cv_dlopen_self, [dnl
-         _LT_TRY_DLOPEN_SELF(
-           lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-           lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-         lt_cv_dlopen_self_static, [dnl
-         _LT_TRY_DLOPEN_SELF(
-           lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-           lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
-        [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
-        [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
-        [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   chmod u+w . 2>&AS_MESSAGE_LOG_FD
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
-       [Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $RM conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
-         [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
-  [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
-   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
-   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
-  # We can hardcode non-existent directories.
-  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_TAGVAR(hardcode_action, $1)=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_TAGVAR(hardcode_action, $1)=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
-   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
-    [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP" ; then
-      striplib="$STRIP -x"
-      old_striplib="$STRIP -S"
-      AC_MSG_RESULT([yes])
-    else
-      AC_MSG_RESULT([no])
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-  esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
-       [], [
-if test "$GCC" = yes; then
-  case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
-  esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-  # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
-  lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
-      test -d "$lt_sys_path" && \
-       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
-    fi
-  done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
-  for (lt_i = NF; lt_i > 0; lt_i--) {
-    if ($lt_i != "" && $lt_i != ".") {
-      if ($lt_i == "..") {
-        lt_count++;
-      } else {
-        if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
-        } else {
-          lt_count--;
-        }
-      }
-    }
-  }
-  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
-  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix[[4-9]]*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  case $host_cpu in
-  powerpc)
-    # Since July 2007 AmigaOS4 officially supports .so libraries.
-    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    ;;
-  m68k)
-    library_names_spec='$libname.ixlibrary $libname.a'
-    # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    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'
-    ;;
-  esac
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[[45]]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname~
-      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-      fi'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw* | cegcc*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
-
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
-  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  *) # from 4.6 on, and DragonFly
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  hppa*64*)
-    shrext_cmds='.sl'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-interix[[3-9]]*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
-       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
-       [shlibpath_overrides_runpath=yes])])
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-*nto* | *qnx*)
-  version_type=qnx
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='ldqnx.so'
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-rdos*)
-  dynamic_linker=no
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
-    [Variables whose values should be saved in libtool wrapper scripts and
-    restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
-    [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
-    [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
-    [[List of archive names.  First name is the real one, the rest are links.
-    The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
-    [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [postinstall_cmds], [2],
-    [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
-    [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
-    [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
-    [[As "finish_cmds", except a single script fragment to be evaled but
-    not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
-    [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
-    [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
-    [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="m4_if([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
-         fi ;;
-       esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
-        [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_ARG_WITH([gnu-ld],
-    [AS_HELP_STRING([--with-gnu-ld],
-       [assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by $CC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
-      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-      *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi[[45]]*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
-
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump',
-  # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
-    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-    lt_cv_file_magic_cmd='func_win32_libid'
-  else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-    lt_cv_file_magic_cmd='$OBJDUMP -f'
-  fi
-  ;;
-
-cegcc)
-  # use the weaker test based on 'objdump'. See mingw*.
-  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-freebsd* | dragonfly*)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    [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]']
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix[[3-9]]*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd* | netbsdelf*-gnu)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-*nto* | *qnx*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-rdos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    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]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
-
-tpf*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
-    [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
-    [Command to use when deplibs_check_method == "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-       # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-       #   nm: unknown option "B" ignored
-       # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
-         lt_cv_path_NM="$tmp_nm -B"
-         break
-         ;;
-       *)
-         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-         */dev/null*)
-           lt_cv_path_NM="$tmp_nm -p"
-           break
-           ;;
-         *)
-           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-           continue # so that we can try to find one that supports BSD flags
-           ;;
-         esac
-         ;;
-       esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
-else
-  # Didn't find any BSD compatible name lister, look for dumpbin.
-  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
-  AC_SUBST([DUMPBIN])
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
-  fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
-  [lt_cv_nm_interface="BSD nm"
-  echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
-  (eval "$ac_compile" 2>conftest.err)
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
-  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
-  cat conftest.out >&AS_MESSAGE_LOG_FD
-  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
-    lt_cv_nm_interface="MS dumpbin"
-  fi
-  rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
-  # These system don't have libm, or don't need it
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
-  ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
-  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
-  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions], [],
-    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
-       [Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32* | cegcc*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-osf*)
-  symcode='[[BCDEGQRST]]'
-  ;;
-solaris*)
-  symcode='[[BDRT]]'
-  ;;
-sco3.2v5*)
-  symcode='[[DT]]'
-  ;;
-sysv4.2uw2*)
-  symcode='[[DT]]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[[ABDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
-
-  # Write the raw and C identifiers.
-  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
-    # which start with @ or ?.
-    lt_cv_sys_global_symbol_pipe="$AWK ['"\
-"     {last_section=section; section=\$ 3};"\
-"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-"     \$ 0!~/External *\|/{next};"\
-"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-"     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-"     ' prfx=^$ac_symprfx]"
-  else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[    ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-  fi
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-       mv -f "$nlist"T "$nlist"
-      else
-       rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
-       if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
-         cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
-         # Now generate the symbol file.
-         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
-         cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols.  */
-const struct {
-  const char *name;
-  void       *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
-  { "@PROGRAM@", (void *) 0 },
-_LT_EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
-         cat <<\_LT_EOF >> conftest.$ac_ext
-  {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
-         # Now try linking the two files.
-         mv conftest.$ac_objext conftstm.$ac_objext
-         lt_save_LIBS="$LIBS"
-         lt_save_CFLAGS="$CFLAGS"
-         LIBS="conftstm.$ac_objext"
-         CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-         if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-           pipe_works=yes
-         fi
-         LIBS="$lt_save_LIBS"
-         CFLAGS="$lt_save_CFLAGS"
-       else
-         echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-       fi
-      else
-       echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
-  else
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
-  fi
-  rm -rf conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
-    [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
-    [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
-    [lt_cv_sys_global_symbol_to_c_name_address], [1],
-    [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
-    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
-    [Transform the output of nm in a C name address pair when lib prefix is needed])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-m4_if([$1], [CXX], [
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | cygwin* | os2* | pw32* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      m4_if([$1], [GCJ], [],
-       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-       ;;
-      *)
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-       ;;
-      esac
-      ;;
-    *qnx* | *nto*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-    *)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix[[4-9]]*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-         # AIX 5 now supports IA64 processor
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-       else
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-       fi
-       ;;
-      chorus*)
-       case $cc_basename in
-       cxch68*)
-         # Green Hills C++ Compiler
-         # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-         ;;
-       esac
-       ;;
-      dgux*)
-       case $cc_basename in
-         ec++*)
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           ;;
-         ghcx*)
-           # Green Hills C++ Compiler
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      freebsd* | dragonfly*)
-       # FreeBSD uses GNU C++
-       ;;
-      hpux9* | hpux10* | hpux11*)
-       case $cc_basename in
-         CC*)
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-           if test "$host_cpu" != ia64; then
-             _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-           fi
-           ;;
-         aCC*)
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-           case $host_cpu in
-           hppa*64*|ia64*)
-             # +Z the default
-             ;;
-           *)
-             _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-             ;;
-           esac
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      interix*)
-       # This is c89, which is MS Visual C++ (no shared libs)
-       # Anyone wants to do a port?
-       ;;
-      irix5* | irix6* | nonstopux*)
-       case $cc_basename in
-         CC*)
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           # CC pic flag -KPIC is the default.
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      linux* | k*bsd*-gnu)
-       case $cc_basename in
-         KCC*)
-           # KAI C++ Compiler
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-           ;;
-         ecpc* )
-           # old Intel C++ for x86_64 which still supported -KPIC.
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-           ;;
-         icpc* )
-           # Intel C++, used to be incompatible with GCC.
-           # ICC 10 doesn't accept -KPIC any more.
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-           ;;
-         pgCC* | pgcpp*)
-           # Portland Group C++ compiler
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-         cxx*)
-           # Compaq C++
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           ;;
-         xlc* | xlC*)
-           # IBM XL 8.0 on PPC
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
-           ;;
-         *)
-           case `$CC -V 2>&1 | sed 5q` in
-           *Sun\ C*)
-             # Sun C++ 5.9
-             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-             ;;
-           esac
-           ;;
-       esac
-       ;;
-      lynxos*)
-       ;;
-      m88k*)
-       ;;
-      mvs*)
-       case $cc_basename in
-         cxx*)
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      netbsd* | netbsdelf*-gnu)
-       ;;
-      *qnx* | *nto*)
-        # QNX uses GNU C++, but need to define -shared option too, otherwise
-        # it will coredump.
-        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-        ;;
-      osf3* | osf4* | osf5*)
-       case $cc_basename in
-         KCC*)
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-           ;;
-         RCC*)
-           # Rational C++ 2.4.1
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         cxx*)
-           # Digital/Compaq C++
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      psos*)
-       ;;
-      solaris*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-           ;;
-         gcx*)
-           # Green Hills C++ Compiler
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sunos4*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.x
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-         lcc*)
-           # Lucid
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-       case $cc_basename in
-         CC*)
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-       esac
-       ;;
-      tandem*)
-       case $cc_basename in
-         NCC*)
-           # NonStop-UX NCC 3.20
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      vxworks*)
-       ;;
-      *)
-       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-       ;;
-    esac
-  fi
-],
-[
-  if test "$GCC" = yes; then
-    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      m4_if([$1], [GCJ], [],
-       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-       # +Z the default
-       ;;
-      *)
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-       ;;
-      esac
-      ;;
-
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
-    *)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      m4_if([$1], [GCJ], [],
-       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    linux* | k*bsd*-gnu)
-      case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
-      ecc*)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      # icc used to be incompatible with GCC.
-      # ICC 10 doesn't accept -KPIC any more.
-      icc* | ifort*)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      # Lahey Fortran 8.1.
-      lf95*)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
-       ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-        ;;
-      ccc*)
-        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-        # All Alpha code is PIC.
-        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-        ;;
-      xl*)
-       # IBM XL C 8.0/Fortran 10.1 on PPC
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
-       ;;
-      *)
-       case `$CC -V 2>&1 | sed 5q` in
-       *Sun\ C*)
-         # Sun C 5.9
-         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-         ;;
-       *Sun\ F*)
-         # Sun Fortran 8.3 passes all unrecognized flags to the linker
-         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-         _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
-         ;;
-       esac
-       ;;
-      esac
-      ;;
-
-    newsos6)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    rdos*)
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    solaris*)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
-      *)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    unicos*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-
-    uts4*)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *)
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
-    ;;
-esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-       [How to pass a linker flag through the compiler])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
-    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
-    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
-    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
-       [Additional compiler flags for building library objects])
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
-  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
-  $lt_tmp_static_flag,
-  [],
-  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
-       [Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
-  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix[[4-9]]*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_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'
-    else
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
-  cygwin* | mingw* | cegcc*)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  linux* | k*bsd*-gnu)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-  ;;
-  *)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-], [
-  runpath_var=
-  _LT_TAGVAR(allow_undefined_flag, $1)=
-  _LT_TAGVAR(always_export_symbols, $1)=no
-  _LT_TAGVAR(archive_cmds, $1)=
-  _LT_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_TAGVAR(compiler_needs_object, $1)=no
-  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  _LT_TAGVAR(hardcode_automatic, $1)=no
-  _LT_TAGVAR(hardcode_direct, $1)=no
-  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
-  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-  _LT_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(inherit_rpath, $1)=no
-  _LT_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_TAGVAR(module_cmds, $1)=
-  _LT_TAGVAR(module_expsym_cmds, $1)=
-  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
-  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
-  extract_expsyms_cmds=
-
-  case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
-
-  _LT_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>&1` in
-      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix[[3-9]]*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            _LT_TAGVAR(archive_expsym_cmds, $1)=''
-        ;;
-      m68k)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes
-        ;;
-      esac
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-      # as there is no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(always_export_symbols, $1)=no
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    interix[[3-9]]*)
-      _LT_TAGVAR(hardcode_direct, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    gnu* | linux* | tpf* | k*bsd*-gnu)
-      tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
-       case $cc_basename in
-         diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
-       esac
-      fi
-      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-        && test "$tmp_diet" = no
-      then
-       tmp_addflag=
-       tmp_sharedflag='-shared'
-       case $cc_basename,$host_cpu in
-        pgcc*)                         # Portland Group C compiler
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       lf95*)                          # Lahey Fortran 8.1
-         _LT_TAGVAR(whole_archive_flag_spec, $1)=
-         tmp_sharedflag='--shared' ;;
-       xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
-         tmp_sharedflag='-qmkshrobj'
-         tmp_addflag= ;;
-       esac
-       case `$CC -V 2>&1 | sed 5q` in
-       *Sun\ C*)                       # Sun C 5.9
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-         _LT_TAGVAR(compiler_needs_object, $1)=yes
-         tmp_sharedflag='-G' ;;
-       *Sun\ F*)                       # Sun Fortran 8.3
-         tmp_sharedflag='-G' ;;
-       esac
-       _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-        if test "x$supports_anon_versioning" = xyes; then
-          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-           echo "local: *; };" >> $output_objdir/$libname.ver~
-           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-        fi
-
-       case $cc_basename in
-       xlf*)
-         # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-         _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-         if test "x$supports_anon_versioning" = xyes; then
-           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-             echo "local: *; };" >> $output_objdir/$libname.ver~
-             $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
-         fi
-         ;;
-       esac
-      else
-        _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-       ;;
-       *)
-         # For security reasons, it is highly recommended that you always
-         # use absolute paths for naming shared libraries, and exclude the
-         # DT_RUNPATH tag from executables and libraries.  But doing so
-         # requires that you compile everything twice, which is a pain.
-         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         else
-           _LT_TAGVAR(ld_shlibs, $1)=no
-         fi
-       ;;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-
-    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
-      runpath_var=
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(always_export_symbols, $1)=yes
-      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       _LT_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
-      ;;
-
-    aix[[4-9]]*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         _LT_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'
-       else
-         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
-
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
-
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      _LT_TAGVAR(archive_cmds, $1)=''
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[[012]]|aix4.[[012]].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" &&
-          strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         :
-         else
-         # We have old collect2
-         _LT_TAGVAR(hardcode_direct, $1)=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         _LT_TAGVAR(hardcode_minus_L, $1)=yes
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-         _LT_TAGVAR(hardcode_libdir_separator, $1)=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-       _LT_TAGVAR(link_all_deplibs, $1)=no
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
-
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      _LT_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-      else
-       if test "$host_cpu" = ia64; then
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-         _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-         _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            _LT_TAGVAR(archive_expsym_cmds, $1)=''
-        ;;
-      m68k)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes
-        ;;
-      esac
-      ;;
-
-    bsdi[[45]]*)
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      ;;
-
-    darwin* | rhapsody*)
-      _LT_DARWIN_LINKER_FEATURES($1)
-      ;;
-
-    dgux*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    freebsd1*)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-       _LT_TAGVAR(hardcode_direct, $1)=yes
-       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       case $host_cpu in
-       hppa*64*|ia64*)
-         _LT_TAGVAR(hardcode_direct, $1)=no
-         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-         ;;
-       *)
-         _LT_TAGVAR(hardcode_direct, $1)=yes
-         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         _LT_TAGVAR(hardcode_minus_L, $1)=yes
-         ;;
-       esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       # Try to use the -exported_symbol ld option, if it does not
-       # work, assume that -exports_file does not work either and
-       # implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-        )
-        LDFLAGS="$save_LDFLAGS"
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(inherit_rpath, $1)=yes
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    newsos6)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *nto* | *qnx*)
-      ;;
-
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-       _LT_TAGVAR(hardcode_direct, $1)=yes
-       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-       else
-         case $host_os in
-          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-            _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-            ;;
-          *)
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-            ;;
-         esac
-       fi
-      else
-       _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    os2*)
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      else
-       _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
-       # Both c and cxx compiler support -rpath directly
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    solaris*)
-      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-      else
-       case `$CC -V 2>&1` in
-       *"Compilers 5.0"*)
-         wlarc=''
-         _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
-         ;;
-       *)
-         wlarc='${wl}'
-         _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-         ;;
-       esac
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *)
-       # The compiler driver will combine and reorder linker options,
-       # but understands `-z linker_flag'.  GCC discards it without `$wl',
-       # but is careful enough not to reorder.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       if test "$GCC" = yes; then
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-       else
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
-       fi
-       ;;
-      esac
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-       sni)
-         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
-         _LT_TAGVAR(hardcode_direct, $1)=no
-        ;;
-       motorola)
-         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4.3*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       _LT_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-
-    if test x$host_vendor = xsni; then
-      case $host in
-      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
-       ;;
-      esac
-    fi
-  fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
-    [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
-  # Assume -lc should be added
-  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $_LT_TAGVAR(archive_cmds, $1) in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
-       pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
-        _LT_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
-        then
-         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-         _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
-    [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
-    [enable_shared_with_static_runtimes], [0],
-    [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
-    [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
-    [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
-    [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
-    [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
-    [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
-    [Commands used to build a loadable module if different from building
-    a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
-    [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
-    [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
-    [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
-    [Flag to hardcode $libdir into a binary during linking.
-    This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
-    [[If ld is used when linking, flag to hardcode $libdir into a binary
-    during linking.  This must work even if $libdir does not exist]])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
-    [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
-    DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
-    DIR into the resulting binary and the resulting library dependency is
-    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
-    library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
-    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-    into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
-    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-    into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
-    [Set to "yes" if building a shared library automatically hardcodes DIR
-    into the library and all subsequent libraries and executables linked
-    against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
-    [Set to yes if linker adds runtime paths of dependent libraries
-    to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
-    [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
-    [Fix the shell variable $srcfile for the compiler])
-_LT_TAGDECL([], [always_export_symbols], [0],
-    [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
-    [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
-    [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
-    [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
-    [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [file_list_spec], [1],
-    [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl    [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_SYS_DYNAMIC_LINKER($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-  LT_SYS_DLOPEN_SELF
-  _LT_CMD_STRIPLIB
-
-  # Report which library types will actually be built
-  AC_MSG_CHECKING([if libtool supports shared libraries])
-  AC_MSG_RESULT([$can_build_shared])
-
-  AC_MSG_CHECKING([whether to build shared libraries])
-  test "$can_build_shared" = "no" && enable_shared=no
-
-  # On AIX, shared libraries and static libraries use the same namespace, and
-  # are all built from PIC.
-  case $host_os in
-  aix3*)
-    test "$enable_shared" = yes && enable_static=no
-    if test -n "$RANLIB"; then
-      archive_cmds="$archive_cmds~\$RANLIB \$lib"
-      postinstall_cmds='$RANLIB $lib'
-    fi
-    ;;
-
-  aix[[4-9]]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
-    fi
-    ;;
-  esac
-  AC_MSG_RESULT([$enable_shared])
-
-  AC_MSG_CHECKING([whether to build static libraries])
-  # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
-  AC_MSG_RESULT([$enable_static])
-
-  _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="int some_variable = 0;"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC=$CC
-  lt_save_LD=$LD
-  lt_save_GCC=$GCC
-  GCC=$GXX
-  lt_save_with_gnu_ld=$with_gnu_ld
-  lt_save_path_LD=$lt_cv_path_LD
-  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-  else
-    $as_unset lt_cv_prog_gnu_ld
-  fi
-  if test -n "${lt_cv_path_LDCXX+set}"; then
-    lt_cv_path_LD=$lt_cv_path_LDCXX
-  else
-    $as_unset lt_cv_path_LD
-  fi
-  test -z "${LDCXX+set}" || LD=$LDCXX
-  CC=${CXX-"c++"}
-  compiler=$CC
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-
-  if test -n "$compiler"; then
-    # We don't want -fno-exception when compiling C++ code, so set the
-    # no_builtin_flag separately
-    if test "$GXX" = yes; then
-      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-    else
-      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-    fi
-
-    if test "$GXX" = yes; then
-      # Set up default GNU C++ configuration
-
-      LT_PATH_LD
-
-      # Check if GNU C++ uses GNU ld as the underlying linker, since the
-      # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-        # If archive_cmds runs LD, not CC, wlarc should be empty
-        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-        #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
-
-        # ancient GNU ld didn't support --whole-archive et. al.
-        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
-         $GREP 'no-whole-archive' > /dev/null; then
-          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-        else
-          _LT_TAGVAR(whole_archive_flag_spec, $1)=
-        fi
-      else
-        with_gnu_ld=no
-        wlarc=
-
-        # A generic and very simple default shared library creation
-        # command for GNU C++ for the case where it uses the native
-        # linker, instead of GNU ld.  If possible, this setting should
-        # overridden to take advantage of the native linker features on
-        # the platform it is being used on.
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-      fi
-
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
-    else
-      GXX=no
-      with_gnu_ld=no
-      wlarc=
-    fi
-
-    # PORTME: fill in a description of your system's C++ link characteristics
-    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-    _LT_TAGVAR(ld_shlibs, $1)=yes
-    case $host_os in
-      aix3*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-      aix[[4-9]]*)
-        if test "$host_cpu" = ia64; then
-          # On IA64, the linker does run time linking by default, so we don't
-          # have to do anything special.
-          aix_use_runtimelinking=no
-          exp_sym_flag='-Bexport'
-          no_entry_flag=""
-        else
-          aix_use_runtimelinking=no
-
-          # Test if we are trying to use run time linking or normal
-          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
-          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
-           for ld_flag in $LDFLAGS; do
-             case $ld_flag in
-             *-brtl*)
-               aix_use_runtimelinking=yes
-               break
-               ;;
-             esac
-           done
-           ;;
-          esac
-
-          exp_sym_flag='-bexport'
-          no_entry_flag='-bnoentry'
-        fi
-
-        # When large executables or shared objects are built, AIX ld can
-        # have problems creating the table of contents.  If linking a library
-        # or program results in "error TOC overflow" add -mminimal-toc to
-        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-        _LT_TAGVAR(archive_cmds, $1)=''
-        _LT_TAGVAR(hardcode_direct, $1)=yes
-        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-        _LT_TAGVAR(link_all_deplibs, $1)=yes
-        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
-        if test "$GXX" = yes; then
-          case $host_os in aix4.[[012]]|aix4.[[012]].*)
-          # We only want to do this on AIX 4.2 and lower, the check
-          # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" &&
-            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-         then
-           # We have reworked collect2
-           :
-         else
-           # We have old collect2
-           _LT_TAGVAR(hardcode_direct, $1)=unsupported
-           # It fails to find uninstalled libraries when the uninstalled
-           # path is not listed in the libpath.  Setting hardcode_minus_L
-           # to unsupported forces relinking
-           _LT_TAGVAR(hardcode_minus_L, $1)=yes
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-           _LT_TAGVAR(hardcode_libdir_separator, $1)=
-         fi
-          esac
-          shared_flag='-shared'
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag="$shared_flag "'${wl}-G'
-         fi
-        else
-          # not using gcc
-          if test "$host_cpu" = ia64; then
-         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-         # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-          else
-           if test "$aix_use_runtimelinking" = yes; then
-             shared_flag='${wl}-G'
-           else
-             shared_flag='${wl}-bM:SRE'
-           fi
-          fi
-        fi
-
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
-        # It seems that -bexpall does not export symbols beginning with
-        # underscore (_), so it is better to generate a list of symbols to
-       # export.
-        _LT_TAGVAR(always_export_symbols, $1)=yes
-        if test "$aix_use_runtimelinking" = yes; then
-          # Warning - without using the other runtime loading flags (-brtl),
-          # -berok will link without error, but may produce a broken library.
-          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
-          # Determine the default libpath from the value encoded in an empty
-          # executable.
-          _LT_SYS_MODULE_PATH_AIX
-          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-        else
-          if test "$host_cpu" = ia64; then
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-          else
-           # Determine the default libpath from the value encoded in an
-           # empty executable.
-           _LT_SYS_MODULE_PATH_AIX
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-           # Warning - without using the other run time loading flags,
-           # -berok will link without error, but may produce a broken library.
-           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-           # Exported symbols can be pulled into shared objects from archives
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-           # This is similar to how AIX traditionally builds its shared
-           # libraries.
-           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-          fi
-        fi
-        ;;
-
-      beos*)
-       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-         # support --undefined.  This deserves some investigation.  FIXME
-         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       else
-         _LT_TAGVAR(ld_shlibs, $1)=no
-       fi
-       ;;
-
-      chorus*)
-        case $cc_basename in
-          *)
-         # FIXME: insert proper C++ library support
-         _LT_TAGVAR(ld_shlibs, $1)=no
-         ;;
-        esac
-        ;;
-
-      cygwin* | mingw* | pw32* | cegcc*)
-        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-        # as there is no search path for DLLs.
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-        _LT_TAGVAR(always_export_symbols, $1)=no
-        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-          # If the export-symbols file already is a .def file (1st line
-          # is EXPORTS), use it as is; otherwise, prepend...
-          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-           cp $export_symbols $output_objdir/$soname.def;
-          else
-           echo EXPORTS > $output_objdir/$soname.def;
-           cat $export_symbols >> $output_objdir/$soname.def;
-          fi~
-          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-        else
-          _LT_TAGVAR(ld_shlibs, $1)=no
-        fi
-        ;;
-      darwin* | rhapsody*)
-        _LT_DARWIN_LINKER_FEATURES($1)
-       ;;
-
-      dgux*)
-        case $cc_basename in
-          ec++*)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          ghcx*)
-           # Green Hills C++ Compiler
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          *)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-        esac
-        ;;
-
-      freebsd[[12]]*)
-        # C++ shared libraries reported to be fairly broken before
-       # switch to ELF
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      freebsd-elf*)
-        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        ;;
-
-      freebsd* | dragonfly*)
-        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-        # conventions
-        _LT_TAGVAR(ld_shlibs, $1)=yes
-        ;;
-
-      gnu*)
-        ;;
-
-      hpux9*)
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-        _LT_TAGVAR(hardcode_direct, $1)=yes
-        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-                                            # but as the default
-                                            # location of the library.
-
-        case $cc_basename in
-          CC*)
-            # FIXME: insert proper C++ library support
-            _LT_TAGVAR(ld_shlibs, $1)=no
-            ;;
-          aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            # Commands to make compiler produce verbose output that lists
-            # what "hidden" libraries, object files and flags are used when
-            # linking a shared library.
-            #
-            # There doesn't appear to be a way to prevent this compiler from
-            # explicitly linking system object files so we need to strip them
-            # from the output so that they don't get included in the library
-            # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-            ;;
-          *)
-            if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            else
-              # FIXME: insert proper C++ library support
-              _LT_TAGVAR(ld_shlibs, $1)=no
-            fi
-            ;;
-        esac
-        ;;
-
-      hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-          case $host_cpu in
-            hppa*64*|ia64*)
-              ;;
-            *)
-             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-              ;;
-          esac
-        fi
-        case $host_cpu in
-          hppa*64*|ia64*)
-            _LT_TAGVAR(hardcode_direct, $1)=no
-            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-            ;;
-          *)
-            _LT_TAGVAR(hardcode_direct, $1)=yes
-            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-                                                # but as the default
-                                                # location of the library.
-            ;;
-        esac
-
-        case $cc_basename in
-          CC*)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          aCC*)
-           case $host_cpu in
-             hppa*64*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-               ;;
-             ia64*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-               ;;
-             *)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-               ;;
-           esac
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           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 "X$list" | $Xsed'
-           ;;
-          *)
-           if test "$GXX" = yes; then
-             if test $with_gnu_ld = no; then
-               case $host_cpu in
-                 hppa*64*)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-                   ;;
-                 ia64*)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-                   ;;
-                 *)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-                   ;;
-               esac
-             fi
-           else
-             # FIXME: insert proper C++ library support
-             _LT_TAGVAR(ld_shlibs, $1)=no
-           fi
-           ;;
-        esac
-        ;;
-
-      interix[[3-9]]*)
-       _LT_TAGVAR(hardcode_direct, $1)=no
-       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-       # Instead, shared libraries are loaded at an image base (0x10000000 by
-       # default) and relocated if they conflict, which is a slow very memory
-       # consuming and fragmenting process.  To avoid this, we pick a random,
-       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-       ;;
-      irix5* | irix6*)
-        case $cc_basename in
-          CC*)
-           # SGI C++
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
-           # Archives containing C++ object files must be created using
-           # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-           # necessary to make sure instantiated templates are included
-           # in the archive.
-           _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-           ;;
-          *)
-           if test "$GXX" = yes; then
-             if test "$with_gnu_ld" = no; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-             else
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
-             fi
-           fi
-           _LT_TAGVAR(link_all_deplibs, $1)=yes
-           ;;
-        esac
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(inherit_rpath, $1)=yes
-        ;;
-
-      linux* | k*bsd*-gnu)
-        case $cc_basename in
-          KCC*)
-           # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-           # KCC will only create a shared library if the output file
-           # ends with ".so" (or ".sl" for HP-UX), so rename the library
-           # to its proper name (with version) after linking.
-           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           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 "X$list" | $Xsed'
-
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-           # Archives containing C++ object files must be created using
-           # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-           _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-           ;;
-         icpc* | ecpc* )
-           # Intel C++
-           with_gnu_ld=yes
-           # version 8.0 and above of icpc choke on multiply defined symbols
-           # if we add $predep_objects and $postdep_objects, however 7.1 and
-           # earlier do not add the objects themselves.
-           case `$CC -V 2>&1` in
-             *"Version 7."*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-               ;;
-             *)  # Version 8.0 or newer
-               tmp_idyn=
-               case $host_cpu in
-                 ia64*) tmp_idyn=' -i_dynamic';;
-               esac
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-               ;;
-           esac
-           _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-           ;;
-          pgCC* | pgcpp*)
-            # Portland Group C++ compiler
-           case `$CC -V` in
-           *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
-             _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-               compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
-             _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
-               $RANLIB $oldlib'
-             _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-             _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-             ;;
-           *) # Version 6 will use weak symbols
-             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-             ;;
-           esac
-
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-            ;;
-         cxx*)
-           # Compaq C++
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-           runpath_var=LD_RUN_PATH
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
-           ;;
-         xl*)
-           # IBM XL 8.0 on PPC, with GNU ld
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           if test "x$supports_anon_versioning" = xyes; then
-             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-               echo "local: *; };" >> $output_objdir/$libname.ver~
-               $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-           fi
-           ;;
-         *)
-           case `$CC -V 2>&1 | sed 5q` in
-           *Sun\ C*)
-             # Sun C++ 5.9
-             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-             _LT_TAGVAR(compiler_needs_object, $1)=yes
-
-             # Not sure whether something based on
-             # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
-             # would be better.
-             output_verbose_link_cmd='echo'
-
-             # Archives containing C++ object files must be created using
-             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-             # necessary to make sure instantiated templates are included
-             # in the archive.
-             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-             ;;
-           esac
-           ;;
-       esac
-       ;;
-
-      lynxos*)
-        # FIXME: insert proper C++ library support
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       ;;
-
-      m88k*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-       ;;
-
-      mvs*)
-        case $cc_basename in
-          cxx*)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-         *)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-       esac
-       ;;
-
-      netbsd*)
-        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-         wlarc=
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-         _LT_TAGVAR(hardcode_direct, $1)=yes
-         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       fi
-       # Workaround some broken pre-1.5 toolchains
-       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-       ;;
-
-      *nto* | *qnx*)
-        _LT_TAGVAR(ld_shlibs, $1)=yes
-       ;;
-
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       ;;
-
-      openbsd*)
-       if test -f /usr/libexec/ld.so; then
-         _LT_TAGVAR(hardcode_direct, $1)=yes
-         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-         fi
-         output_verbose_link_cmd=echo
-       else
-         _LT_TAGVAR(ld_shlibs, $1)=no
-       fi
-       ;;
-
-      osf3* | osf4* | osf5*)
-        case $cc_basename in
-          KCC*)
-           # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-           # KCC will only create a shared library if the output file
-           # ends with ".so" (or ".sl" for HP-UX), so rename the library
-           # to its proper name (with version) after linking.
-           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-           # Archives containing C++ object files must be created using
-           # the KAI C++ compiler.
-           case $host in
-             osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
-             *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
-           esac
-           ;;
-          RCC*)
-           # Rational C++ 2.4.1
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          cxx*)
-           case $host in
-             osf3*)
-               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-               ;;
-             *)
-               _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-               _LT_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~
-                 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
-                 $RM $lib.exp'
-               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-               ;;
-           esac
-
-           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
-           ;;
-         *)
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-             case $host in
-               osf3*)
-                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-                 ;;
-               *)
-                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-                 ;;
-             esac
-
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-             # Commands to make compiler produce verbose output that lists
-             # what "hidden" libraries, object files and flags are used when
-             # linking a shared library.
-             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
-           else
-             # FIXME: insert proper C++ library support
-             _LT_TAGVAR(ld_shlibs, $1)=no
-           fi
-           ;;
-        esac
-        ;;
-
-      psos*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      sunos4*)
-        case $cc_basename in
-          CC*)
-           # Sun C++ 4.x
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          lcc*)
-           # Lucid
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          *)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-        esac
-        ;;
-
-      solaris*)
-        case $cc_basename in
-          CC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
-           _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-             $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-           case $host_os in
-             solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-             *)
-               # The compiler driver will combine and reorder linker options,
-               # but understands `-z linker_flag'.
-               # Supported since Solaris 2.6 (maybe 2.5.1?)
-               _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
-               ;;
-           esac
-           _LT_TAGVAR(link_all_deplibs, $1)=yes
-
-           output_verbose_link_cmd='echo'
-
-           # Archives containing C++ object files must be created using
-           # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-           # necessary to make sure instantiated templates are included
-           # in the archive.
-           _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-           ;;
-          gcx*)
-           # Green Hills C++ Compiler
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-           # The C++ compiler must be used to create the archive.
-           _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-           ;;
-          *)
-           # GNU C++ compiler with Solaris linker
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-             if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-               # Commands to make compiler produce verbose output that lists
-               # what "hidden" libraries, object files and flags are used when
-               # linking a shared library.
-               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-             else
-               # g++ 2.7 appears to require `-G' NOT `-shared' on this
-               # platform.
-               _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-               # Commands to make compiler produce verbose output that lists
-               # what "hidden" libraries, object files and flags are used when
-               # linking a shared library.
-               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-             fi
-
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-             case $host_os in
-               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-               *)
-                 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-                 ;;
-             esac
-           fi
-           ;;
-        esac
-        ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      case $cc_basename in
-        CC*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-      esac
-      ;;
-
-      sysv5* | sco3.2v5* | sco5v6*)
-       # Note: We can NOT use -z defs as we might desire, because we do not
-       # link with -lc, and that would cause any symbols used from libc to
-       # always be unresolved, which means just about no library would
-       # ever link correctly.  If we're not using GNU ld we use -z text
-       # though, which does catch some bad symbols but isn't as heavy-handed
-       # as -z defs.
-       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
-       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-       _LT_TAGVAR(link_all_deplibs, $1)=yes
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-       runpath_var='LD_RUN_PATH'
-
-       case $cc_basename in
-          CC*)
-           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           ;;
-         *)
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           ;;
-       esac
-      ;;
-
-      tandem*)
-        case $cc_basename in
-          NCC*)
-           # NonStop-UX NCC 3.20
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          *)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-        esac
-        ;;
-
-      vxworks*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      *)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-    esac
-
-    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-    _LT_TAGVAR(GCC, $1)="$GXX"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_SYS_HIDDEN_LIBDEPS($1)
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  CC=$lt_save_CC
-  LDCXX=$LD
-  LD=$lt_save_LD
-  GCC=$lt_save_GCC
-  with_gnu_ld=$lt_save_with_gnu_ld
-  lt_cv_path_LDCXX=$lt_cv_path_LD
-  lt_cv_path_LD=$lt_save_path_LD
-  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library.  It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
-      subroutine foo
-      implicit none
-      integer*4 a
-      a=0
-      return
-      end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
-      subroutine foo
-      implicit none
-      integer a
-      a=0
-      return
-      end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
-  private int a;
-  public void bar (void) {
-    a = 0;
-  }
-};
-_LT_EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
-        prev=$p
-        continue
-       else
-        prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        case $p in
-        -L* | -R*)
-          # Internal compiler library paths should come after those
-          # provided the user.  The postdeps already come after the
-          # user supplied libs so there is no need to process them.
-          if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
-            _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-          else
-            _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-          fi
-          ;;
-        # The "-l" case would never come before the object being
-        # linked, so don't bother handling this case.
-        esac
-       else
-        if test -z "$_LT_TAGVAR(postdeps, $1)"; then
-          _LT_TAGVAR(postdeps, $1)="${prev}${p}"
-        else
-          _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
-        fi
-       fi
-       ;;
-
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-        pre_test_object_deps_done=yes
-        continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
-          _LT_TAGVAR(predep_objects, $1)="$p"
-        else
-          _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
-        fi
-       else
-        if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
-          _LT_TAGVAR(postdep_objects, $1)="$p"
-        else
-          _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
-        fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  _LT_TAGVAR(predep_objects,$1)=
-  _LT_TAGVAR(postdep_objects,$1)=
-  _LT_TAGVAR(postdeps,$1)=
-  ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
-    [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
-    [Dependencies to place before and after the objects being linked to
-    create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
-    [The library search path used internally by the compiler when linking
-    a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code="\
-      program t
-      end
-"
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
-  lt_save_GCC=$GCC
-  CC=${F77-"f77"}
-  compiler=$CC
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-  GCC=$G77
-  if test -n "$compiler"; then
-    AC_MSG_CHECKING([if libtool supports shared libraries])
-    AC_MSG_RESULT([$can_build_shared])
-
-    AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
-
-    # On AIX, shared libraries and static libraries use the same namespace, and
-    # are all built from PIC.
-    case $host_os in
-      aix3*)
-        test "$enable_shared" = yes && enable_static=no
-        if test -n "$RANLIB"; then
-          archive_cmds="$archive_cmds~\$RANLIB \$lib"
-          postinstall_cmds='$RANLIB $lib'
-        fi
-        ;;
-      aix[[4-9]]*)
-       if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-         test "$enable_shared" = yes && enable_static=no
-       fi
-        ;;
-    esac
-    AC_MSG_RESULT([$enable_shared])
-
-    AC_MSG_CHECKING([whether to build static libraries])
-    # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
-    AC_MSG_RESULT([$enable_static])
-
-    _LT_TAGVAR(GCC, $1)="$G77"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code="\
-      program t
-      end
-"
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
-  lt_save_GCC=$GCC
-  CC=${FC-"f95"}
-  compiler=$CC
-  GCC=$ac_cv_fc_compiler_gnu
-
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-
-  if test -n "$compiler"; then
-    AC_MSG_CHECKING([if libtool supports shared libraries])
-    AC_MSG_RESULT([$can_build_shared])
-
-    AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
-
-    # On AIX, shared libraries and static libraries use the same namespace, and
-    # are all built from PIC.
-    case $host_os in
-      aix3*)
-        test "$enable_shared" = yes && enable_static=no
-        if test -n "$RANLIB"; then
-          archive_cmds="$archive_cmds~\$RANLIB \$lib"
-          postinstall_cmds='$RANLIB $lib'
-        fi
-        ;;
-      aix[[4-9]]*)
-       if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-         test "$enable_shared" = yes && enable_static=no
-       fi
-        ;;
-    esac
-    AC_MSG_RESULT([$enable_shared])
-
-    AC_MSG_CHECKING([whether to build static libraries])
-    # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
-    AC_MSG_RESULT([$enable_static])
-
-    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_SYS_HIDDEN_LIBDEPS($1)
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-
-  _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC="$lt_save_CC"
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
-  :
-  _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
-  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
-    [AC_CHECK_TOOL(GCJ, gcj,)
-      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-      AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
-    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
-  cat /dev/null > conftest.in
-  lt_ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
-  # Check for GNU sed and select it if it is found.
-  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
-    lt_cv_path_SED=$lt_ac_sed
-    break
-  fi
-  while true; do
-    cat conftest.in conftest.in >conftest.tmp
-    mv conftest.tmp conftest.in
-    cp conftest.in conftest.nl
-    echo >>conftest.nl
-    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
-    cmp -s conftest.out conftest.nl || break
-    # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
-    lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
-      lt_ac_max=$lt_ac_count
-      lt_cv_path_SED=$lt_ac_sed
-    fi
-  done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  lt_unset=unset
-else
-  lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  lt_SP2NL='tr \040 \012'
-  lt_NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  lt_SP2NL='tr \100 \n'
-  lt_NL2SP='tr \r\n \100\100'
-  ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $[*] ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
-
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$[@]"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]+=\$[2]"
-}
-_LT_EOF
-    ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
-    ;;
-  esac
-])
-
-# Helper functions for option handling.                    -*- Autoconf -*-
-#
-#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltoptions.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
-# ------------------------------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
-# ---------------------------------------
-# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
-# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
-# saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
-        _LT_MANGLE_DEFUN([$1], [$2]),
-    [m4_warning([Unknown $1 option `$2'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
-# ------------------------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
-
-
-# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
-# -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
-# are set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
-           [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
-                     [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
-# ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
-# with MACRO-NAME.  If any OPTION has a matching handler declared with
-# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
-# the unknown option and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
-    [_LT_SET_OPTION([$1], _LT_Option)])
-
-m4_if([$1],[LT_INIT],[
-  dnl
-  dnl Simply set some default values (i.e off) if boolean options were not
-  dnl specified:
-  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
-  ])
-  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
-  ])
-  dnl
-  dnl If no reference was made to various pairs of opposing options, then
-  dnl we run the default mode handler for the pair.  For example, if neither
-  dnl `shared' nor `disable-shared' was passed, we enable building of shared
-  dnl archives by default:
-  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
-  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
-  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
-  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-                  [_LT_ENABLE_FAST_INSTALL])
-  ])
-])# _LT_SET_OPTIONS
-
-
-
-# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
-# -----------------------------------------
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
-
-
-# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
-# -----------------------------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([LT_INIT], [dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([LT_INIT], [win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-  ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS],      [0], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-_LT_SET_OPTION([LT_INIT], [win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
-    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-       [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_shared=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
-    _LT_DECL([build_libtool_libs], [enable_shared], [0],
-       [Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
-])
-
-AC_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], [disable-shared])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
-    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-       [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_static=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
-    _LT_DECL([build_old_libs], [enable_static], [0],
-       [Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
-])
-
-AC_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], [disable-static])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
-    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_fast_install=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
-        [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic],
-       [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([LT_INIT], [pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
-
-
-m4_define([_LTDL_MODE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
-                [m4_define([_LTDL_MODE], [nonrecursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [recursive],
-                [m4_define([_LTDL_MODE], [recursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [subproject],
-                [m4_define([_LTDL_MODE], [subproject])])
-
-m4_define([_LTDL_TYPE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [installable],
-                [m4_define([_LTDL_TYPE], [installable])])
-LT_OPTION_DEFINE([LTDL_INIT], [convenience],
-                [m4_define([_LTDL_TYPE], [convenience])])
-
-# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
-# versions in m4sugar had bugs.
-m4_define([lt_join],
-[m4_if([$#], [1], [],
-       [$#], [2], [[$2]],
-       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
-m4_define([_lt_join],
-[m4_if([$#$2], [2], [],
-       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
-       [$#], 1, [],
-       [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_append(MACRO-NAME, STRING, [SEPARATOR])
-# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
-# Note that neither SEPARATOR nor STRING are expanded; they are appended
-# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
-# No SEPARATOR is output if MACRO-NAME was previously undefined (different
-# than defined and empty).
-#
-# This macro is needed until we can rely on Autoconf 2.62, since earlier
-# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
-m4_define([lt_append],
-[m4_define([$1],
-          m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
-
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-# Needed until we can rely on m4_combine added in Autoconf 2.62.
-m4_define([lt_combine],
-[m4_if(m4_eval([$# > 3]), [1],
-       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
-[[m4_foreach([_Lt_prefix], [$2],
-            [m4_foreach([_Lt_suffix],
-               ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
-       [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
-         [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
-                [lt_append([$1], [$2], [$3])$4],
-                [$5])],
-         [lt_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$3])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
-       m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
-    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
-       [$5],
-    [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
-  [lt_join(m4_quote(m4_default([$4], [[, ]])),
-           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
-                     [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
-
-# ltversion.m4 -- version numbers                      -*- Autoconf -*-
-#
-#   Copyright (C) 2004 Free Software Foundation, Inc.
-#   Written by Scott James Remnant, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# Generated from ltversion.in.
-
-# serial 3012 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.2.6])
-m4_define([LT_PACKAGE_REVISION], [1.3012])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6'
-macro_revision='1.3012'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
-
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
-#
-#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
-#   Written by Scott James Remnant, 2004.
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 4 lt~obsolete.m4
-
-# These exist entirely to fool aclocal when bootstrapping libtool.
-#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
-# which have later been changed to m4_define as they aren't part of the
-# exported API, or moved to Autoconf or Automake where they belong.
-#
-# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
-# using a macro with the same name in our local m4/libtool.m4 it'll
-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
-# and doesn't know about Autoconf macros at all.)
-#
-# So we provide this file, which has a silly filename so it's always
-# included after everything else.  This provides aclocal with the
-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
-# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
-#
-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
-# Yes, that means every name once taken will need to remain here until
-# we give up compatibility with versions before 1.7, at which point
-# we need to keep only those names which we still refer to.
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
-
-m4_ifndef([AC_LIBTOOL_LINKER_OPTION],  [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
-m4_ifndef([AC_PROG_EGREP],             [AC_DEFUN([AC_PROG_EGREP])])
-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],        [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_AC_SHELL_INIT],         [AC_DEFUN([_LT_AC_SHELL_INIT])])
-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],    [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
-m4_ifndef([_LT_PROG_LTMAIN],           [AC_DEFUN([_LT_PROG_LTMAIN])])
-m4_ifndef([_LT_AC_TAGVAR],             [AC_DEFUN([_LT_AC_TAGVAR])])
-m4_ifndef([AC_LTDL_ENABLE_INSTALL],    [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
-m4_ifndef([AC_LTDL_PREOPEN],           [AC_DEFUN([AC_LTDL_PREOPEN])])
-m4_ifndef([_LT_AC_SYS_COMPILER],       [AC_DEFUN([_LT_AC_SYS_COMPILER])])
-m4_ifndef([_LT_AC_LOCK],               [AC_DEFUN([_LT_AC_LOCK])])
-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],        [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],    [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],    [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
-m4_ifndef([AC_LIBTOOL_OBJDIR],         [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
-m4_ifndef([AC_LTDL_OBJDIR],            [AC_DEFUN([AC_LTDL_OBJDIR])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],  [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
-m4_ifndef([AC_PATH_MAGIC],             [AC_DEFUN([AC_PATH_MAGIC])])
-m4_ifndef([AC_PROG_LD_GNU],            [AC_DEFUN([AC_PROG_LD_GNU])])
-m4_ifndef([AC_PROG_LD_RELOAD_FLAG],    [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
-m4_ifndef([AC_DEPLIBS_CHECK_METHOD],   [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
-m4_ifndef([LT_AC_PROG_EGREP],          [AC_DEFUN([LT_AC_PROG_EGREP])])
-m4_ifndef([LT_AC_PROG_SED],            [AC_DEFUN([LT_AC_PROG_SED])])
-m4_ifndef([_LT_CC_BASENAME],           [AC_DEFUN([_LT_CC_BASENAME])])
-m4_ifndef([_LT_COMPILER_BOILERPLATE],  [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
-m4_ifndef([_LT_LINKER_BOILERPLATE],    [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
-m4_ifndef([_AC_PROG_LIBTOOL],          [AC_DEFUN([_AC_PROG_LIBTOOL])])
-m4_ifndef([AC_LIBTOOL_SETUP],          [AC_DEFUN([AC_LIBTOOL_SETUP])])
-m4_ifndef([_LT_AC_CHECK_DLFCN],                [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],     [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
-m4_ifndef([_LT_AC_TAGCONFIG],          [AC_DEFUN([_LT_AC_TAGCONFIG])])
-m4_ifndef([AC_DISABLE_FAST_INSTALL],   [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
-m4_ifndef([_LT_AC_LANG_CXX],           [AC_DEFUN([_LT_AC_LANG_CXX])])
-m4_ifndef([_LT_AC_LANG_F77],           [AC_DEFUN([_LT_AC_LANG_F77])])
-m4_ifndef([_LT_AC_LANG_GCJ],           [AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC],             [AC_DEFUN([AC_LIBTOOL_RC])])
-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
-m4_ifndef([_LT_AC_LANG_C_CONFIG],      [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
-m4_ifndef([_LT_AC_LANG_CXX_CONFIG],    [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
-m4_ifndef([_LT_AC_LANG_F77_CONFIG],    [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],    [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
-m4_ifndef([_LT_AC_LANG_RC_CONFIG],     [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
-m4_ifndef([AC_LIBTOOL_CONFIG],         [AC_DEFUN([AC_LIBTOOL_CONFIG])])
-m4_ifndef([_LT_AC_FILE_LTDLL_C],       [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
-
-# nls.m4 serial 3 (gettext-0.15)
-dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-
-AC_PREREQ(2.50)
-
-AC_DEFUN([AM_NLS],
-[
-  AC_MSG_CHECKING([whether NLS is requested])
-  dnl Default is enabled NLS
-  AC_ARG_ENABLE(nls,
-    [  --disable-nls           do not use Native Language Support],
-    USE_NLS=$enableval, USE_NLS=yes)
-  AC_MSG_RESULT($USE_NLS)
-  AC_SUBST(USE_NLS)
-])
-
 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -8652,10 +31,10 @@ AC_DEFUN([AM_NLS],
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.10'
+[am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10.2], [],
+m4_if([$1], [1.11], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -8671,7 +50,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.2])dnl
+[AM_AUTOMAKE_VERSION([1.11])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -8731,14 +110,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 9
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -8751,6 +130,7 @@ AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -8764,14 +144,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
+# serial 10
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -8828,6 +208,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -8845,7 +235,17 @@ AC_CACHE_CHECK([dependency style of $depcc],
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -8855,19 +255,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
        break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -9005,13 +409,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008 Free Software Foundation, Inc.
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 13
+# serial 16
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -9028,7 +432,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.60])dnl
+[AC_PREREQ([2.62])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -9079,8 +483,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
@@ -9088,24 +492,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+                 [_AM_DEPENDENCIES(CC)],
+                 [define([AC_PROG_CC],
+                         defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+                 [_AM_DEPENDENCIES(CXX)],
+                 [define([AC_PROG_CXX],
+                         defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                  [_AM_DEPENDENCIES(OBJC)],
-                  [define([AC_PROG_OBJC],
-                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+                 [_AM_DEPENDENCIES(OBJC)],
+                 [define([AC_PROG_OBJC],
+                         defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
@@ -9128,7 +545,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -9139,7 +556,14 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 AC_SUBST(install_sh)])
 
 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
@@ -9166,27 +590,38 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
 AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode is disabled by default
-  AC_ARG_ENABLE(maintainer-mode,
-[  --enable-maintainer-mode  enable make rules and dependencies not useful
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [disable], [m4_define([am_maintainer_other], [enable])],
+       [m4_define([am_maintainer_other], [enable])
+        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer],
-      USE_MAINTAINER_MODE=$enableval,
-      USE_MAINTAINER_MODE=no)
+      [USE_MAINTAINER_MODE=$enableval],
+      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
   MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST(MAINT)dnl
+  AC_SUBST([MAINT])dnl
 ]
 )
 
@@ -9194,13 +629,13 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -9209,7 +644,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-       @echo done
+       @echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -9219,24 +654,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 AC_SUBST([am__include])
 AC_SUBST([am__quote])
@@ -9244,16 +679,51 @@ AC_MSG_RESULT([$_am_result])
 rm -f confinc confmf
 ])
 
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 6
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -9270,7 +740,14 @@ AC_SUBST($1)])
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -9339,7 +816,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -9370,13 +847,11 @@ AC_DEFUN([_AM_IF_OPTION],
 # numbers and dots only.
 AC_DEFUN([AM_PATH_PYTHON],
  [
-  dnl Find a Python interpreter.  Python versions prior to 1.5 are not
-  dnl supported because the default installation locations changed from
-  dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
-  dnl in 1.5.
+  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
+  dnl supported. (2.0 was released on October 16, 2000).
   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-                    [python python2 python2.5 python2.4 python2.3 python2.2 dnl
-python2.1 python2.0 python1.6 python1.5])
+                    [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
+python2.1 python2.0])
 
   m4_if([$1],[],[
     dnl No version check is needed.
@@ -9423,7 +898,7 @@ python2.1 python2.0 python1.6 python1.5])
   dnl library.
 
   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
-    [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
+    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
 
   dnl Use the values of $prefix and $exec_prefix for the corresponding
@@ -9438,7 +913,7 @@ python2.1 python2.0 python1.6 python1.5])
   dnl to know which OS platform Python thinks this is.
 
   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
-    [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
+    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
 
 
@@ -9455,12 +930,19 @@ python2.1 python2.0 python1.6 python1.5])
     [am_cv_python_pythondir],
     [if test "x$prefix" = xNONE
      then
-       py_prefix_arg=
+       am_py_prefix=$ac_default_prefix
      else
-       py_prefix_arg=",prefix='$prefix'"
+       am_py_prefix=$prefix
      fi
-     am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0$py_prefix_arg)" -n -q install $py_prefix_arg 2>/dev/null ||
-     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+     case $am_cv_python_pythondir in
+     $am_py_prefix*)
+       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
+       ;;
+     esac
+    ])
   AC_SUBST([pythondir], [$am_cv_python_pythondir])
 
   dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
@@ -9478,12 +960,19 @@ python2.1 python2.0 python1.6 python1.5])
     [am_cv_python_pyexecdir],
     [if test "x$exec_prefix" = xNONE
      then
-       py_exec_prefix_arg=$py_prefix_arg
+       am_py_exec_prefix=$am_py_prefix
      else
-       py_exec_prefix_arg=",prefix='$exec_prefix'"
+       am_py_exec_prefix=$exec_prefix
      fi
-     am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0$py_exec_prefix_arg)" -n -q install $py_exec_prefix_arg 2>/dev/null ||
-     echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
+     echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+     case $am_cv_python_pyexecdir in
+     $am_py_exec_prefix*)
+       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
+       ;;
+     esac
+    ])
   AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
 
   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
@@ -9503,15 +992,16 @@ python2.1 python2.0 python1.6 python1.5])
 # Run ACTION-IF-FALSE otherwise.
 # This test uses sys.hexversion instead of the string equivalent (first
 # word of sys.version), in order to cope with versions such as 2.2c1.
-# hexversion has been introduced in Python 1.5.2; it's probably not
-# worth to support older versions (1.5.1 was released on October 31, 1998).
+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
- [prog="import sys, string
+ [prog="import sys
 # split strings by '.' and convert to numeric.  Append some zeros
 # because we need at least 4 digits for the hex conversion.
-minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
 minverhex = 0
-for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
 sys.exit(sys.hexversion < minverhex)"
   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
 
@@ -9534,14 +1024,14 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_SANITY_CHECK
 # ---------------
@@ -9550,16 +1040,29 @@ AC_DEFUN([AM_SANITY_CHECK],
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$[*]" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$[*]" != "X $srcdir/configure conftest.file" \
@@ -9584,6 +1087,33 @@ Check your system clock])
 fi
 AC_MSG_RESULT(yes)])
 
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -9612,18 +1142,25 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 # This macro is traced by Automake.
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
@@ -9720,4 +1257,38 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-m4_include([acinclude.m4])
+m4_include([m4/acinclude.m4])
+m4_include([m4/codeset.m4])
+m4_include([m4/gettext.m4])
+m4_include([m4/glibc2.m4])
+m4_include([m4/glibc21.m4])
+m4_include([m4/iconv.m4])
+m4_include([m4/intdiv0.m4])
+m4_include([m4/intmax.m4])
+m4_include([m4/inttypes-pri.m4])
+m4_include([m4/inttypes.m4])
+m4_include([m4/inttypes_h.m4])
+m4_include([m4/isc-posix.m4])
+m4_include([m4/lcmessage.m4])
+m4_include([m4/lib-ld.m4])
+m4_include([m4/lib-link.m4])
+m4_include([m4/lib-prefix.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/longdouble.m4])
+m4_include([m4/longlong.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
+m4_include([m4/nls.m4])
+m4_include([m4/po.m4])
+m4_include([m4/printf-posix.m4])
+m4_include([m4/progtest.m4])
+m4_include([m4/signed.m4])
+m4_include([m4/size_max.m4])
+m4_include([m4/stdint_h.m4])
+m4_include([m4/uintmax_t.m4])
+m4_include([m4/ulonglong.m4])
+m4_include([m4/wchar_t.m4])
+m4_include([m4/wint_t.m4])
+m4_include([m4/xsize.m4])
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..b524ca3
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+libtoolize
+autoreconf --force --install --verbose -I config -I m4
index d975032c0d4628d6d83feb39f12b0dfeb01747e7..70beba1695a31bad90387bd7360056c773a5694d 100644 (file)
@@ -3,8 +3,11 @@
 if BUILD_TCL
 SUB_tcl = tcl
 endif
+if BUILD_LUA
+SUB_lua = lua
+endif
 
-SUBDIRS = $(SUB_tcl)
+SUBDIRS = $(SUB_tcl) $(SUB_lua)
 
 # the following files are not mentioned in any other Makefile
 EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-piped/RRDp.pm perl-piped/t/base.t \
@@ -17,18 +20,18 @@ EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-p
 all-local:  @COMP_PERL@ @COMP_RUBY@ @COMP_PYTHON@
 
 install-data-local:
-       test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true
-       test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true
-       test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true
-       test -d python/build && cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py install --skip-build --prefix=$(DESTDIR)$(prefix) --exec-prefix=$(DESTDIR)$(exec_prefix) || true
+       $(AM_V_GEN)test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true
+       $(AM_V_GEN)test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true
+       $(AM_V_GEN)test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true
+       $(AM_V_GEN)test -d python/build && cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py install --skip-build --prefix=$(DESTDIR)$(prefix) --exec-prefix=$(DESTDIR)$(exec_prefix) || true
 
-# rules for buildung the ruby module
+# rules for building the ruby module
 # RUBYARCHDIR= is to work around in a makefile quirk not sure 
 # it is is the right thing todo, but it makes rrdtool build on freebsd as well
 ruby: 
        cd ruby && $(RUBY) extconf.rb && $(MAKE) EPREFIX=$(exec_prefix) $(RUBY_MAKE_OPTIONS) RUBYARCHDIR=
 
-# rules for buildung the pyton module
+# rules for building the pyton module
 python:
        cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py build_ext --rpath=$(libdir) && env LIBDIR=../../src/.libs $(PYTHON) setup.py build
 
index c381ef2018181211d5dae9ea194b729f3e1f4e3b..6bbdfbd8ad877791ed28c72650b30d9ddda60d23 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.11 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,8 +16,9 @@
 @SET_MAKE@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -35,13 +37,37 @@ target_triplet = @target@
 subdir = bindings
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
+       $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
+       $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \
+       $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
+       $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
+       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/rrd_config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -53,24 +79,54 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        ps-recursive uninstall-recursive
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
 ETAGS = etags
 CTAGS = ctags
-DIST_SUBDIRS = tcl
+DIST_SUBDIRS = tcl lua
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
 ALL_LIBS = @ALL_LIBS@
-ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-CATALOGS = @CATALOGS@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+COMP_LUA = @COMP_LUA@
 COMP_PERL = @COMP_PERL@
 COMP_PYTHON = @COMP_PYTHON@
 COMP_RUBY = @COMP_RUBY@
@@ -89,37 +145,50 @@ ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
+GENCAT = @GENCAT@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_WPRINTF = @HAVE_WPRINTF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
 LIBVERS = @LIBVERS@
-LIB_LIBINTL = @LIB_LIBINTL@
 LIPO = @LIPO@
 LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
+LUA = @LUA@
+LUA_CFLAGS = @LUA_CFLAGS@
+LUA_DEFINES = @LUA_DEFINES@
+LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@
+LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@
+LUA_LFLAGS = @LUA_LFLAGS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
 MSGMERGE = @MSGMERGE@
 MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@
 MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@
@@ -150,10 +219,7 @@ PERL_VERSION = @PERL_VERSION@
 PKGCONFIG = @PKGCONFIG@
 POD2HTML = @POD2HTML@
 POD2MAN = @POD2MAN@
-POFILES = @POFILES@
 POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -185,8 +251,10 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
 TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
 TCL_VERSION = @TCL_VERSION@
 TROFF = @TROFF@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WERROR = @WERROR@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -250,7 +318,8 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 @BUILD_TCL_TRUE@SUB_tcl = tcl
-SUBDIRS = $(SUB_tcl)
+@BUILD_LUA_TRUE@SUB_lua = lua
+SUBDIRS = $(SUB_tcl) $(SUB_lua)
 
 # the following files are not mentioned in any other Makefile
 EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-piped/RRDp.pm perl-piped/t/base.t \
@@ -270,9 +339,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  bindings/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  bindings/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnu bindings/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -290,6 +359,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -321,7 +391,7 @@ $(RECURSIVE_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
@@ -355,16 +425,16 @@ $(RECURSIVE_CLEAN_TARGETS):
          else \
            local_target="$$target"; \
          fi; \
-         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done && test -z "$$fail"
 tags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
        done
 ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
        done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -379,7 +449,7 @@ tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
+       set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
@@ -391,7 +461,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
-             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
@@ -400,29 +470,34 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
          done | \
          $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
          $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -443,29 +518,44 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
            || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
-           distdir=`$(am__cd) $(distdir) && pwd`; \
-           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-           (cd $$subdir && \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
-               top_distdir="$$top_distdir" \
-               distdir="$$distdir/$$subdir" \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
                am__remove_distdir=: \
                am__skip_length_check=: \
+               am__skip_mode_fix=: \
                distdir) \
              || exit 1; \
          fi; \
@@ -495,6 +585,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -513,6 +604,8 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
@@ -521,18 +614,28 @@ install-data-am: install-data-local
 
 install-dvi: install-dvi-recursive
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-recursive
 
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-recursive
 
+install-pdf-am:
+
 install-ps: install-ps-recursive
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -553,8 +656,8 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
-       install-strip
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+       install-am install-strip tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am all-local check check-am clean clean-generic \
@@ -576,18 +679,18 @@ uninstall-am:
 all-local:  @COMP_PERL@ @COMP_RUBY@ @COMP_PYTHON@
 
 install-data-local:
-       test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true
-       test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true
-       test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true
-       test -d python/build && cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py install --skip-build --prefix=$(DESTDIR)$(prefix) --exec-prefix=$(DESTDIR)$(exec_prefix) || true
+       $(AM_V_GEN)test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true
+       $(AM_V_GEN)test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true
+       $(AM_V_GEN)test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true
+       $(AM_V_GEN)test -d python/build && cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py install --skip-build --prefix=$(DESTDIR)$(prefix) --exec-prefix=$(DESTDIR)$(exec_prefix) || true
 
-# rules for buildung the ruby module
+# rules for building the ruby module
 # RUBYARCHDIR= is to work around in a makefile quirk not sure 
 # it is is the right thing todo, but it makes rrdtool build on freebsd as well
 ruby: 
        cd ruby && $(RUBY) extconf.rb && $(MAKE) EPREFIX=$(exec_prefix) $(RUBY_MAKE_OPTIONS) RUBYARCHDIR=
 
-# rules for buildung the pyton module
+# rules for building the pyton module
 python:
        cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py build_ext --rpath=$(libdir) && env LIBDIR=../../src/.libs $(PYTHON) setup.py build
 
@@ -612,6 +715,7 @@ clean-local:
        test -f perl-shared/Makefile && rm -f perl-shared/Makefile || true 
        test -f ruby/Makefile && cd ruby && $(MAKE) clean && rm Makefile || true 
        test -d python/build && cd python &&  rm -rf build || true
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/bindings/lua/Makefile.am b/bindings/lua/Makefile.am
new file mode 100644 (file)
index 0000000..f1389d6
--- /dev/null
@@ -0,0 +1,66 @@
+# These files are not mentioned in any other Makefile
+# compat-5.1.lua is only necessary for Lua 5.0 in distros where
+# it's not already installed.
+EXTRA_DIST = README test.lua.bottom compat-5.1r5/compat-5.1.lua
+
+LIB_VERSION_INFO=0:0:0
+
+LUA                 = @LUA@
+LUA_INSTALL_CMOD    = @LUA_INSTALL_CMOD@
+LUA_INSTALL_LMOD    = @LUA_INSTALL_LMOD@
+LUA_DEFINES         = @LUA_DEFINES@
+LUA_CFLAGS          = @LUA_CFLAGS@
+LUA_LFLAGS          = @LUA_LFLAGS@
+
+CLEANFILES = rrd.o rrd.so test.lua test.rrd test.png
+
+lualibdir=$(LUA_INSTALL_CMOD)
+lualib_LTLIBRARIES = rrd.la
+if LUA_NEED_OUR_COMPAT51
+  rrd_la_SOURCES = rrdlua.c compat-5.1r5/compat-5.1.c compat-5.1r5/compat-5.1.h
+  compatdir = $(LUA_INSTALL_LMOD)
+  compat_DATA = compat-5.1r5/compat-5.1.lua
+else
+  rrd_la_SOURCES = rrdlua.c
+endif
+rrd_la_LIBADD = -lrrd -lm
+rrd_la_LDFLAGS = -module -version-info $(LIB_VERSION_INFO) $(LUA_LFLAGS) -L$(top_builddir)/src/.libs
+rrd_la_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir) $(LUA_CFLAGS) $(LUA_DEFINES) -DLIB_VERSION=\"$(LIB_VERSION)\"
+
+.PHONY: test.lua
+
+test.lua: test.lua.bottom
+       @echo "-- Created by Makefile." > test.lua
+       @echo "-- Test script adapted from the one in the Ruby binding." > test.lua
+       @echo >> test.lua
+if LUA50
+       @echo "--- compat-5.1.lua is only required for Lua 5.0 ----------" >> test.lua
+if LUA_NEED_OUR_COMPAT51
+if !LUA_SITE_LINSTALL
+       @echo "original_LUA_PATH = LUA_PATH" >> test.lua
+       @echo "-- try only compat-5.1.lua installed with RRDtool" >> test.lua
+       @echo "LUA_PATH = '$(LUA_INSTALL_LMOD)/?.lua'" >> test.lua
+endif
+endif
+       @echo "local r = pcall(require, 'compat-5.1')" >> test.lua
+       @echo "if not r then" >> test.lua
+       @echo "  print('** compat-5.1.lua not found')" >> test.lua
+       @echo "  os.exit(1)" >> test.lua
+       @echo "end" >> test.lua
+if LUA_NEED_OUR_COMPAT51
+if !LUA_SITE_LINSTALL
+       @echo "LUA_PATH = original_LUA_PATH" >> test.lua
+       @echo "original_LUA_PATH = nil" >> test.lua
+endif
+endif
+       @echo "----------------------------------------------------------" >> test.lua
+       @echo >> test.lua
+endif
+if !LUA_SITE_CINSTALL
+       @echo "package.cpath = '$(LUA_INSTALL_CMOD)/?.so;' .. package.cpath" >> test.lua
+endif
+       @cat test.lua.bottom >> test.lua
+
+test: test.lua
+       $(LUA) test.lua
+
diff --git a/bindings/lua/Makefile.in b/bindings/lua/Makefile.in
new file mode 100644 (file)
index 0000000..3083743
--- /dev/null
@@ -0,0 +1,731 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = bindings/lua
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
+       $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
+       $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \
+       $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
+       $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
+       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/rrd_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(lualibdir)" "$(DESTDIR)$(compatdir)"
+LTLIBRARIES = $(lualib_LTLIBRARIES)
+rrd_la_DEPENDENCIES =
+am__rrd_la_SOURCES_DIST = rrdlua.c compat-5.1r5/compat-5.1.c \
+       compat-5.1r5/compat-5.1.h
+@LUA_NEED_OUR_COMPAT51_FALSE@am_rrd_la_OBJECTS = rrd_la-rrdlua.lo
+@LUA_NEED_OUR_COMPAT51_TRUE@am_rrd_la_OBJECTS = rrd_la-rrdlua.lo \
+@LUA_NEED_OUR_COMPAT51_TRUE@   rrd_la-compat-5.1.lo
+rrd_la_OBJECTS = $(am_rrd_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+rrd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(rrd_la_CFLAGS) $(CFLAGS) \
+       $(rrd_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+SOURCES = $(rrd_la_SOURCES)
+DIST_SOURCES = $(am__rrd_la_SOURCES_DIST)
+DATA = $(compat_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALL_LIBS = @ALL_LIBS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMP_LUA = @COMP_LUA@
+COMP_PERL = @COMP_PERL@
+COMP_PYTHON = @COMP_PYTHON@
+COMP_RUBY = @COMP_RUBY@
+CORE_LIBS = @CORE_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GENCAT = @GENCAT@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_WPRINTF = @HAVE_WPRINTF@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBVERS = @LIBVERS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+LUA = @LUA@
+LUA_CFLAGS = @LUA_CFLAGS@
+LUA_DEFINES = @LUA_DEFINES@
+LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@
+LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@
+LUA_LFLAGS = @LUA_LFLAGS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@
+MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NROFF = @NROFF@
+NUMVERS = @NUMVERS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PERLCC = @PERLCC@
+PERLCCFLAGS = @PERLCCFLAGS@
+PERLFLAGS = @PERLFLAGS@
+PERLLD = @PERLLD@
+PERLLDFLAGS = @PERLLDFLAGS@
+PERL_CC = @PERL_CC@
+PERL_MAKE_OPTIONS = @PERL_MAKE_OPTIONS@
+PERL_VERSION = @PERL_VERSION@
+PKGCONFIG = @PKGCONFIG@
+POD2HTML = @POD2HTML@
+POD2MAN = @POD2MAN@
+POSUB = @POSUB@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RRDDOCDIR = @RRDDOCDIR@
+RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@
+RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@
+RRD_GETOPT_LONG = @RRD_GETOPT_LONG@
+RUBY = @RUBY@
+RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@
+TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@
+TCL_PACKAGE_DIR = @TCL_PACKAGE_DIR@
+TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
+TCL_PREFIX = @TCL_PREFIX@
+TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
+TCL_SHLIB_LD = @TCL_SHLIB_LD@
+TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
+TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
+TCL_VERSION = @TCL_VERSION@
+TROFF = @TROFF@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WERROR = @WERROR@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# These files are not mentioned in any other Makefile
+# compat-5.1.lua is only necessary for Lua 5.0 in distros where
+# it's not already installed.
+EXTRA_DIST = README test.lua.bottom compat-5.1r5/compat-5.1.lua
+LIB_VERSION_INFO = 0:0:0
+CLEANFILES = rrd.o rrd.so test.lua test.rrd test.png
+lualibdir = $(LUA_INSTALL_CMOD)
+lualib_LTLIBRARIES = rrd.la
+@LUA_NEED_OUR_COMPAT51_FALSE@rrd_la_SOURCES = rrdlua.c
+@LUA_NEED_OUR_COMPAT51_TRUE@rrd_la_SOURCES = rrdlua.c compat-5.1r5/compat-5.1.c compat-5.1r5/compat-5.1.h
+@LUA_NEED_OUR_COMPAT51_TRUE@compatdir = $(LUA_INSTALL_LMOD)
+@LUA_NEED_OUR_COMPAT51_TRUE@compat_DATA = compat-5.1r5/compat-5.1.lua
+rrd_la_LIBADD = -lrrd -lm
+rrd_la_LDFLAGS = -module -version-info $(LIB_VERSION_INFO) $(LUA_LFLAGS) -L$(top_builddir)/src/.libs
+rrd_la_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir) $(LUA_CFLAGS) $(LUA_DEFINES) -DLIB_VERSION=\"$(LIB_VERSION)\"
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/lua/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnu bindings/lua/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-lualibLTLIBRARIES: $(lualib_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(lualibdir)" || $(MKDIR_P) "$(DESTDIR)$(lualibdir)"
+       @list='$(lualib_LTLIBRARIES)'; test -n "$(lualibdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(lualibdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(lualibdir)"; \
+       }
+
+uninstall-lualibLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(lualib_LTLIBRARIES)'; test -n "$(lualibdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(lualibdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(lualibdir)/$$f"; \
+       done
+
+clean-lualibLTLIBRARIES:
+       -test -z "$(lualib_LTLIBRARIES)" || rm -f $(lualib_LTLIBRARIES)
+       @list='$(lualib_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+rrd.la: $(rrd_la_OBJECTS) $(rrd_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(rrd_la_LINK) -rpath $(lualibdir) $(rrd_la_OBJECTS) $(rrd_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_la-compat-5.1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_la-rrdlua.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+rrd_la-rrdlua.lo: rrdlua.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rrd_la_CFLAGS) $(CFLAGS) -MT rrd_la-rrdlua.lo -MD -MP -MF $(DEPDIR)/rrd_la-rrdlua.Tpo -c -o rrd_la-rrdlua.lo `test -f 'rrdlua.c' || echo '$(srcdir)/'`rrdlua.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rrd_la-rrdlua.Tpo $(DEPDIR)/rrd_la-rrdlua.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrdlua.c' object='rrd_la-rrdlua.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rrd_la_CFLAGS) $(CFLAGS) -c -o rrd_la-rrdlua.lo `test -f 'rrdlua.c' || echo '$(srcdir)/'`rrdlua.c
+
+rrd_la-compat-5.1.lo: compat-5.1r5/compat-5.1.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rrd_la_CFLAGS) $(CFLAGS) -MT rrd_la-compat-5.1.lo -MD -MP -MF $(DEPDIR)/rrd_la-compat-5.1.Tpo -c -o rrd_la-compat-5.1.lo `test -f 'compat-5.1r5/compat-5.1.c' || echo '$(srcdir)/'`compat-5.1r5/compat-5.1.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rrd_la-compat-5.1.Tpo $(DEPDIR)/rrd_la-compat-5.1.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='compat-5.1r5/compat-5.1.c' object='rrd_la-compat-5.1.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rrd_la_CFLAGS) $(CFLAGS) -c -o rrd_la-compat-5.1.lo `test -f 'compat-5.1r5/compat-5.1.c' || echo '$(srcdir)/'`compat-5.1r5/compat-5.1.c
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+install-compatDATA: $(compat_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(compatdir)" || $(MKDIR_P) "$(DESTDIR)$(compatdir)"
+       @list='$(compat_DATA)'; test -n "$(compatdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(compatdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(compatdir)" || exit $$?; \
+       done
+
+uninstall-compatDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(compat_DATA)'; test -n "$(compatdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(compatdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(compatdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs:
+       for dir in "$(DESTDIR)$(lualibdir)" "$(DESTDIR)$(compatdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-lualibLTLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-compatDATA install-lualibLTLIBRARIES
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-compatDATA uninstall-lualibLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-lualibLTLIBRARIES ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-compatDATA install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-lualibLTLIBRARIES install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-compatDATA uninstall-lualibLTLIBRARIES
+
+
+.PHONY: test.lua
+
+test.lua: test.lua.bottom
+       @echo "-- Created by Makefile." > test.lua
+       @echo "-- Test script adapted from the one in the Ruby binding." > test.lua
+       @echo >> test.lua
+@LUA50_TRUE@   @echo "--- compat-5.1.lua is only required for Lua 5.0 ----------" >> test.lua
+@LUA50_TRUE@@LUA_NEED_OUR_COMPAT51_TRUE@@LUA_SITE_LINSTALL_FALSE@      @echo "original_LUA_PATH = LUA_PATH" >> test.lua
+@LUA50_TRUE@@LUA_NEED_OUR_COMPAT51_TRUE@@LUA_SITE_LINSTALL_FALSE@      @echo "-- try only compat-5.1.lua installed with RRDtool" >> test.lua
+@LUA50_TRUE@@LUA_NEED_OUR_COMPAT51_TRUE@@LUA_SITE_LINSTALL_FALSE@      @echo "LUA_PATH = '$(LUA_INSTALL_LMOD)/?.lua'" >> test.lua
+@LUA50_TRUE@   @echo "local r = pcall(require, 'compat-5.1')" >> test.lua
+@LUA50_TRUE@   @echo "if not r then" >> test.lua
+@LUA50_TRUE@   @echo "  print('** compat-5.1.lua not found')" >> test.lua
+@LUA50_TRUE@   @echo "  os.exit(1)" >> test.lua
+@LUA50_TRUE@   @echo "end" >> test.lua
+@LUA50_TRUE@@LUA_NEED_OUR_COMPAT51_TRUE@@LUA_SITE_LINSTALL_FALSE@      @echo "LUA_PATH = original_LUA_PATH" >> test.lua
+@LUA50_TRUE@@LUA_NEED_OUR_COMPAT51_TRUE@@LUA_SITE_LINSTALL_FALSE@      @echo "original_LUA_PATH = nil" >> test.lua
+@LUA50_TRUE@   @echo "----------------------------------------------------------" >> test.lua
+@LUA50_TRUE@   @echo >> test.lua
+@LUA_SITE_CINSTALL_FALSE@      @echo "package.cpath = '$(LUA_INSTALL_CMOD)/?.so;' .. package.cpath" >> test.lua
+       @cat test.lua.bottom >> test.lua
+
+test: test.lua
+       $(LUA) test.lua
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/bindings/lua/README b/bindings/lua/README
new file mode 100644 (file)
index 0000000..a42339d
--- /dev/null
@@ -0,0 +1,68 @@
+RRDLua is a Lua module for RRD functions.
+
+- Configuration
+
+  From the top dir of RRDtool package, run "./configure", or
+  "./configure --enable-lua-site-install" if you prefer to install in
+  Lua's search path.
+
+ You should have lua 5.0, or superior, and respective lua-dev packages
+ installed before executing configure.
+
+- Compilation and installation
+
+ Run 'make' and 'sudo make install'. If you don't enable lua-site-install,
+ the Lua modules will be installed together with RRDtool, under the subdir
+ <INSTALL_PREFIX>lib/lua/<lua_version>.
+
+- Testing
+
+ Install RRDtool first, as above. Then, enter the bindings/lua dir, run
+ 'make test' and use your preferred viewer to display the just created
+ 'test.png'. If you can read "Enjoy Lua RRDtool module!" on the picture,
+ everything went fine.
+
+- Using with Lua 5.1
+
+ Start your programs with:
+
+  ------..-----------------------------------------------------------
+  package.cpath = '<INSTALL_PREFIX/lib/lua/5.1/?.so;' ..
+                  package.cpath
+  require 'rrd'
+  -------------------------------------------------------------------
+
+ OBS: If you use the option --enable-lua-site-install you won't need
+      to change package.cpath like above. 
+
+- Using with Lua 5.0
+
+ The Lua binding for RRDtool needs the compat-5.1 module to work with
+ Lua 5.0. Some Linux distros, like Ubuntu gutsy and hardy, have it
+ already integrated in Lua 5.0 -dev packages, so you just have to
+ require:
+
+  require 'compat-5.1'
+
+ For other platforms, the compat-5.1 module that comes with this Lua
+ binding will be installed for you in the same dir where RRDtool was
+ installed, under the subdir .../lib/lua/5.0. In this case, you must
+ tell your Lua programs where to find it by changing the Lua var
+ LUA_PATH:
+
+  --- compat-5.1.lua is only necessary for Lua 5.0 ------------------
+  original_LUA_PATH = LUA_PATH
+  -- try only compat-5.1 installed with RRDtool package
+  LUA_PATH = '<INSTALL_PREFIX>/lib/lua/5.0/?.lua'
+  require 'compat-5.1'
+  LUA_PATH = original_LUA_PATH
+  original_LUA_PATH = nil
+  --- end of code to require compat-5.1 -----------------------------
+
+  Now we can require the rrd module just like we did for 5.1 above:
+
+  -------------------------------------------------------------------
+  package.cpath = '<INSTALL_PREFIX>/lib/lua/5.0/?.so;' ..
+                  package.cpath
+  require 'rrd'
+  -------------------------------------------------------------------
diff --git a/bindings/lua/compat-5.1r5/compat-5.1.c b/bindings/lua/compat-5.1r5/compat-5.1.c
new file mode 100644 (file)
index 0000000..d8303bd
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+** Compat-5.1
+** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat)
+** $Id: compat-5.1.c 1621 2008-10-20 06:06:16Z oetiker $
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include "lua.h"
+#include "lauxlib.h"
+#include "compat-5.1.h"
+
+static void getfield(lua_State *L, int idx, const char *name) {
+    const char *end = strchr(name, '.');
+    lua_pushvalue(L, idx);
+    while (end) {
+        lua_pushlstring(L, name, end - name);
+        lua_gettable(L, -2);
+        lua_remove(L, -2);
+        if (lua_isnil(L, -1)) return;
+        name = end+1;
+        end = strchr(name, '.');
+    }
+    lua_pushstring(L, name);
+    lua_gettable(L, -2);
+    lua_remove(L, -2);
+}
+
+static void setfield(lua_State *L, int idx, const char *name) {
+    const char *end = strchr(name, '.');
+    lua_pushvalue(L, idx);
+    while (end) {
+        lua_pushlstring(L, name, end - name);
+        lua_gettable(L, -2);
+        /* create table if not found */
+        if (lua_isnil(L, -1)) {
+            lua_pop(L, 1);
+            lua_newtable(L);
+            lua_pushlstring(L, name, end - name);
+            lua_pushvalue(L, -2);
+            lua_settable(L, -4);
+        }
+        lua_remove(L, -2);
+        name = end+1;
+        end = strchr(name, '.');
+    }
+    lua_pushstring(L, name);
+    lua_pushvalue(L, -3);
+    lua_settable(L, -3);
+    lua_pop(L, 2);
+}
+
+LUALIB_API void luaL_module(lua_State *L, const char *libname,
+                              const luaL_reg *l, int nup) {
+  if (libname) {
+    getfield(L, LUA_GLOBALSINDEX, libname);  /* check whether lib already exists */
+    if (lua_isnil(L, -1)) { 
+      int env, ns;
+      lua_pop(L, 1); /* get rid of nil */
+      lua_pushliteral(L, "require");
+      lua_gettable(L, LUA_GLOBALSINDEX); /* look for require */
+      lua_getfenv(L, -1); /* getfenv(require) */
+      lua_remove(L, -2); /* remove function require */
+      env = lua_gettop(L);
+
+      lua_newtable(L); /* create namespace for lib */
+      ns = lua_gettop(L);
+      getfield(L, env, "package.loaded"); /* get package.loaded table */
+      if (lua_isnil(L, -1)) { /* create package.loaded table */
+          lua_pop(L, 1); /* remove previous result */
+          lua_newtable(L);
+          lua_pushvalue(L, -1);
+          setfield(L, env, "package.loaded");
+      }
+      else if (!lua_istable(L, -1))
+        luaL_error(L, "name conflict for library `%s'", libname);
+      lua_pushstring(L, libname);
+      lua_pushvalue(L, ns); 
+      lua_settable(L, -3); /* package.loaded[libname] = ns */
+      lua_pop(L, 1); /* get rid of package.loaded table */
+      lua_pushvalue(L, ns); /* copy namespace */
+      setfield(L, LUA_GLOBALSINDEX, libname);
+      lua_remove (L, env); /* remove env */
+    }
+    lua_insert(L, -(nup+1));  /* move library table to below upvalues */
+  }
+  for (; l->name; l++) {
+    int i;
+    lua_pushstring(L, l->name);
+    for (i=0; i<nup; i++)  /* copy upvalues to the top */
+      lua_pushvalue(L, -(nup+1));
+    lua_pushcclosure(L, l->func, nup);
+    lua_settable(L, -(nup+3));
+  }
+  lua_pop(L, nup);  /* remove upvalues */
+}
+
diff --git a/bindings/lua/compat-5.1r5/compat-5.1.h b/bindings/lua/compat-5.1r5/compat-5.1.h
new file mode 100644 (file)
index 0000000..d342203
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+** Compat-5.1
+** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat/)
+** $Id: compat-5.1.h 1621 2008-10-20 06:06:16Z oetiker $
+*/
+
+#ifndef COMPAT_H
+
+LUALIB_API void luaL_module(lua_State *L, const char *libname,
+                                       const luaL_reg *l, int nup);
+#define luaL_openlib luaL_module
+
+#endif
diff --git a/bindings/lua/compat-5.1r5/compat-5.1.lua b/bindings/lua/compat-5.1r5/compat-5.1.lua
new file mode 100644 (file)
index 0000000..0938d56
--- /dev/null
@@ -0,0 +1,267 @@
+--
+-- Compat-5.1
+-- Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat)
+-- According to Lua 5.1
+-- $Id: compat-5.1.lua,v 1.22 2006/02/20 21:12:47 carregal Exp $
+--
+
+_COMPAT51 = "Compat-5.1 R5"
+
+local LUA_DIRSEP = '/'
+local LUA_OFSEP = '_'
+local OLD_LUA_OFSEP = ''
+local POF = 'luaopen_'
+local LUA_PATH_MARK = '?'
+local LUA_IGMARK = ':'
+
+local assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type = assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type
+local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub
+
+--
+-- avoid overwriting the package table if it's already there
+--
+package = package or {}
+local _PACKAGE = package
+
+package.path = LUA_PATH or os.getenv("LUA_PATH") or
+             ("./?.lua;" ..
+              "/usr/local/share/lua/5.0/?.lua;" ..
+              "/usr/local/share/lua/5.0/?/?.lua;" ..
+              "/usr/local/share/lua/5.0/?/init.lua" )
+package.cpath = LUA_CPATH or os.getenv("LUA_CPATH") or
+             "./?.so;" ..
+             "./l?.so;" ..
+             "/usr/local/lib/lua/5.0/?.so;" ..
+             "/usr/local/lib/lua/5.0/l?.so"
+
+--
+-- make sure require works with standard libraries
+--
+package.loaded = package.loaded or {}
+package.loaded.debug = debug
+package.loaded.string = string
+package.loaded.math = math
+package.loaded.io = io
+package.loaded.os = os
+package.loaded.table = table 
+package.loaded.base = _G
+package.loaded.coroutine = coroutine
+local _LOADED = package.loaded
+
+--
+-- avoid overwriting the package.preload table if it's already there
+--
+package.preload = package.preload or {}
+local _PRELOAD = package.preload
+
+
+--
+-- looks for a file `name' in given path
+--
+local function findfile (name, pname)
+       name = gsub (name, "%.", LUA_DIRSEP)
+       local path = _PACKAGE[pname]
+       assert (type(path) == "string", format ("package.%s must be a string", pname))
+       for c in gfind (path, "[^;]+") do
+               c = gsub (c, "%"..LUA_PATH_MARK, name)
+               local f = io.open (c)
+               if f then
+                       f:close ()
+                       return c
+               end
+       end
+       return nil -- not found
+end
+
+
+--
+-- check whether library is already loaded
+--
+local function loader_preload (name)
+       assert (type(name) == "string", format (
+               "bad argument #1 to `require' (string expected, got %s)", type(name)))
+       assert (type(_PRELOAD) == "table", "`package.preload' must be a table")
+       return _PRELOAD[name]
+end
+
+
+--
+-- Lua library loader
+--
+local function loader_Lua (name)
+       assert (type(name) == "string", format (
+               "bad argument #1 to `require' (string expected, got %s)", type(name)))
+       local filename = findfile (name, "path")
+       if not filename then
+               return false
+       end
+       local f, err = loadfile (filename)
+       if not f then
+               error (format ("error loading module `%s' (%s)", name, err))
+       end
+       return f
+end
+
+
+local function mkfuncname (name)
+       name = gsub (name, "^.*%"..LUA_IGMARK, "")
+       name = gsub (name, "%.", LUA_OFSEP)
+       return POF..name
+end
+
+local function old_mkfuncname (name)
+       --name = gsub (name, "^.*%"..LUA_IGMARK, "")
+       name = gsub (name, "%.", OLD_LUA_OFSEP)
+       return POF..name
+end
+
+--
+-- C library loader
+--
+local function loader_C (name)
+       assert (type(name) == "string", format (
+               "bad argument #1 to `require' (string expected, got %s)", type(name)))
+       local filename = findfile (name, "cpath")
+       if not filename then
+               return false
+       end
+       local funcname = mkfuncname (name)
+       local f, err = loadlib (filename, funcname)
+       if not f then
+               funcname = old_mkfuncname (name)
+               f, err = loadlib (filename, funcname)
+               if not f then
+                       error (format ("error loading module `%s' (%s)", name, err))
+               end
+       end
+       return f
+end
+
+
+local function loader_Croot (name)
+       local p = gsub (name, "^([^.]*).-$", "%1")
+       if p == "" then
+               return
+       end
+       local filename = findfile (p, "cpath")
+       if not filename then
+               return
+       end
+       local funcname = mkfuncname (name)
+       local f, err, where = loadlib (filename, funcname)
+       if f then
+               return f
+       elseif where ~= "init" then
+               error (format ("error loading module `%s' (%s)", name, err))
+       end
+end
+
+-- create `loaders' table
+package.loaders = package.loaders or { loader_preload, loader_Lua, loader_C, loader_Croot, }
+local _LOADERS = package.loaders
+
+
+--
+-- iterate over available loaders
+--
+local function load (name, loaders)
+       -- iterate over available loaders
+       assert (type (loaders) == "table", "`package.loaders' must be a table")
+       for i, loader in ipairs (loaders) do
+               local f = loader (name)
+               if f then
+                       return f
+               end
+       end
+       error (format ("module `%s' not found", name))
+end
+
+-- sentinel
+local sentinel = function () end
+
+--
+-- new require
+--
+function _G.require (modname)
+       assert (type(modname) == "string", format (
+               "bad argument #1 to `require' (string expected, got %s)", type(name)))
+       local p = _LOADED[modname]
+       if p then -- is it there?
+               if p == sentinel then
+                       error (format ("loop or previous error loading module '%s'", modname))
+               end
+               return p -- package is already loaded
+       end
+       local init = load (modname, _LOADERS)
+       _LOADED[modname] = sentinel
+       local actual_arg = _G.arg
+       _G.arg = { modname }
+       local res = init (modname)
+       if res then
+               _LOADED[modname] = res
+       end
+       _G.arg = actual_arg
+       if _LOADED[modname] == sentinel then
+               _LOADED[modname] = true
+       end
+       return _LOADED[modname]
+end
+
+
+-- findtable
+local function findtable (t, f)
+       assert (type(f)=="string", "not a valid field name ("..tostring(f)..")")
+       local ff = f.."."
+       local ok, e, w = find (ff, '(.-)%.', 1)
+       while ok do
+               local nt = rawget (t, w)
+               if not nt then
+                       nt = {}
+                       t[w] = nt
+               elseif type(t) ~= "table" then
+                       return sub (f, e+1)
+               end
+               t = nt
+               ok, e, w = find (ff, '(.-)%.', e+1)
+       end
+       return t
+end
+
+--
+-- new package.seeall function
+--
+function _PACKAGE.seeall (module)
+       local t = type(module)
+       assert (t == "table", "bad argument #1 to package.seeall (table expected, got "..t..")")
+       local meta = getmetatable (module)
+       if not meta then
+               meta = {}
+               setmetatable (module, meta)
+       end
+       meta.__index = _G
+end
+
+
+--
+-- new module function
+--
+function _G.module (modname, ...)
+       local ns = _LOADED[modname]
+       if type(ns) ~= "table" then
+               ns = findtable (_G, modname)
+               if not ns then
+                       error (string.format ("name conflict for module '%s'", modname))
+               end
+               _LOADED[modname] = ns
+       end
+       if not ns._NAME then
+               ns._NAME = modname
+               ns._M = ns
+               ns._PACKAGE = gsub (modname, "[^.]*$", "")
+       end
+       setfenv (2, ns)
+       for i, f in ipairs (arg) do
+               f (ns)
+       end
+end
diff --git a/bindings/lua/rrdlua.c b/bindings/lua/rrdlua.c
new file mode 100644 (file)
index 0000000..a733184
--- /dev/null
@@ -0,0 +1,380 @@
+/*
+ * Lua bindings for RRDTool
+ *
+ * This software is licensed to the public under the Free Software
+ * Foundation's GNU GPL, version 2 or later. You may obtain a copy
+ * of the GPL by visiting the Free Software Foundations web site at
+ * www.fsf.org, and a copy is included in this distribution.
+ *
+ * Copyright 2008 Fidelis Assis, all rights reserved.
+ *
+ */
+
+#include <ctype.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <math.h>
+#include <errno.h>
+#include <dirent.h>
+#include <inttypes.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+#include "lualib.h"
+#include "../../src/rrd_tool.h"
+
+#ifdef LUA50
+#ifdef HAVE_COMPAT51
+#include "compat-5.1.h"
+#else
+#include "compat-5.1r5/compat-5.1.h"
+#endif
+#endif
+
+extern void rrd_freemem(void *mem);
+
+extern int luaopen_rrd (lua_State * L);
+typedef int (*RRD_FUNCTION)(int, char **);
+typedef rrd_info_t *(RRD_FUNCTION_V)(int, char **);
+
+/**********************************************************/
+
+static void reset_rrd_state(void)
+{
+    optind = 0;
+    opterr = 0;
+    rrd_clear_error();
+}
+
+static char **make_argv(const char *cmd, lua_State * L)
+{
+  char **argv;
+  int i;
+  int argc = lua_gettop(L) + 1;
+
+  if (!(argv = calloc(argc, sizeof (char *)))) 
+    /* raise an error and never return */
+    luaL_error(L, "Can't allocate memory for arguments array", cmd);
+
+  /* fprintf(stderr, "Args:\n"); */
+  argv[0] = (char *) cmd; /* Dummy arg. Cast to (char *) because rrd */
+                          /* functions don't expect (const * char)   */
+  /* fprintf(stderr, "%s\n", argv[0]); */
+  for (i=1; i<argc; i++) {
+    /* accepts string or number */
+    if (lua_isstring(L, i) || lua_isnumber(L, i)) {
+      if (!(argv[i] = strdup(lua_tostring (L, i)))) {
+        /* raise an error and never return */
+        luaL_error(L, "%s - error duplicating string area for arg #%d",
+                   cmd, i);
+      }
+    } else {
+      /* raise an error and never return */
+      luaL_error(L, "Invalid arg #%d to %s: args must be strings or numbers",
+                 i, cmd);
+    }
+    /* fprintf(stderr, "%s\n", argv[i]); */
+  }
+  return argv;
+}
+
+static int
+rrd_common_call (lua_State *L, const char *cmd, RRD_FUNCTION rrd_function)
+{
+  char **argv;
+  int argc = lua_gettop(L) + 1;
+
+  argv = make_argv(cmd, L);
+  reset_rrd_state();
+  rrd_function(argc, argv);
+  free(argv);
+  if (rrd_test_error()) luaL_error(L, rrd_get_error());
+  return 0;
+}
+
+#if defined(DINF)
+static int
+lua_rrd_infocall(lua_State *L, const char *cmd, RRD_FUNCTION_V rrd_function)
+{
+  char **argv;
+  rrd_info_t *p, *data;
+  int argc = lua_gettop(L) + 1;
+
+  argv = make_argv(cmd, L);
+  reset_rrd_state();
+  data = rrd_function(argc, argv);
+  free(argv);
+  if (rrd_test_error()) luaL_error(L, rrd_get_error());
+
+  lua_newtable(L);
+  p = data;
+  while (data) {
+    lua_pushstring(L, data->key);
+    switch (data->type) {
+      case RD_I_CNT:
+        if (isnan(data->value.u_val)) {
+          lua_pushnil(L); 
+        } else {
+          lua_pushnumber(L, (lua_Number) data->value.u_val);
+        }
+        lua_rawset(L, -3);
+        break;
+      case RD_I_VAL:
+        lua_pushnumber(L, (lua_Number) data->value.u_val);
+        lua_rawset(L, -3);
+        break;
+      case RD_I_STR:
+        lua_pushstring(L, data->value.u_str);
+        lua_rawset(L, -3);
+        break;
+      case RD_I_BLO:
+        lua_pushlstring(L, (const char *) data->value.u_blo.ptr,
+                        data->value.u_blo.size);
+        lua_rawset(L, -3);
+        break;
+      default:
+        rrd_info_free(p); 
+        return luaL_error(L, "Wrong data type to info call");
+        break;
+    }
+    data = data->next;
+  }
+  rrd_info_free(p); 
+  return 1;
+}
+#endif
+
+/**********************************************************/
+
+static int
+lua_rrd_create (lua_State * L)
+{
+  rrd_common_call(L, "create", rrd_create);
+  return 0;
+}
+
+static int
+lua_rrd_dump (lua_State * L)
+{
+  rrd_common_call(L, "dump", rrd_dump);
+  return 0;
+}
+
+static int
+lua_rrd_resize (lua_State * L)
+{
+  rrd_common_call(L, "resize", rrd_resize);
+  return 0;
+}
+
+static int
+lua_rrd_restore (lua_State * L)
+{
+  rrd_common_call(L, "restore", rrd_restore);
+  return 0;
+}
+
+static int
+lua_rrd_tune (lua_State * L)
+{
+  rrd_common_call(L, "tune", rrd_tune);
+  return 0;
+}
+
+static int
+lua_rrd_update (lua_State * L)
+{
+  rrd_common_call(L, "update", rrd_update);
+  return 0;
+}
+
+static int
+lua_rrd_fetch (lua_State * L)
+{
+  int argc = lua_gettop(L) + 1;
+  char **argv = make_argv("fetch", L);
+  unsigned long i, j, step, ds_cnt;
+  rrd_value_t *data, *p;
+  char    **names;
+  time_t  t, start, end;
+
+  reset_rrd_state();
+  rrd_fetch(argc, argv, &start, &end, &step, &ds_cnt, &names, &data);
+  free(argv);
+  if (rrd_test_error()) luaL_error(L, rrd_get_error());
+
+  lua_pushnumber(L, (lua_Number) start);
+  lua_pushnumber(L, (lua_Number) step);
+  /* fprintf(stderr, "%lu, %lu, %lu, %lu\n", start, end, step, num_points); */
+
+  /* create the ds names array */
+  lua_newtable(L);
+  for (i=0; i<ds_cnt; i++) {
+    lua_pushstring(L, names[i]);
+    lua_rawseti(L, -2, i+1);
+    rrd_freemem(names[i]);
+  }
+  rrd_freemem(names);
+
+  /* create the data points array */
+  lua_newtable(L);
+  p = data;
+  for (t=start, i=0; t<end; t+=step, i++) {
+    lua_newtable(L);
+    for (j=0; j<ds_cnt; j++) {
+      /*fprintf(stderr, "Point #%lu\n", j+1); */
+      lua_pushnumber(L, (lua_Number) *p++);
+      lua_rawseti(L, -2, j+1);
+    }
+    lua_rawseti(L, -2, i+1);
+  }
+  rrd_freemem(data);
+
+  /* return the end as the last value */
+  lua_pushnumber(L, (lua_Number) end);
+
+  return 5;
+}
+
+static int
+lua_rrd_first (lua_State * L)
+{
+  time_t first;
+  int argc = lua_gettop(L) + 1;
+  char **argv = make_argv("first", L);
+  reset_rrd_state();
+  first = rrd_first(argc, argv);
+  free(argv);
+  if (rrd_test_error()) luaL_error(L, rrd_get_error());
+  lua_pushnumber(L, (lua_Number) first);
+  return 1;
+}
+
+static int
+lua_rrd_last (lua_State * L)
+{
+  time_t last;
+  int argc = lua_gettop(L) + 1;
+  char **argv = make_argv("last", L);
+  reset_rrd_state();
+  last = rrd_last(argc, argv);
+  free(argv);
+  if (rrd_test_error()) luaL_error(L, rrd_get_error());
+  lua_pushnumber(L, (lua_Number) last);
+  return 1;
+}
+
+static int
+lua_rrd_graph (lua_State * L)
+{
+  int argc = lua_gettop(L) + 1;
+  char **argv = make_argv("last", L);
+  char **calcpr;
+  int i, xsize, ysize;
+  double ymin, ymax;
+
+  reset_rrd_state();
+  rrd_graph(argc, argv, &calcpr, &xsize, &ysize, NULL, &ymin, &ymax);
+  free(argv);
+  if (rrd_test_error()) luaL_error(L, rrd_get_error());
+  lua_pushnumber(L, (lua_Number) xsize);
+  lua_pushnumber(L, (lua_Number) ysize);
+  lua_newtable(L);
+  for (i = 0; calcpr && calcpr[i]; i++) {
+      lua_pushstring(L, calcpr[i]);
+      lua_rawseti(L, -2, i+1);
+      rrd_freemem(calcpr[i]);
+  }
+  rrd_freemem(calcpr);
+  return 3;
+}
+
+static int
+lua_rrd_flushcached(lua_State *L)
+{
+  return rrd_common_call(L, "flushcached", rrd_flushcached);
+}
+
+#if defined(DINF)
+static int
+lua_rrd_info (lua_State * L)
+{
+  return lua_rrd_infocall(L, "info", rrd_info);
+}
+
+static int
+lua_rrd_graphv (lua_State * L)
+{
+  return lua_rrd_infocall(L, "graphv", rrd_graph_v);
+}
+
+static int
+lua_rrd_updatev (lua_State * L)
+{
+  return lua_rrd_infocall(L, "updatev", rrd_update_v);
+}
+#endif
+
+/**********************************************************/
+
+/*
+** Assumes the table is on top of the stack.
+*/
+static void
+set_info (lua_State * L)
+{
+  lua_pushliteral (L, "_COPYRIGHT");
+  lua_pushliteral (L, "Copyright (C) 2008 Fidelis Assis");
+  lua_settable (L, -3);
+  lua_pushliteral (L, "_DESCRIPTION");
+  lua_pushliteral (L, "RRD-lua is a Lua binding for RRDTool.");
+  lua_settable (L, -3);
+  lua_pushliteral (L, "_NAME");
+  lua_pushliteral (L, "RRD-Lua");
+  lua_settable (L, -3);
+  lua_pushliteral (L, "_VERSION");
+  lua_pushliteral (L, LIB_VERSION);
+  lua_settable (L, -3);
+}
+
+/**********************************************************/
+
+static const struct luaL_reg rrd[] = {
+  {"create", lua_rrd_create},
+  {"dump", lua_rrd_dump},
+  {"fetch", lua_rrd_fetch},
+  {"first", lua_rrd_first},
+  {"graph", lua_rrd_graph},
+  {"last", lua_rrd_last},
+  {"resize", lua_rrd_resize},
+  {"restore", lua_rrd_restore},
+  {"tune", lua_rrd_tune},
+  {"update", lua_rrd_update},
+  {"flushcached", lua_rrd_flushcached},
+#if defined(DINF)
+  {"info", lua_rrd_info},
+  {"updatev", lua_rrd_updatev},
+  {"graphv", lua_rrd_graphv},
+#endif
+  {NULL, NULL}
+};
+
+
+/*
+** Open RRD library
+*/
+int
+luaopen_rrd (lua_State * L)
+{
+#if defined LUA50
+  /* luaL_module is defined in compat-5.1.c */
+  luaL_module (L, "rrd", rrd, 0);
+#else
+  luaL_register (L, "rrd", rrd);
+#endif
+  set_info (L);
+  return 1;
+}
diff --git a/bindings/lua/test.lua.bottom b/bindings/lua/test.lua.bottom
new file mode 100644 (file)
index 0000000..caa590c
--- /dev/null
@@ -0,0 +1,90 @@
+
+local rrd = require 'rrd'
+
+local name = 'test.rrd'
+local start = 300 * math.floor(os.time() / 300)
+
+io.write('\n-- Creating ', name, '\n')
+rrd.create(
+    name,
+    '--start', start-1,
+    '--step', '300',
+    'DS:a:GAUGE:600:U:U',
+    'DS:b:GAUGE:600:U:U',
+    'RRA:AVERAGE:0.5:1:300')
+
+local num_points = 0
+for t=start, start+300*300, 300 do
+  local s = string.format('%d:%d:%f', t,
+                          math.random(100), math.sin(t/800)*50+50)
+  rrd.update(name, s)
+  num_points = num_points + 1
+end
+
+io.write('rrd file created with ', num_points, ' points, from ', start,
+         ' to ', start+300*300, '\n')
+
+io.write('\n-- Testing rrd.info\n')
+local info = rrd.info(name)
+for k,v in pairs(info) do
+  io.write(k, '=', v, '\n')
+end
+io.write('\n')
+
+io.write('-- Testing rrd.fetch\n') 
+io.write('fetching data from ', name, ' - interval: ', start, ' to ',
+         start+300*300, '\n') 
+local fstart, fstep, fnames, fdata =
+  rrd.fetch(name, '--start', start, '--end', start+300*300+10, 'AVERAGE')
+io.write('got ', table.getn(fdata[1]), ' data sources with ', table.getn(fdata),
+         ' data points each.\n')
+
+io.write('\n-- Printing fetched data\n') 
+io.write('            ')
+for i, n in ipairs(fnames) do
+  io.write(n, '            ')
+end
+io.write('\n')
+for i, v in ipairs(fdata) do
+  local time = fstart + (i-1)*fstep
+  io.write(string.format('%s (%d): ', os.date('%c', time), time))
+  for _, w in ipairs(v) do
+    io.write(string.format('%e ', w))
+  end
+  io.write('\n')
+end
+io.write('\n')
+
+io.write('\n-- Testing rrd.graphv - creates test.png and returns values\n') 
+local t = rrd.graphv(
+   'test.png',
+   '--title', 'Enjoy Lua RRDtool module!',
+   '--start', start+3600,
+   '--end', 'start + 1000 min',
+   '--interlace',
+   '--imgformat', 'PNG',
+   '--width=450',
+   'DEF:a=' .. name .. ':a:AVERAGE',
+   'DEF:b=' .. name .. ':b:AVERAGE',
+   'CDEF:line=TIME,2400,%,300,LT,a,UNKN,IF',
+   'AREA:b#00b6e4:beta',
+   'AREA:line#0022e9:alpha',
+   'LINE3:line#ff0000',
+   'VDEF:va=a,AVERAGE',
+   'VDEF:vb=b,AVERAGE',
+   'PRINT:va:%5.2lf',
+   'PRINT:vb:%5.2lf')
+
+io.write('\n-- Returned values:\n') 
+io.write('print[0]: ', t['print[0]'], '\n')
+io.write('print[1]: ', t['print[1]'], '\n')
+for k, v in pairs(t) do
+  if not string.find(k, '^print%[%d+%]') then
+    io.write(k, ': ', v, '\n')
+  end
+end
+io.write('\n')
+
+io.write('-- The graph "test.png" was created.\n')
+io.write('-- Use your preferred viewer to display it.\n\n')
+
index fba90ae4f101db280c644d90739547d954d15204..c3fbf91f91de2ca03a9210c7d06c5453ee5e0044 100644 (file)
@@ -124,7 +124,7 @@ sub cmd (@);
 sub end ();
 sub read ();
 
-$VERSION=1.3008;
+$VERSION=1.3002;
 
 sub start ($){
   croak "rrdtool is already running"
index 3bcbdfc4d4b0351b8759a57724ffc7c5b58dc17b..33dd52996bcd3d8522a3e57b79d492eab8a19ecd 100644 (file)
@@ -7,7 +7,7 @@ use vars qw(@ISA $VERSION);
 
 require DynaLoader;
 
-$VERSION=1.3008;
+$VERSION=1.3002;
 
 bootstrap RRDs $VERSION;
 
@@ -33,6 +33,7 @@ RRDs - Access RRDtool as a shared module
   RRDs::times(start, end)
   RRDs::dump ...
   RRDs::restore ...
+  RRDs::flushcached ...
 
 =head1 DESCRIPTION
 
index 25d44a51c555aa30312608e803fd4c121998dfc8..029b3beeebe0a3de3190e29d5e0f8419ac6c7ad3 100644 (file)
@@ -444,3 +444,13 @@ rrd_restore(...)
        OUTPUT:
                RETVAL
 
+int
+rrd_flushcached(...)
+       PROTOTYPE: @
+       PREINIT:
+       int i;
+       char **argv;
+       CODE:
+               rrdcode(rrd_flushcached);
+       OUTPUT:
+               RETVAL
index 2df98066f140af33fe63798cd4dea54019ebee0b..8eba8f928b7e31167406da0e19e0152a85916b58 100644 (file)
@@ -58,28 +58,59 @@ static int create_args(
     int *argc,
     char ***argv)
 {
-    PyObject *o;
-    int       size, i;
-
-    size = PyTuple_Size(args);
+    PyObject *o, *lo;
+    int       args_count,
+              argv_count,
+              element_count,
+              i, j;
+
+    args_count = PyTuple_Size(args);
+    element_count = 0;
+    for (i = 0; i < args_count; i++) {
+        o = PyTuple_GET_ITEM(args, i);
+        if (PyString_Check(o))
+            element_count++;
+        else if (PyList_CheckExact(o))
+                element_count += PyList_Size(o);
+             else {
+                 PyErr_Format(PyExc_TypeError, "argument %d must be string or list of strings", i);
+                 return -1;
+             }
+    }
+   
     *argv = PyMem_New(char *,
-                      size + 1);
+                      element_count + 1);
 
     if (*argv == NULL)
         return -1;
 
-    for (i = 0; i < size; i++) {
+    argv_count = 0;
+    for (i = 0; i < args_count; i++) {
         o = PyTuple_GET_ITEM(args, i);
-        if (PyString_Check(o))
-            (*argv)[i + 1] = PyString_AS_STRING(o);
-        else {
-            PyMem_Del(*argv);
-            PyErr_Format(PyExc_TypeError, "argument %d must be string", i);
-            return -1;
-        }
+        if (PyString_Check(o)) {
+            argv_count++;
+            (*argv)[argv_count] = PyString_AS_STRING(o);
+        } else if (PyList_CheckExact(o))
+                   for (j = 0; j < PyList_Size(o); j++) {
+                       lo = PyList_GetItem(o, j);
+                       if (PyString_Check(lo)) {
+                           argv_count++;
+                           (*argv)[argv_count] = PyString_AS_STRING(lo);
+                       } else {
+                             PyMem_Del(*argv);
+                             PyErr_Format(PyExc_TypeError, "element %d in argument %d must be string", j, i);
+                             return -1;
+                       }
+                   }
+               else {
+                   PyMem_Del(*argv);
+                   PyErr_Format(PyExc_TypeError, "argument %d must be string or list of strings", i);
+                   return -1;
+               }
     }
+
     (*argv)[0] = command;
-    *argc = size + 1;
+    *argc = element_count + 1;
 
     /* reset getopt state */
     opterr = optind = 0;
@@ -526,6 +557,34 @@ static PyObject *PyRRD_updatev(
     return r;
 }
 
+static char PyRRD_flushcached__doc__[] =
+  "flush(args..): flush RRD files from memory\n"
+  "   flush [--daemon address] file [file ...]";
+
+static PyObject *PyRRD_flushcached(
+    PyObject UNUSED(*self),
+    PyObject * args)
+{
+    PyObject *r;
+    int       argc;
+    char    **argv;
+
+    if (create_args("flushcached", args, &argc, &argv) < 0)
+        return NULL;
+
+    if (rrd_flushcached(argc, argv) != 0) {
+        PyErr_SetString(ErrorObject, rrd_get_error());
+        rrd_clear_error();
+        r = NULL;
+    } else {
+        Py_INCREF(Py_None);
+        r = Py_None;
+    }
+
+    destroy_args(&argv);
+    return r;
+}
+
 /* List of methods defined in the module */
 #define meth(name, func, doc) {name, (PyCFunction)func, METH_VARARGS, doc}
 
@@ -541,6 +600,7 @@ static PyMethodDef _rrdtool_methods[] = {
     meth("info", PyRRD_info, PyRRD_info__doc__),
     meth("graphv", PyRRD_graphv, PyRRD_graphv__doc__),
     meth("updatev", PyRRD_updatev, PyRRD_updatev__doc__),
+    meth("flushcached", PyRRD_flushcached, PyRRD_flushcached__doc__),
     {NULL, NULL, 0, NULL}
 };
 
index 2045e5a5dca2a06dbc86356eeb520684d5197e85..f46aa183308ac9eaeebacd4f4722f8585ca7f89a 100644 (file)
@@ -3,6 +3,8 @@
 
 require 'mkmf'
 
+$CFLAGS += ' -Wall '
+
 if /linux/ =~ RUBY_PLATFORM
    $LDFLAGS += '-Wl,--rpath -Wl,$(EPREFIX)/lib'
 elsif /solaris/ =~ RUBY_PLATFORM
index bc314f6c5cfc3cc0217a37752773200255556ff0..93fb7ac96426cc1655d2512103790844109df6c5 100644 (file)
@@ -1,9 +1,10 @@
-/* $Id: main.c 1791 2009-04-14 13:55:29Z oetiker $
+/* $Id: main.c 1855 2009-06-07 20:48:39Z oetiker $
  * Substantial penalty for early withdrawal.
  */
 
 #include <unistd.h>
 #include <ruby.h>
+#include <math.h>
 #include "../../src/rrd_tool.h"
 
 typedef struct string_arr_t {
@@ -19,6 +20,11 @@ typedef int (
     int argc,
     char **argv);
 
+typedef rrd_info_t *(
+    *RRDINFOFUNC) (
+    int argc,
+    char **argv);
+
 #define RRD_CHECK_ERROR  \
     if (rrd_test_error()) \
       rb_raise(rb_eRRDError, rrd_get_error()); \
@@ -138,11 +144,18 @@ VALUE rb_rrd_update(
     return rrd_call(rrd_update, args);
 }
 
+VALUE rb_rrd_flushcached(
+    VALUE self,
+    VALUE args)
+{
+    return rrd_call(rrd_flushcached, args);
+}
+
 
 /* Calls Returning Data via the Info Interface */
 
 VALUE rb_rrd_infocall(
-    RRDFUNC func,
+    RRDINFOFUNC func,
     VALUE args)
 {
     string_arr a;
@@ -173,9 +186,12 @@ VALUE rb_rrd_infocall(
         case RD_I_STR:
             rb_hash_aset(result, key, rb_str_new2(data->value.u_str));
             break;
+        case RD_I_INT:
+            rb_hash_aset(result, key, INT2FIX(data->value.u_int));
+            break;
         case RD_I_BLO:
             rb_hash_aset(result, key,
-                         rb_str_new(data->value.u_blo.ptr,
+                         rb_str_new((char *)data->value.u_blo.ptr,
                                     data->value.u_blo.size));
             break;
         }
@@ -318,6 +334,7 @@ void Init_RRD(
     rb_define_module_function(mRRD, "restore", rb_rrd_restore, -2);
     rb_define_module_function(mRRD, "tune", rb_rrd_tune, -2);
     rb_define_module_function(mRRD, "update", rb_rrd_update, -2);
+    rb_define_module_function(mRRD, "flushcached", rb_rrd_flushcached, -2);
     rb_define_module_function(mRRD, "info", rb_rrd_info, -2);
     rb_define_module_function(mRRD, "updatev", rb_rrd_updatev, -2);
     rb_define_module_function(mRRD, "graphv", rb_rrd_graphv, -2);
index 34f4077bf55cea90d6c5f8812204a7da15b60159..c0e8b0ff9b2217be48d17b4deb657562111813f3 100644 (file)
@@ -4,6 +4,7 @@ EXTRA_DIST = README tclrrd.c
 VERSION = @VERSION@
 
 AM_CFLAGS = @CFLAGS@
+### no including this by default @WERROR@
 
 TCL_PREFIX = @TCL_PREFIX@
 TCL_SHLIB_LD = @TCL_SHLIB_LD@
index 159f014f40176913fd8b2d2ad47b49670f91e0c3..8d15a28cd057c80487f6d36ce274997cd95467fe 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.11 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -18,8 +19,9 @@
 
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -39,47 +41,83 @@ subdir = bindings/tcl
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
        $(srcdir)/ifOctets.tcl.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
+       $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
+       $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \
+       $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
+       $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
+       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/rrd_config.h
 CONFIG_CLEAN_FILES = ifOctets.tcl
+CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibdir)" \
        "$(DESTDIR)$(tclpkgdir)" "$(DESTDIR)$(pkglibdir)" \
        "$(DESTDIR)$(tclpkgdir)"
-libLIBRARIES_INSTALL = $(INSTALL_DATA)
 LIBRARIES = $(lib_LIBRARIES)
-pkglibSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-tclpkgSCRIPT_INSTALL = $(INSTALL_SCRIPT)
 SCRIPTS = $(pkglib_SCRIPTS) $(tclpkg_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
-pkglibDATA_INSTALL = $(INSTALL_DATA)
-tclpkgDATA_INSTALL = $(INSTALL_DATA)
 DATA = $(pkglib_DATA) $(tclpkg_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
 ALL_LIBS = @ALL_LIBS@
-ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-CATALOGS = @CATALOGS@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+COMP_LUA = @COMP_LUA@
 COMP_PERL = @COMP_PERL@
 COMP_PYTHON = @COMP_PYTHON@
 COMP_RUBY = @COMP_RUBY@
@@ -98,37 +136,50 @@ ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
+GENCAT = @GENCAT@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_WPRINTF = @HAVE_WPRINTF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
 LIBVERS = @LIBVERS@
-LIB_LIBINTL = @LIB_LIBINTL@
 LIPO = @LIPO@
 LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
+LUA = @LUA@
+LUA_CFLAGS = @LUA_CFLAGS@
+LUA_DEFINES = @LUA_DEFINES@
+LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@
+LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@
+LUA_LFLAGS = @LUA_LFLAGS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
 MSGMERGE = @MSGMERGE@
 MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@
 MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@
@@ -159,10 +210,7 @@ PERL_VERSION = @PERL_VERSION@
 PKGCONFIG = @PKGCONFIG@
 POD2HTML = @POD2HTML@
 POD2MAN = @POD2MAN@
-POFILES = @POFILES@
 POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -187,6 +235,7 @@ TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@
 TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@
 TCL_PACKAGE_DIR = @TCL_PACKAGE_DIR@
 TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
+### no including this by default @WERROR@
 TCL_PREFIX = @TCL_PREFIX@
 TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
 TCL_SHLIB_LD = @TCL_SHLIB_LD@
@@ -194,8 +243,10 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
 TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
 TCL_VERSION = @TCL_VERSION@
 TROFF = @TROFF@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WERROR = @WERROR@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -291,9 +342,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  bindings/tcl/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  bindings/tcl/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/tcl/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnu bindings/tcl/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -311,75 +362,109 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 ifOctets.tcl: $(top_builddir)/config.status $(srcdir)/ifOctets.tcl.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 install-libLIBRARIES: $(lib_LIBRARIES)
        @$(NORMAL_INSTALL)
        test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LIBRARIES)'; for p in $$list; do \
+       @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+       list2=; for p in $$list; do \
          if test -f $$p; then \
-           f=$(am__strip_dir) \
-           echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           list2="$$list2 $$p"; \
          else :; fi; \
-       done
+       done; \
+       test -z "$$list2" || { \
+         echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
+         $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
        @$(POST_INSTALL)
-       @list='$(lib_LIBRARIES)'; for p in $$list; do \
+       @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+       for p in $$list; do \
          if test -f $$p; then \
-           p=$(am__strip_dir) \
-           echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
-           $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
+           $(am__strip_dir) \
+           echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
+           ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
          else :; fi; \
        done
 
 uninstall-libLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(lib_LIBRARIES)'; for p in $$list; do \
-         p=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         rm -f "$(DESTDIR)$(libdir)/$$p"; \
-       done
+       @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(libdir)' && rm -f "$$files" )"; \
+       cd "$(DESTDIR)$(libdir)" && rm -f $$files
 
 clean-libLIBRARIES:
        -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
 install-pkglibSCRIPTS: $(pkglib_SCRIPTS)
        @$(NORMAL_INSTALL)
        test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
-       @list='$(pkglib_SCRIPTS)'; for p in $$list; do \
+       @list='$(pkglib_SCRIPTS)'; test -n "$(pkglibdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(pkglibSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
-           $(pkglibSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-pkglibSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(pkglib_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
-       done
+       @list='$(pkglib_SCRIPTS)'; test -n "$(pkglibdir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files
 install-tclpkgSCRIPTS: $(tclpkg_SCRIPTS)
        @$(NORMAL_INSTALL)
        test -z "$(tclpkgdir)" || $(MKDIR_P) "$(DESTDIR)$(tclpkgdir)"
-       @list='$(tclpkg_SCRIPTS)'; for p in $$list; do \
+       @list='$(tclpkg_SCRIPTS)'; test -n "$(tclpkgdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(tclpkgSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(tclpkgdir)/$$f'"; \
-           $(tclpkgSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(tclpkgdir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tclpkgdir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tclpkgdir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-tclpkgSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tclpkg_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(tclpkgdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tclpkgdir)/$$f"; \
-       done
+       @list='$(tclpkg_SCRIPTS)'; test -n "$(tclpkgdir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(tclpkgdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(tclpkgdir)" && rm -f $$files
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -389,37 +474,43 @@ clean-libtool:
 install-pkglibDATA: $(pkglib_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
-       @list='$(pkglib_DATA)'; for p in $$list; do \
+       @list='$(pkglib_DATA)'; test -n "$(pkglibdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(pkglibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
-         $(pkglibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkglibdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pkglibdir)" || exit $$?; \
        done
 
 uninstall-pkglibDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(pkglib_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
-       done
+       @list='$(pkglib_DATA)'; test -n "$(pkglibdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files
 install-tclpkgDATA: $(tclpkg_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(tclpkgdir)" || $(MKDIR_P) "$(DESTDIR)$(tclpkgdir)"
-       @list='$(tclpkg_DATA)'; for p in $$list; do \
+       @list='$(tclpkg_DATA)'; test -n "$(tclpkgdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(tclpkgDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tclpkgdir)/$$f'"; \
-         $(tclpkgDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tclpkgdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tclpkgdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tclpkgdir)" || exit $$?; \
        done
 
 uninstall-tclpkgDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(tclpkg_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(tclpkgdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tclpkgdir)/$$f"; \
-       done
+       @list='$(tclpkg_DATA)'; test -n "$(tclpkgdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(tclpkgdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(tclpkgdir)" && rm -f $$files
 tags: TAGS
 TAGS:
 
@@ -443,13 +534,17 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -481,6 +576,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -500,6 +596,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -508,19 +606,29 @@ install-data-am: install-tclpkgDATA install-tclpkgSCRIPTS
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am: install-exec-local install-libLIBRARIES \
        install-pkglibDATA install-pkglibSCRIPTS
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -576,6 +684,7 @@ pkgIndex.tcl:
 install-exec-local: $(TCL_RRD_LIB)
        @$(NORMAL_INSTALL)
        $(INSTALL_PROGRAM) $(TCL_RRD_LIB) $(DESTDIR)$(libdir)/$(TCL_RRD_LIB)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index c432918f4d180164ba6d2ee8f6a119d76f758a72..f1f0234e96855a78835639c009bd6beadb4411d4 100644 (file)
@@ -8,7 +8,7 @@
  * See the file "COPYING" for information on usage and redistribution
  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  *
- * $Id: tclrrd.c 1405 2008-06-08 15:55:09Z oetiker $
+ * $Id: tclrrd.c 1854 2009-06-07 14:46:21Z oetiker $
  */
 
 
@@ -97,7 +97,7 @@ static void getopt_squieeze(
 
 /* Thread-safe version */
 static int Rrd_Create(
-    ClientData clientData,
+    ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
     CONST84 char *argv[])
@@ -186,7 +186,8 @@ static int Rrd_Create(
         return TCL_ERROR;
     }
 
-    rrd_create_r(argv2[1], pdp_step, last_up, argc - 2, argv2 + 2);
+    rrd_create_r(argv2[1], pdp_step, last_up, argc - 2,
+                 (const char **)argv2 + 2);
 
     getopt_cleanup(argc, argv2);
 
@@ -204,7 +205,7 @@ static int Rrd_Create(
 
 /* Thread-safe version */
 static int Rrd_Dump(
-    ClientData clientData,
+    ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
     CONST84 char *argv[])
@@ -229,11 +230,35 @@ static int Rrd_Dump(
     return TCL_OK;
 }
 
+/* Thread-safe version */
+static int Rrd_Flushcached(
+    ClientData __attribute__((unused)) clientData,
+    Tcl_Interp *interp,
+    int argc,
+    CONST84 char *argv[])
+{
+    if (argc < 2) {
+        Tcl_AppendResult(interp, "RRD Error: needs rrd filename",
+                         (char *) NULL);
+        return TCL_ERROR;
+    }
+
+    rrd_flushcached(argc, (char**)argv);
+
+    if (rrd_test_error()) {
+        Tcl_AppendResult(interp, "RRD Error: ",
+                         rrd_get_error(), (char *) NULL);
+        rrd_clear_error();
+        return TCL_ERROR;
+    }
+
+    return TCL_OK;
+}
 
 
 /* Thread-safe version */
 static int Rrd_Last(
-    ClientData clientData,
+    ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
     CONST84 char *argv[])
@@ -264,7 +289,7 @@ static int Rrd_Last(
 
 /* Thread-safe version */
 static int Rrd_Update(
-    ClientData clientData,
+    ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
     CONST84 char *argv[])
@@ -319,7 +344,7 @@ static int Rrd_Update(
         return TCL_ERROR;
     }
 
-    rrd_update_r(argv2[1], template, argc - 2, argv2 + 2);
+    rrd_update_r(argv2[1], template, argc - 2, (const char **)argv2 + 2);
 
     if (template != NULL) {
         free(template);
@@ -337,7 +362,7 @@ static int Rrd_Update(
 }
 
 static int Rrd_Lastupdate(
-    ClientData clientData,
+    ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
     CONST84 char *argv[])
@@ -350,8 +375,15 @@ static int Rrd_Lastupdate(
     Tcl_Obj  *listPtr;
     unsigned long ds_cnt, i;
 
+    /* TODO: support for rrdcached */
+    if (argc != 2) {
+        Tcl_AppendResult(interp, "RRD Error: needs a single rrd filename",
+                         (char *) NULL);
+        return TCL_ERROR;
+    }
+
     argv2 = getopt_init(argc, argv);
-    if (rrd_lastupdate(argc - 1, argv2, &last_update,
+    if (rrd_lastupdate_r(argv2[1], &last_update,
                        &ds_cnt, &ds_namv, &last_ds) == 0) {
         listPtr = Tcl_GetObjResult(interp);
         for (i = 0; i < ds_cnt; i++) {
@@ -379,7 +411,7 @@ static int Rrd_Lastupdate(
 }
 
 static int Rrd_Fetch(
-    ClientData clientData,
+    ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
     CONST84 char *argv[])
@@ -424,7 +456,7 @@ static int Rrd_Fetch(
 
 
 static int Rrd_Graph(
-    ClientData clientData,
+    ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
     CONST84 char *argv[])
@@ -472,7 +504,7 @@ static int Rrd_Graph(
          * Must dup() file descriptor so we can fclose(stream), otherwise the fclose()
          * would close Tcl's file descriptor
          */
-        if ((fd2 = dup((int) fd1)) == -1) {
+        if ((fd2 = dup((int)fd1)) == -1) {
             Tcl_AppendResult(interp,
                              "dup() failed for file descriptor associated with \"",
                              argv[1], "\": ", strerror(errno), (char *) NULL);
@@ -534,7 +566,7 @@ static int Rrd_Graph(
 
 
 static int Rrd_Tune(
-    ClientData clientData,
+    ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
     CONST84 char *argv[])
@@ -558,7 +590,7 @@ static int Rrd_Tune(
 
 
 static int Rrd_Resize(
-    ClientData clientData,
+    ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
     CONST84 char *argv[])
@@ -582,7 +614,7 @@ static int Rrd_Resize(
 
 
 static int Rrd_Restore(
-    ClientData clientData,
+    ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
     CONST84 char *argv[])
@@ -618,6 +650,7 @@ typedef struct {
 static CmdInfo rrdCmds[] = {
     {"Rrd::create", Rrd_Create, 1}, /* Thread-safe version */
     {"Rrd::dump", Rrd_Dump, 0}, /* Thread-safe version */
+    {"Rrd::flushcached", Rrd_Flushcached, 0},
     {"Rrd::last", Rrd_Last, 0}, /* Thread-safe version */
     {"Rrd::lastupdate", Rrd_Lastupdate, 0}, /* Thread-safe version */
     {"Rrd::update", Rrd_Update, 1}, /* Thread-safe version */
diff --git a/compile b/compile
new file mode 100755 (executable)
index 0000000..ec64c62
--- /dev/null
+++ b/compile
@@ -0,0 +1,143 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
+# Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we strip `-o arg' only if arg is an object.
+       eat=1
+       case $2 in
+         *.o | *.obj)
+           ofile=$2
+           ;;
+         *)
+           set x "$@" -o "$2"
+           shift
+           ;;
+       esac
+       ;;
+      *.c)
+       cfile=$1
+       set x "$@" "$1"
+       shift
+       ;;
+      *)
+       set x "$@" "$1"
+       shift
+       ;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
index f32079abda668e5fc8f8de6f226e7b26384e8a03..da8331460888af3b367e2a9df88cb52022866c73 100755 (executable)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2008-01-23'
+timestamp='2009-04-27'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -324,6 +324,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        case `/usr/bin/uname -p` in
            sparc) echo sparc-icl-nx7; exit ;;
        esac ;;
+    s390x:SunOS:*:*)
+       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
     sun4H:SunOS:5.*:*)
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
@@ -331,7 +334,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
@@ -796,7 +812,7 @@ EOF
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd)
+           EM64T | authenticamd | genuineintel)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
            IA64)
@@ -935,6 +951,9 @@ EOF
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
        exit ;;
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-gnu
+       exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -985,9 +1004,6 @@ EOF
          a.out-i386-linux)
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
                exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
          "")
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
                # one that does not give us useful --help.
@@ -1102,8 +1118,11 @@ EOF
     pc:*:*:*)
        # Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-       echo i386-pc-msdosdjgpp
+        # the processor, so we play safe by assuming i586.
+       # Note: whatever this is, it MUST be the same as what config.sub
+       # prints for the "djgpp" host, or else GDB configury will decide that
+       # this is a cross-build.
+       echo i586-pc-msdosdjgpp
         exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
@@ -1141,6 +1160,16 @@ EOF
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
        exit ;;
@@ -1216,6 +1245,9 @@ EOF
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
        echo i586-pc-beos
        exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
        exit ;;
@@ -1324,6 +1356,9 @@ EOF
     i*86:rdos:*:*)
        echo ${UNAME_MACHINE}-pc-rdos
        exit ;;
+    i*86:AROS:*:*)
+       echo ${UNAME_MACHINE}-pc-aros
+       exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/config.rpath b/config.rpath
new file mode 100755 (executable)
index 0000000..3f1bef3
--- /dev/null
@@ -0,0 +1,571 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+#   Copyright 1996-2005 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+#   This file is free software; the Free Software Foundation gives
+#   unlimited permission to copy and/or distribute it, with or without
+#   modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+#   than 256 bytes, otherwise the compiler driver will dump core. The only
+#   known workaround is to choose shorter directory names for the build
+#   directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix*)
+      wl='-Wl,'
+      ;;
+    darwin*)
+      case "$cc_basename" in
+        xlc*)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
+    mingw* | pw32* | os2*)
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6* | nonstopux*)
+      wl='-Wl,'
+      ;;
+    newsos6)
+      ;;
+    linux*)
+      case $cc_basename in
+        icc* | ecc*)
+          wl='-Wl,'
+          ;;
+        pgcc | pgf77 | pgf90)
+          wl='-Wl,'
+          ;;
+        ccc*)
+          wl='-Wl,'
+          ;;
+        como)
+          wl='-lopt='
+          ;;
+      esac
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    sco3.2v5*)
+      ;;
+    solaris*)
+      wl='-Wl,'
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      wl='-Wl,'
+      ;;
+    sysv4*MP*)
+      ;;
+    unicos*)
+      wl='-Wl,'
+      ;;
+    uts4*)
+      ;;
+  esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  case "$host_os" in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+        ld_shlibs=no
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we cannot use
+      # them.
+      ld_shlibs=no
+      ;;
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    netbsd*)
+      ;;
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = yes; then
+    # Unlike libtool, we use -rpath here, not --rpath, since the documented
+    # option of GNU ld is called -rpath, not --rpath.
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  fi
+else
+  case "$host_os" in
+    aix3*)
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes; then
+        # Neither direct hardcoding nor static linking is supported with a
+        # broken collect2.
+        hardcode_direct=unsupported
+      fi
+      ;;
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+        # On IA64, the linker does run time linking by default, so we don't
+        # have to do anything special.
+        aix_use_runtimelinking=no
+      else
+        aix_use_runtimelinking=no
+        # Test if we are trying to use run time linking or normal
+        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+        # need to do runtime linking.
+        case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+          for ld_flag in $LDFLAGS; do
+            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+              aix_use_runtimelinking=yes
+              break
+            fi
+          done
+        esac
+      fi
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      if test "$GCC" = yes; then
+        case $host_os in aix4.[012]|aix4.[012].*)
+          collect2name=`${CC} -print-prog-name=collect2`
+          if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            hardcode_direct=yes
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+        esac
+      fi
+      # Begin _LT_AC_SYS_LIBPATH_AIX.
+      echo 'int main () { return 0; }' > conftest.c
+      ${CC} ${LDFLAGS} conftest.c -o conftest
+      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      if test -z "$aix_libpath"; then
+        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      fi
+      if test -z "$aix_libpath"; then
+        aix_libpath="/usr/lib:/lib"
+      fi
+      rm -f conftest.c conftest
+      # End _LT_AC_SYS_LIBPATH_AIX.
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        fi
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+    bsdi[45]*)
+      ;;
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      libext=lib
+      ;;
+    darwin* | rhapsody*)
+      hardcode_direct=no
+      if test "$GCC" = yes ; then
+        :
+      else
+        case "$cc_basename" in
+          xlc*)
+            ;;
+          *)
+            ld_shlibs=no
+            ;;
+        esac
+      fi
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+    freebsd2.2*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    freebsd2*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      ;;
+    hpux10* | hpux11*)
+      if test "$with_gnu_ld" = no; then
+        case "$host_cpu" in
+          hppa*64*)
+            hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+            hardcode_libdir_separator=:
+            hardcode_direct=no
+            ;;
+          ia64*)
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_direct=no
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+          *)
+            hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+            hardcode_libdir_separator=:
+            hardcode_direct=yes
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+        esac
+      fi
+      ;;
+    irix5* | irix6* | nonstopux*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    netbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    newsos6)
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    openbsd*)
+      hardcode_direct=yes
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      else
+        case "$host_os" in
+          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+            hardcode_libdir_flag_spec='-R$libdir'
+            ;;
+          *)
+            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+            ;;
+        esac
+      fi
+      ;;
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      ;;
+    osf3*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    osf4* | osf5*)
+      if test "$GCC" = yes; then
+        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+        # Both cc and cxx compiler support -rpath directly
+        hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+    sco3.2v5*)
+      ;;
+    solaris*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+    sunos4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    sysv4)
+      case $host_vendor in
+        sni)
+          hardcode_direct=yes # is this really true???
+          ;;
+        siemens)
+          hardcode_direct=no
+          ;;
+        motorola)
+          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+          ;;
+      esac
+      ;;
+    sysv4.3*)
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+        ld_shlibs=yes
+      fi
+      ;;
+    sysv4.2uw2*)
+      hardcode_direct=yes
+      hardcode_minus_L=no
+      ;;
+    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      ;;
+    sysv5*)
+      hardcode_libdir_flag_spec=
+      ;;
+    uts4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    *)
+      ld_shlibs=no
+      ;;
+  esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+libname_spec='lib$name'
+case "$host_os" in
+  aix3*)
+    ;;
+  aix4* | aix5*)
+    ;;
+  amigaos*)
+    ;;
+  beos*)
+    ;;
+  bsdi[45]*)
+    ;;
+  cygwin* | mingw* | pw32*)
+    shrext=.dll
+    ;;
+  darwin* | rhapsody*)
+    shrext=.dylib
+    ;;
+  dgux*)
+    ;;
+  freebsd1*)
+    ;;
+  kfreebsd*-gnu)
+    ;;
+  freebsd*)
+    ;;
+  gnu*)
+    ;;
+  hpux9* | hpux10* | hpux11*)
+    case "$host_cpu" in
+      ia64*)
+        shrext=.so
+        ;;
+      hppa*64*)
+        shrext=.sl
+        ;;
+      *)
+        shrext=.sl
+        ;;
+    esac
+    ;;
+  irix5* | irix6* | nonstopux*)
+    case "$host_os" in
+      irix5* | nonstopux*)
+        libsuff= shlibsuff=
+        ;;
+      *)
+        case $LD in
+          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+          *) libsuff= shlibsuff= ;;
+        esac
+        ;;
+    esac
+    ;;
+  linux*oldld* | linux*aout* | linux*coff*)
+    ;;
+  linux*)
+    ;;
+  knetbsd*-gnu)
+    ;;
+  netbsd*)
+    ;;
+  newsos6)
+    ;;
+  nto-qnx*)
+    ;;
+  openbsd*)
+    ;;
+  os2*)
+    libname_spec='$name'
+    shrext=.dll
+    ;;
+  osf3* | osf4* | osf5*)
+    ;;
+  sco3.2v5*)
+    ;;
+  solaris*)
+    ;;
+  sunos4*)
+    ;;
+  sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+    ;;
+  sysv4*MP*)
+    ;;
+  uts4*)
+    ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
index 6759825a5b7fcf64476b4398dc0e30b3090b925c..a39437d0158ed7058a189617db490472252a70ae 100755 (executable)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2008-01-16'
+timestamp='2009-04-17'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -122,6 +122,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -249,13 +250,16 @@ case $basic_machine in
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore | mep \
+       | maxq | mb | microblaze | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
-       | mips64vr | mips64vrel \
+       | mips64octeon | mips64octeonel \
        | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
        | mips64vr4100 | mips64vr4100el \
        | mips64vr4300 | mips64vr4300el \
        | mips64vr5000 | mips64vr5000el \
@@ -268,6 +272,7 @@ case $basic_machine in
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
+       | moxie \
        | mt \
        | msp430 \
        | nios | nios2 \
@@ -277,7 +282,7 @@ case $basic_machine in
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
        | score \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -286,7 +291,7 @@ case $basic_machine in
        | v850 | v850e \
        | we32k \
        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
+       | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
        m6811 | m68hc11 | m6812 | m68hc12)
@@ -329,14 +334,17 @@ case $basic_machine in
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
+       | mips64octeon-* | mips64octeonel-* \
        | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
        | mips64vr4100-* | mips64vr4100el-* \
        | mips64vr4300-* | mips64vr4300el-* \
        | mips64vr5000-* | mips64vr5000el-* \
@@ -358,20 +366,20 @@ case $basic_machine in
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
        | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
        | tron-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
        | xstormy16-* | xtensa*-* \
        | ymp-* \
-       | z8k-*)
+       | z8k-* | z80-*)
                ;;
        # Recognize the basic CPU types without company name, with glob match.
        xtensa*)
@@ -439,6 +447,10 @@ case $basic_machine in
                basic_machine=m68k-apollo
                os=-bsd
                ;;
+       aros)
+               basic_machine=i386-pc
+               os=-aros
+               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -459,6 +471,10 @@ case $basic_machine in
                basic_machine=c90-cray
                os=-unicos
                ;;
+        cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
        convex-c1)
                basic_machine=c1-convex
                os=-bsd
@@ -526,6 +542,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
        djgpp)
                basic_machine=i586-pc
                os=-msdosdjgpp
@@ -1128,6 +1148,10 @@ case $basic_machine in
                basic_machine=z8k-unknown
                os=-sim
                ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
        none)
                basic_machine=none-none
                os=-none
@@ -1166,7 +1190,7 @@ case $basic_machine in
        we32k)
                basic_machine=we32k-att
                ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
                basic_machine=sh-unknown
                ;;
        sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1238,8 +1262,9 @@ case $os in
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
+             | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1248,7 +1273,7 @@ case $os in
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1388,6 +1413,9 @@ case $os in
        -zvmoe)
                os=-zvmoe
                ;;
+       -dicos*)
+               os=-dicos
+               ;;
        -none)
                ;;
        *)
index 4975fee92c10c8c1953ccedbb829eb95b39d55a4..66b0ca7f26c20073dbf90498e360d0181d14f06f 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for rrdtool 1.3.8.
+# Generated by GNU Autoconf 2.63 for rrdtool 1.3.99909060808.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -743,11 +743,10 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='rrdtool'
 PACKAGE_TARNAME='rrdtool'
-PACKAGE_VERSION='1.3.8'
-PACKAGE_STRING='rrdtool 1.3.8'
+PACKAGE_VERSION='1.3.99909060808'
+PACKAGE_STRING='rrdtool 1.3.99909060808'
 PACKAGE_BUGREPORT=''
 
-ac_default_prefix=/usr/local/rrdtool-$PACKAGE_VERSION
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -784,7 +783,10 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='LTLIBOBJS
+ac_default_prefix=/usr/local/rrdtool-$PACKAGE_VERSION
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
 LIBOBJS
 RRDDOCDIR
 TROFF
@@ -814,6 +816,23 @@ BUILD_TCL_SITE_FALSE
 BUILD_TCL_SITE_TRUE
 BUILD_TCL_FALSE
 BUILD_TCL_TRUE
+BUILD_LUA_FALSE
+BUILD_LUA_TRUE
+LUA50_FALSE
+LUA50_TRUE
+LUA_SITE_LINSTALL_FALSE
+LUA_SITE_LINSTALL_TRUE
+LUA_SITE_CINSTALL_FALSE
+LUA_SITE_CINSTALL_TRUE
+LUA_NEED_OUR_COMPAT51_FALSE
+LUA_NEED_OUR_COMPAT51_TRUE
+LUA_DEFINES
+LUA_LFLAGS
+LUA_CFLAGS
+LUA_INSTALL_LMOD
+LUA_INSTALL_CMOD
+COMP_LUA
+LUA
 COMP_RUBY
 RUBY_MAKE_OPTIONS
 RUBY
@@ -833,6 +852,8 @@ CORE_LIBS
 PKGCONFIG
 BUILD_RRDCGI_FALSE
 BUILD_RRDCGI_TRUE
+BUILD_LIBDBI_FALSE
+BUILD_LIBDBI_TRUE
 BUILD_MULTITHREAD_FALSE
 BUILD_MULTITHREAD_TRUE
 PTHREAD_CFLAGS
@@ -844,52 +865,37 @@ MULTITHREAD_CFLAGS
 BUILD_GETOPT_FALSE
 BUILD_GETOPT_TRUE
 RRD_GETOPT_LONG
-BUILD_LIBINTL_FALSE
-BUILD_LIBINTL_TRUE
-LIB_LIBINTL
-ALL_LINGUAS
-INTLTOOL_PERL
-MSGMERGE
-INTLTOOL_POLICY_RULE
-INTLTOOL_SERVICE_RULE
-INTLTOOL_THEME_RULE
-INTLTOOL_SCHEMAS_RULE
-INTLTOOL_CAVES_RULE
-INTLTOOL_XML_NOMERGE_RULE
-INTLTOOL_XML_RULE
-INTLTOOL_KBD_RULE
-INTLTOOL_XAM_RULE
-INTLTOOL_UI_RULE
-INTLTOOL_SOUNDLIST_RULE
-INTLTOOL_SHEET_RULE
-INTLTOOL_SERVER_RULE
-INTLTOOL_PONG_RULE
-INTLTOOL_OAF_RULE
-INTLTOOL_PROP_RULE
-INTLTOOL_KEYS_RULE
-INTLTOOL_DIRECTORY_RULE
-INTLTOOL_DESKTOP_RULE
-INTLTOOL_EXTRACT
-INTLTOOL_MERGE
-INTLTOOL_UPDATE
-MKINSTALLDIRS
 POSUB
-POFILES
-PO_IN_DATADIR_FALSE
-PO_IN_DATADIR_TRUE
+LTLIBINTL
+LIBINTL
 INTLLIBS
+INTL_LIBTOOL_SUFFIX_PREFIX
+INTLOBJS
+GENCAT
 INSTOBJEXT
-GMOFILES
 DATADIRNAME
 CATOBJEXT
-CATALOGS
+USE_INCLUDED_LIBINTL
+BUILD_INCLUDED_LIBINTL
+INTLBISON
+LTLIBICONV
+LIBICONV
+HAVE_WPRINTF
+HAVE_SNPRINTF
+HAVE_ASPRINTF
+HAVE_POSIX_PRINTF
+INTL_MACOSX_LIBS
+GLIBC21
+ALLOCA
+GLIBC2
+MSGMERGE
 XGETTEXT
 GMSGFMT
-MSGFMT_OPTS
 MSGFMT
 USE_NLS
-GETTEXT_PACKAGE
+MKINSTALLDIRS
 RRD_DEFAULT_FONT
+WERROR
 OTOOL64
 OTOOL
 LIPO
@@ -905,11 +911,16 @@ ac_ct_DUMPBIN
 DUMPBIN
 LD
 FGREP
-EGREP
-GREP
 SED
 LIBTOOL
-CPP
+STATIC_PROGRAMS_FALSE
+STATIC_PROGRAMS_TRUE
+RRDGRAPH_YLEGEND_ANGLE
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
@@ -919,19 +930,6 @@ AMDEP_TRUE
 am__quote
 am__include
 DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-STATIC_PROGRAMS_FALSE
-STATIC_PROGRAMS_TRUE
-RRDGRAPH_YLEGEND_ANGLE
-MAINT
-MAINTAINER_MODE_FALSE
-MAINTAINER_MODE_TRUE
 am__untar
 am__tar
 AMTAR
@@ -955,6 +953,16 @@ am__isrc
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
+EGREP
+GREP
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
 target_os
 target_vendor
 target_cpu
@@ -1010,27 +1018,34 @@ PERLFLAGS'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_dependency_tracking
+enable_silent_rules
 enable_maintainer_mode
 enable_rrdcgi
 with_rrd_default_font
 enable_mmap
 enable_pthread
 enable_static_programs
-enable_dependency_tracking
 enable_shared
 enable_static
 with_pic
 enable_fast_install
 with_gnu_ld
 enable_libtool_lock
-enable_libintl
 enable_nls
+enable_rpath
+with_libiconv_prefix
+with_included_gettext
+with_libintl_prefix
+enable_libdbi
 enable_perl
 enable_perl_site_install
 with_perl_options
 enable_ruby
 enable_ruby_site_install
 with_ruby_options
+enable_lua
+enable_lua_site_install
 enable_tcl
 with_tcllib
 enable_python
@@ -1038,13 +1053,13 @@ enable_python
       ac_precious_vars='build_alias
 host_alias
 target_alias
-RRDGRAPH_YLEGEND_ANGLE
 CC
 CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
 CPP
+RRDGRAPH_YLEGEND_ANGLE
 PERLCC
 PERLCCFLAGS
 PERLLD
@@ -1602,7 +1617,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures rrdtool 1.3.8 to adapt to many kinds of systems.
+\`configure' configures rrdtool 1.3.99909060808 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1673,7 +1688,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of rrdtool 1.3.8:";;
+     short | recursive ) echo "Configuration of rrdtool 1.3.99909060808:";;
    esac
   cat <<\_ACEOF
 
@@ -1681,35 +1696,53 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
   --enable-maintainer-mode  enable make rules and dependencies not useful
                          (and sometimes confusing) to the casual installer
   --disable-rrdcgi        disable building of rrdcgi
   --disable-mmap          disable mmap in rrd_update, use seek+write instead
   --disable-pthread       disable multithread support
-  --enable-static-programs  Build static programs
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-static-programs
+                          Build static programs
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
-  --disable-libintl        i18n support (libintl)
   --disable-nls           do not use Native Language Support
+  --disable-rpath         do not hardcode runtime library paths
+  --disable-libdbi        do not build in support for libdbi
   --disable-perl          do not build the perl modules
-  --enable-perl-site-install   by default the rrdtool perl modules are installed
-                         together with rrdtool in $prefix/lib/perl. You have to
-                          put a 'use lib qw($prefix/lib/perl)' into your scripts
-                          when you want to use them. When you set this option
-                          the perl modules will get installed wherever
+  --enable-perl-site-install
+                          by default the rrdtool perl modules are installed
+                          together with rrdtool in $prefix/lib/perl. You have
+                          to put a 'use lib qw($prefix/lib/perl)' into your
+                          scripts when you want to use them. When you set this
+                          option the perl modules will get installed wherever
                           your perl setup thinks it is best.
   --disable-ruby          do not build the ruby modules
-  --enable-ruby-site-install   by default the rrdtool ruby modules are installed
-                         together with rrdtool in $prefix/lib/ruby. You have to
-                          add $prefix/lib/ruby/$ruby_version/$sitearch to you $: variable
-                          for ruby to find the RRD.so file.
+  --enable-ruby-site-install
+                          by default the rrdtool ruby modules are installed
+                          together with rrdtool in $prefix/lib/ruby. You have
+                          to add $prefix/lib/ruby/$ruby_version/$sitearch to
+                          your $: variable for ruby to find the RRD.so file.
+  --disable-lua           do not build the lua modules
+  --enable-lua-site-install
+                          by default the lua module is installed together with
+                          rrdtool in $prefix/lib/lua/$lua_version. You have to
+                          add $prefix/lib/lua/$lua_version/?.so to
+                          package.cpath for lua to find 'rrd.so'. For lua 5.0
+                          you may also need to change LUA_PATH to the same
+                          dir, to require 'compat-5.1'. When you set this
+                          option the lua modules will get installed wherever
+                          your Lua setup thinks it is best. WARNING: if you
+                          set this option, system lua modules compat-5.1.lua
+                          and rrd.so, if any, may be overwritten.
   --disable-tcl           do not build the tcl modules
-  --enable-tcl-site        install the tcl extension in the tcl tree
+  --enable-tcl-site       install the tcl extension in the tcl tree
   --disable-python        do not build the python modules
 
 Optional Packages:
@@ -1719,6 +1752,12 @@ Optional Packages:
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-gnu-ld           assume the C compiler uses GNU ld default=no
+  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
+  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
+  --with-included-gettext use the GNU gettext library included here
+  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
+  --without-libintl-prefix     don't search for libintl in includedir and libdir
   --with-perl-options=OPTIONS  options to pass on command-line when
                           generating Makefile from Makefile.PL. If you set this
                           option, interesting things may happen unless you know
@@ -1730,8 +1769,6 @@ Optional Packages:
   --with-tcllib=DIR       location of the tclConfig.sh
 
 Some influential environment variables:
-  RRDGRAPH_YLEGEND_ANGLE
-              Vertical label angle: -90.0 (default) or 90.0
   CC          C compiler command
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
@@ -1740,6 +1777,8 @@ Some influential environment variables:
   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
+  RRDGRAPH_YLEGEND_ANGLE
+              Vertical label angle: -90.0 (default) or 90.0
   PERLCC      [] C compiler for Perl modules
   PERLCCFLAGS [] CC flags for Perl modules
   PERLLD      [same], [as], [PERLCC] Linker for Perl modules
@@ -1811,7 +1850,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-rrdtool configure 1.3.8
+rrdtool configure 1.3.99909060808
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1825,7 +1864,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by rrdtool $as_me 1.3.8, which was
+It was created by rrdtool $as_me 1.3.99909060808, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2194,10 +2233,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-NUMVERS=1.3008
+NUMVERS=1.399909060808
 
 
-LIBVERS=4:7:0
+LIBVERS=5:0:1
 
 
 ac_aux_dir=
@@ -2357,228 +2396,114 @@ test -n "$target_alias" &&
   test "$program_prefix$program_suffix$program_transform_name" = \
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
-am__api_version='1.10'
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
-         if test $ac_prog = install &&
-           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-           # AIX install.  It has an incompatible calling convention.
-           :
-         elif test $ac_prog = install &&
-           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           rm -rf conftest.one conftest.two conftest.dir
-           echo one > conftest.one
-           echo two > conftest.two
-           mkdir conftest.dir
-           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-             test -s conftest.one && test -s conftest.two &&
-             test -s conftest.dir/conftest.one &&
-             test -s conftest.dir/conftest.two
-           then
-             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-             break 3
-           fi
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
 done
 IFS=$as_save_IFS
 
-rm -rf conftest.one conftest.two conftest.dir
-
 fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&5
-$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-Check your system clock" >&5
-$as_echo "$as_me: error: newly created file is older than distributed files!
-Check your system clock" >&2;}
-   { (exit 1); exit 1; }; }
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
-
-{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in mkdir gmkdir; do
-        for ac_exec_ext in '' $ac_executable_extensions; do
-          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
-          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-            'mkdir (GNU coreutils) '* | \
-            'mkdir (coreutils) '* | \
-            'mkdir (fileutils) '4.1*)
-              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-              break 3;;
-          esac
-        done
-       done
-done
-IFS=$as_save_IFS
-
-fi
-
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    test -d ./--version && rmdir ./--version
-    MKDIR_P="$ac_install_sh -d"
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
 
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
 esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
 
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -2587,7 +2512,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AWK="$ac_prog"
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -2597,128 +2522,87 @@ IFS=$as_save_IFS
 
 fi
 fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-       @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
 fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
 fi
 
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  am__isrc=' -I$(srcdir)'
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
 
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
 fi
-
-
-# Define the identity of the package.
- PACKAGE='rrdtool'
- VERSION='1.3.8'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
+if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -2727,7 +2611,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -2737,28 +2621,32 @@ IFS=$as_save_IFS
 
 fi
 fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
+    test -n "$CC" && break
+  done
 fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -2767,7 +2655,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
+    ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -2777,17 +2665,21 @@ IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -2795,1043 +2687,1045 @@ yes:)
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    STRIP=$ac_ct_STRIP
+    CC=$ac_ct_CC
   fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
-    # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
-  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
-  USE_MAINTAINER_MODE=no
 fi
 
-  { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-$as_echo "$USE_MAINTAINER_MODE" >&6; }
-   if test $USE_MAINTAINER_MODE = yes; then
-  MAINTAINER_MODE_TRUE=
-  MAINTAINER_MODE_FALSE='#'
-else
-  MAINTAINER_MODE_TRUE='#'
-  MAINTAINER_MODE_FALSE=
 fi
 
-  MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-
-ac_config_headers="$ac_config_headers rrd_config.h"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
 
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
 
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
 
-cat >>confdefs.h <<_ACEOF
-#define RRDGRAPH_YLEGEND_ANGLE ${RRDGRAPH_YLEGEND_ANGLE:-90.0}
-_ACEOF
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
 
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+       ;;
+    [ab].out )
+       # We found the default executable, but exeext='' is most
+       # certainly right.
+       break;;
+    *.* )
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
+       break;;
+    * )
+       break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
 
-# Check whether --enable-rrdcgi was given.
-if test "${enable_rrdcgi+set}" = set; then
-  enableval=$enable_rrdcgi;
 else
-  enable_rrdcgi=yes
+  ac_file=''
 fi
 
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }; }
+fi
 
-# Check whether --with-rrd-default-font was given.
-if test "${with_rrd_default_font+set}" = set; then
-  withval=$with_rrd_default_font; RRD_DEFAULT_FONT=$withval
-else
+ac_exeext=$ac_cv_exeext
 
-  if test -d ${WINDIR:-nodir}/cour.ttf ; then
-       RRD_DEFAULT_FONT=`cd $WINDIR;pwd`/cour.ttf
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
   else
-       RRD_DEFAULT_FONT='"DejaVu Sans Mono,Bitstream Vera Sans Mono,monospace,Courier"'
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+    fi
   fi
-
 fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
 
-# Check whether --enable-mmap was given.
-if test "${enable_mmap+set}" = set; then
-  enableval=$enable_mmap;
-else
-  enable_mmap=yes
-fi
-
-
-# Check whether --enable-pthread was given.
-if test "${enable_pthread+set}" = set; then
-  enableval=$enable_pthread;
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) break;;
+  esac
+done
 else
-  enable_pthread=yes
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 fi
 
+rm -f conftest$ac_cv_exeext
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
 
-# Check whether --enable-static-programs was given.
-if test "${enable_static_programs+set}" = set; then
-  enableval=$enable_static_programs; case "${enableval}" in
-       yes) staticprogs=yes ;;
-       no)  staticprogs=no ;;
-       *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-static-programs" >&5
-$as_echo "$as_me: error: bad value ${enableval} for --enable-static-programs" >&2;}
-   { (exit 1); exit 1; }; } ;;
-     esac
-else
-  staticprogs=no
-fi
-
- if test "x$staticprogs" = "xyes"; then
-  STATIC_PROGRAMS_TRUE=
-  STATIC_PROGRAMS_FALSE='#'
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  STATIC_PROGRAMS_TRUE='#'
-  STATIC_PROGRAMS_FALSE=
-fi
-
-
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-case $TERM in
-       #   for the most important terminal types we directly know the sequences
-       xterm|xterm*|vt220|vt220*)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
-       ;;
-       vt100|vt100*|cygwin)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
-       ;;
-       *)
-               T_MD=''
-               T_ME=''
-       ;;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-  { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-  { $as_echo "$as_me:$LINENO: result: ${T_MD}Audit Compilation Environment${T_ME}" >&5
-$as_echo "${T_MD}Audit Compilation Environment${T_ME}" >&6; }
-
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_compiler_gnu=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
 else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+int
+main ()
+{
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-    CC=$ac_ct_CC
-  fi
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
 else
-  CC="$ac_cv_prog_CC"
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+       CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
 else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
   fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
 fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
 
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
 int
 main ()
 {
-
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
   ;
   return 0;
 }
 _ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link_default") 2>&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-       ;;
-    [ab].out )
-       # We found the default executable, but exeext='' is most
-       # certainly right.
-       break;;
-    *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-       then :; else
-          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-       fi
-       # We set ac_cv_exeext here because the later test for it is not
-       # safe: cross compilers may not add the suffix if given an `-o'
-       # argument, so we may need to know it at that point already.
-       # Even if this section looks crufty: it has the advantage of
-       # actually working.
-       break;;
-    * )
-       break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
 else
-  ac_file=''
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+
 fi
 
-ac_exeext=$ac_cv_exeext
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-       cross_compiling=yes
-    else
-       { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-    fi
-  fi
 fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
 
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-         break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
 
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
 _ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  :
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+  # Broken: fails on valid input.
+continue
 fi
 
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
+#include <ac_nonexistent.h>
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_compiler_gnu=yes
+       }; then
+  # Broken: success on invalid input.
+continue
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_compiler_gnu=no
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
+rm -f conftest.err conftest.$ac_ext
 
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
+    done
+    ac_cv_prog_CPP=$CPP
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
+fi
+  CPP=$ac_cv_prog_CPP
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+       }; then
   :
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_c_werror_flag=$ac_save_c_werror_flag
-        CFLAGS="-g"
-        cat >conftest.$ac_ext <<_ACEOF
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+#include <ac_nonexistent.h>
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
+       }; then
+  # Broken: success on invalid input.
+continue
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+  # Passes both tests.
+ac_preproc_ok=:
+break
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+rm -f conftest.err conftest.$ac_ext
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
   fi
+else
+  ac_cv_path_GREP=$GREP
 fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+      $ac_path_EGREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
 
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+   fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
 
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
 int
 main ()
 {
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+
   ;
   return 0;
 }
 _ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
+rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3849,358 +3743,277 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_c89=$ac_arg
+  ac_cv_header_stdc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
+       ac_cv_header_stdc=no
 fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-DEPDIR="${am__leading_dot}deps"
 
-ac_config_commands="$ac_config_commands depfiles"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
 
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo done
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
 fi
+rm -f conftest*
 
-
-{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
-  enableval=$enable_dependency_tracking;
 fi
 
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
 else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
+  ac_cv_header_stdc=no
 fi
+rm -f conftest*
 
+fi
 
-
-depcc="$CC"   am_compiler_list=
-
-{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  $as_echo_n "(cached) " >&6
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
 else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    case $depmode in
-    nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    none) break ;;
-    esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
-    if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
 
-  cd ..
-  rm -rf conftest.dir
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
 else
-  am_cv_CC_dependencies_compiler_type=none
-fi
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
+
 fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
 fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                 inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
+$ac_includes_default
+
+#include <$ac_header>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       }; then
-  :
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Broken: fails on valid input.
-continue
+       eval "$as_ac_Header=no"
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
+fi
+
+done
+
+
+
+  if test "${ac_cv_header_minix_config_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
+$as_echo_n "checking for minix/config.h... " >&6; }
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+$as_echo "$ac_cv_header_minix_config_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
+$as_echo_n "checking minix/config.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <ac_nonexistent.h>
+$ac_includes_default
+#include <minix/config.h>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
+       ac_header_compiler=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
+$as_echo_n "checking minix/config.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
+#include <minix/config.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -4219,960 +4032,1243 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
        }; then
-  :
+  ac_header_preproc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Broken: fails on valid input.
-continue
+  ac_header_preproc=no
 fi
 
 rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: minix/config.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
+$as_echo_n "checking for minix/config.h... " >&6; }
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_minix_config_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+$as_echo "$ac_cv_header_minix_config_h" >&6; }
+
+fi
+if test "x$ac_cv_header_minix_config_h" = x""yes; then
+  MINIX=yes
+else
+  MINIX=
+fi
+
+
+  if test "$MINIX" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_SOURCE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_1_SOURCE 2
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _MINIX 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <ac_nonexistent.h>
+
+#        define __EXTENSIONS__ 1
+         $ac_includes_default
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
+       } && test -s conftest.$ac_objext; then
+  ac_cv_safe_to_define___extensions__=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
+       ac_cv_safe_to_define___extensions__=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    cat >>confdefs.h <<\_ACEOF
+#define __EXTENSIONS__ 1
+_ACEOF
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-case `pwd` in
-  *\ * | *\    *)
-    { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
-esac
-
-
-
-macro_version='2.2.6'
-macro_revision='1.3012'
-
-
-
-
-
-
-
-
+  cat >>confdefs.h <<\_ACEOF
+#define _ALL_SOURCE 1
+_ACEOF
 
+  cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
 
+  cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
 
+  cat >>confdefs.h <<\_ACEOF
+#define _TANDEM_SOURCE 1
+_ACEOF
 
 
-ltmain="$ac_aux_dir/ltmain.sh"
+am__api_version='1.11'
 
-{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
-     for ac_i in 1 2 3 4 5 6 7; do
-       ac_script="$ac_script$as_nl$ac_script"
-     done
-     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
-     $as_unset ac_script || ac_script=
-     if test -z "$SED"; then
-  ac_path_SED_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
-  # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
-  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo '' >> "conftest.nl"
-    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_SED_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_SED="$ac_path_SED"
-      ac_path_SED_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+         if test $ac_prog = install &&
+           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         elif test $ac_prog = install &&
+           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           rm -rf conftest.one conftest.two conftest.dir
+           echo one > conftest.one
+           echo two > conftest.two
+           mkdir conftest.dir
+           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+             test -s conftest.one && test -s conftest.two &&
+             test -s conftest.dir/conftest.one &&
+             test -s conftest.dir/conftest.two
+           then
+             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+             break 3
+           fi
+         fi
+       fi
+      done
+    done
+    ;;
 esac
 
-      $ac_path_SED_found && break 3
-    done
-  done
 done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_SED"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
-$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_SED=$SED
-fi
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
-  rm -f conftest.sed
+rm -rf conftest.one conftest.two conftest.dir
 
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
 
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
+{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
+$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
+$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
 
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
 
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
 
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+$as_echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
 
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
 
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
 done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
 else
-  ac_cv_path_GREP=$GREP
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
 
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
+  for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
 done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
+
 fi
 
-   fi
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
 
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
 
-{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
-   then ac_cv_path_FGREP="$GREP -F"
-   else
-     if test -z "$FGREP"; then
-  ac_path_FGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in fgrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
-  # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'FGREP' >> "conftest.nl"
-    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_FGREP="$ac_path_FGREP"
-      ac_path_FGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_FGREP_found && break 3
-    done
-  done
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
 done
 IFS=$as_save_IFS
-  if test -z "$ac_cv_path_FGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_FGREP=$FGREP
-fi
 
-   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-test -z "$GREP" && GREP=grep
+  test -n "$AWK" && break
+done
 
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
 
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
 
+DEPDIR="${am__leading_dot}deps"
 
+ac_config_commands="$ac_config_commands depfiles"
 
 
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
 
 
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
 
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval=$enable_dependency_tracking;
+fi
 
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
 
 
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then
+  enableval=$enable_silent_rules;
+fi
 
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=1;;
+esac
+AM_BACKSLASH='\'
 
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
 
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
 
 
+# Define the identity of the package.
+ PACKAGE='rrdtool'
+ VERSION='1.3.99909060808'
 
 
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
 
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | ?:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
-      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
-  { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-      *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-      esac
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
     fi
   done
-  IFS="$lt_save_ifs"
+
+  cd ..
+  rm -rf conftest.dir
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  am_cv_CC_dependencies_compiler_type=none
 fi
+
 fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  { $as_echo "$as_me:$LINENO: result: $LD" >&5
-$as_echo "$LD" >&6; }
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
 fi
-test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  $as_echo_n "(cached) " >&6
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
 else
-  # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac
+  USE_MAINTAINER_MODE=no
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
 
+  { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
 
+  MAINT=$MAINTAINER_MODE_TRUE
 
 
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then
+  enableval=$enable_silent_rules;
+fi
 
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=0;;
+esac
+AM_BACKSLASH='\'
 
+ac_config_headers="$ac_config_headers rrd_config.h"
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-       # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-       #   nm: unknown option "B" ignored
-       # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
-         lt_cv_path_NM="$tmp_nm -B"
-         break
-         ;;
-       *)
-         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-         */dev/null*)
-           lt_cv_path_NM="$tmp_nm -p"
-           break
-           ;;
-         *)
-           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-           continue # so that we can try to find one that supports BSD flags
-           ;;
-         esac
-         ;;
-       esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  : ${lt_cv_path_NM=no}
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
-else
-  # Didn't find any BSD compatible name lister, look for dumpbin.
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DUMPBIN"; then
-  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
-  { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-    test -n "$DUMPBIN" && break
-  done
-fi
-if test -z "$DUMPBIN"; then
-  ac_ct_DUMPBIN=$DUMPBIN
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_DUMPBIN"; then
-  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
-if test -n "$ac_ct_DUMPBIN"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define RRDGRAPH_YLEGEND_ANGLE ${RRDGRAPH_YLEGEND_ANGLE:-90.0}
+_ACEOF
+
+
+# Check whether --enable-rrdcgi was given.
+if test "${enable_rrdcgi+set}" = set; then
+  enableval=$enable_rrdcgi;
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  enable_rrdcgi=yes
 fi
 
 
-  test -n "$ac_ct_DUMPBIN" && break
-done
 
-  if test "x$ac_ct_DUMPBIN" = x; then
-    DUMPBIN=":"
+# Check whether --with-rrd-default-font was given.
+if test "${with_rrd_default_font+set}" = set; then
+  withval=$with_rrd_default_font; RRD_DEFAULT_FONT=$withval
+else
+
+  if test -d ${WINDIR:-nodir}/cour.ttf ; then
+       RRD_DEFAULT_FONT=`cd $WINDIR;pwd`/cour.ttf
   else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    DUMPBIN=$ac_ct_DUMPBIN
+       RRD_DEFAULT_FONT='"DejaVu Sans Mono,Bitstream Vera Sans Mono,monospace,Courier"'
   fi
-fi
 
-
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
-  fi
 fi
-test -z "$NM" && NM=nm
 
 
+# Check whether --enable-mmap was given.
+if test "${enable_mmap+set}" = set; then
+  enableval=$enable_mmap;
+else
+  enable_mmap=yes
+fi
 
 
+# Check whether --enable-pthread was given.
+if test "${enable_pthread+set}" = set; then
+  enableval=$enable_pthread;
+else
+  enable_pthread=yes
+fi
 
 
-{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then
-  $as_echo_n "(cached) " >&6
+# Check whether --enable-static-programs was given.
+if test "${enable_static_programs+set}" = set; then
+  enableval=$enable_static_programs; case "${enableval}" in
+       yes) staticprogs=yes ;;
+       no)  staticprogs=no ;;
+       *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-static-programs" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --enable-static-programs" >&2;}
+   { (exit 1); exit 1; }; } ;;
+     esac
 else
-  lt_cv_nm_interface="BSD nm"
-  echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:4913: $ac_compile\"" >&5)
-  (eval "$ac_compile" 2>conftest.err)
-  cat conftest.err >&5
-  (eval echo "\"\$as_me:4916: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
-  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
-  cat conftest.err >&5
-  (eval echo "\"\$as_me:4919: output\"" >&5)
-  cat conftest.out >&5
-  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
-    lt_cv_nm_interface="MS dumpbin"
-  fi
-  rm -f conftest*
+  staticprogs=no
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+ if test "x$staticprogs" = "xyes"; then
+  STATIC_PROGRAMS_TRUE=
+  STATIC_PROGRAMS_FALSE='#'
 else
-  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
+  STATIC_PROGRAMS_TRUE='#'
+  STATIC_PROGRAMS_FALSE=
 fi
 
-# find the maximum length of command line arguments
-{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-    i=0
-  teststring="ABCD"
 
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
 
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
 
-  cygwin* | mingw* | cegcc*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
+case $TERM in
+       #   for the most important terminal types we directly know the sequences
+       xterm|xterm*|vt220|vt220*)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+       ;;
+       vt100|vt100*|cygwin)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+       ;;
+       *)
+               T_MD=''
+               T_ME=''
+       ;;
+esac
+  { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+  { $as_echo "$as_me:$LINENO: result: ${T_MD}Audit Compilation Environment${T_ME}" >&5
+$as_echo "${T_MD}Audit Compilation Environment${T_ME}" >&6; }
 
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
 
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[         ]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    else
-      # Make teststring a little bigger before we do anything with it.
-      # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
-        teststring=$teststring$teststring
-      done
-      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-      # If test is not a shell built-in, we'll probably end up computing a
-      # maximum length that is only half of the actual maximum length, but
-      # we can't tell.
-      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-                = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
-             test $i != 17 # 1/2 MB should be enough
-      do
-        i=`expr $i + 1`
-        teststring=$teststring$teststring
-      done
-      # Only check the string length outside the loop.
-      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
-      teststring=
-      # Add a significant safety factor because C++ compilers can tack on
-      # massive amounts of additional arguments before passing them to the
-      # linker.  It appears as though 1/2 is a usable value.
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    fi
-    ;;
-  esac
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
 fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
-  { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  { $as_echo "$as_me:$LINENO: result: none" >&5
-$as_echo "none" >&6; }
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-
-
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Broken: fails on valid input.
+continue
+fi
 
+rm -f conftest.err conftest.$ac_ext
 
-: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
 
+rm -f conftest.err conftest.$ac_ext
 
-{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
 
+    done
+    ac_cv_prog_CPP=$CPP
 
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  lt_unset=unset
+fi
+  CPP=$ac_cv_prog_CPP
 else
-  lt_unset=false
+  ac_cv_prog_CPP=$CPP
 fi
-
-
-
-
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  lt_SP2NL='tr \040 \012'
-  lt_NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  lt_SP2NL='tr \100 \n'
-  lt_NL2SP='tr \r\n \100\100'
-  ;;
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Broken: fails on valid input.
+continue
+fi
 
+rm -f conftest.err conftest.$ac_ext
 
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
 
+rm -f conftest.err conftest.$ac_ext
 
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then
-  $as_echo_n "(cached) " >&6
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
 else
-  lt_cv_ld_reload_flag='-r'
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-
-
-
-
-
-
-
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$OBJDUMP"; then
-  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -5181,7 +5277,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5191,10 +5287,10 @@ IFS=$as_save_IFS
 
 fi
 fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
-  { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
@@ -5202,17 +5298,17 @@ fi
 
 
 fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
-  ac_ct_OBJDUMP=$OBJDUMP
-  # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_OBJDUMP"; then
-  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -5221,7 +5317,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5231,17 +5327,17 @@ IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_OBJDUMP" = x; then
-    OBJDUMP="false"
+  if test "x$ac_ct_CC" = x; then
+    CC=""
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -5249,246 +5345,65 @@ yes:)
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    OBJDUMP=$ac_ct_OBJDUMP
+    CC=$ac_ct_CC
   fi
 else
-  OBJDUMP="$ac_cv_prog_OBJDUMP"
+  CC="$ac_cv_prog_CC"
 fi
 
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-case $host_os in
-aix[4-9]*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi[45]*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
-
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump',
-  # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
-    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-    lt_cv_file_magic_cmd='func_win32_libid'
-  else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-    lt_cv_file_magic_cmd='$OBJDUMP -f'
-  fi
-  ;;
-
-cegcc)
-  # use the weaker test based on 'objdump'. See mingw*.
-  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-freebsd* | dragonfly*)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    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]'
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix[3-9]*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd* | netbsdelf*-gnu)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-*nto* | *qnx*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
   fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-rdos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    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]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
-
-tpf*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
+  ac_prog_rejected=no
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -5496,7 +5411,11 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5504,12 +5423,24 @@ done
 done
 IFS=$as_save_IFS
 
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
 fi
 fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:$LINENO: result: $AR" >&5
-$as_echo "$AR" >&6; }
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
@@ -5517,17 +5448,19 @@ fi
 
 
 fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -5536,7 +5469,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AR="ar"
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5546,53 +5479,32 @@ IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_AR" = x; then
-    AR="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
-  fi
-else
-  AR="$ac_cv_prog_AR"
-fi
-
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-
-
-
-
-
-
-
-
-
-
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -5601,7 +5513,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5611,57 +5523,21 @@ IFS=$as_save_IFS
 
 fi
 fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+  test -n "$ac_ct_CC" && break
 done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
+  if test "x$ac_ct_CC" = x; then
+    CC=""
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -5669,409 +5545,709 @@ yes:)
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    STRIP=$ac_ct_STRIP
+    CC=$ac_ct_CC
   fi
-else
-  STRIP="$ac_cv_prog_STRIP"
 fi
 
-test -z "$STRIP" && STRIP=:
-
-
+fi
 
 
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_compiler_gnu=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  $as_echo_n "(cached) " >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
 else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+int
+main ()
+{
 
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-    RANLIB=$ac_ct_RANLIB
-  fi
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
 else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-test -z "$RANLIB" && RANLIB=:
+       CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
 
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
 
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
 
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
 
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
+fi
 
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test "x$CC" != xcc; then
+  { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+  { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+                     sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+int
+main ()
+{
 
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+   test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+      then
+       # cc works too.
+       :
+      else
+       # cc exists but doesn't like -o.
+       eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
 
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[BCDT]'
-  ;;
-cygwin* | mingw* | pw32* | cegcc*)
-  symcode='[ABCDGISTW]'
-  ;;
-hpux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[ABCDEGRST]'
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[BCDEGRST]'
-  ;;
-osf*)
-  symcode='[BCDEGQRST]'
-  ;;
-solaris*)
-  symcode='[BDRT]'
-  ;;
-sco3.2v5*)
-  symcode='[DT]'
-  ;;
-sysv4.2uw2*)
-  symcode='[DT]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[ABDT]'
-  ;;
-sysv4)
-  symcode='[DFNSTU]'
-  ;;
-esac
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
 
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[ABCDGIRSTW]' ;;
-esac
+fi
 
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
 
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
+case `pwd` in
+  *\ * | *\    *)
+    { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
 esac
 
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
 
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
-  # Write the raw and C identifiers.
-  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
-    # which start with @ or ?.
-    lt_cv_sys_global_symbol_pipe="$AWK '"\
-"     {last_section=section; section=\$ 3};"\
-"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-"     \$ 0!~/External *\|/{next};"\
-"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-"     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-"     ' prfx=^$ac_symprfx"
-  else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-  fi
+macro_version='2.2.6'
+macro_revision='1.3012'
 
-  # Check to see that the pipe works correctly.
-  pipe_works=no
 
-  rm -f conftest*
-  cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
 
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
-  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-       mv -f "$nlist"T "$nlist"
-      else
-       rm -f "$nlist"T
-      fi
 
-      # Make sure that we snagged all the symbols we need.
-      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
-       if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
-         cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
 
-_LT_EOF
-         # Now generate the symbol file.
-         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
-         cat <<_LT_EOF >> conftest.$ac_ext
 
-/* The mapping between symbol names and symbols.  */
-const struct {
-  const char *name;
-  void       *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[] =
-{
-  { "@PROGRAM@", (void *) 0 },
-_LT_EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
-         cat <<\_LT_EOF >> conftest.$ac_ext
-  {0, (void *) 0}
-};
 
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
 
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
-         # Now try linking the two files.
-         mv conftest.$ac_objext conftstm.$ac_objext
-         lt_save_LIBS="$LIBS"
-         lt_save_CFLAGS="$CFLAGS"
-         LIBS="conftstm.$ac_objext"
-         CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
-         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext}; then
-           pipe_works=yes
-         fi
-         LIBS="$lt_save_LIBS"
-         CFLAGS="$lt_save_CFLAGS"
-       else
-         echo "cannot find nm_test_func in $nlist" >&5
-       fi
-      else
-       echo "cannot find nm_test_var in $nlist" >&5
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     $as_unset ac_script || ac_script=
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
     fi
-  else
-    echo "$progname: failed program was:" >&5
-    cat conftest.$ac_ext >&5
-  fi
-  rm -rf conftest* conftst*
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
+      $ac_path_SED_found && break 3
+    done
+  done
 done
-
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_SED=$SED
 fi
 
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
 fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  { $as_echo "$as_me:$LINENO: result: failed" >&5
-$as_echo "failed" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  { $as_echo "$as_me:$LINENO: result: ok" >&5
-$as_echo "ok" >&6; }
-fi
+  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+  # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_FGREP="$ac_path_FGREP"
+      ac_path_FGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
+      $ac_path_FGREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
 
+   fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
 
 
+test -z "$GREP" && GREP=grep
 
 
 
 
 
 
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval=$enable_libtool_lock;
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
 fi
 
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.$ac_objext` in
-      *ELF-32*)
-       HPUX_IA64_MODE="32"
-       ;;
-      *ELF-64*)
-       HPUX_IA64_MODE="64"
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break
        ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '#line 6125 "configure"' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
-      case `/usr/bin/file conftest.$ac_objext` in
-       *32-bit*)
-         LD="${LD-ld} -melf32bsmip"
-         ;;
-       *N32*)
-         LD="${LD-ld} -melf32bmipn32"
-         ;;
-       *64-bit*)
-         LD="${LD-ld} -melf64bmip"
+      *)
+       test "$with_gnu_ld" != yes && break
        ;;
       esac
-    else
-      case `/usr/bin/file conftest.$ac_objext` in
-       *32-bit*)
-         LD="${LD-ld} -32"
-         ;;
-       *N32*)
-         LD="${LD-ld} -n32"
-         ;;
-       *64-bit*)
-         LD="${LD-ld} -64"
-         ;;
-      esac
     fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.o` in
-      *32-bit*)
-       case $host in
-         x86_64-*kfreebsd*-gnu)
-           LD="${LD-ld} -m elf_i386_fbsd"
-           ;;
-         x86_64-*linux*)
-           LD="${LD-ld} -m elf_i386"
-           ;;
-         ppc64-*linux*|powerpc64-*linux*)
-           LD="${LD-ld} -m elf32ppclinux"
-           ;;
-         s390x-*linux*)
-           LD="${LD-ld} -m elf_s390"
-           ;;
-         sparc64-*linux*)
-           LD="${LD-ld} -m elf32_sparc"
-           ;;
-       esac
-       ;;
-      *64-bit*)
-       case $host in
-         x86_64-*kfreebsd*-gnu)
-           LD="${LD-ld} -m elf_x86_64_fbsd"
-           ;;
-         x86_64-*linux*)
-           LD="${LD-ld} -m elf_x86_64"
-           ;;
-         ppc*-*linux*|powerpc*-*linux*)
-           LD="${LD-ld} -m elf64ppc"
-           ;;
-         s390*-*linux*|s390*-*tpf*)
-           LD="${LD-ld} -m elf64_s390"
-           ;;
-         sparc*-*linux*)
-           LD="${LD-ld} -m elf64_sparc"
-           ;;
-       esac
-       ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
 
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-     cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  lt_cv_cc_needs_belf=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       lt_cv_cc_needs_belf=no
-fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-     ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)
-       if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
-         LD="${LD-ld} -64"
-       fi
-       ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-esac
 
-need_locks="$enable_libtool_lock"
 
 
-  case $host_os in
-    rhapsody* | darwin*)
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$DSYMUTIL"; then
-  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
   fi
-done
-done
-IFS=$as_save_IFS
-
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+       # Check to see if the nm accepts a BSD-compat flag.
+       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       #   nm: unknown option "B" ignored
+       # Tru64's nm complains that /dev/null is an invalid object file
+       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+       */dev/null* | *'Invalid file or object type'*)
+         lt_cv_path_NM="$tmp_nm -B"
+         break
+         ;;
+       *)
+         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+         */dev/null*)
+           lt_cv_path_NM="$tmp_nm -p"
+           break
+           ;;
+         *)
+           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+           continue # so that we can try to find one that supports BSD flags
+           ;;
+         esac
+         ;;
+       esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
 fi
 fi
-DSYMUTIL=$ac_cv_prog_DSYMUTIL
-if test -n "$DSYMUTIL"; then
-  { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DSYMUTIL"; then
-  ac_ct_DSYMUTIL=$DSYMUTIL
-  # Extract the first word of "dsymutil", so it can be a program name with args.
-set dummy dsymutil; ac_word=$2
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_DSYMUTIL"; then
-  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -6374,7 +6455,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -6384,40 +6465,32 @@ IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
-if test -n "$ac_ct_DSYMUTIL"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_DSYMUTIL" = x; then
-    DSYMUTIL=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    DSYMUTIL=$ac_ct_DSYMUTIL
-  fi
-else
-  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
-fi
 
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$NMEDIT"; then
-  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -6426,7 +6499,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -6436,57 +6509,21 @@ IFS=$as_save_IFS
 
 fi
 fi
-NMEDIT=$ac_cv_prog_NMEDIT
-if test -n "$NMEDIT"; then
-  { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-fi
-if test -z "$ac_cv_prog_NMEDIT"; then
-  ac_ct_NMEDIT=$NMEDIT
-  # Extract the first word of "nmedit", so it can be a program name with args.
-set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_NMEDIT"; then
-  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_NMEDIT="nmedit"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+  test -n "$ac_ct_DUMPBIN" && break
 done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
-if test -n "$ac_ct_NMEDIT"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_ct_NMEDIT" = x; then
-    NMEDIT=":"
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -6494,246 +6531,292 @@ yes:)
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    NMEDIT=$ac_ct_NMEDIT
+    DUMPBIN=$ac_ct_DUMPBIN
   fi
-else
-  NMEDIT="$ac_cv_prog_NMEDIT"
 fi
 
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
-set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$LIPO"; then
-  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
 fi
-fi
-LIPO=$ac_cv_prog_LIPO
-if test -n "$LIPO"; then
-  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+test -z "$NM" && NM=nm
 
 
-fi
-if test -z "$ac_cv_prog_LIPO"; then
-  ac_ct_LIPO=$LIPO
-  # Extract the first word of "lipo", so it can be a program name with args.
-set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_LIPO"; then
-  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_LIPO="lipo"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
-if test -n "$ac_ct_LIPO"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-  if test "x$ac_ct_LIPO" = x; then
-    LIPO=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    LIPO=$ac_ct_LIPO
-  fi
-else
-  LIPO="$ac_cv_prog_LIPO"
-fi
 
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then
+
+{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$OTOOL"; then
-  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+  lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:6557: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:6560: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:6563: output\"" >&5)
+  cat conftest.out >&5
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
   fi
-done
-done
-IFS=$as_save_IFS
-
-fi
+  rm -f conftest*
 fi
-OTOOL=$ac_cv_prog_OTOOL
-if test -n "$OTOOL"; then
-  { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
 fi
 
-
-fi
-if test -z "$ac_cv_prog_OTOOL"; then
-  ac_ct_OTOOL=$OTOOL
-  # Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_OTOOL"; then
-  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_OTOOL="otool"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+    i=0
+  teststring="ABCD"
 
-fi
-fi
-ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
-if test -n "$ac_ct_OTOOL"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
 
-  if test "x$ac_ct_OTOOL" = x; then
-    OTOOL=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    OTOOL=$ac_ct_OTOOL
-  fi
-else
-  OTOOL="$ac_cv_prog_OTOOL"
-fi
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
 
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$OTOOL64"; then
-  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
 
-fi
-fi
-OTOOL64=$ac_cv_prog_OTOOL64
-if test -n "$OTOOL64"; then
-  { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
 
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
 
-fi
-if test -z "$ac_cv_prog_OTOOL64"; then
-  ac_ct_OTOOL64=$OTOOL64
-  # Extract the first word of "otool64", so it can be a program name with args.
-set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[         ]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+                = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+             test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_OTOOL64"; then
-  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -6742,7 +6825,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_OTOOL64="otool64"
+    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -6752,17 +6835,57 @@ IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
-if test -n "$ac_ct_OTOOL64"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
-  if test "x$ac_ct_OTOOL64" = x; then
-    OTOOL64=":"
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -6770,12 +6893,13 @@ yes:)
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    OTOOL64=$ac_ct_OTOOL64
+    OBJDUMP=$ac_ct_OBJDUMP
   fi
 else
-  OTOOL64="$ac_cv_prog_OTOOL64"
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
 fi
 
+test -z "$OBJDUMP" && OBJDUMP=objdump
 
 
 
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
-       # By default we will add the -single_module flag. You can override
-       # by either setting the environment variable LT_MULTI_MODULE
-       # non-empty at configure time, or by adding -multi_module to the
-       # link flags.
-       rm -rf libconftest.dylib*
-       echo "int foo(void){return 1;}" > conftest.c
-       echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&5
-       $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-         -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
-        _lt_result=$?
-       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
-         lt_cv_apple_cc_single_mod=yes
-       else
-         cat conftest.err >&5
-       fi
-       rm -rf libconftest.dylib*
-       rm -f conftest.*
-      fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
-    { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_ld_exported_symbols_list=no
-      save_LDFLAGS=$LDFLAGS
-      echo "_main" > conftest.sym
-      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
 
-int
-main ()
-{
+case $host_os in
+aix[4-9]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  lt_cv_ld_exported_symbols_list=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-       lt_cv_ld_exported_symbols_list=no
-fi
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-       LDFLAGS="$save_LDFLAGS"
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-       10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-       10.[012]*)
-         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-       10.*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     ;;
-  esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
-      _lt_dar_single_mod='$single_module'
-    fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
-    else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    if test "$DSYMUTIL" != ":"; then
-      _lt_dsymutil='~$DSYMUTIL $lib || :'
-    else
-      _lt_dsymutil=
-    fi
+  hppa*64*)
+    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]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
     ;;
   esac
+  ;;
 
+interix[3-9]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
 
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-int
-main ()
-{
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_header_stdc=no
-fi
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
 
-fi
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-fi
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    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]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
 
 fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
 
-fi
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
 
 
 
 
 
 
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                 inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-       eval "$as_ac_Header=no"
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:$LINENO: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-done
-
-
 
-for ac_header in dlfcn.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-       eval "$as_ac_Header=no"
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-done
-
-
-
-# Set options
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
 
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
-        enable_dlopen=no
 
 
-  enable_win32_dll=no
 
 
-            # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval=$enable_shared; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_shared=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_shared=yes
-fi
 
 
 
 
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-  # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then
-  enableval=$enable_static; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_static=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
 else
-  enable_static=yes
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
 
+test -z "$STRIP" && STRIP=:
 
 
 
 
 
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then
-  withval=$with_pic; pic_mode="$withval"
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
 else
-  pic_mode=default
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-test -z "$pic_mode" && pic_mode=default
-
-
-
-
-
-
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-  # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
-  enableval=$enable_fast_install; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-       IFS="$lt_save_ifs"
-       if test "X$pkg" = "X$p"; then
-         enable_fast_install=yes
-       fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
 else
-  enable_fast_install=yes
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
 
+test -z "$RANLIB" && RANLIB=:
 
 
 
 
 
 
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
 
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
 
 
 
@@ -7395,7 +7464,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
-test -z "$LN_S" && LN_S="ln -s"
 
 
 
@@ -7407,279 +7475,258 @@ test -z "$LN_S" && LN_S="ln -s"
 
 
 
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
+# Allow CC to be a program name with arguments.
+compiler=$CC
 
-if test -n "${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
 
-{ $as_echo "$as_me:$LINENO: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
-
-
-
-
-
-
-
-
-
-
-
-
-
 
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
 
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
 
+# Define system-specific variables.
 case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
   fi
   ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
 
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
 
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
 
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
 
-# Global variables:
-ofile=libtool
-can_build_shared=yes
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK '"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
 
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+  # Check to see that the pipe works correctly.
+  pipe_works=no
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
 
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+       mv -f "$nlist"T "$nlist"
+      else
+       rm -f "$nlist"T
+      fi
 
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+       if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+         cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
 
+_LT_EOF
+         # Now generate the symbol file.
+         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<_LT_EOF 1>&2
+         cat <<_LT_EOF >> conftest.$ac_ext
 
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
+/* The mapping between symbol names and symbols.  */
+const struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+         cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
 
+#ifdef __cplusplus
+}
+#endif
 _LT_EOF
-         fi ;;
-       esac
+         # Now try linking the two files.
+         mv conftest.$ac_objext conftstm.$ac_objext
+         lt_save_LIBS="$LIBS"
+         lt_save_CFLAGS="$CFLAGS"
+         LIBS="conftstm.$ac_objext"
+         CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+           pipe_works=yes
+         fi
+         LIBS="$lt_save_LIBS"
+         CFLAGS="$lt_save_CFLAGS"
+       else
+         echo "cannot find nm_test_func in $nlist" >&5
+       fi
+      else
+       echo "cannot find nm_test_var in $nlist" >&5
       fi
-      break
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
     fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
 fi
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { $as_echo "$as_me:$LINENO: result: failed" >&5
+$as_echo "failed" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
 fi
 
 
 
 
 
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    { $as_echo "$as_me:$LINENO: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
-         fi ;;
-       esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-  else
-    MAGIC_CMD=:
-  fi
-fi
 
-  fi
-  ;;
-esac
 
-# Use C for the default configuration in the libtool script
 
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-# Source file extension for C test sources.
-ac_ext=c
 
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
 
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
 
 
 
@@ -7687,474 +7734,710 @@ lt_simple_link_test_code='int main(){return(0);}'
 
 
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval=$enable_libtool_lock;
+fi
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+       HPUX_IA64_MODE="32"
+       ;;
+      *ELF-64*)
+       HPUX_IA64_MODE="64"
+       ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 7768 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+       *32-bit*)
+         LD="${LD-ld} -melf32bsmip"
+         ;;
+       *N32*)
+         LD="${LD-ld} -melf32bmipn32"
+         ;;
+       *64-bit*)
+         LD="${LD-ld} -melf64bmip"
+       ;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+       *32-bit*)
+         LD="${LD-ld} -32"
+         ;;
+       *N32*)
+         LD="${LD-ld} -n32"
+         ;;
+       *64-bit*)
+         LD="${LD-ld} -64"
+         ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
 
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+       case $host in
+         x86_64-*kfreebsd*-gnu)
+           LD="${LD-ld} -m elf_i386_fbsd"
+           ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_i386"
+           ;;
+         ppc64-*linux*|powerpc64-*linux*)
+           LD="${LD-ld} -m elf32ppclinux"
+           ;;
+         s390x-*linux*)
+           LD="${LD-ld} -m elf_s390"
+           ;;
+         sparc64-*linux*)
+           LD="${LD-ld} -m elf32_sparc"
+           ;;
+       esac
+       ;;
+      *64-bit*)
+       case $host in
+         x86_64-*kfreebsd*-gnu)
+           LD="${LD-ld} -m elf_x86_64_fbsd"
+           ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+         ppc*-*linux*|powerpc*-*linux*)
+           LD="${LD-ld} -m elf64ppc"
+           ;;
+         s390*-*linux*|s390*-*tpf*)
+           LD="${LD-ld} -m elf64_s390"
+           ;;
+         sparc*-*linux*)
+           LD="${LD-ld} -m elf64_sparc"
+           ;;
+       esac
+       ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
 
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-if test -n "$compiler"; then
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  lt_cv_cc_needs_belf=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-lt_prog_compiler_no_builtin_flag=
+       lt_cv_cc_needs_belf=no
+fi
 
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-
-  { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_rtti_exceptions=no
-   ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7742: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:7746: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $RM conftest*
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+       if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+         LD="${LD-ld} -64"
+       fi
+       ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
 
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+need_locks="$enable_libtool_lock"
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-    :
-fi
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
 fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+  ac_ct_DSYMUTIL=$DSYMUTIL
+  # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DSYMUTIL=$ac_ct_DSYMUTIL
+  fi
+else
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
 
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-  lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl='-Wl,'
-    lt_prog_compiler_static='-static'
 
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+  ac_ct_NMEDIT=$NMEDIT
+  # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_NMEDIT="nmedit"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            lt_prog_compiler_pic='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic='-fno-common'
-      ;;
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    NMEDIT=$ac_ct_NMEDIT
+  fi
+else
+  NMEDIT="$ac_cv_prog_NMEDIT"
+fi
 
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic='-fPIC'
-       ;;
-      esac
-      ;;
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-    interix[3-9]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared=no
-      enable_shared=no
-      ;;
 
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      lt_prog_compiler_pic='-fPIC -shared'
-      ;;
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+  ac_ct_LIPO=$LIPO
+  # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_LIPO="lipo"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       lt_prog_compiler_pic=-Kconform_pic
-      fi
-      ;;
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    *)
-      lt_prog_compiler_pic='-fPIC'
-      ;;
-    esac
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
   else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static='-Bstatic'
-      else
-       lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LIPO=$ac_ct_LIPO
+  fi
+else
+  LIPO="$ac_cv_prog_LIPO"
+fi
 
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
-      ;;
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static='-non_shared'
-      ;;
 
-    linux* | k*bsd*-gnu)
-      case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
-      ecc*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-KPIC'
-       lt_prog_compiler_static='-static'
-        ;;
-      # icc used to be incompatible with GCC.
-      # ICC 10 doesn't accept -KPIC any more.
-      icc* | ifort*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-fPIC'
-       lt_prog_compiler_static='-static'
-        ;;
-      # Lahey Fortran 8.1.
-      lf95*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='--shared'
-       lt_prog_compiler_static='--static'
-       ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-fpic'
-       lt_prog_compiler_static='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static='-non_shared'
-        ;;
-      xl*)
-       # IBM XL C 8.0/Fortran 10.1 on PPC
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-qpic'
-       lt_prog_compiler_static='-qstaticlink'
-       ;;
-      *)
-       case `$CC -V 2>&1 | sed 5q` in
-       *Sun\ C*)
-         # Sun C 5.9
-         lt_prog_compiler_pic='-KPIC'
-         lt_prog_compiler_static='-Bstatic'
-         lt_prog_compiler_wl='-Wl,'
-         ;;
-       *Sun\ F*)
-         # Sun Fortran 8.3 passes all unrecognized flags to the linker
-         lt_prog_compiler_pic='-KPIC'
-         lt_prog_compiler_static='-Bstatic'
-         lt_prog_compiler_wl=''
-         ;;
-       esac
-       ;;
-      esac
-      ;;
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+  ac_ct_OTOOL=$OTOOL
+  # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL="otool"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-    newsos6)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      lt_prog_compiler_pic='-fPIC -shared'
-      ;;
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL=$ac_ct_OTOOL
+  fi
+else
+  OTOOL="$ac_cv_prog_OTOOL"
+fi
 
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static='-non_shared'
-      ;;
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-    rdos*)
-      lt_prog_compiler_static='-non_shared'
-      ;;
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    solaris*)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-       lt_prog_compiler_wl='-Qoption ld ';;
-      *)
-       lt_prog_compiler_wl='-Wl,';;
-      esac
-      ;;
 
-    sunos4*)
-      lt_prog_compiler_wl='-Qoption ld '
-      lt_prog_compiler_pic='-PIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+  ac_ct_OTOOL64=$OTOOL64
+  # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL64="otool64"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       lt_prog_compiler_pic='-Kconform_pic'
-       lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL64=$ac_ct_OTOOL64
+  fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
+fi
 
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    unicos*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_can_build_shared=no
-      ;;
 
-    uts4*)
-      lt_prog_compiler_pic='-pic'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    *)
-      lt_prog_compiler_can_build_shared=no
-      ;;
-    esac
-  fi
 
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic=
-    ;;
-  *)
-    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
 
 
 
 
 
 
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
-  { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_pic_works=no
-   ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8081: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:8085: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_pic_works=yes
-     fi
-   fi
-   $RM conftest*
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
-    case $lt_prog_compiler_pic in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
-     esac
-else
-    lt_prog_compiler_pic=
-     lt_prog_compiler_can_build_shared=no
-fi
 
-fi
 
 
 
 
 
 
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_cv_prog_compiler_static_works=yes
-       fi
-     else
-       lt_cv_prog_compiler_static_works=yes
-     fi
-   fi
-   $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
-    :
-else
-    lt_prog_compiler_static=
-fi
 
 
 
 
 
 
-  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+    { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_c_o=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8186: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:8190: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
-
+  lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+       # By default we will add the -single_module flag. You can override
+       # by either setting the environment variable LT_MULTI_MODULE
+       # non-empty at configure time, or by adding -multi_module to the
+       # link flags.
+       rm -rf libconftest.dylib*
+       echo "int foo(void){return 1;}" > conftest.c
+       echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+       $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+         -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+         lt_cv_apple_cc_single_mod=yes
+       else
+         cat conftest.err >&5
+       fi
+       rm -rf libconftest.dylib*
+       rm -f conftest.*
+      fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+    { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  lt_cv_ld_exported_symbols_list=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       lt_cv_ld_exported_symbols_list=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+       LDFLAGS="$save_LDFLAGS"
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[012])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+       10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+       10.[012]*)
+         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+       10.*)
+         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
 
 
-  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+for ac_header in dlfcn.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_c_o=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
 
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8241: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:8245: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       eval "$as_ac_Header=no"
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
-  hard_links=yes
-  $RM conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
 fi
 
+done
 
 
 
+# Set options
 
 
-  { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
 
-  runpath_var=
-  allow_undefined_flag=
-  always_export_symbols=no
-  archive_cmds=
-  archive_expsym_cmds=
-  compiler_needs_object=no
-  enable_shared_with_static_runtimes=no
-  export_dynamic_flag_spec=
-  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  hardcode_automatic=no
-  hardcode_direct=no
-  hardcode_direct_absolute=no
-  hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
-  hardcode_libdir_separator=
-  hardcode_minus_L=no
-  hardcode_shlibpath_var=unsupported
-  inherit_rpath=no
-  link_all_deplibs=unknown
-  module_cmds=
-  module_expsym_cmds=
-  old_archive_from_new_cmds=
-  old_archive_from_expsyms_cmds=
-  thread_safe_flag_spec=
-  whole_archive_flag_spec=
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  # Exclude shared library initialization/finalization symbols.
-  extract_expsyms_cmds=
+        enable_dlopen=no
 
-  case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
 
-  ld_shlibs=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+  enable_win32_dll=no
 
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      whole_archive_flag_spec=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>&1` in
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
+
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_shared=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
     esac
+else
+  enable_shared=yes
+fi
 
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix[3-9]*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       ld_shlibs=no
-       cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
 
-_LT_EOF
-      fi
-      ;;
 
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            archive_expsym_cmds=''
-        ;;
-      m68k)
-            archive_cmds='$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)'
-            hardcode_libdir_flag_spec='-L$libdir'
-            hardcode_minus_L=yes
-        ;;
-      esac
-      ;;
 
-    beos*)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
 
-    cygwin* | mingw* | pw32* | cegcc*)
-      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      allow_undefined_flag=unsupported
-      always_export_symbols=no
-      enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
 
-      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
 
-    interix[3-9]*)
-      hardcode_direct=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_static=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
       ;;
+    esac
+else
+  enable_static=yes
+fi
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
-      tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
-       case $cc_basename in
-         diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
-       esac
-      fi
-      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-        && test "$tmp_diet" = no
-      then
-       tmp_addflag=
-       tmp_sharedflag='-shared'
-       case $cc_basename,$host_cpu in
-        pgcc*)                         # Portland Group C compiler
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       lf95*)                          # Lahey Fortran 8.1
-         whole_archive_flag_spec=
-         tmp_sharedflag='--shared' ;;
-       xl[cC]*)                        # IBM XL C 8.0 on PPC (deal with xlf below)
-         tmp_sharedflag='-qmkshrobj'
-         tmp_addflag= ;;
-       esac
-       case `$CC -V 2>&1 | sed 5q` in
-       *Sun\ C*)                       # Sun C 5.9
-         whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-         compiler_needs_object=yes
-         tmp_sharedflag='-G' ;;
-       *Sun\ F*)                       # Sun Fortran 8.3
-         tmp_sharedflag='-G' ;;
-       esac
-       archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
-          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-           echo "local: *; };" >> $output_objdir/$libname.ver~
-           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-        fi
 
-       case $cc_basename in
-       xlf*)
-         # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
-         whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
-         hardcode_libdir_flag_spec=
-         hardcode_libdir_flag_spec_ld='-rpath $libdir'
-         archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-         if test "x$supports_anon_versioning" = xyes; then
-           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-             echo "local: *; };" >> $output_objdir/$libname.ver~
-             $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
-         fi
-         ;;
-       esac
-      else
-        ld_shlibs=no
-      fi
-      ;;
 
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
 
-    solaris*)
-      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
-       ld_shlibs=no
-       cat <<_LT_EOF 1>&2
 
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-_LT_EOF
-      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-       ld_shlibs=no
-       cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-_LT_EOF
-       ;;
-       *)
-         # For security reasons, it is highly recommended that you always
-         # use absolute paths for naming shared libraries, and exclude the
-         # DT_RUNPATH tag from executables and libraries.  But doing so
-         # requires that you compile everything twice, which is a pain.
-         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-           hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         else
-           ld_shlibs=no
-         fi
-       ;;
-      esac
-      ;;
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then
+  withval=$with_pic; pic_mode="$withval"
+else
+  pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
 
-    sunos4*)
-      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
+
+
+
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
     *)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs=no
-      fi
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_fast_install=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
       ;;
     esac
+else
+  enable_fast_install=yes
+fi
 
-    if test "$ld_shlibs" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec=
-      export_dynamic_flag_spec=
-      whole_archive_flag_spec=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag=unsupported
-      always_export_symbols=yes
-      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       hardcode_direct=unsupported
-      fi
-      ;;
 
-    aix[4-9]*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-       else
-         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
 
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
 
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
 
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      archive_cmds=''
-      hardcode_direct=yes
-      hardcode_direct_absolute=yes
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-      file_list_spec='${wl}-f,'
 
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" &&
-          strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         :
-         else
-         # We have old collect2
-         hardcode_direct=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L=yes
-         hardcode_libdir_flag_spec='-L$libdir'
-         hardcode_libdir_separator=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-       link_all_deplibs=no
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
 
-      export_dynamic_flag_spec='${wl}-bexpall'
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag='-berok'
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-       /^0/ {
-           s/^0  *\(.*\)$/\1/
-           p
-       }
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
 
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
-fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-      else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-         allow_undefined_flag="-z nodefs"
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-       /^0/ {
-           s/^0  *\(.*\)$/\1/
-           p
-       }
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         no_undefined_flag=' ${wl}-bernotok'
-         allow_undefined_flag=' ${wl}-berok'
-         # Exported symbols can be pulled into shared objects from archives
-         whole_archive_flag_spec='$convenience'
-         archive_cmds_need_lc=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
 
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            archive_expsym_cmds=''
-        ;;
-      m68k)
-            archive_cmds='$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)'
-            hardcode_libdir_flag_spec='-L$libdir'
-            hardcode_minus_L=yes
-        ;;
-      esac
-      ;;
 
-    bsdi[45]*)
-      export_dynamic_flag_spec=-rdynamic
-      ;;
 
-    cygwin* | mingw* | pw32* | cegcc*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      allow_undefined_flag=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_from_new_cmds='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
-      ;;
 
-    darwin* | rhapsody*)
 
 
-  archive_cmds_need_lc=no
-  hardcode_direct=no
-  hardcode_automatic=yes
-  hardcode_shlibpath_var=unsupported
-  whole_archive_flag_spec=''
-  link_all_deplibs=yes
-  allow_undefined_flag="$_lt_dar_allow_undefined"
-  case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
-     *) _lt_dar_can_shared=$GCC ;;
-  esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
-  else
-  ld_shlibs=no
-  fi
 
-      ;;
 
-    dgux*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    hpux9*)
-      if test "$GCC" = yes; then
-       archive_cmds='$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'
-      else
-       archive_cmds='$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'
-      fi
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_direct=yes
 
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
-      ;;
+test -z "$LN_S" && LN_S="ln -s"
 
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_flag_spec_ld='+b $libdir'
-       hardcode_libdir_separator=:
-       hardcode_direct=yes
-       hardcode_direct_absolute=yes
-       export_dynamic_flag_spec='${wl}-E'
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L=yes
-      fi
-      ;;
 
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator=:
 
-       case $host_cpu in
-       hppa*64*|ia64*)
-         hardcode_direct=no
-         hardcode_shlibpath_var=no
-         ;;
-       *)
-         hardcode_direct=yes
-         hardcode_direct_absolute=yes
-         export_dynamic_flag_spec='${wl}-E'
 
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L=yes
-         ;;
-       esac
-      fi
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       # Try to use the -exported_symbol ld option, if it does not
-       # work, assume that -exports_file does not work either and
-       # implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        cat >conftest.$ac_ext <<_ACEOF
-int foo(void) {}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
 
-fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-        LDFLAGS="$save_LDFLAGS"
-      else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-      fi
-      archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      inherit_rpath=yes
-      link_all_deplibs=yes
-      ;;
 
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    newsos6)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_shlibpath_var=no
-      ;;
 
-    *nto* | *qnx*)
-      ;;
 
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-       hardcode_direct=yes
-       hardcode_shlibpath_var=no
-       hardcode_direct_absolute=yes
-       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-         export_dynamic_flag_spec='${wl}-E'
-       else
-         case $host_os in
-          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-            hardcode_libdir_flag_spec='-R$libdir'
-            ;;
-          *)
-            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-            ;;
-         esac
-       fi
-      else
-       ld_shlibs=no
-      fi
-      ;;
 
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      allow_undefined_flag=unsupported
-      archive_cmds='$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'
-      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
 
-    osf3*)
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
+{ $as_echo "$as_me:$LINENO: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
 
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-       allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
-       # Both c and cxx compiler support -rpath directly
-       hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      archive_cmds_need_lc='no'
-      hardcode_libdir_separator=:
-      ;;
-
-    solaris*)
-      no_undefined_flag=' -z defs'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-      else
-       case `$CC -V 2>&1` in
-       *"Compilers 5.0"*)
-         wlarc=''
-         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
-         ;;
-       *)
-         wlarc='${wl}'
-         archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
-         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-         ;;
-       esac
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_shlibpath_var=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
-       # The compiler driver will combine and reorder linker options,
-       # but understands `-z linker_flag'.  GCC discards it without `$wl',
-       # but is careful enough not to reorder.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       if test "$GCC" = yes; then
-         whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-       else
-         whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
-       fi
-       ;;
-      esac
-      link_all_deplibs=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-       sni)
-         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         reload_cmds='$CC -r -o $output$reload_objs'
-         hardcode_direct=no
-        ;;
-       motorola)
-         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var=no
-      ;;
-
-    sysv4.3*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var=no
-      export_dynamic_flag_spec='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ld_shlibs=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag='${wl}-z,text'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-R,$libdir'
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
-
-    *)
-      ld_shlibs=no
-      ;;
-    esac
 
-    if test x$host_vendor = xsni; then
-      case $host in
-      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       export_dynamic_flag_spec='${wl}-Blargedynsym'
-       ;;
-      esac
-    fi
-  fi
 
-{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
 
-with_gnu_ld=$with_gnu_ld
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
 
 
 
@@ -9392,102 +8846,231 @@ with_gnu_ld=$with_gnu_ld
 
 
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl
-       pic_flag=$lt_prog_compiler_pic
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag
-        allow_undefined_flag=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-         archive_cmds_need_lc=no
-        else
-         archive_cmds_need_lc=yes
-        fi
-        allow_undefined_flag=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
-      ;;
-    esac
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
   fi
   ;;
 esac
 
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
 
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
 
+# Global variables:
+ofile=libtool
+can_build_shared=yes
 
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
 
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
 
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
 
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
 
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+       case $deplibs_check_method in
+       "file_magic "*)
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+           $EGREP "$file_magic_regex" > /dev/null; then
+           :
+         else
+           cat <<_LT_EOF 1>&2
 
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
 
+_LT_EOF
+         fi ;;
+       esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
 
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
 
 
 
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:$LINENO: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+       case $deplibs_check_method in
+       "file_magic "*)
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+           $EGREP "$file_magic_regex" > /dev/null; then
+           :
+         else
+           cat <<_LT_EOF 1>&2
 
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
 
+_LT_EOF
+         fi ;;
+       esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
 
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
+  else
+    MAGIC_CMD=:
+  fi
+fi
 
+  fi
+  ;;
+esac
 
+# Use C for the default configuration in the libtool script
 
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+# Source file extension for C test sources.
+ac_ext=c
 
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
 
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
 
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
 
 
 
@@ -9495,72 +9078,478 @@ esac
 
 
 
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
+# Allow CC to be a program name with arguments.
+compiler=$CC
 
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
 
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
 
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
 
 
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
 
+lt_prog_compiler_no_builtin_flag=
 
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
 
+  { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:9137: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:9141: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $RM conftest*
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
 
+fi
 
 
 
 
 
 
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
 
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
 
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
 
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
 
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
 
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
 
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic='-fPIC'
+       ;;
+      esac
+      ;;
 
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
 
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
 
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
 
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
 
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static='-Bstatic'
+      else
+       lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
 
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
 
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
 
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-fPIC'
+       lt_prog_compiler_static='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='--shared'
+       lt_prog_compiler_static='--static'
+       ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-fpic'
+       lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      xl*)
+       # IBM XL C 8.0/Fortran 10.1 on PPC
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-qpic'
+       lt_prog_compiler_static='-qstaticlink'
+       ;;
+      *)
+       case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ C*)
+         # Sun C 5.9
+         lt_prog_compiler_pic='-KPIC'
+         lt_prog_compiler_static='-Bstatic'
+         lt_prog_compiler_wl='-Wl,'
+         ;;
+       *Sun\ F*)
+         # Sun Fortran 8.3 passes all unrecognized flags to the linker
+         lt_prog_compiler_pic='-KPIC'
+         lt_prog_compiler_static='-Bstatic'
+         lt_prog_compiler_wl=''
+         ;;
+       esac
+       ;;
+      esac
+      ;;
 
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
 
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+       lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+       lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
 
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       lt_prog_compiler_pic='-Kconform_pic'
+       lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
 
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
 
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
 
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
 
 
 
 
 
 
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+  { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:9476: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:9480: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works=yes
+     fi
+   fi
+   $RM conftest*
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
 
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
 
+fi
 
 
 
 
 
 
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
 
 
 
@@ -9568,482 +9557,6627 @@ esac
 
 
 
+  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:9581: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:9585: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
 
 
 
+  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:9636: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:9640: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
 
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
 
 
 
 
 
 
+  { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
 
+  runpath_var=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
 
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
 
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
 
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
 
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       ld_shlibs=no
+       cat <<_LT_EOF 1>&2
 
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
 
+_LT_EOF
+      fi
+      ;;
 
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$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)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
 
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       allow_undefined_flag=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
 
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
 
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
+       else
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
 
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
 
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+       case $cc_basename in
+         diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
+       esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+        && test "$tmp_diet" = no
+      then
+       tmp_addflag=
+       tmp_sharedflag='-shared'
+       case $cc_basename,$host_cpu in
+        pgcc*)                         # Portland Group C compiler
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       lf95*)                          # Lahey Fortran 8.1
+         whole_archive_flag_spec=
+         tmp_sharedflag='--shared' ;;
+       xl[cC]*)                        # IBM XL C 8.0 on PPC (deal with xlf below)
+         tmp_sharedflag='-qmkshrobj'
+         tmp_addflag= ;;
+       esac
+       case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ C*)                       # Sun C 5.9
+         whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         compiler_needs_object=yes
+         tmp_sharedflag='-G' ;;
+       *Sun\ F*)                       # Sun Fortran 8.3
+         tmp_sharedflag='-G' ;;
+       esac
+       archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+           echo "local: *; };" >> $output_objdir/$libname.ver~
+           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
 
+       case $cc_basename in
+       xlf*)
+         # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+         whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+         hardcode_libdir_flag_spec=
+         hardcode_libdir_flag_spec_ld='-rpath $libdir'
+         archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+         if test "x$supports_anon_versioning" = xyes; then
+           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+             echo "local: *; };" >> $output_objdir/$libname.ver~
+             $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+         fi
+         ;;
+       esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
 
-
-
-
-
-
-
-
-  { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
-
-if test "$GCC" = yes; then
-  case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
-  esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-  # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
-  lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
-      test -d "$lt_sys_path" && \
-       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
-    fi
-  done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
-  for (lt_i = NF; lt_i > 0; lt_i--) {
-    if ($lt_i != "" && $lt_i != ".") {
-      if ($lt_i == "..") {
-        lt_count++;
-      } else {
-        if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
-        } else {
-          lt_count--;
-        }
-      }
-    }
-  }
-  if (lt_foo != "") { lt_freq[lt_foo]++; }
-  if (lt_freq[lt_foo] == 1) { print lt_foo; }
-}'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix[4-9]*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
-       :
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
       else
-       can_build_shared=no
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
 
-amigaos*)
-  case $host_cpu in
-  powerpc)
-    # Since July 2007 AmigaOS4 officially supports .so libraries.
-    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    ;;
-  m68k)
-    library_names_spec='$libname.ixlibrary $libname.a'
-    # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    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'
-    ;;
-  esac
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       ld_shlibs=no
+       cat <<_LT_EOF 1>&2
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname~
-      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-      fi'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
 
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw* | cegcc*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+       ld_shlibs=no
       fi
       ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
 
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+       ld_shlibs=no
+       cat <<_LT_EOF 1>&2
 
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
 
-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
+_LT_EOF
+       ;;
+       *)
+         # For security reasons, it is highly recommended that you always
+         # use absolute paths for naming shared libraries, and exclude the
+         # DT_RUNPATH tag from executables and libraries.  But doing so
+         # requires that you compile everything twice, which is a pain.
+         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+           hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         else
+           ld_shlibs=no
+         fi
+       ;;
+      esac
+      ;;
 
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+    esac
 
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
   else
+    # PORTME fill in a description of your system's linker (not GNU ld)
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct=unsupported
+      fi
       ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  *) # from 4.6 on, and DragonFly
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
 
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+       # On IA64, the linker does run time linking by default, so we don't
+       # have to do anything special.
+       aix_use_runtimelinking=no
+       exp_sym_flag='-Bexport'
+       no_entry_flag=""
+      else
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+       else
+         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+       fi
+       aix_use_runtimelinking=no
 
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
+       # Test if we are trying to use run time linking or normal
+       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+       # need to do runtime linking.
+       case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+         for ld_flag in $LDFLAGS; do
+         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+           aix_use_runtimelinking=yes
+           break
+         fi
+         done
+         ;;
+       esac
+
+       exp_sym_flag='-bexport'
+       no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
+
+      if test "$GCC" = yes; then
+       case $host_os in aix4.[012]|aix4.[012].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" &&
+          strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+         :
+         else
+         # We have old collect2
+         hardcode_direct=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L=yes
+         hardcode_libdir_flag_spec='-L$libdir'
+         hardcode_libdir_separator=
+         fi
+         ;;
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag="$shared_flag "'${wl}-G'
+       fi
+      else
+       # not using gcc
+       if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+       else
+         if test "$aix_use_runtimelinking" = yes; then
+           shared_flag='${wl}-G'
+         else
+           shared_flag='${wl}-bM:SRE'
+         fi
+       fi
+      fi
+
+      export_dynamic_flag_spec='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+       # Warning - without using the other runtime loading flags (-brtl),
+       # -berok will link without error, but may produce a broken library.
+       allow_undefined_flag='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+       /^0/ {
+           s/^0  *\(.*\)$/\1/
+           p
+       }
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+       if test "$host_cpu" = ia64; then
+         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+         allow_undefined_flag="-z nodefs"
+         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+       /^0/ {
+           s/^0  *\(.*\)$/\1/
+           p
+       }
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+         # Warning - without using the other run time loading flags,
+         # -berok will link without error, but may produce a broken library.
+         no_undefined_flag=' ${wl}-bernotok'
+         allow_undefined_flag=' ${wl}-berok'
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec='$convenience'
+         archive_cmds_need_lc=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$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)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_from_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  whole_archive_flag_spec=''
+  link_all_deplibs=yes
+  allow_undefined_flag="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+  else
+  ld_shlibs=no
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       archive_cmds='$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'
+      else
+       archive_cmds='$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'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+       hardcode_libdir_flag_spec_ld='+b $libdir'
+       hardcode_libdir_separator=:
+       hardcode_direct=yes
+       hardcode_direct_absolute=yes
+       export_dynamic_flag_spec='${wl}-E'
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator=:
+
+       case $host_cpu in
+       hppa*64*|ia64*)
+         hardcode_direct=no
+         hardcode_shlibpath_var=no
+         ;;
+       *)
+         hardcode_direct=yes
+         hardcode_direct_absolute=yes
+         export_dynamic_flag_spec='${wl}-E'
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       # Try to use the -exported_symbol ld option, if it does not
+       # work, assume that -exports_file does not work either and
+       # implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        LDFLAGS="$save_LDFLAGS"
+      else
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+       hardcode_direct=yes
+       hardcode_shlibpath_var=no
+       hardcode_direct_absolute=yes
+       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+         export_dynamic_flag_spec='${wl}-E'
+       else
+         case $host_os in
+          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+            hardcode_libdir_flag_spec='-R$libdir'
+            ;;
+          *)
+            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+            ;;
+         esac
+       fi
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$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'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; then
+       wlarc='${wl}'
+       archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+       case `$CC -V 2>&1` in
+       *"Compilers 5.0"*)
+         wlarc=''
+         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+         ;;
+       *)
+         wlarc='${wl}'
+         archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+         ;;
+       esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+       # The compiler driver will combine and reorder linker options,
+       # but understands `-z linker_flag'.  GCC discards it without `$wl',
+       # but is careful enough not to reorder.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       if test "$GCC" = yes; then
+         whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       else
+         whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+       fi
+       ;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
+       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         reload_cmds='$CC -r -o $output$reload_objs'
+         hardcode_direct=no
+        ;;
+       motorola)
+         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_shlibpath_var=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+       export_dynamic_flag_spec='${wl}-Blargedynsym'
+       ;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+       pic_flag=$lt_prog_compiler_pic
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+         archive_cmds_need_lc=no
+        else
+         archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+          echo ' yes '
+          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+       :
+      else
+       can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    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'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       else
+               version_type=irix
+       fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
+  shlibpath_overrides_runpath=yes
+fi
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+       shlibpath_overrides_runpath=no
+       ;;
+      *)
+       shlibpath_overrides_runpath=yes
+       ;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
   need_lib_prefix=no
   need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
     shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+       ;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+   test "$inherit_rpath" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+
+
+
+
+  if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dl_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+    ;;
+
+  *)
+    { $as_echo "$as_me:$LINENO: checking for shl_load" >&5
+$as_echo_n "checking for shl_load... " >&6; }
+if test "${ac_cv_func_shl_load+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_shl_load || defined __stub___shl_load
+choke me
+#endif
+
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_shl_load=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_func_shl_load=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+$as_echo "$ac_cv_func_shl_load" >&6; }
+if test "x$ac_cv_func_shl_load" = x""yes; then
+  lt_cv_dlopen="shl_load"
+else
+  { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dld_shl_load=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  { $as_echo "$as_me:$LINENO: checking for dlopen" >&5
+$as_echo_n "checking for dlopen... " >&6; }
+if test "${ac_cv_func_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_dlopen || defined __stub___dlopen
+choke me
+#endif
+
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_func_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+$as_echo "$ac_cv_func_dlopen" >&6; }
+if test "x$ac_cv_func_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen"
+else
+  { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dl_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_svld_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dld_dld_link=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+         if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 12436 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL          RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL                DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL                0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW         DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW       RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW     DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW     0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+         if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 12532 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL          RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL                DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL                0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW         DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW       RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW     DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW     0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+    else
+      { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+  *)
+    { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+  # Report which library types will actually be built
+  { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+  { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+  { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[4-9]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+  { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  { $as_echo "$as_me:$LINENO: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+        ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
+
+{ $as_echo "$as_me:$LINENO: checking if gcc likes the -Werror flag" >&5
+$as_echo_n "checking if gcc likes the -Werror flag... " >&6; }
+if test "${rd_cv_gcc_flag__Werror+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  rd_cv_gcc_flag__Werror="yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       rd_cv_gcc_flag__Werror="no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $rd_cv_gcc_flag__Werror" >&5
+$as_echo "$rd_cv_gcc_flag__Werror" >&6; }
+if test "x$rd_cv_gcc_flag__Werror" = "xyes"; then
+  WERROR="-Werror"
+else
+  WERROR=""
+fi
+
+
+if test "x$GCC" = "xyes"; then
+  for flag in -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do
+    oCFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS $flag"
+    cachename=rd_cv_gcc_flag_`echo $flag|sed 's/[^A-Za-z]/_/g'`
+    { $as_echo "$as_me:$LINENO: checking if gcc likes the $flag flag" >&5
+$as_echo_n "checking if gcc likes the $flag flag... " >&6; }
+if { as_var=$cachename; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval $cachename=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval $cachename=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$cachename'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    if eval test \$$cachename = no; then
+         CFLAGS="$oCFLAGS"
+    fi
+  done
+fi
+
+
+
+
+
+
+case $TERM in
+       #   for the most important terminal types we directly know the sequences
+       xterm|xterm*|vt220|vt220*)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+       ;;
+       vt100|vt100*|cygwin)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+       ;;
+       *)
+               T_MD=''
+               T_ME=''
+       ;;
+esac
+  { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+  { $as_echo "$as_me:$LINENO: result: ${T_MD}Checking for Header Files${T_ME}" >&5
+$as_echo "${T_MD}Checking for Header Files${T_ME}" >&6; }
+
+
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_opendir=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_opendir+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then
+  :
+else
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_opendir=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_opendir+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then
+  :
+else
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in libgen.h features.h sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if test "${ac_cv_c_const+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset cs;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_const=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_c_const=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const /**/
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if test "${ac_cv_header_time+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_time=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_header_time=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test "${ac_cv_struct_tm+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+                                    int *p = &tm.tm_sec;
+                                    return !p;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_struct_tm=time.h
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_struct_tm=sys/time.h
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+
+case $TERM in
+       #   for the most important terminal types we directly know the sequences
+       xterm|xterm*|vt220|vt220*)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+       ;;
+       vt100|vt100*|cygwin)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+       ;;
+       *)
+               T_MD=''
+               T_ME=''
+       ;;
+esac
+  { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+  { $as_echo "$as_me:$LINENO: result: ${T_MD}Test Library Functions${T_ME}" >&5
+$as_echo "${T_MD}Test Library Functions${T_ME}" >&6; }
+
+
+{ $as_echo "$as_me:$LINENO: checking for acos" >&5
+$as_echo_n "checking for acos... " >&6; }
+if test "${ac_cv_func_acos+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define acos to an innocuous variant, in case <limits.h> declares acos.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define acos innocuous_acos
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char acos (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef acos
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char acos ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_acos || defined __stub___acos
+choke me
+#endif
+
+int
+main ()
+{
+return acos ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_acos=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_func_acos=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_acos" >&5
+$as_echo "$ac_cv_func_acos" >&6; }
+if test "x$ac_cv_func_acos" = x""yes; then
+  :
+else
+
+{ $as_echo "$as_me:$LINENO: checking for acos in -lm" >&5
+$as_echo_n "checking for acos in -lm... " >&6; }
+if test "${ac_cv_lib_m_acos+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char acos ();
+int
+main ()
+{
+return acos ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_m_acos=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_m_acos=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_acos" >&5
+$as_echo "$ac_cv_lib_m_acos" >&6; }
+if test "x$ac_cv_lib_m_acos" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+fi
+
+
+
+eval `./libtool --config | grep pic_flag`
+CFLAGS="$CFLAGS $pic_flag"
+
+
+
+for ac_func in strftime
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  # strftime is in -lintl on SCO UNIX.
+{ $as_echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
+$as_echo_n "checking for strftime in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_strftime+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strftime ();
+int
+main ()
+{
+return strftime ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_intl_strftime=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_intl_strftime=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
+$as_echo "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = x""yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRFTIME 1
+_ACEOF
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+
+for ac_func in vprintf
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+{ $as_echo "$as_me:$LINENO: checking for _doprnt" >&5
+$as_echo_n "checking for _doprnt... " >&6; }
+if test "${ac_cv_func__doprnt+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define _doprnt innocuous__doprnt
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _doprnt (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef _doprnt
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char _doprnt ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub__doprnt || defined __stub____doprnt
+choke me
+#endif
+
+int
+main ()
+{
+return _doprnt ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func__doprnt=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_func__doprnt=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+$as_echo "$ac_cv_func__doprnt" >&6; }
+if test "x$ac_cv_func__doprnt" = x""yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DOPRNT 1
+_ACEOF
+
+fi
+
+fi
+done
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+       # Check for potential -arch flags.  It is not universal unless
+       # there are some -arch flags.  Note that *ppc* also matches
+       # ppc64.  This check is also rather less than ideal.
+       case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
+         *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
+       esac
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+               #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_bigendian=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_c_bigendian=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_bigendian=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_c_bigendian=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then
+  # Try to guess by grepping values from an object file.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+             ac_cv_c_bigendian=yes
+           fi
+           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+             if test "$ac_cv_c_bigendian" = unknown; then
+               ac_cv_c_bigendian=no
+             else
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=no
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+    fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+;; #(
+   no)
+      ;; #(
+   universal)
+
+cat >>confdefs.h <<\_ACEOF
+#define AC_APPLE_UNIVERSAL_BUILD 1
+_ACEOF
+
+     ;; #(
+   *)
+     { { $as_echo "$as_me:$LINENO: error: unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+$as_echo "$as_me: error: unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+   { (exit 1); exit 1; }; } ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in tzset fsync mbstowcs opendir readdir chdir chroot getuid setlocale strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+{ $as_echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
+$as_echo_n "checking whether strerror_r is declared... " >&6; }
+if test "${ac_cv_have_decl_strerror_r+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+#ifndef strerror_r
+  (void) strerror_r;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_decl_strerror_r=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_have_decl_strerror_r=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
+$as_echo "$ac_cv_have_decl_strerror_r" >&6; }
+if test "x$ac_cv_have_decl_strerror_r" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R 0
+_ACEOF
+
+
+fi
+
+
+
+for ac_func in strerror_r
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
+$as_echo_n "checking whether strerror_r returns char *... " >&6; }
+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+    ac_cv_func_strerror_r_char_p=no
+    if test $ac_cv_have_decl_strerror_r = yes; then
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+         char buf[100];
+         char x = *strerror_r (0, buf, sizeof buf);
+         char *p = strerror_r (0, buf, sizeof buf);
+         return !p || x;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_func_strerror_r_char_p=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      # strerror_r is not declared.  Choose between
+      # systems that have relatively inaccessible declarations for the
+      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
+      # former has a strerror_r that returns char*, while the latter
+      # has a strerror_r that returns `int'.
+      # This test should segfault on the DEC system.
+      if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+       extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+         char x = *strerror_r (0, buf, sizeof buf);
+         return ! isalpha (x);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_strerror_r_char_p=yes
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+    fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
+$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+if test $ac_cv_func_strerror_r_char_p = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STRERROR_R_CHAR_P 1
+_ACEOF
+
+fi
+
+
+
+case $TERM in
+       #   for the most important terminal types we directly know the sequences
+       xterm|xterm*|vt220|vt220*)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+       ;;
+       vt100|vt100*|cygwin)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+       ;;
+       *)
+               T_MD=''
+               T_ME=''
+       ;;
+esac
+  { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+  { $as_echo "$as_me:$LINENO: result: ${T_MD}Map/Fadvis/Madvise checking${T_ME}" >&5
+$as_echo "${T_MD}Map/Fadvis/Madvise checking${T_ME}" >&6; }
+
+
+
+
+
+for ac_func in fdatasync
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  { $as_echo "$as_me:$LINENO: checking for fdatasync in -lrt" >&5
+$as_echo_n "checking for fdatasync in -lrt... " >&6; }
+if test "${ac_cv_lib_rt_fdatasync+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char fdatasync ();
+int
+main ()
+{
+return fdatasync ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_rt_fdatasync=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_rt_fdatasync=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_fdatasync" >&5
+$as_echo "$ac_cv_lib_rt_fdatasync" >&6; }
+if test "x$ac_cv_lib_rt_fdatasync" = x""yes; then
+  LIBS="${LIBS} -lrt"; cat >>confdefs.h <<\_ACEOF
+#define HAVE_FDATASYNC 1
+_ACEOF
+
+fi
+
+fi
+done
+
+
+for ac_func in fsync
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+if test "x$enable_mmap" = "xyes"; then
+  case "$host" in
+  *cygwin*)
+    # the normal mmap test does not work in cygwin
+
+for ac_func in mmap
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+    if test "x$ac_cv_func_mmap" = "xyes"; then
+      ac_cv_func_mmap_fixed_mapped=yes
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  ;;
+  *)
+
+for ac_header in sys/mman.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
     ;;
-  hppa*64*)
-    shrext_cmds='.sl'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
     ;;
-  *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in stdlib.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
     ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in getpagesize
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
-interix[3-9]*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:$LINENO: checking for working mmap" >&5
+$as_echo_n "checking for working mmap... " >&6; }
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+   Here is a matrix of mmap possibilities:
+       mmap private not fixed
+       mmap private fixed at somewhere currently unmapped
+       mmap private fixed at somewhere already mapped
+       mmap shared not fixed
+       mmap shared fixed at somewhere currently unmapped
+       mmap shared fixed at somewhere already mapped
+   For private mappings, we should verify that changes cannot be read()
+   back from the file, nor mmap's back from the file at a different
+   address.  (There have been systems where private was not correctly
+   implemented like the infamous i386 svr4.0, and systems where the
+   VM page cache was not coherent with the file system buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propagated back to all the places they're supposed to be.
+
+   Grep wants private fixed already mapped.
+   The main things grep needs to know about mmap are:
+   * does it exist and is it safe to write into the mmap'd area
+   * how to use it (BSD variants)  */
+
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+char *malloc ();
+#endif
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+/* Assume that all systems that can run configure have sys/param.h.  */
+# ifndef HAVE_SYS_PARAM_H
+#  define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192  /* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+int
+main ()
+{
+  char *data, *data2, *data3;
+  int i, pagesize;
+  int fd;
+
+  pagesize = getpagesize ();
+
+  /* First, make a file with some known garbage in it. */
+  data = (char *) malloc (pagesize);
+  if (!data)
+    return 1;
+  for (i = 0; i < pagesize; ++i)
+    *(data + i) = rand ();
+  umask (0);
+  fd = creat ("conftest.mmap", 0600);
+  if (fd < 0)
+    return 1;
+  if (write (fd, data, pagesize) != pagesize)
+    return 1;
+  close (fd);
+
+  /* Next, try to mmap the file at a fixed address which already has
+     something else allocated at it.  If we can, also make sure that
+     we see the same garbage.  */
+  fd = open ("conftest.mmap", O_RDWR);
+  if (fd < 0)
+    return 1;
+  data2 = (char *) malloc (2 * pagesize);
+  if (!data2)
+    return 1;
+  data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
+  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+                    MAP_PRIVATE | MAP_FIXED, fd, 0L))
+    return 1;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data2 + i))
+      return 1;
+
+  /* Finally, make sure that changes to the mapped area do not
+     percolate back to the file as seen by read().  (This is a bug on
+     some variants of i386 svr4.0.)  */
+  for (i = 0; i < pagesize; ++i)
+    *(data2 + i) = *(data2 + i) + 1;
+  data3 = (char *) malloc (pagesize);
+  if (!data3)
+    return 1;
+  if (read (fd, data3, pagesize) != pagesize)
+    return 1;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data3 + i))
+      return 1;
+  close (fd);
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
+$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP 1
+_ACEOF
+
+fi
+rm -f conftest.mmap
 
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
 
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
-       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+
+for ac_func in mmap munmap msync
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
 int
 main ()
 {
-
+return $ac_func ();
   ;
   return 0;
 }
@@ -10067,424 +16201,972 @@ $as_echo "$ac_try_echo") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
-  shlibpath_overrides_runpath=yes
-fi
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-*nto* | *qnx*)
-  version_type=qnx
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='ldqnx.so'
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-rdos*)
-  dynamic_linker=no
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
+       eval "$as_ac_var=no"
+fi
 
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
+fi
+done
 
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
+    { $as_echo "$as_me:$LINENO: checking whether madvise is declared" >&5
+$as_echo_n "checking whether madvise is declared... " >&6; }
+if test "${ac_cv_have_decl_madvise+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef HAVE_SYS_MMAN_H
+                                    # include <sys/mman.h>
+                                    #endif
 
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
+int
+main ()
+{
+#ifndef madvise
+  (void) madvise;
+#endif
 
-*)
-  dynamic_linker=no
-  ;;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_decl_madvise=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+       ac_cv_have_decl_madvise=no
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_madvise" >&5
+$as_echo "$ac_cv_have_decl_madvise" >&6; }
+if test "x$ac_cv_have_decl_madvise" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MADVISE 1
+_ACEOF
+
 
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MADVISE 0
+_ACEOF
 
 
+fi
 
 
+    if test "x$ac_cv_have_decl_madvise" = "xyes";
+    then
 
+for ac_func in madvise
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
+#undef $ac_func
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       eval "$as_ac_var=no"
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
+fi
+done
 
+    else
 
+for ac_func in posix_madvise
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
+#undef $ac_func
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       eval "$as_ac_var=no"
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
+fi
+done
 
+      if test "x$ac_cv_func_posix_madvise" != "xyes"; then
+        { $as_echo "$as_me:$LINENO: WARNING: madvise() nor posix_madvise() found." >&5
+$as_echo "$as_me: WARNING: madvise() nor posix_madvise() found." >&2;}
+      fi
+    fi
+  ;;
+  esac
+  if test "x$ac_cv_func_mmap" != "xyes";
+  then
+    { { $as_echo "$as_me:$LINENO: error: --enable-mmap requested but mmap() was not detected" >&5
+$as_echo "$as_me: error: --enable-mmap requested but mmap() was not detected" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
 
+{ $as_echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
+$as_echo_n "checking whether posix_fadvise is declared... " >&6; }
+if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#define _XOPEN_SOURCE 600
+#include <fcntl.h>
 
+int
+main ()
+{
+#ifndef posix_fadvise
+  (void) posix_fadvise;
+#endif
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_decl_posix_fadvise=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_cv_have_decl_posix_fadvise=no
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
+$as_echo "$ac_cv_have_decl_posix_fadvise" >&6; }
+if test "x$ac_cv_have_decl_posix_fadvise" = x""yes; then
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_POSIX_FADVISE 1
+_ACEOF
 
 
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_POSIX_FADVISE 0
+_ACEOF
 
 
+fi
 
 
 
+for ac_func in posix_fadvise
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
+#undef $ac_func
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       eval "$as_ac_var=no"
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
+fi
+done
 
 
 
+case $TERM in
+       #   for the most important terminal types we directly know the sequences
+       xterm|xterm*|vt220|vt220*)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+       ;;
+       vt100|vt100*|cygwin)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+       ;;
+       *)
+               T_MD=''
+               T_ME=''
+       ;;
+esac
+  { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+  { $as_echo "$as_me:$LINENO: result: ${T_MD}Libintl Processing${T_ME}" >&5
+$as_echo "${T_MD}Libintl Processing${T_ME}" >&6; }
 
 
 
 
 
+        MKINSTALLDIRS=
+  if test -n "$ac_aux_dir"; then
+    case "$ac_aux_dir" in
+      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+    esac
+  fi
+  if test -z "$MKINSTALLDIRS"; then
+    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+  fi
 
 
 
+  { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+    # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then
+  enableval=$enable_nls; USE_NLS=$enableval
+else
+  USE_NLS=yes
+fi
 
+  { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
 
 
 
 
 
 
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
 
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
 
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case "$MSGFMT" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+    ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+  { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+  # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+  { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
 
 
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
 
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
 
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case "$XGETTEXT" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+    ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+  { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+    rm -f messages.po
 
 
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
 
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
 
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case "$MSGMERGE" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+    ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+  { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
+      if test "$GMSGFMT" != ":"; then
+            if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+      : ;
+    else
+      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+      { $as_echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
+$as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
+      GMSGFMT=":"
+    fi
+  fi
 
+      if test "$XGETTEXT" != ":"; then
+            if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+      : ;
+    else
+      { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
+      XGETTEXT=":"
+    fi
+        rm -f messages.po
+  fi
 
+  ac_config_commands="$ac_config_commands default-1"
 
 
 
+    { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2 or newer" >&5
+$as_echo_n "checking whether we are using the GNU C Library 2 or newer... " >&6; }
+if test "${ac_cv_gnu_library_2+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
-   test -n "$runpath_var" ||
-   test "X$hardcode_automatic" = "Xyes" ; then
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+  Lucky GNU user
+ #endif
+#endif
 
-  # We can hardcode non-existent directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky GNU user" >/dev/null 2>&1; then
+  ac_cv_gnu_library_2=yes
 else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
+  ac_cv_gnu_library_2=no
 fi
-{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
+rm -f conftest*
+
+
 
-if test "$hardcode_action" = relink ||
-   test "$inherit_rpath" = yes; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2" >&5
+$as_echo "$ac_cv_gnu_library_2" >&6; }
 
+    GLIBC2="$ac_cv_gnu_library_2"
 
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-  if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-  mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-    ;;
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
 
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-    ;;
 
-  darwin*)
-  # if libdl is installed we need to link against it
-    { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+        { $as_echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
+$as_echo_n "checking for strerror in -lcposix... " >&6; }
+if test "${ac_cv_lib_cposix_strerror+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
+LIBS="-lcposix  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -10498,11 +17180,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char dlopen ();
+char strerror ();
 int
 main ()
 {
-return dlopen ();
+return strerror ();
   ;
   return 0;
 }
@@ -10528,12 +17210,12 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_dl_dlopen=yes
+  ac_cv_lib_cposix_strerror=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_dl_dlopen=no
+       ac_cv_lib_cposix_strerror=no
 fi
 
 rm -rf conftest.dSYM
@@ -10541,80 +17223,208 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
+$as_echo "$ac_cv_lib_cposix_strerror" >&6; }
+if test "x$ac_cv_lib_cposix_strerror" = x""yes; then
+  LIBS="$LIBS -lcposix"
+fi
+
+
+
+
+  { $as_echo "$as_me:$LINENO: checking for signed" >&5
+$as_echo_n "checking for signed... " >&6; }
+if test "${bh_cv_c_signed+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
+int
+main ()
+{
+signed char x;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  bh_cv_c_signed=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       bh_cv_c_signed=no
 fi
 
-    ;;
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bh_cv_c_signed" >&5
+$as_echo "$bh_cv_c_signed" >&6; }
+  if test $bh_cv_c_signed = no; then
 
-  *)
-    { $as_echo "$as_me:$LINENO: checking for shl_load" >&5
-$as_echo_n "checking for shl_load... " >&6; }
-if test "${ac_cv_func_shl_load+set}" = set; then
+cat >>confdefs.h <<\_ACEOF
+#define signed /**/
+_ACEOF
+
+  fi
+
+{ $as_echo "$as_me:$LINENO: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if test "${ac_cv_c_inline+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define shl_load innocuous_shl_load
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_inline=$ac_kw
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef shl_load
+fi
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_shl_load || defined __stub___shl_load
-choke me
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
 #endif
+_ACEOF
+    ;;
+esac
 
+{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
+$as_echo_n "checking for off_t... " >&6; }
+if test "${ac_cv_type_off_t+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_off_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
 int
 main ()
 {
-return shl_load ();
+if (sizeof (off_t))
+       return 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((off_t)))
+         return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -10623,65 +17433,68 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_shl_load=yes
+       } && test -s conftest.$ac_objext; then
+  :
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_shl_load=no
+       ac_cv_type_off_t=yes
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-$as_echo "$ac_cv_func_shl_load" >&6; }
-if test "x$ac_cv_func_shl_load" = x""yes; then
-  lt_cv_dlopen="shl_load"
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+$as_echo "$ac_cv_type_off_t" >&6; }
+if test "x$ac_cv_type_off_t" = x""yes; then
+  :
 else
-  { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+
+cat >>confdefs.h <<_ACEOF
+#define off_t long int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
+$as_echo_n "checking for size_t... " >&6; }
+if test "${ac_cv_type_size_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
+  ac_cv_type_size_t=no
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
+$ac_includes_default
 int
 main ()
 {
-return shl_load ();
+if (sizeof (size_t))
+       return 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -10690,87 +17503,32 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_dld_shl_load=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_dld_shl_load=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
-  { $as_echo "$as_me:$LINENO: checking for dlopen" >&5
-$as_echo_n "checking for dlopen... " >&6; }
-if test "${ac_cv_func_dlopen+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
+       } && test -s conftest.$ac_objext; then
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dlopen innocuous_dlopen
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef dlopen
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_dlopen || defined __stub___dlopen
-choke me
-#endif
-
+$ac_includes_default
 int
 main ()
 {
-return dlopen ();
+if (sizeof ((size_t)))
+         return 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -10779,52 +17537,55 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_dlopen=yes
+       } && test -s conftest.$ac_objext; then
+  :
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_dlopen=no
+       ac_cv_type_size_t=yes
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-$as_echo "$ac_cv_func_dlopen" >&6; }
-if test "x$ac_cv_func_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen"
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+$as_echo "$ac_cv_type_size_t" >&6; }
+if test "x$ac_cv_type_size_t" = x""yes; then
+  :
 else
-  { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+  { $as_echo "$as_me:$LINENO: checking for long long" >&5
+$as_echo_n "checking for long long... " >&6; }
+if test "${ac_cv_type_long_long+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
+long long ll = 1LL; int i = 63;
 int
 main ()
 {
-return dlopen ();
+long long llmax = (long long) -1;
+     return ll << i | ll >> i | llmax / ll | llmax % ll;
   ;
   return 0;
 }
@@ -10850,62 +17611,66 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_dl_dlopen=yes
+  ac_cv_type_long_long=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_dl_dlopen=no
+       ac_cv_type_long_long=no
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-  { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
+$as_echo "$ac_cv_type_long_long" >&6; }
+  if test $ac_cv_type_long_long = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_LONG 1
+_ACEOF
+
+  fi
+
+
+  { $as_echo "$as_me:$LINENO: checking for long double" >&5
+$as_echo_n "checking for long double... " >&6; }
+if test "${gt_cv_c_long_double+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  if test "$GCC" = yes; then
+       gt_cv_c_long_double=yes
+     else
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
+         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
+         long double foo = 0.0;
+         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+
 int
 main ()
 {
-return dlopen ();
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -10914,66 +17679,59 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_svld_dlopen=yes
+       } && test -s conftest.$ac_objext; then
+  gt_cv_c_long_double=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_svld_dlopen=no
+       gt_cv_c_long_double=no
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
-  { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5
+$as_echo "$gt_cv_c_long_double" >&6; }
+  if test $gt_cv_c_long_double = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_DOUBLE 1
+_ACEOF
+
+  fi
+
+
+  { $as_echo "$as_me:$LINENO: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if test "${gt_cv_c_wchar_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
+#include <stddef.h>
+       wchar_t foo = (wchar_t)'\0';
 int
 main ()
 {
-return dld_link ();
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -10982,409 +17740,575 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_dld_dld_link=yes
+       } && test -s conftest.$ac_objext; then
+  gt_cv_c_wchar_t=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_dld_dld_link=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
+       gt_cv_c_wchar_t=no
 fi
 
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+  if test $gt_cv_c_wchar_t = yes; then
 
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-         if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-#line 11054 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCHAR_T 1
+_ACEOF
 
-  return status;
-}
-_LT_EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self=no
   fi
-fi
-rm -fr conftest*
 
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if test "${gt_cv_c_wint_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-         if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self_static=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-#line 11150 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <wchar.h>
+       wint_t foo = (wchar_t)'\0';
+int
+main ()
 {
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
 
-  return status;
+  ;
+  return 0;
 }
-_LT_EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self_static=no
-  fi
-fi
-rm -fr conftest*
-
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  gt_cv_c_wint_t=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       gt_cv_c_wint_t=no
 fi
-{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
 
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+  if test $gt_cv_c_wint_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WINT_T 1
+_ACEOF
 
+  fi
 
 
+  { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if test "${gl_cv_header_inttypes_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  gl_cv_header_inttypes_h=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       gl_cv_header_inttypes_h=no
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5
+$as_echo "$gl_cv_header_inttypes_h" >&6; }
+  if test $gl_cv_header_inttypes_h = yes; then
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
+_ACEOF
 
+  fi
 
 
+  { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5
+$as_echo_n "checking for stdint.h... " >&6; }
+if test "${gl_cv_header_stdint_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <stdint.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  gl_cv_header_stdint_h=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       gl_cv_header_stdint_h=no
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5
+$as_echo "$gl_cv_header_stdint_h" >&6; }
+  if test $gl_cv_header_stdint_h = yes; then
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+_ACEOF
 
+  fi
 
 
 
 
-striplib=
-old_striplib=
-{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { $as_echo "$as_me:$LINENO: checking for intmax_t" >&5
+$as_echo_n "checking for intmax_t... " >&6; }
+if test "${gt_cv_c_intmax_t+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP" ; then
-      striplib="$STRIP -x"
-      old_striplib="$STRIP -S"
-      { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-      { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-    ;;
-  *)
-    { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-    ;;
-  esac
-fi
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
 
+int
+main ()
+{
+intmax_t x = -1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  gt_cv_c_intmax_t=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       gt_cv_c_intmax_t=no
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5
+$as_echo "$gt_cv_c_intmax_t" >&6; }
+  if test $gt_cv_c_intmax_t = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INTMAX_T 1
+_ACEOF
 
+  fi
 
 
 
+  { $as_echo "$as_me:$LINENO: checking whether printf() supports POSIX/XSI format strings" >&5
+$as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; }
+if test "${gt_cv_func_printf_posix+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
 
+      if test "$cross_compiling" = yes; then
 
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  # Report which library types will actually be built
-  { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
-  { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+  notposix
+#endif
 
-  { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
-  test "$can_build_shared" = "no" && enable_shared=no
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "notposix" >/dev/null 2>&1; then
+  gt_cv_func_printf_posix="guessing no"
+else
+  gt_cv_func_printf_posix="guessing yes"
+fi
+rm -f conftest*
 
-  # On AIX, shared libraries and static libraries use the same namespace, and
-  # are all built from PIC.
-  case $host_os in
-  aix3*)
-    test "$enable_shared" = yes && enable_static=no
-    if test -n "$RANLIB"; then
-      archive_cmds="$archive_cmds~\$RANLIB \$lib"
-      postinstall_cmds='$RANLIB $lib'
-    fi
-    ;;
 
-  aix[4-9]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
-    fi
-    ;;
-  esac
-  { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
-  # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
-  { $as_echo "$as_me:$LINENO: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  gt_cv_func_printf_posix=yes
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+( exit $ac_status )
+gt_cv_func_printf_posix=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
 
 
 fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_printf_posix" >&5
+$as_echo "$gt_cv_func_printf_posix" >&6; }
+  case $gt_cv_func_printf_posix in
+    *yes)
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_PRINTF 1
+_ACEOF
 
+      ;;
+  esac
 
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+                         if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_working_alloca_h=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_cv_working_alloca_h=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA_H 1
+_ACEOF
 
+fi
 
+{ $as_echo "$as_me:$LINENO: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  ifdef HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
 
+int
+main ()
+{
+char *p = (char *) alloca (1);
+                                   if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_alloca_works=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_cv_func_alloca_works=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
 
-        ac_config_commands="$ac_config_commands libtool"
+if test $ac_cv_func_alloca_works = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
 
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
 
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
 
-# Only expand once:
+cat >>confdefs.h <<\_ACEOF
+#define C_ALLOCA 1
+_ACEOF
 
 
+{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
 
-CFLAGS="$CFLAGS -D_GNU_SOURCE"
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then
+  ac_cv_os_cray=yes
+else
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
 
-if test "x$GCC" = "xyes"; then
-  for flag in -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do
-    oCFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS $flag"
-    cachename=rd_cv_gcc_flag_`echo $flag|sed 's/[^A-Za-z]/_/g'`
-    { $as_echo "$as_me:$LINENO: checking if gcc likes the $flag flag" >&5
-$as_echo_n "checking if gcc likes the $flag flag... " >&6; }
-if { as_var=$cachename; eval "test \"\${$as_var+set}\" = set"; }; then
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -11393,24 +18317,54 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
 int
 main ()
 {
-return 0
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -11419,57 +18373,47 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval $cachename=yes
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval $cachename=no
+       eval "$as_ac_var=no"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$cachename'}
+ac_res=`eval 'as_val=${'$as_ac_var'}
                 $as_echo "$as_val"'`
               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-    if eval test \$$cachename = no; then
-         CFLAGS="$oCFLAGS"
-    fi
-  done
-fi
-
-
-
-
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
 
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
 
-case $TERM in
-       #   for the most important terminal types we directly know the sequences
-       xterm|xterm*|vt220|vt220*)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
-       ;;
-       vt100|vt100*|cygwin)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
-       ;;
-       *)
-               T_MD=''
-               T_ME=''
-       ;;
-esac
-  { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-  { $as_echo "$as_me:$LINENO: result: ${T_MD}Checking for Header Files${T_ME}" >&5
-$as_echo "${T_MD}Checking for Header Files${T_ME}" >&6; }
+    break
+fi
 
+  done
+fi
 
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then
   $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_stack_direction=0
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -11477,93 +18421,130 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+$ac_includes_default
+int
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
 
 int
 main ()
 {
-
-  ;
-  return 0;
+  return find_stack_direction () < 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_stack_direction=1
 else
-  $as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_header_stdc=no
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
 
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
+
 
 fi
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+
+    { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5
+$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
+if test "${ac_cv_gnu_library_2_1+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
+  $EGREP "Lucky GNU user" >/dev/null 2>&1; then
+  ac_cv_gnu_library_2_1=yes
 else
-  ac_cv_header_stdc=no
+  ac_cv_gnu_library_2_1=no
 fi
 rm -f conftest*
 
+
+
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5
+$as_echo "$ac_cv_gnu_library_2_1" >&6; }
+
+    GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+
+  { $as_echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5
+$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
+if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+      if test "$cross_compiling" = yes; then
+
+          # Guess based on the CPU.
+          case "$host_cpu" in
+            alpha* | i3456786 | m68k | s390*)
+              gt_cv_int_divbyzero_sigfpe="guessing yes";;
+            *)
+              gt_cv_int_divbyzero_sigfpe="guessing no";;
+          esac
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -11571,30 +18552,43 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <ctype.h>
+
 #include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
 #else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+sigfpe_handler (sig) int sig;
 #endif
+{
+  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
+  exit (sig != SIGFPE);
+}
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
 {
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
+  signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+  signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL.  */
+#if defined (__sparc__) && defined (__linux__)
+  signal (SIGILL, sigfpe_handler);
+#endif
+
+  z = x / y;
+  nan = y / y;
+  exit (1);
 }
+
 _ACEOF
 rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -11618,43 +18612,38 @@ $as_echo "$ac_try_echo") >&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  :
+  gt_cv_int_divbyzero_sigfpe=yes
 else
   $as_echo "$as_me: program exited with status $ac_status" >&5
 $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-ac_cv_header_stdc=no
+gt_cv_int_divbyzero_sigfpe=no
 fi
 rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
 
 fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5
+$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; }
+  case "$gt_cv_int_divbyzero_sigfpe" in
+    *yes) value=1;;
+    *) value=0;;
+  esac
 
+cat >>confdefs.h <<_ACEOF
+#define INTDIV0_RAISES_SIGFPE $value
+_ACEOF
 
 
 
-
-
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for unsigned long long" >&5
+$as_echo_n "checking for unsigned long long... " >&6; }
+if test "${ac_cv_type_unsigned_long_long+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -11663,27 +18652,25 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <$ac_hdr>
-
+unsigned long long ull = 1ULL; int i = 63;
 int
 main ()
 {
-if ((DIR *) 0)
-return 0;
+unsigned long long ullmax = (unsigned long long) -1;
+     return ull << i | ull >> i | ullmax / ull | ullmax % ull;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -11692,78 +18679,85 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_type_unsigned_long_long=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_Header=no"
+       ac_cv_type_unsigned_long_long=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
+$as_echo "$ac_cv_type_unsigned_long_long" >&6; }
+  if test $ac_cv_type_unsigned_long_long = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNSIGNED_LONG_LONG 1
 _ACEOF
 
-ac_header_dirent=$ac_hdr; break
-fi
+  fi
 
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then
+
+
+
+  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+
+    test $ac_cv_type_unsigned_long_long = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+
+cat >>confdefs.h <<_ACEOF
+#define uintmax_t $ac_type
+_ACEOF
+
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UINTMAX_T 1
+_ACEOF
+
+  fi
+
+
+  { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if test "${gt_cv_header_inttypes_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
+
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
+#include <sys/types.h>
+#include <inttypes.h>
 int
 main ()
 {
-return opendir ();
+
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' dir; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -11772,86 +18766,65 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_search_opendir=$ac_res
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then
-  :
+       } && test -s conftest.$ac_objext; then
+  gt_cv_header_inttypes_h=yes
 else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       gt_cv_header_inttypes_h=no
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5
+$as_echo "$gt_cv_header_inttypes_h" >&6; }
+  if test $gt_cv_header_inttypes_h = yes; then
 
-else
-  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+  fi
+
+
+
+  if test $gt_cv_header_inttypes_h = yes; then
+    { $as_echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5
+$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
+if test "${gt_cv_inttypes_pri_broken+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
+
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
 #endif
-char opendir ();
+
 int
 main ()
 {
-return opendir ();
+
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' x; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -11860,65 +18833,32 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_search_opendir=$ac_res
+       } && test -s conftest.$ac_objext; then
+  gt_cv_inttypes_pri_broken=no
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then
-  :
-else
-  ac_cv_search_opendir=no
+       gt_cv_inttypes_pri_broken=yes
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5
+$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
 
+cat >>confdefs.h <<_ACEOF
+#define PRI_MACROS_BROKEN 1
+_ACEOF
 
+  fi
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in libgen.h features.h sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h
+for ac_header in stdint.h
 do
 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -11980,217 +18920,130 @@ $as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset cs;
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *pcpcc;
-  char **ppc;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  pcpcc = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++pcpcc;
-  ppc = (char**) pcpcc;
-  pcpcc = (char const *const *) ppc;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-    if (s) return 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-    if (!foo) return 0;
-  }
-  return !cs[0] && !zero.x;
-#endif
-
-  ;
-  return 0;
-}
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_c_const=yes
+       }; then
+  ac_header_preproc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_c_const=no
+  ac_header_preproc=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define const /**/
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
+done
+
+    { $as_echo "$as_me:$LINENO: checking for SIZE_MAX" >&5
+$as_echo_n "checking for SIZE_MAX... " >&6; }
+  result=
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
 
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Found it" >/dev/null 2>&1; then
+  result=yes
+fi
+rm -f conftest*
+
+  if test -z "$result"; then
+                    if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
 int
 main ()
 {
-if ((struct tm *) 0)
-return 0;
+static int test_array [1 - 2 * !((~(size_t)0 / 10) >= 0)];
+test_array [0] = 0
+
   ;
   return 0;
 }
@@ -12213,46 +19066,21 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_header_time=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_header_time=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
-_ACEOF
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if test "${ac_cv_struct_tm+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <time.h>
-
+#include <stddef.h>
 int
 main ()
 {
-struct tm tm;
-                                    int *p = &tm.tm_sec;
-                                    return !p;
+static int test_array [1 - 2 * !((~(size_t)0 / 10) <= $ac_mid)];
+test_array [0] = 0
+
   ;
   return 0;
 }
@@ -12275,108 +19103,51 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_struct_tm=time.h
+  ac_hi=$ac_mid; break
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_struct_tm=sys/time.h
+       ac_lo=`expr $ac_mid + 1`
+                       if test $ac_lo -le $ac_mid; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid + 1`
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
-$as_echo "$ac_cv_struct_tm" >&6; }
-if test $ac_cv_struct_tm = sys/time.h; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TM_IN_SYS_TIME 1
-_ACEOF
-
-fi
-
-
-
-case $TERM in
-       #   for the most important terminal types we directly know the sequences
-       xterm|xterm*|vt220|vt220*)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
-       ;;
-       vt100|vt100*|cygwin)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
-       ;;
-       *)
-               T_MD=''
-               T_ME=''
-       ;;
-esac
-  { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-  { $as_echo "$as_me:$LINENO: result: ${T_MD}Test Library Functions${T_ME}" >&5
-$as_echo "${T_MD}Test Library Functions${T_ME}" >&6; }
-
-
-{ $as_echo "$as_me:$LINENO: checking for acos" >&5
-$as_echo_n "checking for acos... " >&6; }
-if test "${ac_cv_func_acos+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  done
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define acos to an innocuous variant, in case <limits.h> declares acos.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define acos innocuous_acos
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char acos (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef acos
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char acos ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_acos || defined __stub___acos
-choke me
-#endif
-
+#include <stddef.h>
 int
 main ()
 {
-return acos ();
+static int test_array [1 - 2 * !((~(size_t)0 / 10) < 0)];
+test_array [0] = 0
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -12385,66 +19156,35 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_acos=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_func_acos=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_acos" >&5
-$as_echo "$ac_cv_func_acos" >&6; }
-if test "x$ac_cv_func_acos" = x""yes; then
-  :
-else
-
-{ $as_echo "$as_me:$LINENO: checking for acos in -lm" >&5
-$as_echo_n "checking for acos in -lm... " >&6; }
-if test "${ac_cv_lib_m_acos+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+       } && test -s conftest.$ac_objext; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char acos ();
+#include <stddef.h>
 int
 main ()
 {
-return acos ();
+static int test_array [1 - 2 * !((~(size_t)0 / 10) >= $ac_mid)];
+test_array [0] = 0
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -12453,105 +19193,62 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_m_acos=yes
+       } && test -s conftest.$ac_objext; then
+  ac_lo=$ac_mid; break
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_m_acos=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+       ac_hi=`expr '(' $ac_mid ')' - 1`
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid`
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_acos" >&5
-$as_echo "$ac_cv_lib_m_acos" >&6; }
-if test "x$ac_cv_lib_m_acos" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
 
-  LIBS="-lm $LIBS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_lo= ac_hi=
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-
-
-eval `./libtool --config | grep pic_flag`
-CFLAGS="$CFLAGS $pic_flag"
-
-
-
-for ac_func in strftime
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <stddef.h>
 int
 main ()
 {
-return $ac_func ();
+static int test_array [1 - 2 * !((~(size_t)0 / 10) <= $ac_mid)];
+test_array [0] = 0
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -12560,65 +19257,63 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+       ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) res_hi=$ac_lo;;
+'') result=? ;;
+esac
 else
-  # strftime is in -lintl on SCO UNIX.
-{ $as_echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
-$as_echo_n "checking for strftime in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_strftime+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char strftime ();
+#include <stddef.h>
+static long int longval () { return ~(size_t)0 / 10; }
+static unsigned long int ulongval () { return ~(size_t)0 / 10; }
+#include <stdio.h>
+#include <stdlib.h>
 int
 main ()
 {
-return strftime ();
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if ((~(size_t)0 / 10) < 0)
+    {
+      long int i = longval ();
+      if (i != (~(size_t)0 / 10))
+       return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != (~(size_t)0 / 10))
+       return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -12626,108 +19321,99 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_intl_strftime=yes
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  res_hi=`cat conftest.val`
 else
-  $as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_intl_strftime=no
+( exit $ac_status )
+result=?
 fi
-
 rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
-$as_echo "$ac_cv_lib_intl_strftime" >&6; }
-if test "x$ac_cv_lib_intl_strftime" = x""yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRFTIME 1
-_ACEOF
-
-LIBS="-lintl $LIBS"
-fi
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-done
-
+rm -f conftest.val
 
-for ac_func in vprintf
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+    if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((~(size_t)0 % 10) >= 0)];
+test_array [0] = 0
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
 int
 main ()
 {
-return $ac_func ();
+static int test_array [1 - 2 * !((~(size_t)0 % 10) <= $ac_mid)];
+test_array [0] = 0
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -12736,92 +19422,89 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid; break
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+       ac_lo=`expr $ac_mid + 1`
+                       if test $ac_lo -le $ac_mid; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid + 1`
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
-{ $as_echo "$as_me:$LINENO: checking for _doprnt" >&5
-$as_echo_n "checking for _doprnt... " >&6; }
-if test "${ac_cv_func__doprnt+set}" = set; then
-  $as_echo_n "(cached) " >&6
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define _doprnt innocuous__doprnt
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _doprnt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef _doprnt
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char _doprnt ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub__doprnt || defined __stub____doprnt
-choke me
-#endif
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((~(size_t)0 % 10) < 0)];
+test_array [0] = 0
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
 int
 main ()
 {
-return _doprnt ();
+static int test_array [1 - 2 * !((~(size_t)0 % 10) >= $ac_mid)];
+test_array [0] = 0
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -12830,56 +19513,52 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func__doprnt=yes
+       } && test -s conftest.$ac_objext; then
+  ac_lo=$ac_mid; break
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func__doprnt=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+       ac_hi=`expr '(' $ac_mid ')' - 1`
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid`
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
-$as_echo "$ac_cv_func__doprnt" >&6; }
-if test "x$ac_cv_func__doprnt" = x""yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DOPRNT 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_lo= ac_hi=
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-done
-
-
-
 
- { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_bigendian=unknown
-    # See if we're dealing with a universal compiler.
-    cat >conftest.$ac_ext <<_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifndef __APPLE_CC__
-              not a universal capable compiler
-            #endif
-            typedef int dummy;
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((~(size_t)0 % 10) <= $ac_mid)];
+test_array [0] = 0
 
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -12899,40 +19578,111 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-
-       # Check for potential -arch flags.  It is not universal unless
-       # there are some -arch flags.  Note that *ppc* also matches
-       # ppc64.  This check is also rather less than ideal.
-       case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
-         *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
-       esac
+  ac_hi=$ac_mid
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+       ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if sys/param.h defines the BYTE_ORDER macro.
-      cat >conftest.$ac_ext <<_ACEOF
+done
+case $ac_lo in
+?*) res_lo=$ac_lo;;
+'') result=? ;;
+esac
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-            #include <sys/param.h>
+#include <stddef.h>
+static long int longval () { return ~(size_t)0 % 10; }
+static unsigned long int ulongval () { return ~(size_t)0 % 10; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if ((~(size_t)0 % 10) < 0)
+    {
+      long int i = longval ();
+      if (i != (~(size_t)0 % 10))
+       return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != (~(size_t)0 % 10))
+       return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  res_lo=`cat conftest.val`
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+( exit $ac_status )
+result=?
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+
+    if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
 int
 main ()
 {
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-                    && LITTLE_ENDIAN)
-             bogus endian macros
-            #endif
+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)];
+test_array [0] = 0
 
   ;
   return 0;
@@ -12956,22 +19706,20 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-        cat >conftest.$ac_ext <<_ACEOF
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-               #include <sys/param.h>
-
+#include <stddef.h>
 int
 main ()
 {
-#if BYTE_ORDER != BIG_ENDIAN
-                not big endian
-               #endif
+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)];
+test_array [0] = 0
 
   ;
   return 0;
@@ -12995,40 +19743,37 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_c_bigendian=yes
+  ac_hi=$ac_mid; break
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_c_bigendian=no
+       ac_lo=`expr $ac_mid + 1`
+                       if test $ac_lo -le $ac_mid; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid + 1`
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat >conftest.$ac_ext <<_ACEOF
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <limits.h>
-
+#include <stddef.h>
 int
 main ()
 {
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-             bogus endian macros
-            #endif
+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)];
+test_array [0] = 0
 
   ;
   return 0;
@@ -13052,21 +19797,20 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  # It does; now see whether it defined to _BIG_ENDIAN or not.
-        cat >conftest.$ac_ext <<_ACEOF
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <limits.h>
-
+#include <stddef.h>
 int
 main ()
 {
-#ifndef _BIG_ENDIAN
-                not big endian
-               #endif
+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)];
+test_array [0] = 0
 
   ;
   return 0;
@@ -13090,54 +19834,48 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_c_bigendian=yes
+  ac_lo=$ac_mid; break
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_c_bigendian=no
+       ac_hi=`expr '(' $ac_mid ')' - 1`
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid`
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_lo= ac_hi=
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # Compile a test program.
-      if test "$cross_compiling" = yes; then
-  # Try to guess by grepping values from an object file.
-        cat >conftest.$ac_ext <<_ACEOF
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-short int ascii_mm[] =
-                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-               short int ascii_ii[] =
-                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-               int use_ascii (int i) {
-                 return ascii_mm[i] + ascii_ii[i];
-               }
-               short int ebcdic_ii[] =
-                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-               short int ebcdic_mm[] =
-                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-               int use_ebcdic (int i) {
-                 return ebcdic_mm[i] + ebcdic_ii[i];
-               }
-               extern int foo;
-
+#include <stddef.h>
 int
 main ()
 {
-return use_ascii (foo) == use_ebcdic (foo);
+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)];
+test_array [0] = 0
+
   ;
   return 0;
 }
@@ -13160,25 +19898,20 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-             ac_cv_c_bigendian=yes
-           fi
-           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-             if test "$ac_cv_c_bigendian" = unknown; then
-               ac_cv_c_bigendian=no
-             else
-               # finding both strings is unlikely to happen, but who knows?
-               ac_cv_c_bigendian=unknown
-             fi
-           fi
+  ac_hi=$ac_mid
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+       ac_lo=`expr '(' $ac_mid ')' + 1`
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) fits_in_uint=$ac_lo;;
+'') result=? ;;
+esac
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -13186,19 +19919,35 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
+#include <stddef.h>
+static long int longval () { return sizeof (size_t) <= sizeof (unsigned int); }
+static unsigned long int ulongval () { return sizeof (size_t) <= sizeof (unsigned int); }
+#include <stdio.h>
+#include <stdlib.h>
 int
 main ()
 {
 
-            /* Are we little or big endian?  From Harbison&Steele.  */
-            union
-            {
-              long int l;
-              char c[sizeof (long int)];
-            } u;
-            u.l = 1;
-            return u.c[sizeof (long int) - 1] == 1;
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if ((sizeof (size_t) <= sizeof (unsigned int)) < 0)
+    {
+      long int i = longval ();
+      if (i != (sizeof (size_t) <= sizeof (unsigned int)))
+       return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != (sizeof (size_t) <= sizeof (unsigned int)))
+       return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
 
   ;
   return 0;
@@ -13226,119 +19975,258 @@ $as_echo "$ac_try_echo") >&5
   ac_status=$?
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_c_bigendian=no
+  fits_in_uint=`cat conftest.val`
 else
   $as_echo "$as_me: program exited with status $ac_status" >&5
 $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 ( exit $ac_status )
-ac_cv_c_bigendian=yes
+result=?
 fi
 rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
+rm -f conftest.val
 
-
-    fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
-   yes)
-     cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
-;; #(
-   no)
-      ;; #(
-   universal)
-
-cat >>confdefs.h <<\_ACEOF
-#define AC_APPLE_UNIVERSAL_BUILD 1
+    if test "$fits_in_uint" = 1; then
+                  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+        extern size_t foo;
+        extern unsigned long foo;
 
-     ;; #(
-   *)
-     { { $as_echo "$as_me:$LINENO: error: unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-$as_echo "$as_me: error: unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
-   { (exit 1); exit 1; }; } ;;
- esac
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  fits_in_uint=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test -z "$result"; then
+      if test "$fits_in_uint" = 1; then
+        result="$res_hi$res_lo"U
+      else
+        result="$res_hi$res_lo"UL
+      fi
+    else
+            result='~(size_t)0'
+    fi
+  fi
+  { $as_echo "$as_me:$LINENO: result: $result" >&5
+$as_echo "$result" >&6; }
+  if test "$result" != yes; then
 
+cat >>confdefs.h <<_ACEOF
+#define SIZE_MAX $result
+_ACEOF
 
+  fi
 
 
 
 
 
+for ac_header in stdint.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_header_compiler=no
+fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
+fi
 
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
+fi
 
+done
 
 
 
-for ac_func in tzset fsync mbstowcs opendir readdir chdir chroot getuid setlocale strerror snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+    { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  gt_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -framework CoreFoundation"
+     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <CFPreferences.h>
 int
 main ()
 {
-return $ac_func ();
+CFPreferencesCopyAppValue(NULL, NULL)
   ;
   return 0;
 }
@@ -13364,65 +20252,62 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  gt_cv_func_CFPreferencesCopyAppValue=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       gt_cv_func_CFPreferencesCopyAppValue=no
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+     CPPFLAGS="$gt_save_CPPFLAGS"
+     LIBS="$gt_save_LIBS"
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFPREFERENCESCOPYAPPVALUE 1
+_ACEOF
 
-{ $as_echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
-$as_echo_n "checking whether strerror_r is declared... " >&6; }
-if test "${ac_cv_have_decl_strerror_r+set}" = set; then
+  fi
+    { $as_echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  gt_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -framework CoreFoundation"
+     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
+#include <CFLocale.h>
 int
 main ()
 {
-#ifndef strerror_r
-  (void) strerror_r;
-#endif
-
+CFLocaleCopyCurrent();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -13431,145 +20316,598 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_strerror_r=yes
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  gt_cv_func_CFLocaleCopyCurrent=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_have_decl_strerror_r=no
+       gt_cv_func_CFLocaleCopyCurrent=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     CPPFLAGS="$gt_save_CPPFLAGS"
+     LIBS="$gt_save_LIBS"
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
-$as_echo "$ac_cv_have_decl_strerror_r" >&6; }
-if test "x$ac_cv_have_decl_strerror_r" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFLOCALECOPYCURRENT 1
 _ACEOF
 
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+
+
 
+      if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
 else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R 0
-_ACEOF
+  with_gnu_ld=no
+fi
 
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${acl_cv_path_LD+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break ;;
+      *)
+       test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
 
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${acl_cv_prog_gnu_ld+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac
 fi
+{ $as_echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
 
 
 
-for ac_func in strerror_r
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+
+                                                { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if test "${acl_cv_rpath+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+  wl="$acl_cv_wl"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+  enableval=$enable_rpath; :
+else
+  enable_rpath=yes
+fi
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval=$with_libiconv_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+
+fi
+
+      LIBICONV=
+  LTLIBICONV=
+  INCICONV=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='iconv '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$hardcode_direct" = yes; then
+                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                    fi
+                    if test "$hardcode_minus_L" != no; then
+                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+              else
+                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */lib | */lib/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+    done
+  fi
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
-fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
-fi
-done
 
-{ $as_echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
-$as_echo_n "checking whether strerror_r returns char *... " >&6; }
-if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
+$as_echo_n "checking for ptrdiff_t... " >&6; }
+if test "${ac_cv_type_ptrdiff_t+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-
-    ac_cv_func_strerror_r_char_p=no
-    if test $ac_cv_have_decl_strerror_r = yes; then
-      cat >conftest.$ac_ext <<_ACEOF
+  ac_cv_type_ptrdiff_t=no
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -13579,12 +20917,8 @@ $ac_includes_default
 int
 main ()
 {
-
-         char buf[100];
-         char x = *strerror_r (0, buf, sizeof buf);
-         char *p = strerror_r (0, buf, sizeof buf);
-         return !p || x;
-
+if (sizeof (ptrdiff_t))
+       return 0;
   ;
   return 0;
 }
@@ -13607,178 +20941,31 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_func_strerror_r_char_p=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    else
-      # strerror_r is not declared.  Choose between
-      # systems that have relatively inaccessible declarations for the
-      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
-      # former has a strerror_r that returns char*, while the latter
-      # has a strerror_r that returns `int'.
-      # This test should segfault on the DEC system.
-      if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-       extern char *strerror_r ();
-int
-main ()
-{
-char buf[100];
-         char x = *strerror_r (0, buf, sizeof buf);
-         return ! isalpha (x);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_strerror_r_char_p=yes
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-    fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
-$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
-if test $ac_cv_func_strerror_r_char_p = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STRERROR_R_CHAR_P 1
-_ACEOF
-
-fi
-
-
-
-case $TERM in
-       #   for the most important terminal types we directly know the sequences
-       xterm|xterm*|vt220|vt220*)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
-       ;;
-       vt100|vt100*|cygwin)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
-       ;;
-       *)
-               T_MD=''
-               T_ME=''
-       ;;
-esac
-  { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-  { $as_echo "$as_me:$LINENO: result: ${T_MD}Map/Fadvis/Madvise checking${T_ME}" >&5
-$as_echo "${T_MD}Map/Fadvis/Madvise checking${T_ME}" >&6; }
-
-
-
-
-
-for ac_func in fdatasync
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+$ac_includes_default
 int
 main ()
 {
-return $ac_func ();
+if (sizeof ((ptrdiff_t)))
+         return 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -13787,72 +20974,84 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
+       } && test -s conftest.$ac_objext; then
+  :
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       ac_cv_type_ptrdiff_t=yes
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
+$as_echo "$ac_cv_type_ptrdiff_t" >&6; }
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then
+  :
 else
-  { $as_echo "$as_me:$LINENO: checking for fdatasync in -lrt" >&5
-$as_echo_n "checking for fdatasync in -lrt... " >&6; }
-if test "${ac_cv_lib_rt_fdatasync+set}" = set; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ptrdiff_t long
+_ACEOF
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char fdatasync ();
-int
-main ()
-{
-return fdatasync ();
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -13861,144 +21060,135 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_rt_fdatasync=yes
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_rt_fdatasync=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_fdatasync" >&5
-$as_echo "$ac_cv_lib_rt_fdatasync" >&6; }
-if test "x$ac_cv_lib_rt_fdatasync" = x""yes; then
-  LIBS="${LIBS} -lrt"; cat >>confdefs.h <<\_ACEOF
-#define HAVE_FDATASYNC 1
-_ACEOF
-
-fi
-
+       ac_header_compiler=no
 fi
-done
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-for ac_func in fsync
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  ac_header_preproc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+  ac_header_preproc=no
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
+ac_res=`eval 'as_val=${'$as_ac_Header'}
                 $as_echo "$as_val"'`
               { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
                 $as_echo "$as_val"'`
    if test "x$as_val" = x""yes; then
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-fi
-done
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
-if test "x$enable_mmap" = "xyes"; then
-  case "$host" in
-  *cygwin*)
-    # the normal mmap test does not work in cygwin
 
-for ac_func in mmap
+
+
+
+
+
+
+
+for ac_func in asprintf fwprintf getcwd getegid geteuid getgid getuid \
+mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
+strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
+__fsetlocking
 do
 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -14098,37 +21288,31 @@ _ACEOF
 fi
 done
 
-    if test "x$ac_cv_func_mmap" = "xyes"; then
-      ac_cv_func_mmap_fixed_mapped=yes
-    fi
-  ;;
-  *)
 
-for ac_header in sys/mman.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+
+  { $as_echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5
+$as_echo_n "checking whether _snprintf is declared... " >&6; }
+if test "${ac_cv_have_decl__snprintf+set}" = set; then
   $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+#include <stdio.h>
+int
+main ()
+{
+
+#ifndef _snprintf
+  char *p = (char *) _snprintf;
+#endif
+
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -14148,134 +21332,120 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+  ac_cv_have_decl__snprintf=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
+       ac_cv_have_decl__snprintf=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5
+$as_echo "$ac_cv_have_decl__snprintf" >&6; }
+  if test $ac_cv_have_decl__snprintf = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__SNPRINTF $gt_value
+_ACEOF
+
+
+
+  { $as_echo "$as_me:$LINENO: checking whether _snwprintf is declared" >&5
+$as_echo_n "checking whether _snwprintf is declared... " >&6; }
+if test "${ac_cv_have_decl__snwprintf+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+#include <stdio.h>
+int
+main ()
+{
+
+#ifndef _snwprintf
+  char *p = (char *) _snwprintf;
+#endif
+
+  ;
+  return 0;
+}
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_decl__snwprintf=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
+       ac_cv_have_decl__snwprintf=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__snwprintf" >&5
+$as_echo "$ac_cv_have_decl__snwprintf" >&6; }
+  if test $ac_cv_have_decl__snwprintf = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
 
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__SNWPRINTF $gt_value
 _ACEOF
 
-fi
-
-done
 
 
 
-for ac_header in stdlib.h unistd.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5
+$as_echo_n "checking whether feof_unlocked is declared... " >&6; }
+if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then
   $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+#include <stdio.h>
+int
+main ()
+{
+
+#ifndef feof_unlocked
+  char *p = (char *) feof_unlocked;
+#endif
+
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -14295,114 +21465,99 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+  ac_cv_have_decl_feof_unlocked=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
+       ac_cv_have_decl_feof_unlocked=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
+$as_echo "$ac_cv_have_decl_feof_unlocked" >&6; }
+  if test $ac_cv_have_decl_feof_unlocked = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FEOF_UNLOCKED $gt_value
+_ACEOF
+
+
+
+  { $as_echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5
+$as_echo_n "checking whether fgets_unlocked is declared... " >&6; }
+if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+#include <stdio.h>
+int
+main ()
+{
+
+#ifndef fgets_unlocked
+  char *p = (char *) fgets_unlocked;
+#endif
+
+  ;
+  return 0;
+}
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_decl_fgets_unlocked=yes
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_cv_have_decl_fgets_unlocked=no
 fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
+$as_echo "$ac_cv_have_decl_fgets_unlocked" >&6; }
+  if test $ac_cv_have_decl_fgets_unlocked = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
 
-done
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FGETS_UNLOCKED $gt_value
+_ACEOF
 
 
-for ac_func in getpagesize
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+
+  { $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
+$as_echo_n "checking whether getc_unlocked is declared... " >&6; }
+if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -14411,54 +21566,28 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <stdio.h>
 int
 main ()
 {
-return $ac_func ();
+
+#ifndef getc_unlocked
+  char *p = (char *) getc_unlocked;
+#endif
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -14467,178 +21596,112 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
+       } && test -s conftest.$ac_objext; then
+  ac_cv_have_decl_getc_unlocked=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       ac_cv_have_decl_getc_unlocked=no
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
+$as_echo "$ac_cv_have_decl_getc_unlocked" >&6; }
+  if test $ac_cv_have_decl_getc_unlocked = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED $gt_value
 _ACEOF
 
-fi
-done
 
-{ $as_echo "$as_me:$LINENO: checking for working mmap" >&5
-$as_echo_n "checking for working mmap... " >&6; }
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_fixed_mapped=no
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-/* malloc might have been renamed as rpl_malloc. */
-#undef malloc
 
-/* Thanks to Mike Haertel and Jim Avera for this test.
-   Here is a matrix of mmap possibilities:
-       mmap private not fixed
-       mmap private fixed at somewhere currently unmapped
-       mmap private fixed at somewhere already mapped
-       mmap shared not fixed
-       mmap shared fixed at somewhere currently unmapped
-       mmap shared fixed at somewhere already mapped
-   For private mappings, we should verify that changes cannot be read()
-   back from the file, nor mmap's back from the file at a different
-   address.  (There have been systems where private was not correctly
-   implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the file system buffer cache
-   like early versions of FreeBSD and possibly contemporary NetBSD.)
-   For shared mappings, we should conversely verify that changes get
-   propagated back to all the places they're supposed to be.
+  case $gt_cv_func_printf_posix in
+    *yes) HAVE_POSIX_PRINTF=1 ;;
+    *) HAVE_POSIX_PRINTF=0 ;;
+  esac
 
-   Grep wants private fixed already mapped.
-   The main things grep needs to know about mmap are:
-   * does it exist and is it safe to write into the mmap'd area
-   * how to use it (BSD variants)  */
+  if test "$ac_cv_func_asprintf" = yes; then
+    HAVE_ASPRINTF=1
+  else
+    HAVE_ASPRINTF=0
+  fi
 
-#include <fcntl.h>
-#include <sys/mman.h>
+  if test "$ac_cv_func_snprintf" = yes; then
+    HAVE_SNPRINTF=1
+  else
+    HAVE_SNPRINTF=0
+  fi
 
-#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
-char *malloc ();
-#endif
+  if test "$ac_cv_func_wprintf" = yes; then
+    HAVE_WPRINTF=1
+  else
+    HAVE_WPRINTF=0
+  fi
 
-/* This mess was copied from the GNU getpagesize.h.  */
-#ifndef HAVE_GETPAGESIZE
-/* Assume that all systems that can run configure have sys/param.h.  */
-# ifndef HAVE_SYS_PARAM_H
-#  define HAVE_SYS_PARAM_H 1
-# endif
 
-# ifdef _SC_PAGESIZE
-#  define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-#  ifdef HAVE_SYS_PARAM_H
-#   include <sys/param.h>
-#   ifdef EXEC_PAGESIZE
-#    define getpagesize() EXEC_PAGESIZE
-#   else /* no EXEC_PAGESIZE */
-#    ifdef NBPG
-#     define getpagesize() NBPG * CLSIZE
-#     ifndef CLSIZE
-#      define CLSIZE 1
-#     endif /* no CLSIZE */
-#    else /* no NBPG */
-#     ifdef NBPC
-#      define getpagesize() NBPC
-#     else /* no NBPC */
-#      ifdef PAGESIZE
-#       define getpagesize() PAGESIZE
-#      endif /* PAGESIZE */
-#     endif /* no NBPC */
-#    endif /* no NBPG */
-#   endif /* no EXEC_PAGESIZE */
-#  else /* no HAVE_SYS_PARAM_H */
-#   define getpagesize() 8192  /* punt totally */
-#  endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
 
-#endif /* no HAVE_GETPAGESIZE */
 
-int
-main ()
-{
-  char *data, *data2, *data3;
-  int i, pagesize;
-  int fd;
 
-  pagesize = getpagesize ();
 
-  /* First, make a file with some known garbage in it. */
-  data = (char *) malloc (pagesize);
-  if (!data)
-    return 1;
-  for (i = 0; i < pagesize; ++i)
-    *(data + i) = rand ();
-  umask (0);
-  fd = creat ("conftest.mmap", 0600);
-  if (fd < 0)
-    return 1;
-  if (write (fd, data, pagesize) != pagesize)
-    return 1;
-  close (fd);
 
-  /* Next, try to mmap the file at a fixed address which already has
-     something else allocated at it.  If we can, also make sure that
-     we see the same garbage.  */
-  fd = open ("conftest.mmap", O_RDWR);
-  if (fd < 0)
-    return 1;
-  data2 = (char *) malloc (2 * pagesize);
-  if (!data2)
-    return 1;
-  data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
-  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
-                    MAP_PRIVATE | MAP_FIXED, fd, 0L))
-    return 1;
-  for (i = 0; i < pagesize; ++i)
-    if (*(data + i) != *(data2 + i))
-      return 1;
+          am_save_CPPFLAGS="$CPPFLAGS"
 
-  /* Finally, make sure that changes to the mapped area do not
-     percolate back to the file as seen by read().  (This is a bug on
-     some variants of i386 svr4.0.)  */
-  for (i = 0; i < pagesize; ++i)
-    *(data2 + i) = *(data2 + i) + 1;
-  data3 = (char *) malloc (pagesize);
-  if (!data3)
-    return 1;
-  if (read (fd, data3, pagesize) != pagesize)
-    return 1;
-  for (i = 0; i < pagesize; ++i)
-    if (*(data + i) != *(data3 + i))
-      return 1;
-  close (fd);
+  for element in $INCICONV; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+
+  { $as_echo "$as_me:$LINENO: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);
+  ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14646,98 +21709,47 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_mmap_fixed_mapped=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  am_cv_func_iconv=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
-$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MMAP 1
-_ACEOF
 
 fi
-rm -f conftest.mmap
 
-
-
-
-for ac_func in mmap munmap msync
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <stdlib.h>
+#include <iconv.h>
 int
 main ()
 {
-return $ac_func ();
+iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);
   ;
   return 0;
 }
@@ -14763,53 +21775,73 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+      LIBS="$am_save_LIBS"
+    fi
+
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+  if test "$am_cv_func_iconv" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
 _ACEOF
 
-fi
-done
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+    { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+  else
+            CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
 
-    { $as_echo "$as_me:$LINENO: checking whether madvise is declared" >&5
-$as_echo_n "checking whether madvise is declared... " >&6; }
-if test "${ac_cv_have_decl_madvise+set}" = set; then
+
+
+  if test "$am_cv_func_iconv" = yes; then
+    { $as_echo "$as_me:$LINENO: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
+    if test "${am_cv_proto_iconv+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+
+      cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#ifdef HAVE_SYS_MMAN_H
-                                    # include <sys/mman.h>
-                                    #endif
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
 
 int
 main ()
 {
-#ifndef madvise
-  (void) madvise;
-#endif
 
   ;
   return 0;
@@ -14833,43 +21865,34 @@ $as_echo "$ac_try_echo") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_madvise=yes
+  am_cv_proto_iconv_arg1=""
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_have_decl_madvise=no
+       am_cv_proto_iconv_arg1="const"
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      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);"
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_madvise" >&5
-$as_echo "$ac_cv_have_decl_madvise" >&6; }
-if test "x$ac_cv_have_decl_madvise" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MADVISE 1
-_ACEOF
 
+    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    { $as_echo "$as_me:$LINENO: result: ${ac_t:-
+         }$am_cv_proto_iconv" >&5
+$as_echo "${ac_t:-
+         }$am_cv_proto_iconv" >&6; }
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MADVISE 0
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
 _ACEOF
 
+  fi
 
-fi
-
-
-    if test "x$ac_cv_have_decl_madvise" = "xyes";
-    then
 
-for ac_func in madvise
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if test "${am_cv_langinfo_codeset+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -14878,41 +21901,11 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <langinfo.h>
 int
 main ()
 {
-return $ac_func ();
+char* cs = nl_langinfo(CODESET);
   ;
   return 0;
 }
@@ -14938,83 +21931,47 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  am_cv_langinfo_codeset=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       am_cv_langinfo_codeset=no
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
 fi
-done
-
-    else
-
-for ac_func in posix_madvise
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+{ $as_echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
+$as_echo "$am_cv_langinfo_codeset" >&6; }
+  if test $am_cv_langinfo_codeset = yes; then
 
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LANGINFO_CODESET 1
+_ACEOF
+
+  fi
+
+  if test $ac_cv_header_locale_h = yes; then
 
+  { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if test "${gt_cv_val_LC_MESSAGES+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <locale.h>
 int
 main ()
 {
-return $ac_func ();
+return LC_MESSAGES
   ;
   return 0;
 }
@@ -15040,81 +21997,143 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  gt_cv_val_LC_MESSAGES=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       gt_cv_val_LC_MESSAGES=no
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_val_LC_MESSAGES" >&5
+$as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
+  if test $gt_cv_val_LC_MESSAGES = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
 _ACEOF
 
+  fi
+
+  fi
+
+  if test -n "$INTL_MACOSX_LIBS"; then
+    CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+  fi
+
+                      for ac_prog in bison
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_INTLBISON+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$INTLBISON"; then
+  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_INTLBISON="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+INTLBISON=$ac_cv_prog_INTLBISON
+if test -n "$INTLBISON"; then
+  { $as_echo "$as_me:$LINENO: result: $INTLBISON" >&5
+$as_echo "$INTLBISON" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
+
+
+  test -n "$INTLBISON" && break
 done
 
-      if test "x$ac_cv_func_posix_madvise" != "xyes"; then
-        { $as_echo "$as_me:$LINENO: WARNING: madvise() nor posix_madvise() found." >&5
-$as_echo "$as_me: WARNING: madvise() nor posix_madvise() found." >&2;}
-      fi
-    fi
-  ;;
-  esac
-  if test "x$ac_cv_func_mmap" != "xyes";
-  then
-    { { $as_echo "$as_me:$LINENO: error: --enable-mmap requested but mmap() was not detected" >&5
-$as_echo "$as_me: error: --enable-mmap requested but mmap() was not detected" >&2;}
-   { (exit 1); exit 1; }; }
+  if test -z "$INTLBISON"; then
+    ac_verc_fail=yes
+  else
+        { $as_echo "$as_me:$LINENO: checking version of bison" >&5
+$as_echo_n "checking version of bison... " >&6; }
+    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    esac
+    { $as_echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+$as_echo "$ac_prog_version" >&6; }
+  fi
+  if test $ac_verc_fail = yes; then
+    INTLBISON=:
   fi
-fi
 
-{ $as_echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
-$as_echo_n "checking whether posix_fadvise is declared... " >&6; }
-if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  gt_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -framework CoreFoundation"
+     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#define _XOPEN_SOURCE 600
-#include <fcntl.h>
-
+#include <CFPreferences.h>
 int
 main ()
 {
-#ifndef posix_fadvise
-  (void) posix_fadvise;
-#endif
-
+CFPreferencesCopyAppValue(NULL, NULL)
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -15123,85 +22142,53 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_posix_fadvise=yes
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  gt_cv_func_CFPreferencesCopyAppValue=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_have_decl_posix_fadvise=no
+       gt_cv_func_CFPreferencesCopyAppValue=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     CPPFLAGS="$gt_save_CPPFLAGS"
+     LIBS="$gt_save_LIBS"
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
-$as_echo "$ac_cv_have_decl_posix_fadvise" >&6; }
-if test "x$ac_cv_have_decl_posix_fadvise" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_POSIX_FADVISE 1
-_ACEOF
-
-
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_POSIX_FADVISE 0
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFPREFERENCESCOPYAPPVALUE 1
 _ACEOF
 
-
-fi
-
-
-
-for ac_func in posix_fadvise
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  fi
+    { $as_echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  gt_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -framework CoreFoundation"
+     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <CFLocale.h>
 int
 main ()
 {
-return $ac_func ();
+CFLocaleCopyCurrent();
   ;
   return 0;
 }
@@ -15227,101 +22214,115 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  gt_cv_func_CFLocaleCopyCurrent=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       gt_cv_func_CFLocaleCopyCurrent=no
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+     CPPFLAGS="$gt_save_CPPFLAGS"
+     LIBS="$gt_save_LIBS"
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFLOCALECOPYCURRENT 1
 _ACEOF
 
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+
+
+
+
+  { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+    # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then
+  enableval=$enable_nls; USE_NLS=$enableval
+else
+  USE_NLS=yes
 fi
-done
 
+  { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
 
 
-case $TERM in
-       #   for the most important terminal types we directly know the sequences
-       xterm|xterm*|vt220|vt220*)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
-       ;;
-       vt100|vt100*|cygwin)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
-       ;;
-       *)
-               T_MD=''
-               T_ME=''
-       ;;
-esac
-  { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-  { $as_echo "$as_me:$LINENO: result: ${T_MD}Libintl Processing${T_ME}" >&5
-$as_echo "${T_MD}Libintl Processing${T_ME}" >&6; }
 
 
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
 
-GETTEXT_PACKAGE=rrdtool
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
 
+    if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
 
-cat >>confdefs.h <<_ACEOF
-#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
-_ACEOF
+      { $as_echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
+$as_echo_n "checking whether included gettext is requested... " >&6; }
 
+# Check whether --with-included-gettext was given.
+if test "${with_included_gettext+set}" = set; then
+  withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
+else
+  nls_cv_force_use_gnu_gettext=no
+fi
 
+      { $as_echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
+$as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
 
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
 
-for ac_header in locale.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+
+
+
+
+
+        { $as_echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
+$as_echo_n "checking for GNU gettext in libc... " >&6; }
+if test "${gt_cv_func_gnugettext1_libc+set}" = set; then
   $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -15330,125 +22331,488 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  gt_cv_func_gnugettext1_libc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
+       gt_cv_func_gnugettext1_libc=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5
+$as_echo "$gt_cv_func_gnugettext1_libc" >&6; }
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+        if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then
+  withval=$with_libintl_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+
+fi
+
+      LIBINTL=
+  LTLIBINTL=
+  INCINTL=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='intl '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$hardcode_direct" = yes; then
+                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+                    fi
+                    if test "$hardcode_minus_L" != no; then
+                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+              else
+                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */lib | */lib/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+    done
+  fi
+
+          { $as_echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
+$as_echo_n "checking for GNU gettext in libintl... " >&6; }
+if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+                        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+  ;
+  return 0;
+}
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
        }; then
-  ac_header_preproc=yes
+  gt_cv_func_gnugettext1_libintl=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+       gt_cv_func_gnugettext1_libintl=no
 fi
 
-done
-
-    if test $ac_cv_header_locale_h = yes; then
-    { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-$as_echo_n "checking for LC_MESSAGES... " >&6; }
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+                        if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <locale.h>
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
 int
 main ()
 {
-return LC_MESSAGES
+bindtextdomain ("", "");
+return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
   ;
   return 0;
 }
@@ -15474,174 +22838,217 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  am_cv_val_LC_MESSAGES=yes
+  LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                gt_cv_func_gnugettext1_libintl=yes
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       am_cv_val_LC_MESSAGES=no
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"
 fi
-{ $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
-    if test $am_cv_val_LC_MESSAGES = yes; then
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5
+$as_echo "$gt_cv_func_gnugettext1_libintl" >&6; }
+        fi
+
+                                        if test "$gt_cv_func_gnugettext1_libc" = "yes" \
+           || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+                    LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+                              nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+                BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV"
+        LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                CATOBJEXT=.gmo
+      fi
+
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_LC_MESSAGES 1
+#define ENABLE_NLS 1
 _ACEOF
 
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  { $as_echo "$as_me:$LINENO: checking whether to use NLS" >&5
+$as_echo_n "checking whether to use NLS... " >&6; }
+  { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+  if test "$USE_NLS" = "yes"; then
+    { $as_echo "$as_me:$LINENO: checking where the gettext function comes from" >&5
+$as_echo_n "checking where the gettext function comes from... " >&6; }
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
     fi
+    { $as_echo "$as_me:$LINENO: result: $gt_source" >&5
+$as_echo "$gt_source" >&6; }
   fi
-     USE_NLS=yes
 
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+        { $as_echo "$as_me:$LINENO: checking how to link with libintl" >&5
+$as_echo_n "checking how to link with libintl... " >&6; }
+        { $as_echo "$as_me:$LINENO: result: $LIBINTL" >&5
+$as_echo "$LIBINTL" >&6; }
+
+  for element in $INCINTL; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
 
-    gt_cv_have_gettext=no
+      fi
 
-    CATOBJEXT=NONE
-    XGETTEXT=:
-    INTLLIBS=
 
-    if test "${ac_cv_header_libintl_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
-$as_echo_n "checking for libintl.h... " >&6; }
-if test "${ac_cv_header_libintl_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-$as_echo "$ac_cv_header_libintl_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
-$as_echo_n "checking libintl.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <libintl.h>
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DCGETTEXT 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
-fi
+    fi
+
+        POSUB=po
+  fi
+
+
+            if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+
+
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
-$as_echo_n "checking libintl.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <libintl.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+        nls_cv_header_intl=
+    nls_cv_header_libgt=
 
-  ac_header_preproc=no
-fi
+        DATADIRNAME=share
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
+        INSTOBJEXT=.mo
 
-    ;;
+
+        GENCAT=gencat
+
+
+        INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+
+
+        INTL_LIBTOOL_SUFFIX_PREFIX=
+
+
+
+    INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+
+case $TERM in
+       #   for the most important terminal types we directly know the sequences
+       xterm|xterm*|vt220|vt220*)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+       ;;
+       vt100|vt100*|cygwin)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+       ;;
+       *)
+               T_MD=''
+               T_ME=''
+       ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
-$as_echo_n "checking for libintl.h... " >&6; }
-if test "${ac_cv_header_libintl_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_libintl_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-$as_echo "$ac_cv_header_libintl_h" >&6; }
+  { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+  { $as_echo "$as_me:$LINENO: result: ${T_MD}IEEE Math Checks${T_ME}" >&5
+$as_echo "${T_MD}IEEE Math Checks${T_ME}" >&6; }
+
+
 
-fi
-if test "x$ac_cv_header_libintl_h" = x""yes; then
-  gt_cv_func_dgettext_libintl="no"
-      libintl_extra_libs=""
 
-      #
-      # First check in libc
-      #
-      { $as_echo "$as_me:$LINENO: checking for ngettext in libc" >&5
-$as_echo_n "checking for ngettext in libc... " >&6; }
-if test "${gt_cv_func_ngettext_libc+set}" = set; then
+for ac_func in fpclassify
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -15650,13 +23057,41 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
-#include <libintl.h>
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
 int
 main ()
 {
-return !ngettext ("","", 1)
+return $ac_func ();
   ;
   return 0;
 }
@@ -15682,41 +23117,44 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  gt_cv_func_ngettext_libc=yes
+  eval "$as_ac_var=yes"
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       gt_cv_func_ngettext_libc=no
+       eval "$as_ac_var=no"
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-
 fi
-{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5
-$as_echo "$gt_cv_func_ngettext_libc" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
-             { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5
-$as_echo_n "checking for dgettext in libc... " >&6; }
-if test "${gt_cv_func_dgettext_libc+set}" = set; then
-  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  { $as_echo "$as_me:$LINENO: checking for fpclassify with <math.h>" >&5
+$as_echo_n "checking for fpclassify with <math.h>... " >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <libintl.h>
-
+#include <math.h>
+volatile int x;volatile float f;
 int
 main ()
 {
-return !dgettext ("","")
+x = fpclassify(f)
   ;
   return 0;
 }
@@ -15742,26 +23180,29 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  gt_cv_func_dgettext_libc=yes
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_FPCLASSIFY 1
+_ACEOF
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       gt_cv_func_dgettext_libc=no
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-
 fi
-{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
-$as_echo "$gt_cv_func_dgettext_libc" >&6; }
-      fi
+done
 
-      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
-for ac_func in bind_textdomain_codeset
+
+for ac_func in isinf
 do
 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -15858,43 +23299,21 @@ as_val=`eval 'as_val=${'$as_ac_var'}
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-fi
-done
-
-      fi
-
-      #
-      # If we don't have everything we want, check in libintl
-      #
-      if test "$gt_cv_func_dgettext_libc" != "yes" \
-        || test "$gt_cv_func_ngettext_libc" != "yes" \
-         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
-
-        { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
-$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
-  $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  { $as_echo "$as_me:$LINENO: checking for isinf with <math.h>" >&5
+$as_echo_n "checking for isinf with <math.h>... " >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char bindtextdomain ();
+#include <math.h>
+volatile int x;volatile float f;
 int
 main ()
 {
-return bindtextdomain ();
+x = isinf(f)
   ;
   return 0;
 }
@@ -15920,52 +23339,69 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_intl_bindtextdomain=yes
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_intl_bindtextdomain=no
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
-$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
-if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then
-  { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
-$as_echo_n "checking for ngettext in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+done
+
+
+{ $as_echo "$as_me:$LINENO: checking whether isfinite is broken" >&5
+$as_echo_n "checking whether isfinite is broken... " >&6; }
+if test "${ac_cv_have_broken_isfinite+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+if test "$cross_compiling" = yes; then
+
+case "${target}" in
+  hppa*-*-hpux*) ac_cv_have_broken_isfinite=yes ;;
+  *-solaris2.8) ac_cv_have_broken_isfinite=yes ;;
+  *-solaris2.9) ac_cv_have_broken_isfinite=yes ;;
+  *) ac_cv_have_broken_isfinite=no ;;
+esac
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#ifdef HAVE_MATH_H
+#include <math.h>
 #endif
-char ngettext ();
-int
-main ()
+#ifdef HAVE_FLOAT_H
+#include <float.h>
+#endif
+int main ()
 {
-return ngettext ();
-  ;
-  return 0;
+#ifdef isfinite
+#ifdef LDBL_MAX
+  if (!isfinite(LDBL_MAX)) return 1;
+#endif
+#ifdef DBL_MAX
+  if (!isfinite(DBL_MAX)) return 1;
+#endif
+#endif
+return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -15973,48 +23409,81 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_intl_ngettext=yes
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_have_broken_isfinite=no
 else
-  $as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_intl_ngettext=no
+( exit $ac_status )
+ac_cv_have_broken_isfinite=yes
 fi
-
 rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
-$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
-if test "x$ac_cv_lib_intl_ngettext" = x""yes; then
-  { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
-$as_echo_n "checking for dgettext in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_dgettext+set}" = set; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_broken_isfinite" >&5
+$as_echo "$ac_cv_have_broken_isfinite" >&6; }
+
+case "${target}" in
+  *-solaris2.8) ac_cv_have_broken_isfinite=yes ;;
+  *-solaris2.9) ac_cv_have_broken_isfinite=yes ;;
+esac
+
+if test "x$ac_cv_have_broken_isfinite" = "xno"; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISFINITE 1
+_ACEOF
+
+else
+
+for ac_func in finite
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -16022,11 +23491,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char dgettext ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
 int
 main ()
 {
-return dgettext ();
+return $ac_func ();
   ;
   return 0;
 }
@@ -16052,48 +23528,61 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_intl_dgettext=yes
+  eval "$as_ac_var=yes"
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_intl_dgettext=no
+       eval "$as_ac_var=no"
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
-$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
-if test "x$ac_cv_lib_intl_dgettext" = x""yes; then
-  gt_cv_func_dgettext_libintl=yes
-fi
-
-fi
-
 fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
+else
 
-       if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
-         { $as_echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5
-$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
-         { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-         { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
-$as_echo_n "checking for ngettext in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+for ac_func in isfinite
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl -liconv $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -16101,11 +23590,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char ngettext ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
 int
 main ()
 {
-return ngettext ();
+return $ac_func ();
   ;
   return 0;
 }
@@ -16131,47 +23627,44 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_intl_ngettext=yes
+  eval "$as_ac_var=yes"
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_intl_ngettext=no
+       eval "$as_ac_var=no"
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
-$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
-if test "x$ac_cv_lib_intl_ngettext" = x""yes; then
-  { $as_echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5
-$as_echo_n "checking for dcgettext in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_dcgettext+set}" = set; then
-  $as_echo_n "(cached) " >&6
+ac_res=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl -liconv $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+  { $as_echo "$as_me:$LINENO: checking for isfinite with <math.h>" >&5
+$as_echo_n "checking for isfinite with <math.h>... " >&6; }
+          cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dcgettext ();
+#include <math.h>
+volatile int x;volatile float f;
 int
 main ()
 {
-return dcgettext ();
+x = isfinite(f)
   ;
   return 0;
 }
@@ -16197,51 +23690,47 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_intl_dcgettext=yes
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+               cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISFINITE 1
+_ACEOF
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_intl_dcgettext=no
+       { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
-$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
-if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then
-  gt_cv_func_dgettext_libintl=yes
-                       libintl_extra_libs=-liconv
-else
-  :
+done
+
 fi
+done
 
-else
-  :
 fi
 
-        fi
 
-        #
-        # If we found libintl, then check in it for bind_textdomain_codeset();
-        # we'll prefer libc if neither have bind_textdomain_codeset(),
-        # and both have dgettext and ngettext
-        #
-        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS -lintl $libintl_extra_libs"
-          unset ac_cv_func_bind_textdomain_codeset
-
-for ac_func in bind_textdomain_codeset
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+_cflags=${CFLAGS}
+
+{ $as_echo "$as_me:$LINENO: checking if IEEE math works out of the box" >&5
+$as_echo_n "checking if IEEE math works out of the box... " >&6; }
+if test "${rd_cv_ieee_works+set}" = set; then
   $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  :
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -16249,46 +23738,79 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
+#if HAVE_MATH_H
+#  include <math.h>
 #endif
 
-#undef $ac_func
+#if HAVE_FLOAT_H
+#  include <float.h>
+#endif
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
+
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
+#endif
+
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
+
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
+
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
+#endif
+
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
+
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
+#endif
+
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
 #endif
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    ;
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16296,119 +23818,52 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ieee_works=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+( exit $ac_status )
+rd_cv_ieee_works=no
 fi
-
 rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-done
-
-          LIBS="$glib_save_LIBS"
 
-          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
-            gt_cv_func_dgettext_libc=no
-          else
-            if test "$gt_cv_func_dgettext_libc" = "yes" \
-               && test "$gt_cv_func_ngettext_libc" = "yes"; then
-              gt_cv_func_dgettext_libintl=no
-            fi
-          fi
-        fi
-      fi
-
-      if test "$gt_cv_func_dgettext_libc" = "yes" \
-       || test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        gt_cv_have_gettext=yes
-      fi
-
-      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
-        INTLLIBS="-lintl $libintl_extra_libs"
-      fi
 
-      if test "$gt_cv_have_gettext" = "yes"; then
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETTEXT 1
-_ACEOF
+if test x${rd_cv_ieee_works} = "xyes"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MSGFMT+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case "$MSGFMT" in
-  /*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-       ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-       break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
-  ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test "$MSGFMT" != "no"; then
-  { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
-$as_echo "$MSGFMT" >&6; }
 else
 { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-fi
-       if test "$MSGFMT" != "no"; then
-          glib_save_LIBS="$LIBS"
-          LIBS="$LIBS $INTLLIBS"
+ CFLAGS="$_cflags -ieee"
 
-for ac_func in dcgettext
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -ieee switch" >&5
+$as_echo_n "checking if IEEE math works with the -ieee switch... " >&6; }
+if test "${rd_cv_ieee_switch+set}" = set; then
   $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  :
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -16416,46 +23871,79 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
+#if HAVE_MATH_H
+#  include <math.h>
 #endif
 
-#undef $ac_func
+#if HAVE_FLOAT_H
+#  include <float.h>
+#endif
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
 #endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
+
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
 #endif
 
-int
-main ()
-{
-return $ac_func ();
-  ;
-  return 0;
-}
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
+
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
+
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
+#endif
+
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
+
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
+#endif
+
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+#endif
+
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    ;
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16463,168 +23951,132 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  eval "$as_ac_var=yes"
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ieee_switch=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+( exit $ac_status )
+rd_cv_ieee_switch=no
 fi
-
 rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-done
 
-         MSGFMT_OPTS=
-         { $as_echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5
-$as_echo_n "checking if msgfmt accepts -c... " >&6; }
-         cat >conftest.foo <<_ACEOF
 
-msgid ""
-msgstr ""
-"Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: test 1.0\n"
-"PO-Revision-Date: 2007-02-15 12:01+0100\n"
-"Last-Translator: test <foo@bar.xx>\n"
-"Language-Team: C <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-_ACEOF
-if { ($as_echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5
-  ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  MSGFMT_OPTS=-c; { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-echo "$as_me: failed input was:" >&5
-sed 's/^/| /' conftest.foo >&5
 fi
 
-         # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $GMSGFMT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+if test x${rd_cv_ieee_switch} = "xyes"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-if test -n "$GMSGFMT"; then
-  { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-$as_echo "$GMSGFMT" >&6; }
 else
 { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-fi
-
+ CFLAGS="$_cflags -qfloat=nofold"
 
-         # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -qfloat=nofold switch" >&5
+$as_echo_n "checking if IEEE math works with the -qfloat=nofold switch... " >&6; }
+if test "${rd_cv_ieee_nofold+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case "$XGETTEXT" in
-  /*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-       ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-       break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test "$XGETTEXT" != ":"; then
-  { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-$as_echo "$XGETTEXT" >&6; }
+  if test "$cross_compiling" = yes; then
+  :
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-         cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-int
-main ()
-{
-extern int _nl_msg_cat_cntr;
-                        return _nl_msg_cat_cntr
-  ;
-  return 0;
-}
+
+#if HAVE_MATH_H
+#  include <math.h>
+#endif
+
+#if HAVE_FLOAT_H
+#  include <float.h>
+#endif
+
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
+#endif
+
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
+#endif
+
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
+
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
+
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
+#endif
+
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
+
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
+#endif
+
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+#endif
+
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    ;
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16632,31 +24084,52 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  CATOBJEXT=.gmo
-             DATADIRNAME=share
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ieee_nofold=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       case $host in
-           *-*-solaris*)
-                                                               { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
-$as_echo_n "checking for bind_textdomain_codeset... " >&6; }
-if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+( exit $ac_status )
+rd_cv_ieee_nofold=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+if test x${rd_cv_ieee_nofold} = "xyes"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$_cflags -w -qflttrap=enable:zerodivide"
+
+{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -w -qflttrap=enable:zerodivide" >&5
+$as_echo_n "checking if IEEE math works with the -w -qflttrap=enable:zerodivide... " >&6; }
+if test "${rd_cv_ieee_flttrap+set}" = set; then
   $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  :
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -16664,46 +24137,79 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char bind_textdomain_codeset (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
+#if HAVE_MATH_H
+#  include <math.h>
+#endif
+
+#if HAVE_FLOAT_H
+#  include <float.h>
+#endif
+
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
+#endif
+
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
+#endif
+
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
+
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
+
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
 #endif
 
-#undef bind_textdomain_codeset
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
 #endif
-char bind_textdomain_codeset ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
-choke me
+
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
 #endif
 
-int
-main ()
-{
-return bind_textdomain_codeset ();
-  ;
-  return 0;
-}
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    ;
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16711,723 +24217,1081 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_func_bind_textdomain_codeset=yes
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ieee_flttrap=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_bind_textdomain_codeset=no
+( exit $ac_status )
+rd_cv_ieee_flttrap=no
 fi
-
 rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
-$as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }
-if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then
-  CATOBJEXT=.gmo
-               DATADIRNAME=share
-else
-  CATOBJEXT=.mo
-               DATADIRNAME=lib
-fi
-
-           ;;
-           *)
-           CATOBJEXT=.mo
-            DATADIRNAME=lib
-           ;;
-           esac
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-          LIBS="$glib_save_LIBS"
-         INSTOBJEXT=.mo
-       else
-         gt_cv_have_gettext=no
-       fi
-      fi
 
 fi
 
+if test x${rd_cv_ieee_flttrap} = "xyes"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$_cflags -mieee"
 
-    if test "$gt_cv_have_gettext" = "yes" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
+{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -mieee switch" >&5
+$as_echo_n "checking if IEEE math works with the -mieee switch... " >&6; }
+if test "${rd_cv_ieee_mswitch+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-
-    fi
-
-        if test "$XGETTEXT" != ":"; then
-                  if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-        : ;
-      else
-        { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
-$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
-        XGETTEXT=":"
-      fi
-    fi
-
-    # We need to process the po/ directory.
-    POSUB=po
-
-    ac_config_commands="$ac_config_commands default-1"
-
-
-                for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
-
-
-
-
-
-
-
-
-
-
-
-
-
-   if test "$gt_cv_have_gettext" = "yes"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-$as_echo_n "checking for catalogs to be installed... " >&6; }
-       NEW_LINGUAS=
-       for presentlang in $ALL_LINGUAS; do
-         useit=no
-         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
-           desiredlanguages="$LINGUAS"
-         else
-           desiredlanguages="$ALL_LINGUAS"
-         fi
-         for desiredlang in $desiredlanguages; do
-          # Use the presentlang catalog if desiredlang is
-           #   a. equal to presentlang, or
-           #   b. a variant of presentlang (because in this case,
-           #      presentlang can be used as a fallback for messages
-           #      which are not translated in the desiredlang catalog).
-           case "$desiredlang" in
-             "$presentlang"*) useit=yes;;
-           esac
-         done
-         if test $useit = yes; then
-           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
-         fi
-       done
-       LINGUAS=$NEW_LINGUAS
-       { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5
-$as_echo "$LINGUAS" >&6; }
-     fi
-
-          if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
-
-            MKINSTALLDIRS=
-   if test -n "$ac_aux_dir"; then
-     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
-   fi
-   if test -z "$MKINSTALLDIRS"; then
-     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-   fi
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
-         test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,        $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-       < $srcdir/po/POTFILES.in > po/POTFILES
+#if HAVE_MATH_H
+#  include <math.h>
+#endif
 
+#if HAVE_FLOAT_H
+#  include <float.h>
+#endif
 
-# Check whether --enable-libintl was given.
-if test "${enable_libintl+set}" = set; then
-  enableval=$enable_libintl;
-else
-  enable_libintl=yes
-fi
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
+#endif
 
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
+#endif
 
-if test x$enable_libintl = xyes; then
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
 
-  { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-$as_echo_n "checking whether NLS is requested... " >&6; }
-    # Check whether --enable-nls was given.
-if test "${enable_nls+set}" = set; then
-  enableval=$enable_nls; USE_NLS=$enableval
-else
-  USE_NLS=yes
-fi
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
 
-  { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
-$as_echo "$USE_NLS" >&6; }
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
+#endif
 
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+#endif
 
-case "$am__api_version" in
-    1.01234)
-       { { $as_echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5
-$as_echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
-   { (exit 1); exit 1; }; }
-    ;;
-    *)
-    ;;
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    ;
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-
-if test -n "0.35.0"; then
-    { $as_echo "$as_me:$LINENO: checking for intltool >= 0.35.0" >&5
-$as_echo_n "checking for intltool >= 0.35.0... " >&6; }
-
-    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
-    INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
-
-    { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
-$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
-    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
-       { { $as_echo "$as_me:$LINENO: error: Your intltool is too old.  You need intltool 0.35.0 or later." >&5
-$as_echo "$as_me: error: Your intltool is too old.  You need intltool 0.35.0 or later." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-# Extract the first word of "intltool-update", so it can be a program name with args.
-set dummy intltool-update; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then
-  $as_echo_n "(cached) " >&6
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ieee_mswitch=yes
 else
-  case $INTLTOOL_UPDATE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-  ;;
-esac
+( exit $ac_status )
+rd_cv_ieee_mswitch=no
 fi
-INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
-if test -n "$INTLTOOL_UPDATE"; then
-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_UPDATE" >&5
-$as_echo "$INTLTOOL_UPDATE" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
-# Extract the first word of "intltool-merge", so it can be a program name with args.
-set dummy intltool-merge; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $INTLTOOL_MERGE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
 fi
-INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
-if test -n "$INTLTOOL_MERGE"; then
-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_MERGE" >&5
-$as_echo "$INTLTOOL_MERGE" >&6; }
+
+if test x${rd_cv_ieee_mswitch} = "xyes"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
 else
 { $as_echo "$as_me:$LINENO: result: no" >&5
+ { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-fi
-
+ CFLAGS="$_cflags -q float=rndsngl"
 
-# Extract the first word of "intltool-extract", so it can be a program name with args.
-set dummy intltool-extract; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -q float=rndsngl switch" >&5
+$as_echo_n "checking if IEEE math works with the -q float=rndsngl switch... " >&6; }
+if test "${rd_cv_ieee_qswitch+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case $INTLTOOL_EXTRACT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
-if test -n "$INTLTOOL_EXTRACT"; then
-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_EXTRACT" >&5
-$as_echo "$INTLTOOL_EXTRACT" >&6; }
+  if test "$cross_compiling" = yes; then
+  :
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
-    { { $as_echo "$as_me:$LINENO: error: The intltool scripts were not found. Please install intltool." >&5
-$as_echo "$as_me: error: The intltool scripts were not found. Please install intltool." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@'
-     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@'
-      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
-
-
-
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
+#if HAVE_MATH_H
+#  include <math.h>
+#endif
 
+#if HAVE_FLOAT_H
+#  include <float.h>
+#endif
 
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
+#endif
 
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
+#endif
 
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
 
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
 
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
+#endif
 
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+#endif
 
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    ;
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ieee_qswitch=yes
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+( exit $ac_status )
+rd_cv_ieee_qswitch=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
 
+fi
 
+if test x${rd_cv_ieee_qswitch} = "xyes"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$_cflags -OPT:IEEE_NaN_inf=ON"
 
+{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -OPT:IEEE_NaN_inf=ON switch" >&5
+$as_echo_n "checking if IEEE math works with the -OPT:IEEE_NaN_inf=ON switch... " >&6; }
+if test "${rd_cv_ieee_ieeenaninfswitch+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
+#if HAVE_MATH_H
+#  include <math.h>
+#endif
 
+#if HAVE_FLOAT_H
+#  include <float.h>
+#endif
 
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
+#endif
 
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
+#endif
 
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
 
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
 
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
+#endif
 
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+#endif
 
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    ;
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ieee_ieeenaninfswitch=yes
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+( exit $ac_status )
+rd_cv_ieee_ieeenaninfswitch=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
 
+fi
 
+if test x${rd_cv_ieee_ieeenaninfswitch} = "xyes"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$_cflags -OPT:IEEE_comparisons=ON"
 
+{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch" >&5
+$as_echo_n "checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch... " >&6; }
+if test "${rd_cv_ieee_ieeecmpswitch+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
 
+#if HAVE_MATH_H
+#  include <math.h>
+#endif
 
+#if HAVE_FLOAT_H
+#  include <float.h>
+#endif
 
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
+#endif
 
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
+#endif
 
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
 
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
 
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
+#endif
 
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+#endif
 
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    ;
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ieee_ieeecmpswitch=yes
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+( exit $ac_status )
+rd_cv_ieee_ieeecmpswitch=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
 
+fi
 
+if test x${rd_cv_ieee_ieeecmpswitch} = "xyes"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS=$_cflags
 
+{ $as_echo "$as_me:$LINENO: checking if IEEE math works with fpsetmask(0)" >&5
+$as_echo_n "checking if IEEE math works with fpsetmask(0)... " >&6; }
+if test "${rd_cv_ieee_mask+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <floatingpoint.h>
 
+#if HAVE_MATH_H
+#  include <math.h>
+#endif
 
+#if HAVE_FLOAT_H
+#  include <float.h>
+#endif
 
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
+#endif
 
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
+#endif
 
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
 
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
 
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
+#endif
 
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+#endif
 
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    fpsetmask(0);
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ieee_mask=yes
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+( exit $ac_status )
+rd_cv_ieee_mask=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
 
+fi
 
+if test x${rd_cv_ieee_mask} = "xyes"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ cat >>confdefs.h <<\_ACEOF
+#define MUST_DISABLE_FPMASK 1
+_ACEOF
 
+                PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK"
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+{ $as_echo "$as_me:$LINENO: checking if IEEE math works with signal(SIGFPE,SIG_IGN)" >&5
+$as_echo_n "checking if IEEE math works with signal(SIGFPE,SIG_IGN)... " >&6; }
+if test "${rd_cv_ieee_sigfpe+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <signal.h>
 
+#if HAVE_MATH_H
+#  include <math.h>
+#endif
 
+#if HAVE_FLOAT_H
+#  include <float.h>
+#endif
 
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
+#endif
 
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
+#endif
 
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
 
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
 
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
+#endif
 
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
+#endif
 
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+#endif
 
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    signal(SIGFPE,SIG_IGN);
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ieee_sigfpe=yes
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+( exit $ac_status )
+rd_cv_ieee_sigfpe=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
 
+fi
 
+if test x${rd_cv_ieee_sigfpe} = "xyes"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ cat >>confdefs.h <<\_ACEOF
+#define MUST_DISABLE_SIGFPE 1
+_ACEOF
 
+                   PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE"
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:$LINENO: error:
+Your Compiler does not do propper IEEE math ... Please find out how to
+make IEEE math work with your compiler and let me know (tobi@oetiker.ch).
+Check config.log to see what went wrong ...
+" >&5
+$as_echo "$as_me: error:
+Your Compiler does not do propper IEEE math ... Please find out how to
+make IEEE math work with your compiler and let me know (tobi@oetiker.ch).
+Check config.log to see what went wrong ...
+" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
 
+fi
 
 
+fi
 
 
+fi
 
-# Check the gettext tools to make sure they are GNU
-# Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $XGETTEXT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-  ;;
-esac
-fi
-XGETTEXT=$ac_cv_path_XGETTEXT
-if test -n "$XGETTEXT"; then
-  { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-$as_echo "$XGETTEXT" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 fi
 
 
-# Extract the first word of "msgmerge", so it can be a program name with args.
-set dummy msgmerge; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MSGMERGE+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $MSGMERGE in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
 fi
-MSGMERGE=$ac_cv_path_MSGMERGE
-if test -n "$MSGMERGE"; then
-  { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
-$as_echo "$MSGMERGE" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+
+
 fi
 
 
-# Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MSGFMT+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $MSGFMT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+fi
+
 
-  ;;
-esac
 fi
-MSGFMT=$ac_cv_path_MSGFMT
-if test -n "$MSGFMT"; then
-  { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
-$as_echo "$MSGFMT" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+
+
 fi
 
 
-# Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+case $TERM in
+       #   for the most important terminal types we directly know the sequences
+       xterm|xterm*|vt220|vt220*)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+       ;;
+       vt100|vt100*|cygwin)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+       ;;
+       *)
+               T_MD=''
+               T_ME=''
+       ;;
+esac
+  { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+  { $as_echo "$as_me:$LINENO: result: ${T_MD}Resolve Portability Issues${T_ME}" >&5
+$as_echo "${T_MD}Resolve Portability Issues${T_ME}" >&6; }
+
+
+
+{ $as_echo "$as_me:$LINENO: checking if msync with MS_ASYNC updates the files mtime" >&5
+$as_echo_n "checking if msync with MS_ASYNC updates the files mtime... " >&6; }
+if test "${rd_cv_ms_async+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case $GMSGFMT in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/mman.h>
+#include <stdlib.h>
+#include <utime.h>
+int main(void){
+        int fd;
+        struct stat stbuf;
+        char *addr;
+        int res;
+        char temp[] = "mmaptestXXXXXX";
+        struct utimbuf newtime;
+
+        time_t create_ts;
+        fd = mkstemp(temp);
+        if (fd == -1){
+            perror(temp);
+            return 1;
+        }
+        write(fd,"12345\n", 6);
+        stat(temp, &stbuf);
+        create_ts = stbuf.st_mtime;
+        newtime.actime = 0;
+        newtime.modtime = 0;
+        utime(temp,&newtime);
+        addr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+        if (addr == MAP_FAILED) {
+            perror("mmap");
+            goto bad_exit;
+        }
+        addr[0]='x';
+        res = msync(addr, 4, MS_ASYNC);
+        if (res == -1) {
+           perror("msync");
+           goto bad_exit;
+        }
+        res = close(fd);
+        if (res == -1) {
+           perror("close");
+           goto bad_exit;
+        }
+        /* The ASYNC means that we schedule the msync and return immediately.
+           Since we want to see if the modification time is updated upon
+           msync(), we have to make sure that our asynchronous request
+           completes before we stat below. In a real application, the
+           request would be completed at a random time in the future
+           but for this test we do not want to wait an arbitrary amount of
+           time, so force a commit now.  */
+        sync();
+        stat(temp, &stbuf);
+        if (create_ts > stbuf.st_mtime){
+           goto bad_exit;
+        }
+        unlink(temp);
+        return 0;
+     bad_exit:
+        unlink(temp);
+        return 1;
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-if test -n "$GMSGFMT"; then
-  { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-$as_echo "$GMSGFMT" >&6; }
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  rd_cv_ms_async=ok
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
-    { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
-$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
-   { (exit 1); exit 1; }; }
+( exit $ac_status )
+rd_cv_ms_async=broken
 fi
-xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
-mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
-mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
-if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
-    { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
-$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
-   { (exit 1); exit 1; }; }
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
-# Extract the first word of "perl", so it can be a program name with args.
-set dummy perl; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $INTLTOOL_PERL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
 
-  ;;
-esac
 fi
-INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
-if test -n "$INTLTOOL_PERL"; then
-  { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
-$as_echo "$INTLTOOL_PERL" >&6; }
+
+
+
+if test "${rd_cv_ms_async}" = "ok"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_BROKEN_MS_ASYNC 1
+_ACEOF
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
+ { $as_echo "$as_me:$LINENO: WARNING: With mmap access, your platform fails to update the files" >&5
+$as_echo "$as_me: WARNING: With mmap access, your platform fails to update the files" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: mtime. RRDtool will work around this problem by calling utime on each" >&5
+$as_echo "$as_me: WARNING: mtime. RRDtool will work around this problem by calling utime on each" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: file it opens for rw access." >&5
+$as_echo "$as_me: WARNING: file it opens for rw access." >&2;}
+ sleep 2
 fi
 
 
-if test -z "$INTLTOOL_PERL"; then
-   { { $as_echo "$as_me:$LINENO: error: perl not found" >&5
-$as_echo "$as_me: error: perl not found" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-{ $as_echo "$as_me:$LINENO: checking for perl >= 5.8.1" >&5
-$as_echo_n "checking for perl >= 5.8.1... " >&6; }
-$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
-if test $? -ne 0; then
-   { { $as_echo "$as_me:$LINENO: error: perl 5.8.1 is required for intltool" >&5
-$as_echo "$as_me: error: perl 5.8.1 is required for intltool" >&2;}
-   { (exit 1); exit 1; }; }
-else
-   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
-   { $as_echo "$as_me:$LINENO: result: $IT_PERL_VERSION" >&5
-$as_echo "$IT_PERL_VERSION" >&6; }
-fi
-if test "xno-xml" != "xno-xml"; then
-   { $as_echo "$as_me:$LINENO: checking for XML::Parser" >&5
-$as_echo_n "checking for XML::Parser... " >&6; }
-   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
-       { $as_echo "$as_me:$LINENO: result: ok" >&5
-$as_echo "ok" >&6; }
-   else
-       { { $as_echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5
-$as_echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
-   { (exit 1); exit 1; }; }
-   fi
-fi
 
-# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
 
-# Set DATADIRNAME correctly if it is not set yet
-# (copied from glib-gettext.m4)
-if test -z "$DATADIRNAME"; then
+{ $as_echo "$as_me:$LINENO: checking for opterr" >&5
+$as_echo_n "checking for opterr... " >&6; }
+if test "${rd_cv_var_int_opterr+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+#include <unistd.h>
 int
 main ()
 {
-extern int _nl_msg_cat_cntr;
-                       return _nl_msg_cat_cntr
+extern int opterr; opterr = 1;
   ;
   return 0;
 }
@@ -17453,16 +25317,33 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  DATADIRNAME=share
+  rd_cv_var_int_opterr=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       case $host in
-    *-*-solaris*)
-                        { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
-$as_echo_n "checking for bind_textdomain_codeset... " >&6; }
-if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+       rd_cv_var_int_opterr=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $rd_cv_var_int_opterr" >&5
+$as_echo "$rd_cv_var_int_opterr" >&6; }
+if test x"$rd_cv_var_int_opterr" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT_OPTERR 1
+_ACEOF
+
+fi
+
+build_getopt=no
+RRD_GETOPT_LONG="LIBC_HAS_GETOPT_LONG"
+{ $as_echo "$as_me:$LINENO: checking for getopt_long" >&5
+$as_echo_n "checking for getopt_long... " >&6; }
+if test "${ac_cv_func_getopt_long+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -17471,12 +25352,12 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+/* Define getopt_long to an innocuous variant, in case <limits.h> declares getopt_long.
    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
+#define getopt_long innocuous_getopt_long
 
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char bind_textdomain_codeset (); below.
+    which can conflict with char getopt_long (); below.
     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     <limits.h> exists even on freestanding compilers.  */
 
@@ -17486,7 +25367,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 # include <assert.h>
 #endif
 
-#undef bind_textdomain_codeset
+#undef getopt_long
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -17494,18 +25375,18 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char bind_textdomain_codeset ();
+char getopt_long ();
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
+#if defined __stub_getopt_long || defined __stub___getopt_long
 choke me
 #endif
 
 int
 main ()
 {
-return bind_textdomain_codeset ();
+return getopt_long ();
   ;
   return 0;
 }
@@ -17531,366 +25412,129 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_func_bind_textdomain_codeset=yes
+  ac_cv_func_getopt_long=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_bind_textdomain_codeset=no
+       ac_cv_func_getopt_long=no
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
-$as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; }
-if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then
-  DATADIRNAME=share
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5
+$as_echo "$ac_cv_func_getopt_long" >&6; }
+if test "x$ac_cv_func_getopt_long" = x""yes; then
+  :
 else
-  DATADIRNAME=lib
-fi
 
-    ;;
-    *)
-    DATADIRNAME=lib
-    ;;
-    esac
-fi
+RRD_GETOPT_LONG="getopt_long"
+build_getopt=yes
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 fi
 
 
-
-
-
+ if test $build_getopt = yes; then
+  BUILD_GETOPT_TRUE=
+  BUILD_GETOPT_FALSE='#'
+else
+  BUILD_GETOPT_TRUE='#'
+  BUILD_GETOPT_FALSE=
 fi
 
-if test x$enable_libintl = xyes -a x$MSGFMT = xno; then
-  { $as_echo "$as_me:$LINENO: WARNING: I could not find msgfmt. Diabeling libintl build." >&5
-$as_echo "$as_me: WARNING: I could not find msgfmt. Diabeling libintl build." >&2;}
-  enable_libintl=no
-fi
 
-if test x$enable_libintl = xyes; then
 
-for ac_header in libintl.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+{ $as_echo "$as_me:$LINENO: checking if realloc can deal with NULL" >&5
+$as_echo_n "checking if realloc can deal with NULL... " >&6; }
+if test "${rd_cv_null_realloc+set}" = set; then
   $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+  if test "$cross_compiling" = yes; then
+  :
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+#include <stdlib.h>
+             int main(void){
+              char *x = NULL;
+             x = realloc (x,10);
+             if (x==NULL) return 1;
+             return 0;
+             }
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-
-fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: result: disabeling libintl build" >&5
-$as_echo "disabeling libintl build" >&6; }; enable_libintl=no
-fi
-
-done
-
-fi
-
-if test x$enable_libintl = xyes ; then
-      { $as_echo "$as_me:$LINENO: checking for libintl_gettext in -lintl" >&5
-$as_echo_n "checking for libintl_gettext in -lintl... " >&6; }
-if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char libintl_gettext ();
-int
-main ()
-{
-return libintl_gettext ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_try") 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_intl_libintl_gettext=yes
+  (exit $ac_status); }; }; then
+  rd_cv_null_realloc=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_intl_libintl_gettext=no
+( exit $ac_status )
+rd_cv_null_realloc=nope
 fi
-
 rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_libintl_gettext" >&5
-$as_echo "$ac_cv_lib_intl_libintl_gettext" >&6; }
-if test "x$ac_cv_lib_intl_libintl_gettext" = x""yes; then
-  LIB_LIBINTL="-lintl"
-fi
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
-
- if test x$enable_libintl = xyes; then
-  BUILD_LIBINTL_TRUE=
-  BUILD_LIBINTL_FALSE='#'
-else
-  BUILD_LIBINTL_TRUE='#'
-  BUILD_LIBINTL_FALSE=
 fi
+{ $as_echo "$as_me:$LINENO: result: $rd_cv_null_realloc" >&5
+$as_echo "$rd_cv_null_realloc" >&6; }
 
-
-if test x$enable_libintl = xyes; then
-
+if test x"$rd_cv_null_realloc" = xnope; then
 cat >>confdefs.h <<\_ACEOF
-#define BUILD_LIBINTL /**/
+#define NO_NULL_REALLOC 1
 _ACEOF
 
 fi
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-case $TERM in
-       #   for the most important terminal types we directly know the sequences
-       xterm|xterm*|vt220|vt220*)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
-       ;;
-       vt100|vt100*|cygwin)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
-       ;;
-       *)
-               T_MD=''
-               T_ME=''
-       ;;
-esac
-  { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-  { $as_echo "$as_me:$LINENO: result: ${T_MD}IEEE Math Checks${T_ME}" >&5
-$as_echo "${T_MD}IEEE Math Checks${T_ME}" >&6; }
-
-
-
-
-for ac_func in fpclassify
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:$LINENO: checking if ctime_r need special care to act posixly correct" >&5
+$as_echo_n "checking if ctime_r need special care to act posixly correct... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <time.h>
 int
 main ()
 {
-return $ac_func ();
+ctime_r(NULL,NULL,0)
+
   ;
   return 0;
 }
@@ -17916,44 +25560,19 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  { $as_echo "$as_me:$LINENO: checking for fpclassify with <math.h>" >&5
-$as_echo_n "checking for fpclassify with <math.h>... " >&6; }
-    cat >conftest.$ac_ext <<_ACEOF
+   CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
+      cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <math.h>
-volatile int x;volatile float f;
+#include <time.h>
 int
 main ()
 {
-x = fpclassify(f)
+ctime_r(NULL,NULL)
+
   ;
   return 0;
 }
@@ -17979,77 +25598,38 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-      cat >>confdefs.h <<\_ACEOF
-#define HAVE_FPCLASSIFY 1
-_ACEOF
-
+  { $as_echo "$as_me:$LINENO: result: yes, this seems to be solaris style" >&5
+$as_echo "yes, this seems to be solaris style" >&6; }
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+       { { $as_echo "$as_me:$LINENO: error: Can't figure how to compile ctime_r" >&5
+$as_echo "$as_me: error: Can't figure how to compile ctime_r" >&2;}
+   { (exit 1); exit 1; }; }
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-fi
-done
 
-
-
-for ac_func in isinf
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <time.h>
 int
 main ()
 {
-return $ac_func ();
+ctime_r(NULL,NULL)
+
   ;
   return 0;
 }
@@ -18075,44 +25655,82 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       { { $as_echo "$as_me:$LINENO: error: Can't figure how to compile ctime_r" >&5
+$as_echo "$as_me: error: Can't figure how to compile ctime_r" >&2;}
+   { (exit 1); exit 1; }; }
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+
+
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
-else
-  { $as_echo "$as_me:$LINENO: checking for isinf with <math.h>" >&5
-$as_echo_n "checking for isinf with <math.h>... " >&6; }
-    cat >conftest.$ac_ext <<_ACEOF
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+if test $enable_pthread != no; then
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <math.h>
-volatile int x;volatile float f;
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_join ();
 int
 main ()
 {
-x = isinf(f)
+return pthread_join ();
   ;
   return 0;
 }
@@ -18138,69 +25756,171 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-      cat >>confdefs.h <<\_ACEOF
-#define HAVE_ISINF 1
-_ACEOF
-
+  acx_pthread_ok=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
 fi
-done
 
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
 
-{ $as_echo "$as_me:$LINENO: checking whether isfinite is broken" >&5
-$as_echo_n "checking whether isfinite is broken... " >&6; }
-if test "${ac_cv_have_broken_isfinite+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
 
-if test "$cross_compiling" = yes; then
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
 
-case "${target}" in
-  hppa*-*-hpux*) ac_cv_have_broken_isfinite=yes ;;
-  *-solaris2.8) ac_cv_have_broken_isfinite=yes ;;
-  *-solaris2.9) ac_cv_have_broken_isfinite=yes ;;
-  *) ac_cv_have_broken_isfinite=no ;;
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthread or
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+        ;;
 esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+                ;;
+
+                -*)
+                { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+               pthread-config)
+               # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  if test -n "$acx_pthread_config"; then
+  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_acx_pthread_config="yes"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+fi
+fi
+acx_pthread_config=$ac_cv_prog_acx_pthread_config
+if test -n "$acx_pthread_config"; then
+  { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
+$as_echo "$acx_pthread_config" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+               if test x"$acx_pthread_config" = xno; then continue; fi
+               PTHREAD_CFLAGS="`pthread-config --cflags`"
+               PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+               ;;
+
+                *)
+                { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-#ifdef HAVE_FLOAT_H
-#include <float.h>
-#endif
-int main ()
+#include <pthread.h>
+int
+main ()
 {
-#ifdef isfinite
-#ifdef LDBL_MAX
-  if (!isfinite(LDBL_MAX)) return 1;
-#endif
-#ifdef DBL_MAX
-  if (!isfinite(DBL_MAX)) return 1;
-#endif
-#endif
-return 0;
+pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+  ;
+  return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18208,100 +25928,68 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_have_broken_isfinite=no
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  acx_pthread_ok=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-ac_cv_have_broken_isfinite=yes
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
 
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_broken_isfinite" >&5
-$as_echo "$ac_cv_have_broken_isfinite" >&6; }
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
 
-case "${target}" in
-  *-solaris2.8) ac_cv_have_broken_isfinite=yes ;;
-  *-solaris2.9) ac_cv_have_broken_isfinite=yes ;;
-esac
+        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
 
-if test "x$ac_cv_have_broken_isfinite" = "xno"; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_ISFINITE 1
-_ACEOF
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
 
-else
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-for ac_func in finite
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+       { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+       attr_name=unknown
+       for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+           cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <pthread.h>
 int
 main ()
 {
-return $ac_func ();
+int attr=$attr;
   ;
   return 0;
 }
@@ -18327,80 +26015,195 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+  attr_name=$attr; break
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+       done
+        { $as_echo "$as_me:$LINENO: result: $attr_name" >&5
+$as_echo "$attr_name" >&6; }
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+
+cat >>confdefs.h <<_ACEOF
+#define PTHREAD_CREATE_JOINABLE $attr_name
 _ACEOF
 
-else
+        fi
 
-for ac_func in isfinite
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+        { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+        x_rflag=no
+        case "${host_cpu}-${host_os}" in
+            *-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";;
+            *solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";;
+            *-linux* | *-k*bsd*-gnu*)
+            if test x"$PTHREAD_CFLAGS" = "x-pthread"; then
+                # For Linux/gcc "-pthread" implies "-lpthread". We need, however, to make this explicit
+                # in PTHREAD_LIBS such that a shared library to be built properly depends on libpthread.
+                PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
+            fi;;
+        esac
+        { $as_echo "$as_me:$LINENO: result: ${x_rflag}" >&5
+$as_echo "${x_rflag}" >&6; }
+        if test "x$x_rflag" != xno; then
+            PTHREAD_CFLAGS="$x_rflag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        # Extract the first word of "cc_r", so it can be a program name with args.
+set dummy cc_r; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  if test -n "$PTHREAD_CC"; then
+  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_PTHREAD_CC="cc_r"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+else
+        PTHREAD_CC="$CC"
+fi
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+
+    MULTITHREAD_CFLAGS=$PTHREAD_CFLAGS
+    MULTITHREAD_LDFLAGS=$PTHREAD_LIBS
+
+        :
+else
+        acx_pthread_ok=no
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+
+if test  "x$x_rflag" != "xno"; then
+   CPPFLAGS="$CPPFLAGS $x_rflag"
+fi
+
+ if test $enable_pthread != no; then
+  BUILD_MULTITHREAD_TRUE=
+  BUILD_MULTITHREAD_FALSE='#'
+else
+  BUILD_MULTITHREAD_TRUE='#'
+  BUILD_MULTITHREAD_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+{ $as_echo "$as_me:$LINENO: checking do we need malloc/malloc.h" >&5
+$as_echo_n "checking do we need malloc/malloc.h... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
+#include <stdlib.h>
+int
+main ()
+{
+malloc(1)
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+   { $as_echo "$as_me:$LINENO: result: nope, works out of the box" >&5
+$as_echo "nope, works out of the box" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+                  #include <malloc/malloc.h>
 int
 main ()
 {
-return $ac_func ();
+malloc(1)
+
   ;
   return 0;
 }
@@ -18426,47 +26229,87 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  eval "$as_ac_var=yes"
+
+           cat >>confdefs.h <<\_ACEOF
+#define MUST_HAVE_MALLOC_MALLOC_H 1
+_ACEOF
+
+           { $as_echo "$as_me:$LINENO: result: yes we do" >&5
+$as_echo "yes we do" >&6; }
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       eval "$as_ac_var=no"
+       { { $as_echo "$as_me:$LINENO: error: Can not figure how to compile malloc" >&5
+$as_echo "$as_me: error: Can not figure how to compile malloc" >&2;}
+   { (exit 1); exit 1; }; }
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+
+
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-                $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+case $TERM in
+       #   for the most important terminal types we directly know the sequences
+       xterm|xterm*|vt220|vt220*)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+       ;;
+       vt100|vt100*|cygwin)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+       ;;
+       *)
+               T_MD=''
+               T_ME=''
+       ;;
+esac
+  { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+  { $as_echo "$as_me:$LINENO: result: ${T_MD}Find 3rd-Party Libraries${T_ME}" >&5
+$as_echo "${T_MD}Find 3rd-Party Libraries${T_ME}" >&6; }
+
+
+# Check whether --enable-libdbi was given.
+if test "${enable_libdbi+set}" = set; then
+  enableval=$enable_libdbi; have_libdbi=no
 else
-  { $as_echo "$as_me:$LINENO: checking for isfinite with <math.h>" >&5
-$as_echo_n "checking for isfinite with <math.h>... " >&6; }
-          cat >conftest.$ac_ext <<_ACEOF
+
+  XXX=$LIBS
+  LIBS="$LIBS -ldbi -ldl"
+  { $as_echo "$as_me:$LINENO: checking for libdbi" >&5
+$as_echo_n "checking for libdbi... " >&6; }
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <math.h>
-volatile int x;volatile float f;
+#include <dbi/dbi.h>
 int
 main ()
 {
-x = isfinite(f)
+dbi_initialize(NULL)
+
   ;
   return 0;
 }
+
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
@@ -18489,127 +26332,98 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-               cat >>confdefs.h <<\_ACEOF
-#define HAVE_ISFINITE 1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBDBI 1
 _ACEOF
 
+       { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+       have_libdbi=yes
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:$LINENO: result: no" >&5
+       LIBS=$XXX
+       { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
+       have_libdbi=no
+
+
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+
 fi
-done
 
+ if test $have_libdbi != no; then
+  BUILD_LIBDBI_TRUE=
+  BUILD_LIBDBI_FALSE='#'
+else
+  BUILD_LIBDBI_TRUE='#'
+  BUILD_LIBDBI_FALSE=
 fi
-done
 
+
+ if test $enable_rrdcgi != no; then
+  BUILD_RRDCGI_TRUE=
+  BUILD_RRDCGI_FALSE='#'
+else
+  BUILD_RRDCGI_TRUE='#'
+  BUILD_RRDCGI_FALSE=
 fi
 
 
-ac_ext=c
+
+CORE_LIBS="$LIBS"
+
+
+ ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-_cflags=${CFLAGS}
-
-{ $as_echo "$as_me:$LINENO: checking if IEEE math works out of the box" >&5
-$as_echo_n "checking if IEEE math works out of the box... " >&6; }
-if test "${rd_cv_ieee_works+set}" = set; then
+ EX_CHECK_STATE=NO
+ ex_check_save_LIBS=${LIBS}
+ ex_check_save_CPPFLAGS=${CPPFLAGS}
+ ex_check_save_LDFLAGS=${LDFLAGS}
+ if test "x""" != "x"; then
+   CPPFLAGS="$CPPFLAGS -I"""
+ fi
+  { $as_echo "$as_me:$LINENO: checking for cairo_font_options_create in -lcairo" >&5
+$as_echo_n "checking for cairo_font_options_create in -lcairo... " >&6; }
+if test "${ac_cv_lib_cairo_cairo_font_options_create+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcairo  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
-
-#if HAVE_FLOAT_H
-#  include <float.h>
-#endif
-
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
-
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
-
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
-
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
-
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
-
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    ;
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }
+char cairo_font_options_create ();
+int
+main ()
+{
+return cairo_font_options_create ();
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18617,265 +26431,251 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ieee_works=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_cairo_cairo_font_options_create=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_ieee_works=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+       ac_cv_lib_cairo_cairo_font_options_create=no
 fi
 
-
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_font_options_create" >&5
+$as_echo "$ac_cv_lib_cairo_cairo_font_options_create" >&6; }
+if test "x$ac_cv_lib_cairo_cairo_font_options_create" = x""yes; then
 
-if test x${rd_cv_ieee_works} = "xyes"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$_cflags -ieee"
-
-{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -ieee switch" >&5
-$as_echo_n "checking if IEEE math works with the -ieee switch... " >&6; }
-if test "${rd_cv_ieee_switch+set}" = set; then
+    if test "${ac_cv_header_cairo_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for cairo.h" >&5
+$as_echo_n "checking for cairo.h... " >&6; }
+if test "${ac_cv_header_cairo_h+set}" = set; then
   $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_h" >&5
+$as_echo "$ac_cv_header_cairo_h" >&6; }
 else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking cairo.h usability" >&5
+$as_echo_n "checking cairo.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
-
-#if HAVE_FLOAT_H
-#  include <float.h>
-#endif
-
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
-
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
-
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
-
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
-
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
-
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
-#endif
-
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    ;
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }
+$ac_includes_default
+#include <cairo.h>
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking cairo.h presence" >&5
+$as_echo_n "checking cairo.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <cairo.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ieee_switch=yes
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_ieee_switch=no
+  ac_header_preproc=no
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: cairo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: cairo.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: cairo.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: cairo.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: cairo.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: cairo.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: cairo.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: cairo.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for cairo.h" >&5
+$as_echo_n "checking for cairo.h... " >&6; }
+if test "${ac_cv_header_cairo_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_cairo_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_h" >&5
+$as_echo "$ac_cv_header_cairo_h" >&6; }
+
+fi
+if test "x$ac_cv_header_cairo_h" = x""yes; then
+  LIBS="-lcairo ${LIBS}";EX_CHECK_STATE=YES
 fi
 
 
 fi
 
-if test x${rd_cv_ieee_switch} = "xyes"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+ if test $EX_CHECK_STATE = NO; then
+        for ac_prog in pkg-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$PKGCONFIG"; then
+  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_PKGCONFIG="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
+fi
+fi
+PKGCONFIG=$ac_cv_prog_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
 else
- { $as_echo "$as_me:$LINENO: result: no" >&5
 { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
- CFLAGS="$_cflags -qfloat=nofold"
+fi
 
-{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -qfloat=nofold switch" >&5
-$as_echo_n "checking if IEEE math works with the -qfloat=nofold switch... " >&6; }
-if test "${rd_cv_ieee_nofold+set}" = set; then
+
+  test -n "$PKGCONFIG" && break
+done
+test -n "$PKGCONFIG" || PKGCONFIG="no"
+
+    if test "$PKGCONFIG" != "no"; then
+          if $PKGCONFIG --exists cairo-png; then
+             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags cairo-png`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L cairo-png`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other cairo-png`
+             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l cairo-png`
+                            unset ac_cv_lib_`echo cairo | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_cairo_font_options_create
+             { $as_echo "$as_me:$LINENO: checking for cairo_font_options_create in -lcairo" >&5
+$as_echo_n "checking for cairo_font_options_create in -lcairo... " >&6; }
+if test "${ac_cv_lib_cairo_cairo_font_options_create+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcairo  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
-
-#if HAVE_FLOAT_H
-#  include <float.h>
-#endif
-
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
-
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
-
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
-
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
-
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
-
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    ;
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }
+char cairo_font_options_create ();
+int
+main ()
+{
+return cairo_font_options_create ();
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18883,265 +26683,291 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ieee_nofold=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_cairo_cairo_font_options_create=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_ieee_nofold=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+       ac_cv_lib_cairo_cairo_font_options_create=no
 fi
 
-
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_font_options_create" >&5
+$as_echo "$ac_cv_lib_cairo_cairo_font_options_create" >&6; }
+if test "x$ac_cv_lib_cairo_cairo_font_options_create" = x""yes; then
 
-if test x${rd_cv_ieee_nofold} = "xyes"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$_cflags -w -qflttrap=enable:zerodivide"
-
-{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -w -qflttrap=enable:zerodivide" >&5
-$as_echo_n "checking if IEEE math works with the -w -qflttrap=enable:zerodivide... " >&6; }
-if test "${rd_cv_ieee_flttrap+set}" = set; then
+                unset ac_cv_header_`echo cairo.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
+                if test "${ac_cv_header_cairo_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for cairo.h" >&5
+$as_echo_n "checking for cairo.h... " >&6; }
+if test "${ac_cv_header_cairo_h+set}" = set; then
   $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_h" >&5
+$as_echo "$ac_cv_header_cairo_h" >&6; }
 else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking cairo.h usability" >&5
+$as_echo_n "checking cairo.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
-
-#if HAVE_FLOAT_H
-#  include <float.h>
-#endif
-
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
-
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
-
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
-
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
-
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
-
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
-#endif
-
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    ;
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+$ac_includes_default
+#include <cairo.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking cairo.h presence" >&5
+$as_echo_n "checking cairo.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <cairo.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ieee_flttrap=yes
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_ieee_flttrap=no
+  ac_header_preproc=no
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: cairo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: cairo.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: cairo.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: cairo.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: cairo.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: cairo.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: cairo.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: cairo.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for cairo.h" >&5
+$as_echo_n "checking for cairo.h... " >&6; }
+if test "${ac_cv_header_cairo_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_cairo_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_h" >&5
+$as_echo "$ac_cv_header_cairo_h" >&6; }
+
+fi
+if test "x$ac_cv_header_cairo_h" = x""yes; then
+  EX_CHECK_STATE=YES
 fi
 
 
+
 fi
 
-if test x${rd_cv_ieee_flttrap} = "xyes"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+          else
+             { $as_echo "$as_me:$LINENO: WARNING:
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no cairo-png.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       " >&5
+$as_echo "$as_me: WARNING:
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no cairo-png.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       " >&2;}
+           fi
+     fi
+  fi
 
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$_cflags -mieee"
+  if test ${EX_CHECK_STATE} = NO; then
+     { $as_echo "$as_me:$LINENO: WARNING:
+----------------------------------------------------------------------------
+* I could not find a working copy of cairo-png. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find libcairo and its header files. If
+  you have not installed cairo-png, you can get it either from its original home on
 
-{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -mieee switch" >&5
-$as_echo_n "checking if IEEE math works with the -mieee switch... " >&6; }
-if test "${rd_cv_ieee_mswitch+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+     http://cairographics.org/releases/
 
+  You can find also find an archive copy on
 
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
+     http://oss.oetiker.ch/rrdtool/pub/libs
 
-#if HAVE_FLOAT_H
-#  include <float.h>
-#endif
+  The last tested version of cairo-png is 1.4.6.
 
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
 
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
+----------------------------------------------------------------------------
+                " >&5
+$as_echo "$as_me: WARNING:
+----------------------------------------------------------------------------
+* I could not find a working copy of cairo-png. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find libcairo and its header files. If
+  you have not installed cairo-png, you can get it either from its original home on
 
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
+     http://cairographics.org/releases/
 
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
+  You can find also find an archive copy on
 
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
+     http://oss.oetiker.ch/rrdtool/pub/libs
 
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
+  The last tested version of cairo-png is 1.4.6.
 
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
 
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+----------------------------------------------------------------------------
+                " >&2;}
+       EX_CHECK_ALL_ERR=YES
+       LIBS="${ex_check_save_LIBS}"
+       CPPFLAGS="${ex_check_save_CPPFLAGS}"
+       LDFLAGS="${ex_check_save_LDFLAGS}"
+    fi
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ EX_CHECK_STATE=NO
+ ex_check_save_LIBS=${LIBS}
+ ex_check_save_CPPFLAGS=${CPPFLAGS}
+ ex_check_save_LDFLAGS=${LDFLAGS}
+ if test "x""" != "x"; then
+   CPPFLAGS="$CPPFLAGS -I"""
+ fi
+  { $as_echo "$as_me:$LINENO: checking for cairo_svg_surface_create in -lcairo" >&5
+$as_echo_n "checking for cairo_svg_surface_create in -lcairo... " >&6; }
+if test "${ac_cv_lib_cairo_cairo_svg_surface_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcairo  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    ;
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }
+char cairo_svg_surface_create ();
+int
+main ()
+{
+return cairo_svg_surface_create ();
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -19149,132 +26975,251 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_cairo_cairo_svg_surface_create=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_cairo_cairo_svg_surface_create=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_svg_surface_create" >&5
+$as_echo "$ac_cv_lib_cairo_cairo_svg_surface_create" >&6; }
+if test "x$ac_cv_lib_cairo_cairo_svg_surface_create" = x""yes; then
+
+    if test "${ac_cv_header_cairo_svg_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for cairo-svg.h" >&5
+$as_echo_n "checking for cairo-svg.h... " >&6; }
+if test "${ac_cv_header_cairo_svg_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_svg_h" >&5
+$as_echo "$ac_cv_header_cairo_svg_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking cairo-svg.h usability" >&5
+$as_echo_n "checking cairo-svg.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <cairo-svg.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ieee_mswitch=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_ieee_mswitch=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
+       ac_header_compiler=no
 fi
 
-if test x${rd_cv_ieee_mswitch} = "xyes"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$_cflags -q float=rndsngl"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -q float=rndsngl switch" >&5
-$as_echo_n "checking if IEEE math works with the -q float=rndsngl switch... " >&6; }
-if test "${rd_cv_ieee_qswitch+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking cairo-svg.h presence" >&5
+$as_echo_n "checking cairo-svg.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <cairo-svg.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
+fi
 
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-#if HAVE_FLOAT_H
-#  include <float.h>
-#endif
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: in the future, the compiler will take precedence" >&2;}
 
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for cairo-svg.h" >&5
+$as_echo_n "checking for cairo-svg.h... " >&6; }
+if test "${ac_cv_header_cairo_svg_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_cairo_svg_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_svg_h" >&5
+$as_echo "$ac_cv_header_cairo_svg_h" >&6; }
 
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
+fi
+if test "x$ac_cv_header_cairo_svg_h" = x""yes; then
+  LIBS="-lcairo ${LIBS}";EX_CHECK_STATE=YES
+fi
 
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
 
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
+fi
+
+ if test $EX_CHECK_STATE = NO; then
+        for ac_prog in pkg-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$PKGCONFIG"; then
+  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_PKGCONFIG="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+PKGCONFIG=$ac_cv_prog_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
 
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
+  test -n "$PKGCONFIG" && break
+done
+test -n "$PKGCONFIG" || PKGCONFIG="no"
 
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
+    if test "$PKGCONFIG" != "no"; then
+          if $PKGCONFIG --exists cairo-svg; then
+             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags cairo-svg`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L cairo-svg`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other cairo-svg`
+             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l cairo-svg`
+                            unset ac_cv_lib_`echo cairo | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_cairo_svg_surface_create
+             { $as_echo "$as_me:$LINENO: checking for cairo_svg_surface_create in -lcairo" >&5
+$as_echo_n "checking for cairo_svg_surface_create in -lcairo... " >&6; }
+if test "${ac_cv_lib_cairo_cairo_svg_surface_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcairo  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    ;
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }
+char cairo_svg_surface_create ();
+int
+main ()
+{
+return cairo_svg_surface_create ();
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -19282,398 +27227,291 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ieee_qswitch=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_cairo_cairo_svg_surface_create=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_ieee_qswitch=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+       ac_cv_lib_cairo_cairo_svg_surface_create=no
 fi
 
-
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_svg_surface_create" >&5
+$as_echo "$ac_cv_lib_cairo_cairo_svg_surface_create" >&6; }
+if test "x$ac_cv_lib_cairo_cairo_svg_surface_create" = x""yes; then
 
-if test x${rd_cv_ieee_qswitch} = "xyes"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$_cflags -OPT:IEEE_NaN_inf=ON"
-
-{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -OPT:IEEE_NaN_inf=ON switch" >&5
-$as_echo_n "checking if IEEE math works with the -OPT:IEEE_NaN_inf=ON switch... " >&6; }
-if test "${rd_cv_ieee_ieeenaninfswitch+set}" = set; then
+                unset ac_cv_header_`echo cairo-svg.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
+                if test "${ac_cv_header_cairo_svg_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for cairo-svg.h" >&5
+$as_echo_n "checking for cairo-svg.h... " >&6; }
+if test "${ac_cv_header_cairo_svg_h+set}" = set; then
   $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_svg_h" >&5
+$as_echo "$ac_cv_header_cairo_svg_h" >&6; }
 else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking cairo-svg.h usability" >&5
+$as_echo_n "checking cairo-svg.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+$ac_includes_default
+#include <cairo-svg.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_header_compiler=no
+fi
 
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
-
-#if HAVE_FLOAT_H
-#  include <float.h>
-#endif
-
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
-
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
-
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
-
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
-
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
-
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
-#endif
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    ;
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking cairo-svg.h presence" >&5
+$as_echo_n "checking cairo-svg.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <cairo-svg.h>
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ieee_ieeenaninfswitch=yes
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_ieee_ieeenaninfswitch=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+  ac_header_preproc=no
 fi
 
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: cairo-svg.h: in the future, the compiler will take precedence" >&2;}
 
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for cairo-svg.h" >&5
+$as_echo_n "checking for cairo-svg.h... " >&6; }
+if test "${ac_cv_header_cairo_svg_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_cairo_svg_h=$ac_header_preproc
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_svg_h" >&5
+$as_echo "$ac_cv_header_cairo_svg_h" >&6; }
 
-if test x${rd_cv_ieee_ieeenaninfswitch} = "xyes"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+fi
+if test "x$ac_cv_header_cairo_svg_h" = x""yes; then
+  EX_CHECK_STATE=YES
+fi
 
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$_cflags -OPT:IEEE_comparisons=ON"
 
-{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch" >&5
-$as_echo_n "checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch... " >&6; }
-if test "${rd_cv_ieee_ieeecmpswitch+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
+fi
 
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
+          else
+             { $as_echo "$as_me:$LINENO: WARNING:
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no cairo-svg.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       " >&5
+$as_echo "$as_me: WARNING:
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no cairo-svg.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       " >&2;}
+           fi
+     fi
+  fi
 
-#if HAVE_FLOAT_H
-#  include <float.h>
-#endif
+  if test ${EX_CHECK_STATE} = NO; then
+     { $as_echo "$as_me:$LINENO: WARNING:
+----------------------------------------------------------------------------
+* I could not find a working copy of cairo-svg. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find libcairo and its header files. If
+  you have not installed cairo-svg, you can get it either from its original home on
 
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
+     http://cairographics.org/releases/
 
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
+  You can find also find an archive copy on
 
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
+     http://oss.oetiker.ch/rrdtool/pub/libs
 
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
+  The last tested version of cairo-svg is 1.4.6.
 
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
 
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
+----------------------------------------------------------------------------
+                " >&5
+$as_echo "$as_me: WARNING:
+----------------------------------------------------------------------------
+* I could not find a working copy of cairo-svg. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find libcairo and its header files. If
+  you have not installed cairo-svg, you can get it either from its original home on
 
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
+     http://cairographics.org/releases/
 
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
-#endif
+  You can find also find an archive copy on
 
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    ;
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ieee_ieeecmpswitch=yes
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+     http://oss.oetiker.ch/rrdtool/pub/libs
 
-( exit $ac_status )
-rd_cv_ieee_ieeecmpswitch=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+  The last tested version of cairo-svg is 1.4.6.
 
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
+
+----------------------------------------------------------------------------
+                " >&2;}
+       EX_CHECK_ALL_ERR=YES
+       LIBS="${ex_check_save_LIBS}"
+       CPPFLAGS="${ex_check_save_CPPFLAGS}"
+       LDFLAGS="${ex_check_save_LDFLAGS}"
+    fi
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-fi
 
-if test x${rd_cv_ieee_ieeecmpswitch} = "xyes"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
 
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS=$_cflags
 
-{ $as_echo "$as_me:$LINENO: checking if IEEE math works with fpsetmask(0)" >&5
-$as_echo_n "checking if IEEE math works with fpsetmask(0)... " >&6; }
-if test "${rd_cv_ieee_mask+set}" = set; then
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ EX_CHECK_STATE=NO
+ ex_check_save_LIBS=${LIBS}
+ ex_check_save_CPPFLAGS=${CPPFLAGS}
+ ex_check_save_LDFLAGS=${LDFLAGS}
+ if test "x""" != "x"; then
+   CPPFLAGS="$CPPFLAGS -I"""
+ fi
+  { $as_echo "$as_me:$LINENO: checking for cairo_pdf_surface_create in -lcairo" >&5
+$as_echo_n "checking for cairo_pdf_surface_create in -lcairo... " >&6; }
+if test "${ac_cv_lib_cairo_cairo_pdf_surface_create+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcairo  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <floatingpoint.h>
-
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
-
-#if HAVE_FLOAT_H
-#  include <float.h>
-#endif
-
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
-
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
-
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
-
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
-
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
-
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
 
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    fpsetmask(0);
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }
+char cairo_pdf_surface_create ();
+int
+main ()
+{
+return cairo_pdf_surface_create ();
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -19681,492 +27519,526 @@ case "(($ac_try" in
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ieee_mask=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_cairo_cairo_pdf_surface_create=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_ieee_mask=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+       ac_cv_lib_cairo_cairo_pdf_surface_create=no
 fi
 
-
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_pdf_surface_create" >&5
+$as_echo "$ac_cv_lib_cairo_cairo_pdf_surface_create" >&6; }
+if test "x$ac_cv_lib_cairo_cairo_pdf_surface_create" = x""yes; then
 
-if test x${rd_cv_ieee_mask} = "xyes"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
- cat >>confdefs.h <<\_ACEOF
-#define MUST_DISABLE_FPMASK 1
-_ACEOF
-
-                PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK"
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking if IEEE math works with signal(SIGFPE,SIG_IGN)" >&5
-$as_echo_n "checking if IEEE math works with signal(SIGFPE,SIG_IGN)... " >&6; }
-if test "${rd_cv_ieee_sigfpe+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <signal.h>
-
-#if HAVE_MATH_H
-#  include <math.h>
-#endif
-
-#if HAVE_FLOAT_H
-#  include <float.h>
-#endif
-
-#if HAVE_IEEEFP_H
-#  include <ieeefp.h>
-#endif
-
-#if HAVE_FP_CLASS_H
-#  include <fp_class.h>
-#endif
-
-/* Solaris */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
-#endif
-
-/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
-#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
-#  undef isnan
-#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
-#endif
-
-/* Digital UNIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
-#endif
-
-/* AIX */
-#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
-#  define HAVE_ISINF 1
-#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
-#endif
-
-#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
-#  define HAVE_ISINF 1
-#  define isinf(a) (fpclassify(a) == FP_INFINITE)
-#endif
-
-#include <stdio.h>
-int main(void){
-    double rrdnan,rrdinf,rrdc,rrdzero;
-    signal(SIGFPE,SIG_IGN);
-    /* some math to see if we get a floating point exception */
-    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
-    rrdnan=0.0/rrdzero; /* especially here */
-    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
-                 /* at run time without sig fpe */
-    rrdc = rrdinf + rrdnan;
-    rrdc = rrdinf / rrdnan;
-    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
-    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
-    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
-    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
-    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
-    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
-    return 0;
- }
+    if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for cairo-pdf.h" >&5
+$as_echo_n "checking for cairo-pdf.h... " >&6; }
+if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_pdf_h" >&5
+$as_echo "$ac_cv_header_cairo_pdf_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking cairo-pdf.h usability" >&5
+$as_echo_n "checking cairo-pdf.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <cairo-pdf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking cairo-pdf.h presence" >&5
+$as_echo_n "checking cairo-pdf.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <cairo-pdf.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ieee_sigfpe=yes
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_ieee_sigfpe=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+  ac_header_preproc=no
 fi
 
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-fi
-
-if test x${rd_cv_ieee_sigfpe} = "xyes"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
- cat >>confdefs.h <<\_ACEOF
-#define MUST_DISABLE_SIGFPE 1
-_ACEOF
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: in the future, the compiler will take precedence" >&2;}
 
-                   PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE"
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for cairo-pdf.h" >&5
+$as_echo_n "checking for cairo-pdf.h... " >&6; }
+if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- { { $as_echo "$as_me:$LINENO: error:
-Your Compiler does not do propper IEEE math ... Please find out how to
-make IEEE math work with your compiler and let me know (tobi@oetiker.ch).
-Check config.log to see what went wrong ...
-" >&5
-$as_echo "$as_me: error:
-Your Compiler does not do propper IEEE math ... Please find out how to
-make IEEE math work with your compiler and let me know (tobi@oetiker.ch).
-Check config.log to see what went wrong ...
-" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-fi
-
-
-fi
-
-
+  ac_cv_header_cairo_pdf_h=$ac_header_preproc
 fi
-
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_pdf_h" >&5
+$as_echo "$ac_cv_header_cairo_pdf_h" >&6; }
 
 fi
-
-
+if test "x$ac_cv_header_cairo_pdf_h" = x""yes; then
+  LIBS="-lcairo ${LIBS}";EX_CHECK_STATE=YES
 fi
 
 
 fi
 
+ if test $EX_CHECK_STATE = NO; then
+        for ac_prog in pkg-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$PKGCONFIG"; then
+  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_PKGCONFIG="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
 fi
-
-
 fi
-
-
+PKGCONFIG=$ac_cv_prog_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
+  test -n "$PKGCONFIG" && break
+done
+test -n "$PKGCONFIG" || PKGCONFIG="no"
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
+    if test "$PKGCONFIG" != "no"; then
+          if $PKGCONFIG --exists cairo-pdf; then
+             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags cairo-pdf`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L cairo-pdf`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other cairo-pdf`
+             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l cairo-pdf`
+                            unset ac_cv_lib_`echo cairo | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_cairo_pdf_surface_create
+             { $as_echo "$as_me:$LINENO: checking for cairo_pdf_surface_create in -lcairo" >&5
+$as_echo_n "checking for cairo_pdf_surface_create in -lcairo... " >&6; }
+if test "${ac_cv_lib_cairo_cairo_pdf_surface_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcairo  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-case $TERM in
-       #   for the most important terminal types we directly know the sequences
-       xterm|xterm*|vt220|vt220*)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
-       ;;
-       vt100|vt100*|cygwin)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
-       ;;
-       *)
-               T_MD=''
-               T_ME=''
-       ;;
-esac
-  { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-  { $as_echo "$as_me:$LINENO: result: ${T_MD}Resolve Portability Issues${T_ME}" >&5
-$as_echo "${T_MD}Resolve Portability Issues${T_ME}" >&6; }
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char cairo_pdf_surface_create ();
+int
+main ()
+{
+return cairo_pdf_surface_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_cairo_cairo_pdf_surface_create=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+       ac_cv_lib_cairo_cairo_pdf_surface_create=no
+fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_pdf_surface_create" >&5
+$as_echo "$ac_cv_lib_cairo_cairo_pdf_surface_create" >&6; }
+if test "x$ac_cv_lib_cairo_cairo_pdf_surface_create" = x""yes; then
 
-{ $as_echo "$as_me:$LINENO: checking if msync with MS_ASYNC updates the files mtime" >&5
-$as_echo_n "checking if msync with MS_ASYNC updates the files mtime... " >&6; }
-if test "${rd_cv_ms_async+set}" = set; then
+                unset ac_cv_header_`echo cairo-pdf.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
+                if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for cairo-pdf.h" >&5
+$as_echo_n "checking for cairo-pdf.h... " >&6; }
+if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
   $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_pdf_h" >&5
+$as_echo "$ac_cv_header_cairo_pdf_h" >&6; }
 else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking cairo-pdf.h usability" >&5
+$as_echo_n "checking cairo-pdf.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/mman.h>
-#include <stdlib.h>
-#include <utime.h>
-int main(void){
-        int fd;
-        struct stat stbuf;
-        char *addr;
-        int res;
-        char temp[] = "mmaptestXXXXXX";
-        struct utimbuf newtime;
-
-        time_t create_ts;
-        fd = mkstemp(temp);
-        if (fd == -1){
-            perror(temp);
-            return 1;
-        }
-        write(fd,"12345\n", 6);
-        stat(temp, &stbuf);
-        create_ts = stbuf.st_mtime;
-        newtime.actime = 0;
-        newtime.modtime = 0;
-        utime(temp,&newtime);
-        addr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-        if (addr == MAP_FAILED) {
-            perror("mmap");
-            goto bad_exit;
-        }
-        addr[0]='x';
-        res = msync(addr, 4, MS_ASYNC);
-        if (res == -1) {
-           perror("msync");
-           goto bad_exit;
-        }
-        res = close(fd);
-        if (res == -1) {
-           perror("close");
-           goto bad_exit;
-        }
-        /* The ASYNC means that we schedule the msync and return immediately.
-           Since we want to see if the modification time is updated upon
-           msync(), we have to make sure that our asynchronous request
-           completes before we stat below. In a real application, the
-           request would be completed at a random time in the future
-           but for this test we do not want to wait an arbitrary amount of
-           time, so force a commit now.  */
-        sync();
-        stat(temp, &stbuf);
-        if (create_ts > stbuf.st_mtime){
-           goto bad_exit;
-        }
-        unlink(temp);
-        return 0;
-     bad_exit:
-        unlink(temp);
-        return 1;
-}
-
+$ac_includes_default
+#include <cairo-pdf.h>
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking cairo-pdf.h presence" >&5
+$as_echo_n "checking cairo-pdf.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <cairo-pdf.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_ms_async=ok
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_ms_async=broken
+  ac_header_preproc=no
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: cairo-pdf.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for cairo-pdf.h" >&5
+$as_echo_n "checking for cairo-pdf.h... " >&6; }
+if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_cairo_pdf_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_pdf_h" >&5
+$as_echo "$ac_cv_header_cairo_pdf_h" >&6; }
+
 fi
+if test "x$ac_cv_header_cairo_pdf_h" = x""yes; then
+  EX_CHECK_STATE=YES
+fi
+
 
 
 fi
 
+          else
+             { $as_echo "$as_me:$LINENO: WARNING:
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no cairo-pdf.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       " >&5
+$as_echo "$as_me: WARNING:
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no cairo-pdf.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       " >&2;}
+           fi
+     fi
+  fi
+
+  if test ${EX_CHECK_STATE} = NO; then
+     { $as_echo "$as_me:$LINENO: WARNING:
+----------------------------------------------------------------------------
+* I could not find a working copy of cairo-pdf. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find libcairo and its header files. If
+  you have not installed cairo-pdf, you can get it either from its original home on
+
+     http://cairographics.org/releases/
+
+  You can find also find an archive copy on
 
+     http://oss.oetiker.ch/rrdtool/pub/libs
 
-if test "${rd_cv_ms_async}" = "ok"; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
+  The last tested version of cairo-pdf is 1.4.6.
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_BROKEN_MS_ASYNC 1
-_ACEOF
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
 
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:$LINENO: WARNING: With mmap access, your platform fails to update the files" >&5
-$as_echo "$as_me: WARNING: With mmap access, your platform fails to update the files" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: mtime. RRDtool will work around this problem by calling utime on each" >&5
-$as_echo "$as_me: WARNING: mtime. RRDtool will work around this problem by calling utime on each" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: file it opens for rw access." >&5
-$as_echo "$as_me: WARNING: file it opens for rw access." >&2;}
- sleep 2
-fi
+----------------------------------------------------------------------------
+                " >&5
+$as_echo "$as_me: WARNING:
+----------------------------------------------------------------------------
+* I could not find a working copy of cairo-pdf. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find libcairo and its header files. If
+  you have not installed cairo-pdf, you can get it either from its original home on
 
+     http://cairographics.org/releases/
 
+  You can find also find an archive copy on
 
+     http://oss.oetiker.ch/rrdtool/pub/libs
 
+  The last tested version of cairo-pdf is 1.4.6.
 
-{ $as_echo "$as_me:$LINENO: checking for opterr" >&5
-$as_echo_n "checking for opterr... " >&6; }
-if test "${rd_cv_var_int_opterr+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <unistd.h>
-int
-main ()
-{
-extern int opterr; opterr = 1;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  rd_cv_var_int_opterr=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
 
-       rd_cv_var_int_opterr=no
-fi
+----------------------------------------------------------------------------
+                " >&2;}
+       EX_CHECK_ALL_ERR=YES
+       LIBS="${ex_check_save_LIBS}"
+       CPPFLAGS="${ex_check_save_CPPFLAGS}"
+       LDFLAGS="${ex_check_save_LDFLAGS}"
+    fi
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $rd_cv_var_int_opterr" >&5
-$as_echo "$rd_cv_var_int_opterr" >&6; }
-if test x"$rd_cv_var_int_opterr" = x"yes"; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INT_OPTERR 1
-_ACEOF
 
-fi
 
-build_getopt=no
-RRD_GETOPT_LONG="LIBC_HAS_GETOPT_LONG"
-{ $as_echo "$as_me:$LINENO: checking for getopt_long" >&5
-$as_echo_n "checking for getopt_long... " >&6; }
-if test "${ac_cv_func_getopt_long+set}" = set; then
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ EX_CHECK_STATE=NO
+ ex_check_save_LIBS=${LIBS}
+ ex_check_save_CPPFLAGS=${CPPFLAGS}
+ ex_check_save_LDFLAGS=${LDFLAGS}
+ if test "x""" != "x"; then
+   CPPFLAGS="$CPPFLAGS -I"""
+ fi
+  { $as_echo "$as_me:$LINENO: checking for cairo_ps_surface_create in -lcairo" >&5
+$as_echo_n "checking for cairo_ps_surface_create in -lcairo... " >&6; }
+if test "${ac_cv_lib_cairo_cairo_ps_surface_create+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcairo  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define getopt_long to an innocuous variant, in case <limits.h> declares getopt_long.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define getopt_long innocuous_getopt_long
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char getopt_long (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef getopt_long
 
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
@@ -20174,18 +28046,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char getopt_long ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_getopt_long || defined __stub___getopt_long
-choke me
-#endif
-
+char cairo_ps_surface_create ();
 int
 main ()
 {
-return getopt_long ();
+return cairo_ps_surface_create ();
   ;
   return 0;
 }
@@ -20211,167 +28076,233 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_func_getopt_long=yes
+  ac_cv_lib_cairo_cairo_ps_surface_create=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_func_getopt_long=no
+       ac_cv_lib_cairo_cairo_ps_surface_create=no
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5
-$as_echo "$ac_cv_func_getopt_long" >&6; }
-if test "x$ac_cv_func_getopt_long" = x""yes; then
-  :
-else
-
-RRD_GETOPT_LONG="getopt_long"
-build_getopt=yes
-
-fi
-
-
- if test $build_getopt = yes; then
-  BUILD_GETOPT_TRUE=
-  BUILD_GETOPT_FALSE='#'
-else
-  BUILD_GETOPT_TRUE='#'
-  BUILD_GETOPT_FALSE=
-fi
-
-
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_ps_surface_create" >&5
+$as_echo "$ac_cv_lib_cairo_cairo_ps_surface_create" >&6; }
+if test "x$ac_cv_lib_cairo_cairo_ps_surface_create" = x""yes; then
 
-{ $as_echo "$as_me:$LINENO: checking if realloc can deal with NULL" >&5
-$as_echo_n "checking if realloc can deal with NULL... " >&6; }
-if test "${rd_cv_null_realloc+set}" = set; then
+    if test "${ac_cv_header_cairo_ps_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for cairo-ps.h" >&5
+$as_echo_n "checking for cairo-ps.h... " >&6; }
+if test "${ac_cv_header_cairo_ps_h+set}" = set; then
   $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_ps_h" >&5
+$as_echo "$ac_cv_header_cairo_ps_h" >&6; }
 else
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking cairo-ps.h usability" >&5
+$as_echo_n "checking cairo-ps.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-             int main(void){
-              char *x = NULL;
-             x = realloc (x,10);
-             if (x==NULL) return 1;
-             return 0;
-             }
+$ac_includes_default
+#include <cairo-ps.h>
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  rd_cv_null_realloc=yes
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-rd_cv_null_realloc=nope
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $rd_cv_null_realloc" >&5
-$as_echo "$rd_cv_null_realloc" >&6; }
-
-if test x"$rd_cv_null_realloc" = xnope; then
-cat >>confdefs.h <<\_ACEOF
-#define NO_NULL_REALLOC 1
-_ACEOF
-
+       ac_header_compiler=no
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking if ctime_r need special care to act posixly correct" >&5
-$as_echo_n "checking if ctime_r need special care to act posixly correct... " >&6; }
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking cairo-ps.h presence" >&5
+$as_echo_n "checking cairo-ps.h presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <time.h>
-int
-main ()
-{
-ctime_r(NULL,NULL,0)
-
-  ;
-  return 0;
-}
+#include <cairo-ps.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
        }; then
-   CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
-      cat >conftest.$ac_ext <<_ACEOF
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for cairo-ps.h" >&5
+$as_echo_n "checking for cairo-ps.h... " >&6; }
+if test "${ac_cv_header_cairo_ps_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_cairo_ps_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_ps_h" >&5
+$as_echo "$ac_cv_header_cairo_ps_h" >&6; }
+
+fi
+if test "x$ac_cv_header_cairo_ps_h" = x""yes; then
+  LIBS="-lcairo ${LIBS}";EX_CHECK_STATE=YES
+fi
+
+
+fi
+
+ if test $EX_CHECK_STATE = NO; then
+        for ac_prog in pkg-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$PKGCONFIG"; then
+  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_PKGCONFIG="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+PKGCONFIG=$ac_cv_prog_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$PKGCONFIG" && break
+done
+test -n "$PKGCONFIG" || PKGCONFIG="no"
+
+    if test "$PKGCONFIG" != "no"; then
+          if $PKGCONFIG --exists cairo-ps; then
+             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags cairo-ps`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L cairo-ps`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other cairo-ps`
+             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l cairo-ps`
+                            unset ac_cv_lib_`echo cairo | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_cairo_ps_surface_create
+             { $as_echo "$as_me:$LINENO: checking for cairo_ps_surface_create in -lcairo" >&5
+$as_echo_n "checking for cairo_ps_surface_create in -lcairo... " >&6; }
+if test "${ac_cv_lib_cairo_cairo_ps_surface_create+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcairo  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <time.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char cairo_ps_surface_create ();
 int
 main ()
 {
-ctime_r(NULL,NULL)
-
+return cairo_ps_surface_create ();
   ;
   return 0;
 }
@@ -20397,51 +28328,54 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  { $as_echo "$as_me:$LINENO: result: yes, this seems to be solaris style" >&5
-$as_echo "yes, this seems to be solaris style" >&6; }
+  ac_cv_lib_cairo_cairo_ps_surface_create=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       { { $as_echo "$as_me:$LINENO: error: Can't figure how to compile ctime_r" >&5
-$as_echo "$as_me: error: Can't figure how to compile ctime_r" >&2;}
-   { (exit 1); exit 1; }; }
-
+       ac_cv_lib_cairo_cairo_ps_surface_create=no
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_ps_surface_create" >&5
+$as_echo "$ac_cv_lib_cairo_cairo_ps_surface_create" >&6; }
+if test "x$ac_cv_lib_cairo_cairo_ps_surface_create" = x""yes; then
 
+                unset ac_cv_header_`echo cairo-ps.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
+                if test "${ac_cv_header_cairo_ps_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for cairo-ps.h" >&5
+$as_echo_n "checking for cairo-ps.h... " >&6; }
+if test "${ac_cv_header_cairo_ps_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_ps_h" >&5
+$as_echo "$ac_cv_header_cairo_ps_h" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-        cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking cairo-ps.h usability" >&5
+$as_echo_n "checking cairo-ps.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <time.h>
-int
-main ()
-{
-ctime_r(NULL,NULL)
-
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <cairo-ps.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -20450,271 +28384,217 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       { { $as_echo "$as_me:$LINENO: error: Can't figure how to compile ctime_r" >&5
-$as_echo "$as_me: error: Can't figure how to compile ctime_r" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-
-
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-if test $enable_pthread != no; then
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-acx_pthread_ok=no
+       ac_header_compiler=no
+fi
 
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
-        cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking cairo-ps.h presence" >&5
+$as_echo_n "checking cairo-ps.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_join ();
-int
-main ()
-{
-return pthread_join ();
-  ;
-  return 0;
-}
+#include <cairo-ps.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
        }; then
-  acx_pthread_ok=yes
+  ac_header_preproc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: cairo-ps.h: in the future, the compiler will take precedence" >&2;}
 
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for cairo-ps.h" >&5
+$as_echo_n "checking for cairo-ps.h... " >&6; }
+if test "${ac_cv_header_cairo_ps_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_cairo_ps_h=$ac_header_preproc
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_ps_h" >&5
+$as_echo "$ac_cv_header_cairo_ps_h" >&6; }
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
-        if test x"$acx_pthread_ok" = xno; then
-                PTHREAD_LIBS=""
-                PTHREAD_CFLAGS=""
-        fi
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
+fi
+if test "x$ac_cv_header_cairo_ps_h" = x""yes; then
+  EX_CHECK_STATE=YES
 fi
 
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
 
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
 
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+fi
 
-# The ordering *is* (sometimes) important.  Some notes on the
-# individual items follow:
+          else
+             { $as_echo "$as_me:$LINENO: WARNING:
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no cairo-ps.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       " >&5
+$as_echo "$as_me: WARNING:
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no cairo-ps.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       " >&2;}
+           fi
+     fi
+  fi
 
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-#       other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-#      doesn't hurt to check since this sometimes defines pthreads too;
-#      also defines -D_REENTRANT)
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
+  if test ${EX_CHECK_STATE} = NO; then
+     { $as_echo "$as_me:$LINENO: WARNING:
+----------------------------------------------------------------------------
+* I could not find a working copy of cairo-ps. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find libcairo and its header files. If
+  you have not installed cairo-ps, you can get it either from its original home on
 
-case "${host_cpu}-${host_os}" in
-        *solaris*)
+     http://cairographics.org/releases/
 
-        # On Solaris (at least, for some versions), libc contains stubbed
-        # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthread or
-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-        # a function called by this macro, so we could check for that, but
-        # who knows whether they'll stub that too in a future libc.)  So,
-        # we'll just look for -pthreads and -lpthread first:
+  You can find also find an archive copy on
 
-        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
-        ;;
-esac
+     http://oss.oetiker.ch/rrdtool/pub/libs
 
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
+  The last tested version of cairo-ps is 1.4.6.
 
-        case $flag in
-                none)
-                { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
-                ;;
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
 
-                -*)
-                { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
-                PTHREAD_CFLAGS="$flag"
-                ;;
+----------------------------------------------------------------------------
+                " >&5
+$as_echo "$as_me: WARNING:
+----------------------------------------------------------------------------
+* I could not find a working copy of cairo-ps. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find libcairo and its header files. If
+  you have not installed cairo-ps, you can get it either from its original home on
 
-               pthread-config)
-               # Extract the first word of "pthread-config", so it can be a program name with args.
-set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$acx_pthread_config"; then
-  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_acx_pthread_config="yes"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+     http://cairographics.org/releases/
 
-  test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
-fi
-fi
-acx_pthread_config=$ac_cv_prog_acx_pthread_config
-if test -n "$acx_pthread_config"; then
-  { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
-$as_echo "$acx_pthread_config" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  You can find also find an archive copy on
 
+     http://oss.oetiker.ch/rrdtool/pub/libs
 
-               if test x"$acx_pthread_config" = xno; then continue; fi
-               PTHREAD_CFLAGS="`pthread-config --cflags`"
-               PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-               ;;
+  The last tested version of cairo-ps is 1.4.6.
+
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
+
+----------------------------------------------------------------------------
+                " >&2;}
+       EX_CHECK_ALL_ERR=YES
+       LIBS="${ex_check_save_LIBS}"
+       CPPFLAGS="${ex_check_save_CPPFLAGS}"
+       LDFLAGS="${ex_check_save_LDFLAGS}"
+    fi
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-                *)
-                { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
-                PTHREAD_LIBS="-l$flag"
-                ;;
-        esac
 
-        save_LIBS="$LIBS"
-        save_CFLAGS="$CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
-        cat >conftest.$ac_ext <<_ACEOF
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ EX_CHECK_STATE=NO
+ ex_check_save_LIBS=${LIBS}
+ ex_check_save_CPPFLAGS=${CPPFLAGS}
+ ex_check_save_LDFLAGS=${LDFLAGS}
+ if test "x""" != "x"; then
+   CPPFLAGS="$CPPFLAGS -I"""
+ fi
+  { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5
+$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; }
+if test "${ac_cv_lib_glib_2_0_glib_check_version+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lglib-2.0  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <pthread.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char glib_check_version ();
 int
 main ()
 {
-pthread_t th; pthread_join(th, 0);
-                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
-                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+return glib_check_version ();
   ;
   return 0;
 }
@@ -20740,134 +28620,169 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  acx_pthread_ok=yes
+  ac_cv_lib_glib_2_0_glib_check_version=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+       ac_cv_lib_glib_2_0_glib_check_version=no
 fi
 
 rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_glib_2_0_glib_check_version" >&5
+$as_echo "$ac_cv_lib_glib_2_0_glib_check_version" >&6; }
+if test "x$ac_cv_lib_glib_2_0_glib_check_version" = x""yes; then
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
-        if test "x$acx_pthread_ok" = xyes; then
-                break;
-        fi
+    if test "${ac_cv_header_glib_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for glib.h" >&5
+$as_echo_n "checking for glib.h... " >&6; }
+if test "${ac_cv_header_glib_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5
+$as_echo "$ac_cv_header_glib_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking glib.h usability" >&5
+$as_echo_n "checking glib.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <glib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
+       ac_header_compiler=no
 fi
 
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
-       { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
-       attr_name=unknown
-       for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-           cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking glib.h presence" >&5
+$as_echo_n "checking glib.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <pthread.h>
-int
-main ()
-{
-int attr=$attr;
-  ;
-  return 0;
-}
+#include <glib.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
        }; then
-  attr_name=$attr; break
+  ac_header_preproc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+  ac_header_preproc=no
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-       done
-        { $as_echo "$as_me:$LINENO: result: $attr_name" >&5
-$as_echo "$attr_name" >&6; }
-        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $attr_name
-_ACEOF
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: glib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: glib.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: glib.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: glib.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: glib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: glib.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: glib.h: in the future, the compiler will take precedence" >&2;}
 
-        fi
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for glib.h" >&5
+$as_echo_n "checking for glib.h... " >&6; }
+if test "${ac_cv_header_glib_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_glib_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5
+$as_echo "$ac_cv_header_glib_h" >&6; }
 
-        { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
-        x_rflag=no
-        case "${host_cpu}-${host_os}" in
-            *-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";;
-            *solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";;
-            *-linux*)
-            if test x"$PTHREAD_CFLAGS" = "x-pthread"; then
-                # For Linux/gcc "-pthread" implies "-lpthread". We need, however, to make this explicit
-                # in PTHREAD_LIBS such that a shared library to be built properly depends on libpthread.
-                PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
-            fi;;
-        esac
-        { $as_echo "$as_me:$LINENO: result: ${x_rflag}" >&5
-$as_echo "${x_rflag}" >&6; }
-        if test "x$x_rflag" != xno; then
-            PTHREAD_CFLAGS="$x_rflag $PTHREAD_CFLAGS"
-        fi
+fi
+if test "x$ac_cv_header_glib_h" = x""yes; then
+  LIBS="-lglib-2.0 ${LIBS}";EX_CHECK_STATE=YES
+fi
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
 
-        # More AIX lossage: must compile with cc_r
-        # Extract the first word of "cc_r", so it can be a program name with args.
-set dummy cc_r; ac_word=$2
+fi
+
+ if test $EX_CHECK_STATE = NO; then
+        for ac_prog in pkg-config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
+if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$PTHREAD_CC"; then
-  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+  if test -n "$PKGCONFIG"; then
+  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -20876,7 +28791,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_PTHREAD_CC="cc_r"
+    ac_cv_prog_PKGCONFIG="$ac_prog"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -20884,81 +28799,54 @@ done
 done
 IFS=$as_save_IFS
 
-  test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
 fi
 fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
+PKGCONFIG=$ac_cv_prog_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-else
-        PTHREAD_CC="$CC"
-fi
-
-
-
-
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-
-    MULTITHREAD_CFLAGS=$PTHREAD_CFLAGS
-    MULTITHREAD_LDFLAGS=$PTHREAD_LIBS
-
-        :
-else
-        acx_pthread_ok=no
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-
-if test  "x$x_rflag" != "xno"; then
-   CPPFLAGS="$CPPFLAGS $x_rflag"
-fi
-
- if test $enable_pthread != no; then
-  BUILD_MULTITHREAD_TRUE=
-  BUILD_MULTITHREAD_FALSE='#'
-else
-  BUILD_MULTITHREAD_TRUE='#'
-  BUILD_MULTITHREAD_FALSE=
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+  test -n "$PKGCONFIG" && break
+done
+test -n "$PKGCONFIG" || PKGCONFIG="no"
 
-{ $as_echo "$as_me:$LINENO: checking do we need malloc/malloc.h" >&5
-$as_echo_n "checking do we need malloc/malloc.h... " >&6; }
+    if test "$PKGCONFIG" != "no"; then
+          if $PKGCONFIG --exists glib-2.0; then
+             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags glib-2.0`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L glib-2.0`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other glib-2.0`
+             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l glib-2.0`
+                            unset ac_cv_lib_`echo glib-2.0 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_glib_check_version
+             { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5
+$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; }
+if test "${ac_cv_lib_glib_2_0_glib_check_version+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lglib-2.0  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char glib_check_version ();
 int
 main ()
 {
-malloc(1)
-
+return glib_check_version ();
   ;
   return 0;
 }
@@ -20984,38 +28872,54 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-   { $as_echo "$as_me:$LINENO: result: nope, works out of the box" >&5
-$as_echo "nope, works out of the box" >&6; }
+  ac_cv_lib_glib_2_0_glib_check_version=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-        cat >conftest.$ac_ext <<_ACEOF
+       ac_cv_lib_glib_2_0_glib_check_version=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_glib_2_0_glib_check_version" >&5
+$as_echo "$ac_cv_lib_glib_2_0_glib_check_version" >&6; }
+if test "x$ac_cv_lib_glib_2_0_glib_check_version" = x""yes; then
+
+                unset ac_cv_header_`echo glib.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
+                if test "${ac_cv_header_glib_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for glib.h" >&5
+$as_echo_n "checking for glib.h... " >&6; }
+if test "${ac_cv_header_glib_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5
+$as_echo "$ac_cv_header_glib_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking glib.h usability" >&5
+$as_echo_n "checking glib.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdlib.h>
-                  #include <malloc/malloc.h>
-int
-main ()
-{
-malloc(1)
-
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <glib.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -21024,78 +28928,177 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-           cat >>confdefs.h <<\_ACEOF
-#define MUST_HAVE_MALLOC_MALLOC_H 1
-_ACEOF
+       ac_header_compiler=no
+fi
 
-           { $as_echo "$as_me:$LINENO: result: yes we do" >&5
-$as_echo "yes we do" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking glib.h presence" >&5
+$as_echo_n "checking glib.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <glib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       { { $as_echo "$as_me:$LINENO: error: Can not figure how to compile malloc" >&5
-$as_echo "$as_me: error: Can not figure how to compile malloc" >&2;}
-   { (exit 1); exit 1; }; }
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: glib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: glib.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: glib.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: glib.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: glib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: glib.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: glib.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: glib.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for glib.h" >&5
+$as_echo_n "checking for glib.h... " >&6; }
+if test "${ac_cv_header_glib_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_glib_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5
+$as_echo "$ac_cv_header_glib_h" >&6; }
+
+fi
+if test "x$ac_cv_header_glib_h" = x""yes; then
+  EX_CHECK_STATE=YES
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
 
 
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+          else
+             { $as_echo "$as_me:$LINENO: WARNING:
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no glib-2.0.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       " >&5
+$as_echo "$as_me: WARNING:
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no glib-2.0.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       " >&2;}
+           fi
+     fi
+  fi
 
+  if test ${EX_CHECK_STATE} = NO; then
+     { $as_echo "$as_me:$LINENO: WARNING:
+----------------------------------------------------------------------------
+* I could not find a working copy of glib-2.0. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find libglib-2.0 and its header files. If
+  you have not installed glib-2.0, you can get it either from its original home on
 
+     ftp://ftp.gtk.org/pub/glib/2.12/
 
-case $TERM in
-       #   for the most important terminal types we directly know the sequences
-       xterm|xterm*|vt220|vt220*)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
-       ;;
-       vt100|vt100*|cygwin)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
-       ;;
-       *)
-               T_MD=''
-               T_ME=''
-       ;;
-esac
-  { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-  { $as_echo "$as_me:$LINENO: result: ${T_MD}Find 3rd-Party Libraries${T_ME}" >&5
-$as_echo "${T_MD}Find 3rd-Party Libraries${T_ME}" >&6; }
+  You can find also find an archive copy on
 
+     http://oss.oetiker.ch/rrdtool/pub/libs
 
+  The last tested version of glib-2.0 is 2.12.12.
 
- if test $enable_rrdcgi != no; then
-  BUILD_RRDCGI_TRUE=
-  BUILD_RRDCGI_FALSE='#'
-else
-  BUILD_RRDCGI_TRUE='#'
-  BUILD_RRDCGI_FALSE=
-fi
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
+
+----------------------------------------------------------------------------
+                " >&5
+$as_echo "$as_me: WARNING:
+----------------------------------------------------------------------------
+* I could not find a working copy of glib-2.0. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find libglib-2.0 and its header files. If
+  you have not installed glib-2.0, you can get it either from its original home on
+
+     ftp://ftp.gtk.org/pub/glib/2.12/
 
+  You can find also find an archive copy on
+
+     http://oss.oetiker.ch/rrdtool/pub/libs
+
+  The last tested version of glib-2.0 is 2.12.12.
+
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
+
+----------------------------------------------------------------------------
+                " >&2;}
+       EX_CHECK_ALL_ERR=YES
+       LIBS="${ex_check_save_LIBS}"
+       CPPFLAGS="${ex_check_save_CPPFLAGS}"
+       LDFLAGS="${ex_check_save_LDFLAGS}"
+    fi
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-CORE_LIBS="$LIBS"
 
 
  ac_ext=c
@@ -21111,13 +29114,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
  if test "x""" != "x"; then
    CPPFLAGS="$CPPFLAGS -I"""
  fi
-  { $as_echo "$as_me:$LINENO: checking for cairo_font_options_create in -lcairo" >&5
-$as_echo_n "checking for cairo_font_options_create in -lcairo... " >&6; }
-if test "${ac_cv_lib_cairo_cairo_font_options_create+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpango-1.0" >&5
+$as_echo_n "checking for pango_cairo_context_set_font_options in -lpango-1.0... " >&6; }
+if test "${ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcairo  $LIBS"
+LIBS="-lpango-1.0  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21131,11 +29134,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char cairo_font_options_create ();
+char pango_cairo_context_set_font_options ();
 int
 main ()
 {
-return cairo_font_options_create ();
+return pango_cairo_context_set_font_options ();
   ;
   return 0;
 }
@@ -21161,12 +29164,12 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_cairo_cairo_font_options_create=yes
+  ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_cairo_cairo_font_options_create=no
+       ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=no
 fi
 
 rm -rf conftest.dSYM
@@ -21174,22 +29177,22 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_font_options_create" >&5
-$as_echo "$ac_cv_lib_cairo_cairo_font_options_create" >&6; }
-if test "x$ac_cv_lib_cairo_cairo_font_options_create" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&5
+$as_echo "$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&6; }
+if test "x$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" = x""yes; then
 
-    if test "${ac_cv_header_cairo_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for cairo.h" >&5
-$as_echo_n "checking for cairo.h... " >&6; }
-if test "${ac_cv_header_cairo_h+set}" = set; then
+    if test "${ac_cv_header_pango_pango_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5
+$as_echo_n "checking for pango/pango.h... " >&6; }
+if test "${ac_cv_header_pango_pango_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_h" >&5
-$as_echo "$ac_cv_header_cairo_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5
+$as_echo "$ac_cv_header_pango_pango_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking cairo.h usability" >&5
-$as_echo_n "checking cairo.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking pango/pango.h usability" >&5
+$as_echo_n "checking pango/pango.h usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21197,7 +29200,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <cairo.h>
+#include <pango/pango.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -21230,15 +29233,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking cairo.h presence" >&5
-$as_echo_n "checking cairo.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking pango/pango.h presence" >&5
+$as_echo_n "checking pango/pango.h presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <cairo.h>
+#include <pango/pango.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -21272,41 +29275,41 @@ $as_echo "$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: cairo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: cairo.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: cairo.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: cairo.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: cairo.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: cairo.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: cairo.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: cairo.h: in the future, the compiler will take precedence" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: pango/pango.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: pango/pango.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for cairo.h" >&5
-$as_echo_n "checking for cairo.h... " >&6; }
-if test "${ac_cv_header_cairo_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5
+$as_echo_n "checking for pango/pango.h... " >&6; }
+if test "${ac_cv_header_pango_pango_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_cairo_h=$ac_header_preproc
+  ac_cv_header_pango_pango_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_h" >&5
-$as_echo "$ac_cv_header_cairo_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5
+$as_echo "$ac_cv_header_pango_pango_h" >&6; }
 
 fi
-if test "x$ac_cv_header_cairo_h" = x""yes; then
-  LIBS="-lcairo ${LIBS}";EX_CHECK_STATE=YES
+if test "x$ac_cv_header_pango_pango_h" = x""yes; then
+  LIBS="-lpango-1.0 ${LIBS}";EX_CHECK_STATE=YES
 fi
 
 
@@ -21357,19 +29360,19 @@ done
 test -n "$PKGCONFIG" || PKGCONFIG="no"
 
     if test "$PKGCONFIG" != "no"; then
-          if $PKGCONFIG --exists cairo-png; then
-             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags cairo-png`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L cairo-png`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other cairo-png`
-             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l cairo-png`
-                            unset ac_cv_lib_`echo cairo | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_cairo_font_options_create
-             { $as_echo "$as_me:$LINENO: checking for cairo_font_options_create in -lcairo" >&5
-$as_echo_n "checking for cairo_font_options_create in -lcairo... " >&6; }
-if test "${ac_cv_lib_cairo_cairo_font_options_create+set}" = set; then
+          if $PKGCONFIG --exists pangocairo; then
+             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags pangocairo`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L pangocairo`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other pangocairo`
+             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l pangocairo`
+                            unset ac_cv_lib_`echo pango-1.0 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_pango_cairo_context_set_font_options
+             { $as_echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpango-1.0" >&5
+$as_echo_n "checking for pango_cairo_context_set_font_options in -lpango-1.0... " >&6; }
+if test "${ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcairo  $LIBS"
+LIBS="-lpango-1.0  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21383,11 +29386,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char cairo_font_options_create ();
+char pango_cairo_context_set_font_options ();
 int
 main ()
 {
-return cairo_font_options_create ();
+return pango_cairo_context_set_font_options ();
   ;
   return 0;
 }
@@ -21413,12 +29416,12 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_cairo_cairo_font_options_create=yes
+  ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_cairo_cairo_font_options_create=no
+       ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=no
 fi
 
 rm -rf conftest.dSYM
@@ -21426,23 +29429,23 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_font_options_create" >&5
-$as_echo "$ac_cv_lib_cairo_cairo_font_options_create" >&6; }
-if test "x$ac_cv_lib_cairo_cairo_font_options_create" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&5
+$as_echo "$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&6; }
+if test "x$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" = x""yes; then
 
-                unset ac_cv_header_`echo cairo.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
-                if test "${ac_cv_header_cairo_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for cairo.h" >&5
-$as_echo_n "checking for cairo.h... " >&6; }
-if test "${ac_cv_header_cairo_h+set}" = set; then
+                unset ac_cv_header_`echo pango/pango.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
+                if test "${ac_cv_header_pango_pango_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5
+$as_echo_n "checking for pango/pango.h... " >&6; }
+if test "${ac_cv_header_pango_pango_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_h" >&5
-$as_echo "$ac_cv_header_cairo_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5
+$as_echo "$ac_cv_header_pango_pango_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking cairo.h usability" >&5
-$as_echo_n "checking cairo.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking pango/pango.h usability" >&5
+$as_echo_n "checking pango/pango.h usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21450,7 +29453,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <cairo.h>
+#include <pango/pango.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -21483,15 +29486,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking cairo.h presence" >&5
-$as_echo_n "checking cairo.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking pango/pango.h presence" >&5
+$as_echo_n "checking pango/pango.h presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <cairo.h>
+#include <pango/pango.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -21525,40 +29528,40 @@ $as_echo "$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: cairo.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: cairo.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: cairo.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: cairo.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: cairo.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: cairo.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: cairo.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: cairo.h: in the future, the compiler will take precedence" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: pango/pango.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: pango/pango.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for cairo.h" >&5
-$as_echo_n "checking for cairo.h... " >&6; }
-if test "${ac_cv_header_cairo_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5
+$as_echo_n "checking for pango/pango.h... " >&6; }
+if test "${ac_cv_header_pango_pango_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_cairo_h=$ac_header_preproc
+  ac_cv_header_pango_pango_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_h" >&5
-$as_echo "$ac_cv_header_cairo_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5
+$as_echo "$ac_cv_header_pango_pango_h" >&6; }
 
 fi
-if test "x$ac_cv_header_cairo_h" = x""yes; then
+if test "x$ac_cv_header_pango_pango_h" = x""yes; then
   EX_CHECK_STATE=YES
 fi
 
           else
              { $as_echo "$as_me:$LINENO: WARNING:
 ----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no cairo-png.pc file around.
+* I found a copy of pkgconfig, but there is no pangocairo.pc file around.
   You may want to set the PKG_CONFIG_PATH variable to point to its
   location.
 ----------------------------------------------------------------------------
                        " >&5
 $as_echo "$as_me: WARNING:
 ----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no cairo-png.pc file around.
+* I found a copy of pkgconfig, but there is no pangocairo.pc file around.
   You may want to set the PKG_CONFIG_PATH variable to point to its
   location.
 ----------------------------------------------------------------------------
@@ -21588,18 +29591,18 @@ $as_echo "$as_me: WARNING:
   if test ${EX_CHECK_STATE} = NO; then
      { $as_echo "$as_me:$LINENO: WARNING:
 ----------------------------------------------------------------------------
-* I could not find a working copy of cairo-png. Check config.log for hints on why
+* I could not find a working copy of pangocairo. Check config.log for hints on why
   this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libcairo and its header files. If
-  you have not installed cairo-png, you can get it either from its original home on
+  so that compiler and the linker can find libpango-1.0 and its header files. If
+  you have not installed pangocairo, you can get it either from its original home on
 
-     http://cairographics.org/releases/
+     http://ftp.gnome.org/pub/GNOME/sources/pango/1.17
 
   You can find also find an archive copy on
 
      http://oss.oetiker.ch/rrdtool/pub/libs
 
-  The last tested version of cairo-png is 1.4.6.
+  The last tested version of pangocairo is 1.17.
 
        LIBS=$LIBS
    LDFLAGS=$LDFLAGS
@@ -21609,18 +29612,18 @@ $as_echo "$as_me: WARNING:
                 " >&5
 $as_echo "$as_me: WARNING:
 ----------------------------------------------------------------------------
-* I could not find a working copy of cairo-png. Check config.log for hints on why
+* I could not find a working copy of pangocairo. Check config.log for hints on why
   this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libcairo and its header files. If
-  you have not installed cairo-png, you can get it either from its original home on
+  so that compiler and the linker can find libpango-1.0 and its header files. If
+  you have not installed pangocairo, you can get it either from its original home on
 
-     http://cairographics.org/releases/
+     http://ftp.gnome.org/pub/GNOME/sources/pango/1.17
 
   You can find also find an archive copy on
 
      http://oss.oetiker.ch/rrdtool/pub/libs
 
-  The last tested version of cairo-png is 1.4.6.
+  The last tested version of pangocairo is 1.17.
 
        LIBS=$LIBS
    LDFLAGS=$LDFLAGS
@@ -21652,16 +29655,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
  ex_check_save_LIBS=${LIBS}
  ex_check_save_CPPFLAGS=${CPPFLAGS}
  ex_check_save_LDFLAGS=${LDFLAGS}
- if test "x""" != "x"; then
-   CPPFLAGS="$CPPFLAGS -I"""
+ if test "x/usr/include/libxml2" != "x"; then
+   CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
  fi
-  { $as_echo "$as_me:$LINENO: checking for cairo_svg_surface_create in -lcairo" >&5
-$as_echo_n "checking for cairo_svg_surface_create in -lcairo... " >&6; }
-if test "${ac_cv_lib_cairo_cairo_svg_surface_create+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for xmlParseFile in -lxml2" >&5
+$as_echo_n "checking for xmlParseFile in -lxml2... " >&6; }
+if test "${ac_cv_lib_xml2_xmlParseFile+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcairo  $LIBS"
+LIBS="-lxml2  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21675,11 +29678,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char cairo_svg_surface_create ();
+char xmlParseFile ();
 int
 main ()
 {
-return cairo_svg_surface_create ();
+return xmlParseFile ();
   ;
   return 0;
 }
@@ -21705,12 +29708,12 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_cairo_cairo_svg_surface_create=yes
+  ac_cv_lib_xml2_xmlParseFile=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_cairo_cairo_svg_surface_create=no
+       ac_cv_lib_xml2_xmlParseFile=no
 fi
 
 rm -rf conftest.dSYM
@@ -21718,22 +29721,22 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_svg_surface_create" >&5
-$as_echo "$ac_cv_lib_cairo_cairo_svg_surface_create" >&6; }
-if test "x$ac_cv_lib_cairo_cairo_svg_surface_create" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlParseFile" >&5
+$as_echo "$ac_cv_lib_xml2_xmlParseFile" >&6; }
+if test "x$ac_cv_lib_xml2_xmlParseFile" = x""yes; then
 
-    if test "${ac_cv_header_cairo_svg_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for cairo-svg.h" >&5
-$as_echo_n "checking for cairo-svg.h... " >&6; }
-if test "${ac_cv_header_cairo_svg_h+set}" = set; then
+    if test "${ac_cv_header_libxml_parser_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
+$as_echo_n "checking for libxml/parser.h... " >&6; }
+if test "${ac_cv_header_libxml_parser_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_svg_h" >&5
-$as_echo "$ac_cv_header_cairo_svg_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
+$as_echo "$ac_cv_header_libxml_parser_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking cairo-svg.h usability" >&5
-$as_echo_n "checking cairo-svg.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
+$as_echo_n "checking libxml/parser.h usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21741,7 +29744,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <cairo-svg.h>
+#include <libxml/parser.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -21774,15 +29777,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking cairo-svg.h presence" >&5
-$as_echo_n "checking cairo-svg.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
+$as_echo_n "checking libxml/parser.h presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <cairo-svg.h>
+#include <libxml/parser.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -21816,41 +29819,41 @@ $as_echo "$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: in the future, the compiler will take precedence" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for cairo-svg.h" >&5
-$as_echo_n "checking for cairo-svg.h... " >&6; }
-if test "${ac_cv_header_cairo_svg_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
+$as_echo_n "checking for libxml/parser.h... " >&6; }
+if test "${ac_cv_header_libxml_parser_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_cairo_svg_h=$ac_header_preproc
+  ac_cv_header_libxml_parser_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_svg_h" >&5
-$as_echo "$ac_cv_header_cairo_svg_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
+$as_echo "$ac_cv_header_libxml_parser_h" >&6; }
 
 fi
-if test "x$ac_cv_header_cairo_svg_h" = x""yes; then
-  LIBS="-lcairo ${LIBS}";EX_CHECK_STATE=YES
+if test "x$ac_cv_header_libxml_parser_h" = x""yes; then
+  LIBS="-lxml2 ${LIBS}";EX_CHECK_STATE=YES
 fi
 
 
@@ -21901,19 +29904,19 @@ done
 test -n "$PKGCONFIG" || PKGCONFIG="no"
 
     if test "$PKGCONFIG" != "no"; then
-          if $PKGCONFIG --exists cairo-svg; then
-             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags cairo-svg`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L cairo-svg`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other cairo-svg`
-             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l cairo-svg`
-                            unset ac_cv_lib_`echo cairo | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_cairo_svg_surface_create
-             { $as_echo "$as_me:$LINENO: checking for cairo_svg_surface_create in -lcairo" >&5
-$as_echo_n "checking for cairo_svg_surface_create in -lcairo... " >&6; }
-if test "${ac_cv_lib_cairo_cairo_svg_surface_create+set}" = set; then
+          if $PKGCONFIG --exists libxml-2.0; then
+             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags libxml-2.0`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L libxml-2.0`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other libxml-2.0`
+             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l libxml-2.0`
+                            unset ac_cv_lib_`echo xml2 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_xmlParseFile
+             { $as_echo "$as_me:$LINENO: checking for xmlParseFile in -lxml2" >&5
+$as_echo_n "checking for xmlParseFile in -lxml2... " >&6; }
+if test "${ac_cv_lib_xml2_xmlParseFile+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcairo  $LIBS"
+LIBS="-lxml2  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21927,11 +29930,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char cairo_svg_surface_create ();
+char xmlParseFile ();
 int
 main ()
 {
-return cairo_svg_surface_create ();
+return xmlParseFile ();
   ;
   return 0;
 }
@@ -21957,12 +29960,12 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_cairo_cairo_svg_surface_create=yes
+  ac_cv_lib_xml2_xmlParseFile=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_cairo_cairo_svg_surface_create=no
+       ac_cv_lib_xml2_xmlParseFile=no
 fi
 
 rm -rf conftest.dSYM
@@ -21970,23 +29973,23 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_svg_surface_create" >&5
-$as_echo "$ac_cv_lib_cairo_cairo_svg_surface_create" >&6; }
-if test "x$ac_cv_lib_cairo_cairo_svg_surface_create" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlParseFile" >&5
+$as_echo "$ac_cv_lib_xml2_xmlParseFile" >&6; }
+if test "x$ac_cv_lib_xml2_xmlParseFile" = x""yes; then
 
-                unset ac_cv_header_`echo cairo-svg.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
-                if test "${ac_cv_header_cairo_svg_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for cairo-svg.h" >&5
-$as_echo_n "checking for cairo-svg.h... " >&6; }
-if test "${ac_cv_header_cairo_svg_h+set}" = set; then
+                unset ac_cv_header_`echo libxml/parser.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
+                if test "${ac_cv_header_libxml_parser_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
+$as_echo_n "checking for libxml/parser.h... " >&6; }
+if test "${ac_cv_header_libxml_parser_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_svg_h" >&5
-$as_echo "$ac_cv_header_cairo_svg_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
+$as_echo "$ac_cv_header_libxml_parser_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking cairo-svg.h usability" >&5
-$as_echo_n "checking cairo-svg.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
+$as_echo_n "checking libxml/parser.h usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21994,7 +29997,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <cairo-svg.h>
+#include <libxml/parser.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -22027,15 +30030,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking cairo-svg.h presence" >&5
-$as_echo_n "checking cairo-svg.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
+$as_echo_n "checking libxml/parser.h presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <cairo-svg.h>
+#include <libxml/parser.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -22069,40 +30072,40 @@ $as_echo "$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-svg.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: cairo-svg.h: in the future, the compiler will take precedence" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for cairo-svg.h" >&5
-$as_echo_n "checking for cairo-svg.h... " >&6; }
-if test "${ac_cv_header_cairo_svg_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
+$as_echo_n "checking for libxml/parser.h... " >&6; }
+if test "${ac_cv_header_libxml_parser_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_cairo_svg_h=$ac_header_preproc
+  ac_cv_header_libxml_parser_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_svg_h" >&5
-$as_echo "$ac_cv_header_cairo_svg_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
+$as_echo "$ac_cv_header_libxml_parser_h" >&6; }
 
 fi
-if test "x$ac_cv_header_cairo_svg_h" = x""yes; then
+if test "x$ac_cv_header_libxml_parser_h" = x""yes; then
   EX_CHECK_STATE=YES
 fi
 
           else
              { $as_echo "$as_me:$LINENO: WARNING:
 ----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no cairo-svg.pc file around.
+* I found a copy of pkgconfig, but there is no libxml-2.0.pc file around.
   You may want to set the PKG_CONFIG_PATH variable to point to its
   location.
 ----------------------------------------------------------------------------
                        " >&5
 $as_echo "$as_me: WARNING:
 ----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no cairo-svg.pc file around.
+* I found a copy of pkgconfig, but there is no libxml-2.0.pc file around.
   You may want to set the PKG_CONFIG_PATH variable to point to its
   location.
 ----------------------------------------------------------------------------
@@ -22132,18 +30135,18 @@ $as_echo "$as_me: WARNING:
   if test ${EX_CHECK_STATE} = NO; then
      { $as_echo "$as_me:$LINENO: WARNING:
 ----------------------------------------------------------------------------
-* I could not find a working copy of cairo-svg. Check config.log for hints on why
+* I could not find a working copy of libxml-2.0. Check config.log for hints on why
   this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libcairo and its header files. If
-  you have not installed cairo-svg, you can get it either from its original home on
+  so that compiler and the linker can find libxml2 and its header files. If
+  you have not installed libxml-2.0, you can get it either from its original home on
 
-     http://cairographics.org/releases/
+     http://xmlsoft.org/downloads.html
 
   You can find also find an archive copy on
 
      http://oss.oetiker.ch/rrdtool/pub/libs
 
-  The last tested version of cairo-svg is 1.4.6.
+  The last tested version of libxml-2.0 is 2.6.31.
 
        LIBS=$LIBS
    LDFLAGS=$LDFLAGS
@@ -22153,18 +30156,18 @@ $as_echo "$as_me: WARNING:
                 " >&5
 $as_echo "$as_me: WARNING:
 ----------------------------------------------------------------------------
-* I could not find a working copy of cairo-svg. Check config.log for hints on why
+* I could not find a working copy of libxml-2.0. Check config.log for hints on why
   this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libcairo and its header files. If
-  you have not installed cairo-svg, you can get it either from its original home on
+  so that compiler and the linker can find libxml2 and its header files. If
+  you have not installed libxml-2.0, you can get it either from its original home on
 
-     http://cairographics.org/releases/
+     http://xmlsoft.org/downloads.html
 
   You can find also find an archive copy on
 
      http://oss.oetiker.ch/rrdtool/pub/libs
 
-  The last tested version of cairo-svg is 1.4.6.
+  The last tested version of libxml-2.0 is 2.6.31.
 
        LIBS=$LIBS
    LDFLAGS=$LDFLAGS
@@ -22186,241 +30189,217 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test "$EX_CHECK_ALL_ERR" = "YES"; then
+  { { $as_echo "$as_me:$LINENO: error: Please fix the library issues listed above and try again." >&5
+$as_echo "$as_me: error: Please fix the library issues listed above and try again." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
- EX_CHECK_STATE=NO
- ex_check_save_LIBS=${LIBS}
- ex_check_save_CPPFLAGS=${CPPFLAGS}
- ex_check_save_LDFLAGS=${LDFLAGS}
- if test "x""" != "x"; then
-   CPPFLAGS="$CPPFLAGS -I"""
- fi
-  { $as_echo "$as_me:$LINENO: checking for cairo_pdf_surface_create in -lcairo" >&5
-$as_echo_n "checking for cairo_pdf_surface_create in -lcairo... " >&6; }
-if test "${ac_cv_lib_cairo_cairo_pdf_surface_create+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcairo  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+ALL_LIBS="$LIBS"
+LIBS=
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cairo_pdf_surface_create ();
-int
-main ()
-{
-return cairo_pdf_surface_create ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+
+
+
+
+case $TERM in
+       #   for the most important terminal types we directly know the sequences
+       xterm|xterm*|vt220|vt220*)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+       ;;
+       vt100|vt100*|cygwin)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+       ;;
+       *)
+               T_MD=''
+               T_ME=''
+       ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_cairo_cairo_pdf_surface_create=yes
+  { $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+  { $as_echo "$as_me:$LINENO: result: ${T_MD}Prep for Building Language Bindings${T_ME}" >&5
+$as_echo "${T_MD}Prep for Building Language Bindings${T_ME}" >&6; }
+
+
+PATH=$PATH:/usr/perl5/bin
+export PATH
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PERL+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case $PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-       ac_cv_lib_cairo_cairo_pdf_surface_create=no
+  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
+  ;;
+esac
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+  { $as_echo "$as_me:$LINENO: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_pdf_surface_create" >&5
-$as_echo "$ac_cv_lib_cairo_cairo_pdf_surface_create" >&6; }
-if test "x$ac_cv_lib_cairo_cairo_pdf_surface_create" = x""yes; then
 
-    if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for cairo-pdf.h" >&5
-$as_echo_n "checking for cairo-pdf.h... " >&6; }
-if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
+
+# Extract the first word of "pod2man", so it can be a program name with args.
+set dummy pod2man; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_POD2MAN+set}" = set; then
   $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_pdf_h" >&5
-$as_echo "$ac_cv_header_cairo_pdf_h" >&6; }
 else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking cairo-pdf.h usability" >&5
-$as_echo_n "checking cairo-pdf.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <cairo-pdf.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  case $POD2MAN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN="no"
+  ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+fi
+POD2MAN=$ac_cv_path_POD2MAN
+if test -n "$POD2MAN"; then
+  { $as_echo "$as_me:$LINENO: result: $POD2MAN" >&5
+$as_echo "$POD2MAN" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking cairo-pdf.h presence" >&5
-$as_echo_n "checking cairo-pdf.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <cairo-pdf.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+# Extract the first word of "pod2html", so it can be a program name with args.
+set dummy pod2html; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_POD2HTML+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case $POD2HTML in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_POD2HTML="$POD2HTML" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_POD2HTML="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-  ac_header_preproc=no
+  test -z "$ac_cv_path_POD2HTML" && ac_cv_path_POD2HTML="no"
+  ;;
+esac
+fi
+POD2HTML=$ac_cv_path_POD2HTML
+if test -n "$POD2HTML"; then
+  { $as_echo "$as_me:$LINENO: result: $POD2HTML" >&5
+$as_echo "$POD2HTML" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: in the future, the compiler will take precedence" >&2;}
 
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for cairo-pdf.h" >&5
-$as_echo_n "checking for cairo-pdf.h... " >&6; }
-if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+
+# Check whether --enable-perl was given.
+if test "${enable_perl+set}" = set; then
+  enableval=$enable_perl;
 else
-  ac_cv_header_cairo_pdf_h=$ac_header_preproc
+  enable_perl=yes
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_pdf_h" >&5
-$as_echo "$ac_cv_header_cairo_pdf_h" >&6; }
 
-fi
-if test "x$ac_cv_header_cairo_pdf_h" = x""yes; then
-  LIBS="-lcairo ${LIBS}";EX_CHECK_STATE=YES
-fi
 
 
-fi
 
- if test $EX_CHECK_STATE = NO; then
-        for ac_prog in pkg-config
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+
+
+
+
+if test "x$PERL" = "xno" -o  x$enable_perl = xno; then
+       COMP_PERL=
+else
+       COMP_PERL="perl_piped perl_shared"
+        { $as_echo "$as_me:$LINENO: checking for the perl version you are running" >&5
+$as_echo_n "checking for the perl version you are running... " >&6; }
+       PERL_VERSION=`$PERL -MConfig -e 'print $Config{version}'`
+       { $as_echo "$as_me:$LINENO: result: $PERL_VERSION" >&5
+$as_echo "$PERL_VERSION" >&6; }
+        if test -z "$PERLCC"; then
+            { $as_echo "$as_me:$LINENO: checking for the C compiler perl wants to use to build its modules" >&5
+$as_echo_n "checking for the C compiler perl wants to use to build its modules... " >&6; }
+           perlcc=`$PERL -MConfig -e 'print $Config{cc}'`
+           { $as_echo "$as_me:$LINENO: result: $perlcc" >&5
+$as_echo "$perlcc" >&6; }
+           if test ! -x "$perlcc"; then
+               # Extract the first word of "${perlcc}", so it can be a program name with args.
+set dummy ${perlcc}; ac_word=$2
 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
+if test "${ac_cv_path_PERL_CC+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$PKGCONFIG"; then
-  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $PERL_CC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PERL_CC="$PERL_CC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_PKGCONFIG="$ac_prog"
+    ac_cv_path_PERL_CC="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 IFS=$as_save_IFS
 
+  test -z "$ac_cv_path_PERL_CC" && ac_cv_path_PERL_CC="no"
+  ;;
+esac
 fi
-fi
-PKGCONFIG=$ac_cv_prog_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
+PERL_CC=$ac_cv_path_PERL_CC
+if test -n "$PERL_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $PERL_CC" >&5
+$as_echo "$PERL_CC" >&6; }
 else
   { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$PKGCONFIG" && break
-done
-test -n "$PKGCONFIG" || PKGCONFIG="no"
-
-    if test "$PKGCONFIG" != "no"; then
-          if $PKGCONFIG --exists cairo-pdf; then
-             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags cairo-pdf`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L cairo-pdf`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other cairo-pdf`
-             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l cairo-pdf`
-                            unset ac_cv_lib_`echo cairo | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_cairo_pdf_surface_create
-             { $as_echo "$as_me:$LINENO: checking for cairo_pdf_surface_create in -lcairo" >&5
-$as_echo_n "checking for cairo_pdf_surface_create in -lcairo... " >&6; }
-if test "${ac_cv_lib_cairo_cairo_pdf_surface_create+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcairo  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cairo_pdf_surface_create ();
-int
-main ()
-{
-return cairo_pdf_surface_create ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_cairo_cairo_pdf_surface_create=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_cairo_cairo_pdf_surface_create=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_pdf_surface_create" >&5
-$as_echo "$ac_cv_lib_cairo_cairo_pdf_surface_create" >&6; }
-if test "x$ac_cv_lib_cairo_cairo_pdf_surface_create" = x""yes; then
-
-                unset ac_cv_header_`echo cairo-pdf.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
-                if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for cairo-pdf.h" >&5
-$as_echo_n "checking for cairo-pdf.h... " >&6; }
-if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_pdf_h" >&5
-$as_echo "$ac_cv_header_cairo_pdf_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking cairo-pdf.h usability" >&5
-$as_echo_n "checking cairo-pdf.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <cairo-pdf.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+               if test "$PERL_CC" = "no"; then
+                    { $as_echo "$as_me:$LINENO: WARNING:
+I would not find the Compiler ($perlcc) that was originally used to compile
+your perl binary. You should either make sure that this compiler is
+available on your system, pick an other compiler and set PERLCC
+appropriately, or use a different perl setup that was compiled locally.
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking cairo-pdf.h presence" >&5
-$as_echo_n "checking cairo-pdf.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <cairo-pdf.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+I will disable the compilation of the RRDs perl module for now.
+" >&5
+$as_echo "$as_me: WARNING:
+I would not find the Compiler ($perlcc) that was originally used to compile
+your perl binary. You should either make sure that this compiler is
+available on your system, pick an other compiler and set PERLCC
+appropriately, or use a different perl setup that was compiled locally.
 
-  ac_header_preproc=no
+I will disable the compilation of the RRDs perl module for now.
+" >&2;}
+                   COMP_PERL="perl_piped"
+               fi
+            fi
+        fi
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-pdf.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: cairo-pdf.h: in the future, the compiler will take precedence" >&2;}
+{ $as_echo "$as_me:$LINENO: checking Perl Modules to build" >&5
+$as_echo_n "checking Perl Modules to build... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: ${COMP_PERL:-No Perl Modules will be built}" >&5
+$as_echo "${COMP_PERL:-No Perl Modules will be built}" >&6; }
 
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for cairo-pdf.h" >&5
-$as_echo_n "checking for cairo-pdf.h... " >&6; }
-if test "${ac_cv_header_cairo_pdf_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_header_cairo_pdf_h=$ac_header_preproc
+# Options to pass when configuring perl module
+langpref=$prefix
+test "$langpref" = '$(DESTDIR)NONE' && langpref='$(DESTDIR)'$ac_default_prefix
+test "$langpref" = "NONE" && langpref=$ac_default_prefix
+
+PERL_MAKE_OPTIONS="PREFIX=$langpref LIB=$langpref/lib/perl/$PERL_VERSION"
+
+# Check whether --enable-perl-site-install was given.
+if test "${enable_perl_site_install+set}" = set; then
+  enableval=$enable_perl_site_install; PERL_MAKE_OPTIONS=
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_pdf_h" >&5
-$as_echo "$ac_cv_header_cairo_pdf_h" >&6; }
 
+
+if test ! -z "$PERLCC"; then
+   PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS CC=$PERLCC"
+
+   if test ! -z "$PERLCCFLAGS"; then
+       PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS CCFLAGS=$PERLCCFLAGS"
+   fi
+
+   if test -z "$PERLLD"; then
+       PERLLD=$PERLCC
+   fi
+   PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS LD=$PERLLD"
+
+   if test ! -z "$PERLLDFLAGS"; then
+       PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS LDFLAGS=$PERLLDFLAGS"
+   fi
 fi
-if test "x$ac_cv_header_cairo_pdf_h" = x""yes; then
-  EX_CHECK_STATE=YES
+
+
+# Check whether --with-perl-options was given.
+if test "${with_perl_options+set}" = set; then
+  withval=$with_perl_options; PERL_MAKE_OPTIONS=$withval
 fi
 
 
 
-fi
 
-          else
-             { $as_echo "$as_me:$LINENO: WARNING:
-----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no cairo-pdf.pc file around.
-  You may want to set the PKG_CONFIG_PATH variable to point to its
-  location.
-----------------------------------------------------------------------------
-                       " >&5
-$as_echo "$as_me: WARNING:
-----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no cairo-pdf.pc file around.
-  You may want to set the PKG_CONFIG_PATH variable to point to its
-  location.
-----------------------------------------------------------------------------
-                       " >&2;}
-           fi
-     fi
+
+
+
+# Extract the first word of "ruby", so it can be a program name with args.
+set dummy ruby; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_RUBY+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $RUBY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_RUBY="$RUBY" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_RUBY="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+done
+IFS=$as_save_IFS
 
-  if test ${EX_CHECK_STATE} = NO; then
-     { $as_echo "$as_me:$LINENO: WARNING:
-----------------------------------------------------------------------------
-* I could not find a working copy of cairo-pdf. Check config.log for hints on why
-  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libcairo and its header files. If
-  you have not installed cairo-pdf, you can get it either from its original home on
+  test -z "$ac_cv_path_RUBY" && ac_cv_path_RUBY="no"
+  ;;
+esac
+fi
+RUBY=$ac_cv_path_RUBY
+if test -n "$RUBY"; then
+  { $as_echo "$as_me:$LINENO: result: $RUBY" >&5
+$as_echo "$RUBY" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-     http://cairographics.org/releases/
 
-  You can find also find an archive copy on
 
-     http://oss.oetiker.ch/rrdtool/pub/libs
+# Check whether --enable-ruby was given.
+if test "${enable_ruby+set}" = set; then
+  enableval=$enable_ruby;
+else
+  enable_ruby=yes
+fi
 
-  The last tested version of cairo-pdf is 1.4.6.
 
-       LIBS=$LIBS
-   LDFLAGS=$LDFLAGS
-  CPPFLAGS=$CPPFLAGS
+{ $as_echo "$as_me:$LINENO: checking if ruby modules can be built" >&5
+$as_echo_n "checking if ruby modules can be built... " >&6; }
 
-----------------------------------------------------------------------------
-                " >&5
-$as_echo "$as_me: WARNING:
-----------------------------------------------------------------------------
-* I could not find a working copy of cairo-pdf. Check config.log for hints on why
-  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libcairo and its header files. If
-  you have not installed cairo-pdf, you can get it either from its original home on
+if test "x$RUBY" = "xno" -o  x$enable_ruby = xno; then
+       COMP_RUBY=
+       { $as_echo "$as_me:$LINENO: result: No .. Ruby not found or disabled" >&5
+$as_echo "No .. Ruby not found or disabled" >&6; }
+else
+       if $RUBY -e 'require "mkmf"' >/dev/null 2>&1; then
+               COMP_RUBY="ruby"
+               { $as_echo "$as_me:$LINENO: result: YES" >&5
+$as_echo "YES" >&6; }
+       else
+               COMP_RUBY=
+               { $as_echo "$as_me:$LINENO: result: Ruby found but mkmf is missing! Install the -dev package" >&5
+$as_echo "Ruby found but mkmf is missing! Install the -dev package" >&6; }
+       fi
+fi
 
-     http://cairographics.org/releases/
+# Check whether --enable-ruby-site-install was given.
+if test "${enable_ruby_site_install+set}" = set; then
+  enableval=$enable_ruby_site_install; RUBY_MAKE_OPTIONS=
+else
+  RUBY_MAKE_OPTIONS="sitedir=$langpref/lib/ruby"
+fi
 
-  You can find also find an archive copy on
 
-     http://oss.oetiker.ch/rrdtool/pub/libs
 
-  The last tested version of cairo-pdf is 1.4.6.
 
-       LIBS=$LIBS
-   LDFLAGS=$LDFLAGS
-  CPPFLAGS=$CPPFLAGS
+# Check whether --with-ruby-options was given.
+if test "${with_ruby_options+set}" = set; then
+  withval=$with_ruby_options; RUBY_MAKE_OPTIONS=$withval
+fi
 
-----------------------------------------------------------------------------
-                " >&2;}
-       EX_CHECK_ALL_ERR=YES
-       LIBS="${ex_check_save_LIBS}"
-       CPPFLAGS="${ex_check_save_CPPFLAGS}"
-       LDFLAGS="${ex_check_save_LDFLAGS}"
-    fi
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
 
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
- EX_CHECK_STATE=NO
- ex_check_save_LIBS=${LIBS}
- ex_check_save_CPPFLAGS=${CPPFLAGS}
- ex_check_save_LDFLAGS=${LDFLAGS}
- if test "x""" != "x"; then
-   CPPFLAGS="$CPPFLAGS -I"""
- fi
-  { $as_echo "$as_me:$LINENO: checking for cairo_ps_surface_create in -lcairo" >&5
-$as_echo_n "checking for cairo_ps_surface_create in -lcairo... " >&6; }
-if test "${ac_cv_lib_cairo_cairo_ps_surface_create+set}" = set; then
+# Extract the first word of "lua", so it can be a program name with args.
+set dummy lua; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_LUA+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcairo  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  case $LUA in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LUA="$LUA" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_LUA="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cairo_ps_surface_create ();
-int
-main ()
-{
-return cairo_ps_surface_create ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  test -z "$ac_cv_path_LUA" && ac_cv_path_LUA="no"
+  ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_cairo_cairo_ps_surface_create=yes
+fi
+LUA=$ac_cv_path_LUA
+if test -n "$LUA"; then
+  { $as_echo "$as_me:$LINENO: result: $LUA" >&5
+$as_echo "$LUA" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_cairo_cairo_ps_surface_create=no
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+
+# Check whether --enable-lua was given.
+if test "${enable_lua+set}" = set; then
+  enableval=$enable_lua;
+else
+  enable_lua=yes
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_ps_surface_create" >&5
-$as_echo "$ac_cv_lib_cairo_cairo_ps_surface_create" >&6; }
-if test "x$ac_cv_lib_cairo_cairo_ps_surface_create" = x""yes; then
 
-    if test "${ac_cv_header_cairo_ps_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for cairo-ps.h" >&5
-$as_echo_n "checking for cairo-ps.h... " >&6; }
-if test "${ac_cv_header_cairo_ps_h+set}" = set; then
+
+COMP_LUA=
+if test "$LUA" = "no" -o "$enable_lua" = "no"; then
+  enable_lua=no
+else
+  { $as_echo "$as_me:$LINENO: checking for lua >= 5.0" >&5
+$as_echo_n "checking for lua >= 5.0... " >&6; }
+  read LUA_MAJOR LUA_MINOR LUA_POINT <<LUA_EOF
+    $($LUA -v 2>&1 | cut -f2 -d' ' | sed -e 's/\./ /g')
+LUA_EOF
+  if test 0$LUA_MAJOR -lt 5; then
+    { $as_echo "$as_me:$LINENO: result: no, version found is $LUA_MAJOR.$LUA_MINOR" >&5
+$as_echo "no, version found is $LUA_MAJOR.$LUA_MINOR" >&6; }
+  else
+    { $as_echo "$as_me:$LINENO: result: $LUA_MAJOR.$LUA_MINOR found" >&5
+$as_echo "$LUA_MAJOR.$LUA_MINOR found" >&6; }
+    lua_vdot=$LUA_MAJOR.$LUA_MINOR
+    lua_vndot=$LUA_MAJOR$LUA_MINOR
+    lua_version=$LUA_MAJOR.$LUA_MINOR.$LUA_POINT
+
+for ac_header in lua$lua_vndot/lua.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_ps_h" >&5
-$as_echo "$ac_cv_header_cairo_ps_h" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking cairo-ps.h usability" >&5
-$as_echo_n "checking cairo-ps.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -22829,7 +30673,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <cairo-ps.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -22862,15 +30706,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking cairo-ps.h presence" >&5
-$as_echo_n "checking cairo-ps.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <cairo-ps.h>
+#include <$ac_header>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -22904,177 +30748,203 @@ $as_echo "$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: in the future, the compiler will take precedence" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for cairo-ps.h" >&5
-$as_echo_n "checking for cairo-ps.h... " >&6; }
-if test "${ac_cv_header_cairo_ps_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_cairo_ps_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_ps_h" >&5
-$as_echo "$ac_cv_header_cairo_ps_h" >&6; }
-
-fi
-if test "x$ac_cv_header_cairo_ps_h" = x""yes; then
-  LIBS="-lcairo ${LIBS}";EX_CHECK_STATE=YES
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
- if test $EX_CHECK_STATE = NO; then
-        for ac_prog in pkg-config
+for ac_header in lua$lua_vndot/lualib.h
 do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  if test -n "$PKGCONFIG"; then
-  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_PKGCONFIG="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-fi
-PKGCONFIG=$ac_cv_prog_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+       ac_header_compiler=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-  test -n "$PKGCONFIG" && break
-done
-test -n "$PKGCONFIG" || PKGCONFIG="no"
-
-    if test "$PKGCONFIG" != "no"; then
-          if $PKGCONFIG --exists cairo-ps; then
-             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags cairo-ps`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L cairo-ps`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other cairo-ps`
-             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l cairo-ps`
-                            unset ac_cv_lib_`echo cairo | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_cairo_ps_surface_create
-             { $as_echo "$as_me:$LINENO: checking for cairo_ps_surface_create in -lcairo" >&5
-$as_echo_n "checking for cairo_ps_surface_create in -lcairo... " >&6; }
-if test "${ac_cv_lib_cairo_cairo_ps_surface_create+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcairo  $LIBS"
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cairo_ps_surface_create ();
-int
-main ()
-{
-return cairo_ps_surface_create ();
-  ;
-  return 0;
-}
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_cairo_cairo_ps_surface_create=yes
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_cairo_cairo_ps_surface_create=no
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cairo_cairo_ps_surface_create" >&5
-$as_echo "$ac_cv_lib_cairo_cairo_ps_surface_create" >&6; }
-if test "x$ac_cv_lib_cairo_cairo_ps_surface_create" = x""yes; then
-
-                unset ac_cv_header_`echo cairo-ps.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
-                if test "${ac_cv_header_cairo_ps_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for cairo-ps.h" >&5
-$as_echo_n "checking for cairo-ps.h... " >&6; }
-if test "${ac_cv_header_cairo_ps_h+set}" = set; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ as_ac_Header=`$as_echo "ac_cv_header_lua$lua_vndot/lauxlib.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for lua$lua_vndot/lauxlib.h" >&5
+$as_echo_n "checking for lua$lua_vndot/lauxlib.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_ps_h" >&5
-$as_echo "$ac_cv_header_cairo_ps_h" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking cairo-ps.h usability" >&5
-$as_echo_n "checking cairo-ps.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking lua$lua_vndot/lauxlib.h usability" >&5
+$as_echo_n "checking lua$lua_vndot/lauxlib.h usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -23082,7 +30952,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <cairo-ps.h>
+#include <lua$lua_vndot/lauxlib.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -23115,15 +30985,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking cairo-ps.h presence" >&5
-$as_echo_n "checking cairo-ps.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking lua$lua_vndot/lauxlib.h presence" >&5
+$as_echo_n "checking lua$lua_vndot/lauxlib.h presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <cairo-ps.h>
+#include <lua$lua_vndot/lauxlib.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -23157,215 +31027,71 @@ $as_echo "$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vndot/lauxlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: lua$lua_vndot/lauxlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vndot/lauxlib.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: lua$lua_vndot/lauxlib.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cairo-ps.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: cairo-ps.h: in the future, the compiler will take precedence" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vndot/lauxlib.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: lua$lua_vndot/lauxlib.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vndot/lauxlib.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: lua$lua_vndot/lauxlib.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vndot/lauxlib.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: lua$lua_vndot/lauxlib.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vndot/lauxlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: lua$lua_vndot/lauxlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vndot/lauxlib.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: lua$lua_vndot/lauxlib.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vndot/lauxlib.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: lua$lua_vndot/lauxlib.h: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for cairo-ps.h" >&5
-$as_echo_n "checking for cairo-ps.h... " >&6; }
-if test "${ac_cv_header_cairo_ps_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for lua$lua_vndot/lauxlib.h" >&5
+$as_echo_n "checking for lua$lua_vndot/lauxlib.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_cairo_ps_h=$ac_header_preproc
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cairo_ps_h" >&5
-$as_echo "$ac_cv_header_cairo_ps_h" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
-if test "x$ac_cv_header_cairo_ps_h" = x""yes; then
-  EX_CHECK_STATE=YES
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  lua_headerdir=lua$lua_vndot
 fi
 
 
-
 fi
 
-          else
-             { $as_echo "$as_me:$LINENO: WARNING:
-----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no cairo-ps.pc file around.
-  You may want to set the PKG_CONFIG_PATH variable to point to its
-  location.
-----------------------------------------------------------------------------
-                       " >&5
-$as_echo "$as_me: WARNING:
-----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no cairo-ps.pc file around.
-  You may want to set the PKG_CONFIG_PATH variable to point to its
-  location.
-----------------------------------------------------------------------------
-                       " >&2;}
-           fi
-     fi
-  fi
-
-  if test ${EX_CHECK_STATE} = NO; then
-     { $as_echo "$as_me:$LINENO: WARNING:
-----------------------------------------------------------------------------
-* I could not find a working copy of cairo-ps. Check config.log for hints on why
-  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libcairo and its header files. If
-  you have not installed cairo-ps, you can get it either from its original home on
-
-     http://cairographics.org/releases/
-
-  You can find also find an archive copy on
-
-     http://oss.oetiker.ch/rrdtool/pub/libs
-
-  The last tested version of cairo-ps is 1.4.6.
-
-       LIBS=$LIBS
-   LDFLAGS=$LDFLAGS
-  CPPFLAGS=$CPPFLAGS
-
-----------------------------------------------------------------------------
-                " >&5
-$as_echo "$as_me: WARNING:
-----------------------------------------------------------------------------
-* I could not find a working copy of cairo-ps. Check config.log for hints on why
-  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libcairo and its header files. If
-  you have not installed cairo-ps, you can get it either from its original home on
-
-     http://cairographics.org/releases/
-
-  You can find also find an archive copy on
-
-     http://oss.oetiker.ch/rrdtool/pub/libs
-
-  The last tested version of cairo-ps is 1.4.6.
-
-       LIBS=$LIBS
-   LDFLAGS=$LDFLAGS
-  CPPFLAGS=$CPPFLAGS
-
-----------------------------------------------------------------------------
-                " >&2;}
-       EX_CHECK_ALL_ERR=YES
-       LIBS="${ex_check_save_LIBS}"
-       CPPFLAGS="${ex_check_save_CPPFLAGS}"
-       LDFLAGS="${ex_check_save_LDFLAGS}"
-    fi
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- EX_CHECK_STATE=NO
- ex_check_save_LIBS=${LIBS}
- ex_check_save_CPPFLAGS=${CPPFLAGS}
- ex_check_save_LDFLAGS=${LDFLAGS}
- if test "x""" != "x"; then
-   CPPFLAGS="$CPPFLAGS -I"""
- fi
-  { $as_echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpango-1.0" >&5
-$as_echo_n "checking for pango_cairo_context_set_font_options in -lpango-1.0... " >&6; }
-if test "${ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpango-1.0  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+done
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pango_cairo_context_set_font_options ();
-int
-main ()
-{
-return pango_cairo_context_set_font_options ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&5
-$as_echo "$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&6; }
-if test "x$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" = x""yes; then
-
-    if test "${ac_cv_header_pango_pango_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5
-$as_echo_n "checking for pango/pango.h... " >&6; }
-if test "${ac_cv_header_pango_pango_h+set}" = set; then
+for ac_header in lua$lua_vdot/lua.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5
-$as_echo "$ac_cv_header_pango_pango_h" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking pango/pango.h usability" >&5
-$as_echo_n "checking pango/pango.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -23373,7 +31099,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <pango/pango.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -23406,15 +31132,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking pango/pango.h presence" >&5
-$as_echo_n "checking pango/pango.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <pango/pango.h>
+#include <$ac_header>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -23448,177 +31174,203 @@ $as_echo "$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: pango/pango.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: pango/pango.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5
-$as_echo_n "checking for pango/pango.h... " >&6; }
-if test "${ac_cv_header_pango_pango_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_pango_pango_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5
-$as_echo "$ac_cv_header_pango_pango_h" >&6; }
-
-fi
-if test "x$ac_cv_header_pango_pango_h" = x""yes; then
-  LIBS="-lpango-1.0 ${LIBS}";EX_CHECK_STATE=YES
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
- if test $EX_CHECK_STATE = NO; then
-        for ac_prog in pkg-config
+for ac_header in lua$lua_vdot/lualib.h
 do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  if test -n "$PKGCONFIG"; then
-  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_PKGCONFIG="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-fi
-PKGCONFIG=$ac_cv_prog_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+       ac_header_compiler=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-  test -n "$PKGCONFIG" && break
-done
-test -n "$PKGCONFIG" || PKGCONFIG="no"
-
-    if test "$PKGCONFIG" != "no"; then
-          if $PKGCONFIG --exists pangocairo; then
-             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags pangocairo`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L pangocairo`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other pangocairo`
-             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l pangocairo`
-                            unset ac_cv_lib_`echo pango-1.0 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_pango_cairo_context_set_font_options
-             { $as_echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpango-1.0" >&5
-$as_echo_n "checking for pango_cairo_context_set_font_options in -lpango-1.0... " >&6; }
-if test "${ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpango-1.0  $LIBS"
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pango_cairo_context_set_font_options ();
-int
-main ()
-{
-return pango_cairo_context_set_font_options ();
-  ;
-  return 0;
-}
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=yes
+  ac_header_preproc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=no
+  ac_header_preproc=no
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&5
-$as_echo "$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&6; }
-if test "x$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" = x""yes; then
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
-                unset ac_cv_header_`echo pango/pango.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
-                if test "${ac_cv_header_pango_pango_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5
-$as_echo_n "checking for pango/pango.h... " >&6; }
-if test "${ac_cv_header_pango_pango_h+set}" = set; then
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ as_ac_Header=`$as_echo "ac_cv_header_lua$lua_vdot/lauxlib.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for lua$lua_vdot/lauxlib.h" >&5
+$as_echo_n "checking for lua$lua_vdot/lauxlib.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5
-$as_echo "$ac_cv_header_pango_pango_h" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking pango/pango.h usability" >&5
-$as_echo_n "checking pango/pango.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking lua$lua_vdot/lauxlib.h usability" >&5
+$as_echo_n "checking lua$lua_vdot/lauxlib.h usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -23626,7 +31378,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <pango/pango.h>
+#include <lua$lua_vdot/lauxlib.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -23659,15 +31411,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking pango/pango.h presence" >&5
-$as_echo_n "checking pango/pango.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking lua$lua_vdot/lauxlib.h presence" >&5
+$as_echo_n "checking lua$lua_vdot/lauxlib.h presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <pango/pango.h>
+#include <lua$lua_vdot/lauxlib.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -23701,174 +31453,89 @@ $as_echo "$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vdot/lauxlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: lua$lua_vdot/lauxlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vdot/lauxlib.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: lua$lua_vdot/lauxlib.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: pango/pango.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: pango/pango.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vdot/lauxlib.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: lua$lua_vdot/lauxlib.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vdot/lauxlib.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: lua$lua_vdot/lauxlib.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vdot/lauxlib.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: lua$lua_vdot/lauxlib.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vdot/lauxlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: lua$lua_vdot/lauxlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vdot/lauxlib.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: lua$lua_vdot/lauxlib.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lua$lua_vdot/lauxlib.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: lua$lua_vdot/lauxlib.h: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5
-$as_echo_n "checking for pango/pango.h... " >&6; }
-if test "${ac_cv_header_pango_pango_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for lua$lua_vdot/lauxlib.h" >&5
+$as_echo_n "checking for lua$lua_vdot/lauxlib.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_pango_pango_h=$ac_header_preproc
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5
-$as_echo "$ac_cv_header_pango_pango_h" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
-if test "x$ac_cv_header_pango_pango_h" = x""yes; then
-  EX_CHECK_STATE=YES
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  lua_headerdir=lua$lua_vdot
 fi
 
 
-
 fi
 
-          else
-             { $as_echo "$as_me:$LINENO: WARNING:
-----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no pangocairo.pc file around.
-  You may want to set the PKG_CONFIG_PATH variable to point to its
-  location.
-----------------------------------------------------------------------------
-                       " >&5
-$as_echo "$as_me: WARNING:
-----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no pangocairo.pc file around.
-  You may want to set the PKG_CONFIG_PATH variable to point to its
-  location.
-----------------------------------------------------------------------------
-                       " >&2;}
-           fi
-     fi
-  fi
-
-  if test ${EX_CHECK_STATE} = NO; then
-     { $as_echo "$as_me:$LINENO: WARNING:
-----------------------------------------------------------------------------
-* I could not find a working copy of pangocairo. Check config.log for hints on why
-  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libpango-1.0 and its header files. If
-  you have not installed pangocairo, you can get it either from its original home on
-
-     http://ftp.gnome.org/pub/GNOME/sources/pango/1.17
-
-  You can find also find an archive copy on
-
-     http://oss.oetiker.ch/rrdtool/pub/libs
-
-  The last tested version of pangocairo is 1.17.
-
-       LIBS=$LIBS
-   LDFLAGS=$LDFLAGS
-  CPPFLAGS=$CPPFLAGS
-
-----------------------------------------------------------------------------
-                " >&5
-$as_echo "$as_me: WARNING:
-----------------------------------------------------------------------------
-* I could not find a working copy of pangocairo. Check config.log for hints on why
-  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libpango-1.0 and its header files. If
-  you have not installed pangocairo, you can get it either from its original home on
-
-     http://ftp.gnome.org/pub/GNOME/sources/pango/1.17
-
-  You can find also find an archive copy on
-
-     http://oss.oetiker.ch/rrdtool/pub/libs
-
-  The last tested version of pangocairo is 1.17.
-
-       LIBS=$LIBS
-   LDFLAGS=$LDFLAGS
-  CPPFLAGS=$CPPFLAGS
-
-----------------------------------------------------------------------------
-                " >&2;}
-       EX_CHECK_ALL_ERR=YES
-       LIBS="${ex_check_save_LIBS}"
-       CPPFLAGS="${ex_check_save_CPPFLAGS}"
-       LDFLAGS="${ex_check_save_LDFLAGS}"
-    fi
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
+done
 
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+else
 
- EX_CHECK_STATE=NO
- ex_check_save_LIBS=${LIBS}
- ex_check_save_CPPFLAGS=${CPPFLAGS}
- ex_check_save_LDFLAGS=${LDFLAGS}
- if test "x/usr/include/libxml2" != "x"; then
-   CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
- fi
-  { $as_echo "$as_me:$LINENO: checking for xmlParseFile in -lxml2" >&5
-$as_echo_n "checking for xmlParseFile in -lxml2... " >&6; }
-if test "${ac_cv_lib_xml2_xmlParseFile+set}" = set; then
+for ac_header in lua.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxml2  $LIBS"
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char xmlParseFile ();
-int
-main ()
-{
-return xmlParseFile ();
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -23877,39 +31544,121 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
        }; then
-  ac_cv_lib_xml2_xmlParseFile=yes
+  ac_header_preproc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_xml2_xmlParseFile=no
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlParseFile" >&5
-$as_echo "$ac_cv_lib_xml2_xmlParseFile" >&6; }
-if test "x$ac_cv_lib_xml2_xmlParseFile" = x""yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-    if test "${ac_cv_header_libxml_parser_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
-$as_echo_n "checking for libxml/parser.h... " >&6; }
-if test "${ac_cv_header_libxml_parser_h+set}" = set; then
+for ac_header in lualib.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
-$as_echo "$ac_cv_header_libxml_parser_h" >&6; }
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
-$as_echo_n "checking libxml/parser.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -23917,7 +31666,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <libxml/parser.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -23950,15 +31699,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
-$as_echo_n "checking libxml/parser.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <libxml/parser.h>
+#include <$ac_header>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -23992,177 +31741,59 @@ $as_echo "$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
-$as_echo_n "checking for libxml/parser.h... " >&6; }
-if test "${ac_cv_header_libxml_parser_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_libxml_parser_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
-$as_echo "$ac_cv_header_libxml_parser_h" >&6; }
-
-fi
-if test "x$ac_cv_header_libxml_parser_h" = x""yes; then
-  LIBS="-lxml2 ${LIBS}";EX_CHECK_STATE=YES
-fi
-
-
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
- if test $EX_CHECK_STATE = NO; then
-        for ac_prog in pkg-config
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PKGCONFIG+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$PKGCONFIG"; then
-  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_PKGCONFIG="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-PKGCONFIG=$ac_cv_prog_PKGCONFIG
-if test -n "$PKGCONFIG"; then
-  { $as_echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
-$as_echo "$PKGCONFIG" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
 fi
-
-
-  test -n "$PKGCONFIG" && break
-done
-test -n "$PKGCONFIG" || PKGCONFIG="no"
-
-    if test "$PKGCONFIG" != "no"; then
-          if $PKGCONFIG --exists libxml-2.0; then
-             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags libxml-2.0`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L libxml-2.0`
-             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other libxml-2.0`
-             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l libxml-2.0`
-                            unset ac_cv_lib_`echo xml2 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_xmlParseFile
-             { $as_echo "$as_me:$LINENO: checking for xmlParseFile in -lxml2" >&5
-$as_echo_n "checking for xmlParseFile in -lxml2... " >&6; }
-if test "${ac_cv_lib_xml2_xmlParseFile+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxml2  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char xmlParseFile ();
-int
-main ()
-{
-return xmlParseFile ();
-  ;
-  return 0;
-}
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_xml2_xmlParseFile=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_xml2_xmlParseFile=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlParseFile" >&5
-$as_echo "$ac_cv_lib_xml2_xmlParseFile" >&6; }
-if test "x$ac_cv_lib_xml2_xmlParseFile" = x""yes; then
-
-                unset ac_cv_header_`echo libxml/parser.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`
-                if test "${ac_cv_header_libxml_parser_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
-$as_echo_n "checking for libxml/parser.h... " >&6; }
-if test "${ac_cv_header_libxml_parser_h+set}" = set; then
+ if test "${ac_cv_header_lauxlib_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for lauxlib.h" >&5
+$as_echo_n "checking for lauxlib.h... " >&6; }
+if test "${ac_cv_header_lauxlib_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
-$as_echo "$ac_cv_header_libxml_parser_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lauxlib_h" >&5
+$as_echo "$ac_cv_header_lauxlib_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
-$as_echo_n "checking libxml/parser.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking lauxlib.h usability" >&5
+$as_echo_n "checking lauxlib.h usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -24170,7 +31801,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <libxml/parser.h>
+#include <lauxlib.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -24203,15 +31834,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 $as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
-$as_echo_n "checking libxml/parser.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking lauxlib.h presence" >&5
+$as_echo_n "checking lauxlib.h presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <libxml/parser.h>
+#include <lauxlib.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -24245,417 +31876,486 @@ $as_echo "$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lauxlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: lauxlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lauxlib.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: lauxlib.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lauxlib.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: lauxlib.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lauxlib.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: lauxlib.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lauxlib.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: lauxlib.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lauxlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: lauxlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lauxlib.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: lauxlib.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: lauxlib.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: lauxlib.h: in the future, the compiler will take precedence" >&2;}
 
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
-$as_echo_n "checking for libxml/parser.h... " >&6; }
-if test "${ac_cv_header_libxml_parser_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for lauxlib.h" >&5
+$as_echo_n "checking for lauxlib.h... " >&6; }
+if test "${ac_cv_header_lauxlib_h+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_libxml_parser_h=$ac_header_preproc
+  ac_cv_header_lauxlib_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
-$as_echo "$ac_cv_header_libxml_parser_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lauxlib_h" >&5
+$as_echo "$ac_cv_header_lauxlib_h" >&6; }
 
 fi
-if test "x$ac_cv_header_libxml_parser_h" = x""yes; then
-  EX_CHECK_STATE=YES
+if test "x$ac_cv_header_lauxlib_h" = x""yes; then
+  lua_headerdir=""
+else
+  lua_headerdir="no"
 fi
 
 
-
 fi
 
-          else
-             { $as_echo "$as_me:$LINENO: WARNING:
-----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no libxml-2.0.pc file around.
-  You may want to set the PKG_CONFIG_PATH variable to point to its
-  location.
-----------------------------------------------------------------------------
-                       " >&5
-$as_echo "$as_me: WARNING:
-----------------------------------------------------------------------------
-* I found a copy of pkgconfig, but there is no libxml-2.0.pc file around.
-  You may want to set the PKG_CONFIG_PATH variable to point to its
-  location.
-----------------------------------------------------------------------------
-                       " >&2;}
-           fi
-     fi
-  fi
-
-  if test ${EX_CHECK_STATE} = NO; then
-     { $as_echo "$as_me:$LINENO: WARNING:
-----------------------------------------------------------------------------
-* I could not find a working copy of libxml-2.0. Check config.log for hints on why
-  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libxml2 and its header files. If
-  you have not installed libxml-2.0, you can get it either from its original home on
-
-     http://xmlsoft.org/downloads.html
-
-  You can find also find an archive copy on
-
-     http://oss.oetiker.ch/rrdtool/pub/libs
-
-  The last tested version of libxml-2.0 is 2.6.31.
+done
 
-       LIBS=$LIBS
-   LDFLAGS=$LDFLAGS
-  CPPFLAGS=$CPPFLAGS
+fi
 
-----------------------------------------------------------------------------
-                " >&5
-$as_echo "$as_me: WARNING:
-----------------------------------------------------------------------------
-* I could not find a working copy of libxml-2.0. Check config.log for hints on why
-  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
-  so that compiler and the linker can find libxml2 and its header files. If
-  you have not installed libxml-2.0, you can get it either from its original home on
+done
 
-     http://xmlsoft.org/downloads.html
+fi
 
-  You can find also find an archive copy on
+done
 
-     http://oss.oetiker.ch/rrdtool/pub/libs
+fi
 
-  The last tested version of libxml-2.0 is 2.6.31.
+done
 
-       LIBS=$LIBS
-   LDFLAGS=$LDFLAGS
-  CPPFLAGS=$CPPFLAGS
 
-----------------------------------------------------------------------------
-                " >&2;}
-       EX_CHECK_ALL_ERR=YES
-       LIBS="${ex_check_save_LIBS}"
-       CPPFLAGS="${ex_check_save_CPPFLAGS}"
-       LDFLAGS="${ex_check_save_LDFLAGS}"
+    if test "$lua_headerdir" = "no"; then
+      enable_lua=no
+    else
+      COMP_LUA=lua
     fi
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+    if test "$COMP_LUA" != "lua"; then
+      enable_lua=no
+      { $as_echo "$as_me:$LINENO: WARNING: Lua $lua_vdot found but not lua.h, lualib.h and lauxlib.h! Please install the -dev packages for Lua $lua_vdot" >&5
+$as_echo "$as_me: WARNING: Lua $lua_vdot found but not lua.h, lualib.h and lauxlib.h! Please install the -dev packages for Lua $lua_vdot" >&2;}
+    else
+      # OK, headers found, let's check the libraries (LIBS is not used)
+      LIBS=
+      lua_havelib=no
+      LUA_HAVE_COMPAT51=DONT_HAVE_COMPAT51
+      { $as_echo "$as_me:$LINENO: checking for library containing lua_call" >&5
+$as_echo_n "checking for library containing lua_call... " >&6; }
+if test "${ac_cv_search_lua_call+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lua_call ();
+int
+main ()
+{
+return lua_call ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' lua$lua_vdot lua$lua_vndot lua; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_lua_call=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
-if test "$EX_CHECK_ALL_ERR" = "YES"; then
-  { { $as_echo "$as_me:$LINENO: error: Please fix the library issues listed above and try again." >&5
-$as_echo "$as_me: error: Please fix the library issues listed above and try again." >&2;}
-   { (exit 1); exit 1; }; }
 fi
 
-ALL_LIBS="$LIBS"
-LIBS=
-
-
-
-
-
-case $TERM in
-       #   for the most important terminal types we directly know the sequences
-       xterm|xterm*|vt220|vt220*)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
-       ;;
-       vt100|vt100*|cygwin)
-               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
-               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
-       ;;
-       *)
-               T_MD=''
-               T_ME=''
-       ;;
-esac
-  { $as_echo "$as_me:$LINENO: result: " >&5
-$as_echo "" >&6; }
-  { $as_echo "$as_me:$LINENO: result: ${T_MD}Prep for Building Language Bindings${T_ME}" >&5
-$as_echo "${T_MD}Prep for Building Language Bindings${T_ME}" >&6; }
-
-
-PATH=$PATH:/usr/perl5/bin
-export PATH
-# Extract the first word of "perl", so it can be a program name with args.
-set dummy perl; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PERL+set}" = set; then
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_lua_call+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_lua_call+set}" = set; then
+  :
+else
+  ac_cv_search_lua_call=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_lua_call" >&5
+$as_echo "$ac_cv_search_lua_call" >&6; }
+ac_res=$ac_cv_search_lua_call
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  { $as_echo "$as_me:$LINENO: checking for library containing luaL_register" >&5
+$as_echo_n "checking for library containing luaL_register... " >&6; }
+if test "${ac_cv_search_luaL_register+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case $PERL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
-  ;;
-esac
-fi
-PERL=$ac_cv_path_PERL
-if test -n "$PERL"; then
-  { $as_echo "$as_me:$LINENO: result: $PERL" >&5
-$as_echo "$PERL" >&6; }
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char luaL_register ();
+int
+main ()
+{
+return luaL_register ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' lua$lua_vdot lua$lua_vndot lua; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_luaL_register=$ac_res
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
-# Extract the first word of "pod2man", so it can be a program name with args.
-set dummy pod2man; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_POD2MAN+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $POD2MAN in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+fi
 
-  test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN="no"
-  ;;
-esac
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_luaL_register+set}" = set; then
+  break
 fi
-POD2MAN=$ac_cv_path_POD2MAN
-if test -n "$POD2MAN"; then
-  { $as_echo "$as_me:$LINENO: result: $POD2MAN" >&5
-$as_echo "$POD2MAN" >&6; }
+done
+if test "${ac_cv_search_luaL_register+set}" = set; then
+  :
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_search_luaL_register=no
 fi
-
-
-# Extract the first word of "pod2html", so it can be a program name with args.
-set dummy pod2html; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_POD2HTML+set}" = set; then
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_luaL_register" >&5
+$as_echo "$ac_cv_search_luaL_register" >&6; }
+ac_res=$ac_cv_search_luaL_register
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  lua_havelib=LUA$lua_vndot
+else
+  { $as_echo "$as_me:$LINENO: checking for library containing luaL_module" >&5
+$as_echo_n "checking for library containing luaL_module... " >&6; }
+if test "${ac_cv_search_luaL_module+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case $POD2HTML in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_POD2HTML="$POD2HTML" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_POD2HTML="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  test -z "$ac_cv_path_POD2HTML" && ac_cv_path_POD2HTML="no"
-  ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char luaL_module ();
+int
+main ()
+{
+return luaL_module ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' lualib$lua_vndot lualib$lua_vdot lualib; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-fi
-POD2HTML=$ac_cv_path_POD2HTML
-if test -n "$POD2HTML"; then
-  { $as_echo "$as_me:$LINENO: result: $POD2HTML" >&5
-$as_echo "$POD2HTML" >&6; }
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_luaL_module=$ac_res
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
+fi
 
-# Check whether --enable-perl was given.
-if test "${enable_perl+set}" = set; then
-  enableval=$enable_perl;
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_luaL_module+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_luaL_module+set}" = set; then
+  :
 else
-  enable_perl=yes
+  ac_cv_search_luaL_module=no
 fi
-
-
-
-
-
-
-
-
-if test "x$PERL" = "xno" -o  x$enable_perl = xno; then
-       COMP_PERL=
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_luaL_module" >&5
+$as_echo "$ac_cv_search_luaL_module" >&6; }
+ac_res=$ac_cv_search_luaL_module
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  lua_havelib=$lua_vndot; $LUA -l compat-5.1 2>/dev/null;
+             test "$?" = "0" && LUA_HAVE_COMPAT51=HAVE_COMPAT51
 else
-       COMP_PERL="perl_piped perl_shared"
-        { $as_echo "$as_me:$LINENO: checking for the perl version you are running" >&5
-$as_echo_n "checking for the perl version you are running... " >&6; }
-       PERL_VERSION=`$PERL -MConfig -e 'print $Config{version}'`
-       { $as_echo "$as_me:$LINENO: result: $PERL_VERSION" >&5
-$as_echo "$PERL_VERSION" >&6; }
-        if test -z "$PERLCC"; then
-            { $as_echo "$as_me:$LINENO: checking for the C compiler perl wants to use to build its modules" >&5
-$as_echo_n "checking for the C compiler perl wants to use to build its modules... " >&6; }
-           perlcc=`$PERL -MConfig -e 'print $Config{cc}'`
-           { $as_echo "$as_me:$LINENO: result: $perlcc" >&5
-$as_echo "$perlcc" >&6; }
-           if test ! -x "$perlcc"; then
-               # Extract the first word of "${perlcc}", so it can be a program name with args.
-set dummy ${perlcc}; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PERL_CC+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for library containing luaL_openlib" >&5
+$as_echo_n "checking for library containing luaL_openlib... " >&6; }
+if test "${ac_cv_search_luaL_openlib+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  case $PERL_CC in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PERL_CC="$PERL_CC" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PERL_CC="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  test -z "$ac_cv_path_PERL_CC" && ac_cv_path_PERL_CC="no"
-  ;;
-esac
-fi
-PERL_CC=$ac_cv_path_PERL_CC
-if test -n "$PERL_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $PERL_CC" >&5
-$as_echo "$PERL_CC" >&6; }
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char luaL_openlib ();
+int
+main ()
+{
+return luaL_openlib ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' lualib$lua_vdot lualib$lua_vndot lualib; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_luaL_openlib=$ac_res
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-               if test "$PERL_CC" = "no"; then
-                    { $as_echo "$as_me:$LINENO: WARNING:
-I would not find the Compiler ($perlcc) that was originally used to compile
-your perl binary. You should either make sure that this compiler is
-available on your system, pick an other compiler and set PERLCC
-appropriately, or use a different perl setup that was compiled locally.
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-I will disable the compilation of the RRDs perl module for now.
-" >&5
-$as_echo "$as_me: WARNING:
-I would not find the Compiler ($perlcc) that was originally used to compile
-your perl binary. You should either make sure that this compiler is
-available on your system, pick an other compiler and set PERLCC
-appropriately, or use a different perl setup that was compiled locally.
 
-I will disable the compilation of the RRDs perl module for now.
-" >&2;}
-                   COMP_PERL="perl_piped"
-               fi
-            fi
-        fi
 fi
 
-{ $as_echo "$as_me:$LINENO: checking Perl Modules to build" >&5
-$as_echo_n "checking Perl Modules to build... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: ${COMP_PERL:-No Perl Modules will be built}" >&5
-$as_echo "${COMP_PERL:-No Perl Modules will be built}" >&6; }
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_luaL_openlib+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_luaL_openlib+set}" = set; then
+  :
+else
+  ac_cv_search_luaL_openlib=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_luaL_openlib" >&5
+$as_echo "$ac_cv_search_luaL_openlib" >&6; }
+ac_res=$ac_cv_search_luaL_openlib
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  lua_havelib=$lua_vndot
+else
+  COMP_LUA=
+fi
 
-# Options to pass when configuring perl module
-ppref=$prefix
-test "$ppref" = 'NONE' && ppref=$ac_default_prefix
+fi
 
-PERL_MAKE_OPTIONS="PREFIX="'$(DESTDIR)'"$ppref LIB="'$(DESTDIR)'"$ppref/lib/perl/$PERL_VERSION"
+fi
 
-# Check whether --enable-perl-site-install was given.
-if test "${enable_perl_site_install+set}" = set; then
-  enableval=$enable_perl_site_install; PERL_MAKE_OPTIONS=
+else
+  COMP_LUA=
 fi
 
+      lua_libs=$LIBS
+      LIBS=
 
-if test ! -z "$PERLCC"; then
-   PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS CC=$PERLCC"
+      # Options to pass when configuring Lua module
+      if test  "$lua_havelib" != "no"; then
+        # OK, headers and libs found. Try to set lua flags
+        # and modules installation dirs with pkg-config
+        if test "$PKGCONFIG" != "no"; then
+          if test "$lua_vndot" = "50"; then
+            lua_pkg_prefix=lualib
+          else
+            lua_pkg_prefix=lua
+          fi
+          # try with dot, without dot and finally without version
+          for f in $lua_pkg_prefix$lua_vdot $lua_pkg_prefix$lua_vndot $lua_pkg_prefix; do
+            lua_exec_prefix=`$PKGCONFIG --variable=prefix $f 2>/dev/null`
+            # same binaries?
+            if test "$lua_exec_prefix/bin/lua" = "$LUA"; then
+                # OK, found CFLAGS. Get Lua LFLAGS and modules install dir
+                LUA_CFLAGS=`$PKGCONFIG --cflags $f 2>/dev/null`
+                LUA_LFLAGS=`$PKGCONFIG --libs $f 2>/dev/null`
+                LUA_INSTALL_CMOD=`$PKGCONFIG --variable=INSTALL_CMOD $f 2>/dev/null`
+                LUA_INSTALL_LMOD=`$PKGCONFIG --variable=INSTALL_LMOD $f 2>/dev/null`
+                break
+            fi
+          done
+        fi
 
-   if test ! -z "$PERLCCFLAGS"; then
-       PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS CCFLAGS=$PERLCCFLAGS"
-   fi
+        LUA_RRD_LIBDIR="$langpref/lib/lua/$lua_vdot"
+        # if lua 5.0 can't find compat-5.1, force installation of
+        # compat-5.1.lua together with RRDtool.
+        if test "$lua_vdot" = "5.0" -a "$LUA_HAVE_COMPAT51" != "HAVE_COMPAT51"; then
+          lua_need_compat51=1
+          LUA_INSTALL_LMOD="$LUA_RRD_LIBDIR"
+        fi
 
-   if test -z "$PERLLD"; then
-       PERLLD=$PERLCC
-   fi
-   PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS LD=$PERLLD"
+        # if not set with pkg-config, use default values in src packages compat-5.1, lua 5.1
+        if test "$LUA_CFLAGS" = ""; then
+          { $as_echo "$as_me:$LINENO: WARNING: Setting Lua include and lib flags to defaults in compat-5.1 and lua 5.1 sources" >&5
+$as_echo "$as_me: WARNING: Setting Lua include and lib flags to defaults in compat-5.1 and lua 5.1 sources" >&2;}
+          LUA_CFLAGS="-I/usr/local/include -I/usr/local/include/lua -I/usr/local/include/lua/$lua_vdot"
+          LUA_LFLAGS="-L/usr/local/lib -L/usr/local/lib/lua -L/usr/local/lib/lua/$lua_vdot $lua_libs"
+          LUA_INSTALL_CMOD="/usr/local/lib/lua/$lua_vdot"
+        fi
 
-   if test ! -z "$PERLLDFLAGS"; then
-       PERL_MAKE_OPTIONS="$PERL_MAKE_OPTIONS LDFLAGS=$PERLLDFLAGS"
-   fi
+                                # Check whether --enable-lua-site-install was given.
+if test "${enable_lua_site_install+set}" = set; then
+  enableval=$enable_lua_site_install;
+else
+  LUA_INSTALL_CMOD="$LUA_RRD_LIBDIR"; LUA_INSTALL_LMOD="$LUA_RRD_LIBDIR"
 fi
 
 
-# Check whether --with-perl-options was given.
-if test "${with_perl_options+set}" = set; then
-  withval=$with_perl_options; PERL_MAKE_OPTIONS=$withval
-fi
+        LUA_DEFINES="-DLUA$lua_vndot -D$LUA_HAVE_COMPAT51"
 
 
 
 
 
 
-# Extract the first word of "ruby", so it can be a program name with args.
-set dummy ruby; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_RUBY+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $RUBY in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_RUBY="$RUBY" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_RUBY="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+      else
+        enable_lua=no
+        { $as_echo "$as_me:$LINENO: result: Lua headers found but not the libraries! Please reinstall the dev packages for Lua $LUA_MAJOR.$LUA_MINOR" >&5
+$as_echo "Lua headers found but not the libraries! Please reinstall the dev packages for Lua $LUA_MAJOR.$LUA_MINOR" >&6; }
+      fi
+    fi
   fi
-done
-done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_RUBY" && ac_cv_path_RUBY="no"
-  ;;
-esac
 fi
-RUBY=$ac_cv_path_RUBY
-if test -n "$RUBY"; then
-  { $as_echo "$as_me:$LINENO: result: $RUBY" >&5
-$as_echo "$RUBY" >&6; }
+ if test "$lua_vdot" = "5.0" -a "$LUA_HAVE_COMPAT51" != "HAVE_COMPAT51"; then
+  LUA_NEED_OUR_COMPAT51_TRUE=
+  LUA_NEED_OUR_COMPAT51_FALSE='#'
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  LUA_NEED_OUR_COMPAT51_TRUE='#'
+  LUA_NEED_OUR_COMPAT51_FALSE=
 fi
 
-
-
-# Check whether --enable-ruby was given.
-if test "${enable_ruby+set}" = set; then
-  enableval=$enable_ruby;
+ if test "$LUA_INSTALL_CMOD" != "$LUA_RRD_LIBDIR"; then
+  LUA_SITE_CINSTALL_TRUE=
+  LUA_SITE_CINSTALL_FALSE='#'
 else
-  enable_ruby=yes
+  LUA_SITE_CINSTALL_TRUE='#'
+  LUA_SITE_CINSTALL_FALSE=
 fi
 
-
-{ $as_echo "$as_me:$LINENO: checking if ruby modules can be built" >&5
-$as_echo_n "checking if ruby modules can be built... " >&6; }
-
-if test "x$RUBY" = "xno" -o  x$enable_ruby = xno; then
-       COMP_RUBY=
-       { $as_echo "$as_me:$LINENO: result: No .. Ruby not found or disabled" >&5
-$as_echo "No .. Ruby not found or disabled" >&6; }
+ if test "$LUA_INSTALL_LMOD" != "$LUA_RRD_LIBDIR"; then
+  LUA_SITE_LINSTALL_TRUE=
+  LUA_SITE_LINSTALL_FALSE='#'
 else
-       if $RUBY -e 'require "mkmf"' >/dev/null 2>&1; then
-               COMP_RUBY="ruby"
-               { $as_echo "$as_me:$LINENO: result: YES" >&5
-$as_echo "YES" >&6; }
-       else
-               COMP_RUBY=
-               { $as_echo "$as_me:$LINENO: result: Ruby found but mkmf is missing! Install the -dev package" >&5
-$as_echo "Ruby found but mkmf is missing! Install the -dev package" >&6; }
-       fi
+  LUA_SITE_LINSTALL_TRUE='#'
+  LUA_SITE_LINSTALL_FALSE=
 fi
 
-rpref=$prefix
-test "$rpref" = 'NONE' && rpref=$ac_default_prefix
-
-# Check whether --enable-ruby-site-install was given.
-if test "${enable_ruby_site_install+set}" = set; then
-  enableval=$enable_ruby_site_install; RUBY_MAKE_OPTIONS=
+ if test "$lua_vndot" = "50"; then
+  LUA50_TRUE=
+  LUA50_FALSE='#'
 else
-  RUBY_MAKE_OPTIONS="sitedir="'$(DESTDIR)'"$rpref/lib/ruby"
+  LUA50_TRUE='#'
+  LUA50_FALSE=
 fi
 
-
-
-
-# Check whether --with-ruby-options was given.
-if test "${with_ruby_options+set}" = set; then
-  withval=$with_ruby_options; RUBY_MAKE_OPTIONS=$withval
+ if test "$enable_lua" = "yes"; then
+  BUILD_LUA_TRUE=
+  BUILD_LUA_FALSE='#'
+else
+  BUILD_LUA_TRUE='#'
+  BUILD_LUA_FALSE=
 fi
 
 
-
-
-
-
-
 enable_tcl_site=no
 
 # Check whether --enable-tcl was given.
@@ -24856,12 +32512,14 @@ if test  "$enable_python" = "yes"; then
       # If the user set $PYTHON, use it and don't search something else.
       { $as_echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.3" >&5
 $as_echo_n "checking whether $PYTHON version >= 2.3... " >&6; }
-      prog="import sys, string
+      prog="import sys
 # split strings by '.' and convert to numeric.  Append some zeros
 # because we need at least 4 digits for the hex conversion.
-minver = map(int, string.split('2.3', '.')) + [0, 0, 0]
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0]
 minverhex = 0
-for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
 sys.exit(sys.hexversion < minverhex)"
   if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
    ($PYTHON -c "$prog") >&5 2>&5
@@ -24886,14 +32544,16 @@ if test "${am_cv_pathless_PYTHON+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
 
-       for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do
+       for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
          test "$am_cv_pathless_PYTHON" = none && break
-         prog="import sys, string
+         prog="import sys
 # split strings by '.' and convert to numeric.  Append some zeros
 # because we need at least 4 digits for the hex conversion.
-minver = map(int, string.split('2.3', '.')) + [0, 0, 0]
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '2.3'.split('.'))) + [0, 0, 0]
 minverhex = 0
-for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
 sys.exit(sys.hexversion < minverhex)"
   if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
    ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
@@ -24966,7 +32626,7 @@ $as_echo_n "checking for $am_display_PYTHON version... " >&6; }
 if test "${am_cv_python_version+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"`
+  am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
 fi
 { $as_echo "$as_me:$LINENO: result: $am_cv_python_version" >&5
 $as_echo "$am_cv_python_version" >&6; }
@@ -24985,7 +32645,7 @@ $as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
 if test "${am_cv_python_platform+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
-  am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`
+  am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
 fi
 { $as_echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5
 $as_echo "$am_cv_python_platform" >&6; }
@@ -25001,12 +32661,19 @@ if test "${am_cv_python_pythondir+set}" = set; then
 else
   if test "x$prefix" = xNONE
      then
-       py_prefix_arg=
+       am_py_prefix=$ac_default_prefix
      else
-       py_prefix_arg=",prefix='$prefix'"
+       am_py_prefix=$prefix
      fi
-     am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0$py_prefix_arg)" -n -q install $py_prefix_arg 2>/dev/null ||
+     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
      echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+     case $am_cv_python_pythondir in
+     $am_py_prefix*)
+       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
+       ;;
+     esac
+
 fi
 { $as_echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5
 $as_echo "$am_cv_python_pythondir" >&6; }
@@ -25024,12 +32691,19 @@ if test "${am_cv_python_pyexecdir+set}" = set; then
 else
   if test "x$exec_prefix" = xNONE
      then
-       py_exec_prefix_arg=$py_prefix_arg
+       am_py_exec_prefix=$am_py_prefix
      else
-       py_exec_prefix_arg=",prefix='$exec_prefix'"
+       am_py_exec_prefix=$exec_prefix
      fi
-     am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0$py_exec_prefix_arg)" -n -q install $py_exec_prefix_arg 2>/dev/null ||
+     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
      echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+     case $am_cv_python_pyexecdir in
+     $am_py_exec_prefix*)
+       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
+       ;;
+     esac
+
 fi
 { $as_echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5
 $as_echo "$am_cv_python_pyexecdir" >&6; }
@@ -25241,10 +32915,14 @@ ac_config_files="$ac_config_files examples/perftest.pl"
 
 ac_config_files="$ac_config_files examples/Makefile"
 
+ac_config_files="$ac_config_files examples/rrdcached/Makefile"
+
 ac_config_files="$ac_config_files doc/Makefile"
 
 ac_config_files="$ac_config_files po/Makefile.in"
 
+ac_config_files="$ac_config_files intl/Makefile"
+
 ac_config_files="$ac_config_files src/Makefile"
 
 ac_config_files="$ac_config_files src/librrd.sym.in"
@@ -25259,9 +32937,14 @@ ac_config_files="$ac_config_files bindings/tcl/ifOctets.tcl"
 
 ac_config_files="$ac_config_files Makefile"
 
+ac_config_files="$ac_config_files bindings/lua/Makefile"
+
 
 ac_config_commands="$ac_config_commands default"
 
+
+
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -25359,20 +33042,6 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${STATIC_PROGRAMS_TRUE}" && test -z "${STATIC_PROGRAMS_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"STATIC_PROGRAMS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"STATIC_PROGRAMS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -25387,18 +33056,29 @@ $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
 
-
-  ac_config_commands="$ac_config_commands po/stamp-it"
-
-
-if test -z "${BUILD_LIBINTL_TRUE}" && test -z "${BUILD_LIBINTL_FALSE}"; then
-  { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_LIBINTL\" was never defined.
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${STATIC_PROGRAMS_TRUE}" && test -z "${STATIC_PROGRAMS_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"STATIC_PROGRAMS\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"BUILD_LIBINTL\" was never defined.
+$as_echo "$as_me: error: conditional \"STATIC_PROGRAMS\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+
 if test -z "${BUILD_GETOPT_TRUE}" && test -z "${BUILD_GETOPT_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_GETOPT\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -25413,6 +33093,13 @@ $as_echo "$as_me: error: conditional \"BUILD_MULTITHREAD\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${BUILD_LIBDBI_TRUE}" && test -z "${BUILD_LIBDBI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_LIBDBI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_LIBDBI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${BUILD_RRDCGI_TRUE}" && test -z "${BUILD_RRDCGI_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_RRDCGI\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -25420,6 +33107,41 @@ $as_echo "$as_me: error: conditional \"BUILD_RRDCGI\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${LUA_NEED_OUR_COMPAT51_TRUE}" && test -z "${LUA_NEED_OUR_COMPAT51_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"LUA_NEED_OUR_COMPAT51\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"LUA_NEED_OUR_COMPAT51\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${LUA_SITE_CINSTALL_TRUE}" && test -z "${LUA_SITE_CINSTALL_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"LUA_SITE_CINSTALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"LUA_SITE_CINSTALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${LUA_SITE_LINSTALL_TRUE}" && test -z "${LUA_SITE_LINSTALL_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"LUA_SITE_LINSTALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"LUA_SITE_LINSTALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${LUA50_TRUE}" && test -z "${LUA50_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"LUA50\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"LUA50\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${BUILD_LUA_TRUE}" && test -z "${BUILD_LUA_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_LUA\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_LUA\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${BUILD_TCL_TRUE}" && test -z "${BUILD_TCL_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_TCL\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -25756,7 +33478,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by rrdtool $as_me 1.3.8, which was
+This file was extended by rrdtool $as_me 1.3.99909060808, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -25819,7 +33541,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-rrdtool config.status 1.3.8
+rrdtool config.status 1.3.99909060808
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
 
 
 
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
 
 
 
@@ -26199,8 +33927,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
-    "rrd_config.h") CONFIG_HEADERS="$CONFIG_HEADERS rrd_config.h" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "rrd_config.h") CONFIG_HEADERS="$CONFIG_HEADERS rrd_config.h" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
     "examples/shared-demo.pl") CONFIG_FILES="$CONFIG_FILES examples/shared-demo.pl" ;;
     "examples/4charts.pl") CONFIG_FILES="$CONFIG_FILES examples/4charts.pl" ;;
     "examples/perftest.pl") CONFIG_FILES="$CONFIG_FILES examples/perftest.pl" ;;
     "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
+    "examples/rrdcached/Makefile") CONFIG_FILES="$CONFIG_FILES examples/rrdcached/Makefile" ;;
     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+    "intl/Makefile") CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     "src/librrd.sym.in") CONFIG_FILES="$CONFIG_FILES src/librrd.sym.in" ;;
     "src/librrd.pc") CONFIG_FILES="$CONFIG_FILES src/librrd.pc" ;;
@@ -26220,8 +33950,8 @@ do
     "bindings/tcl/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/tcl/Makefile" ;;
     "bindings/tcl/ifOctets.tcl") CONFIG_FILES="$CONFIG_FILES bindings/tcl/ifOctets.tcl" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "bindings/lua/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/lua/Makefile" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
-    "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
 
   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -27646,32 +35376,119 @@ _LT_EOF
   chmod +x "$ofile"
 
  ;;
-    "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
-        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac ;;
+    "default-1":C)
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done ;;
     "default":C)  chmod +x examples/*.pl ;;
-    "po/stamp-it":C)
-    if  ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
-       { { $as_echo "$as_me:$LINENO: error: po/Makefile.in.in was not created by intltoolize." >&5
-$as_echo "$as_me: error: po/Makefile.in.in was not created by intltoolize." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-    rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
-    >"po/stamp-it.tmp"
-    sed '/^#/d
-        s/^[[].*] *//
-        /^[    ]*$/d
-       '"s|^|  $ac_top_srcdir/|" \
-      "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
-
-    sed '/^POTFILES =/,/[^\\]$/ {
-               /^POTFILES =/!d
-               r po/POTFILES
-         }
-        ' "po/Makefile.in" >"po/Makefile"
-    rm -f "po/Makefile.tmp"
-    mv "po/stamp-it.tmp" "po/stamp-it"
-   ;;
 
   esac
 done # for ac_tag
@@ -27687,6 +35504,7 @@ test $ac_write_fail = 0 ||
 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
    { (exit 1); exit 1; }; }
 
+ test -f config.h || ln -s rrd_config.h config.h
 
 # configure is writing to config.log, and then calls config.status.
 # config.status does its own redirection, appending to config.log.
@@ -27745,11 +35563,21 @@ echo "          Perl Options: $PERL_MAKE_OPTIONS"
 echo "          Ruby Modules: $COMP_RUBY"
 echo "           Ruby Binary: $RUBY"
 echo "          Ruby Options: $RUBY_MAKE_OPTIONS"
+echo "    Build Lua Bindings: $enable_lua"
+if test "$enable_lua" = "yes"; then
+echo "            Lua Binary: $LUA"
+echo "           Lua Version: $lua_version"
+echo "     Lua C-modules dir: $LUA_INSTALL_CMOD"
+if test "$lua_need_compat51" = "1"; then
+echo "   Lua Lua-modules dir: $LUA_INSTALL_LMOD"
+fi
+fi
 echo "    Build Tcl Bindings: $enable_tcl"
 echo " Build Python Bindings: $enable_python"
 echo "          Build rrdcgi: $enable_rrdcgi"
 echo "       Build librrd MT: $enable_pthread"
-echo "     Link with libintl: $enable_libintl"
+echo "           Use gettext: $USE_NLS"
+echo "           With libDBI: $have_libdbi"
 echo
 echo "             Libraries: $ALL_LIBS"
 echo
index ce37e4fdbec60b003b4888da4c4da45b6062710f..38a703a6327e71c2d758cde971e8d00f9d0290d4 100644 (file)
@@ -1,5 +1,6 @@
 dnl RRDtool AutoConf script ... 
 dnl ---------------------------
+dnl $Id: configure.ac 1857 2009-06-08 05:12:26Z oetiker $
 dnl
 dnl Created by Jeff Allen, Tobi Oetiker, Blair Zajac
 dnl
@@ -7,16 +8,19 @@ dnl Inspiration from http://autoconf-archive.cryp.to
  
 dnl tell automake the this script is for rrdtool
 
+dnl Minimum Autoconf version required.
+AC_PREREQ(2.59)
+
 dnl the official version number is
 dnl a.b.c
-AC_INIT([rrdtool],[1.3.8])
+AC_INIT([rrdtool],[1.3.99909060808])
 
 dnl for testing a numberical version number comes handy
 dnl the released version are
 dnl a.bccc
 dnl the devel versions will be something like
 dnl a.b999yymmddhh 
-NUMVERS=1.3008
+NUMVERS=1.399909060808
 AC_SUBST(NUMVERS)
 
 dnl for the linker to understand which versions the library are compatible with
@@ -27,15 +31,16 @@ dnl - if any functionality was removed do c++,r=0,a=0.
 dnl
 dnl see http://sourceware.org/autobook/autobook/autobook_91.html
 dnl 
-LIBVERS=4:7:0
+LIBVERS=5:0:1
 AC_SUBST(LIBVERS)
 
 AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE
+m4_version_prereq(2.60, [AC_USE_SYSTEM_EXTENSIONS], [#])
+AM_INIT_AUTOMAKE(m4_version_prereq(2.63, [silent-rules], [[]]))
 AM_MAINTAINER_MODE
-
-AC_CONFIG_MACRO_DIR([m4])
+m4_version_prereq(2.63, [AM_SILENT_RULES([yes])], [#])
 AC_CONFIG_HEADERS([rrd_config.h])
+AC_CONFIG_MACRO_DIR([m4])
 
 dnl all our local stuff like install scripts and include files
 dnl is in there
@@ -47,9 +52,6 @@ AC_SUBST(VERSION)
 
 AC_PREFIX_DEFAULT( /usr/local/rrdtool-$PACKAGE_VERSION )
 
-dnl Minimum Autoconf version required.
-AC_PREREQ(2.59)
-
 dnl At the TOP of the HEADER
 
 AH_TOP([
@@ -94,7 +96,7 @@ AC_ARG_VAR(RRDGRAPH_YLEGEND_ANGLE,
 AC_DEFINE_UNQUOTED(RRDGRAPH_YLEGEND_ANGLE,${RRDGRAPH_YLEGEND_ANGLE:-90.0},
  [Vertical label angle: -90.0 (default) or 90.0])
 
-AC_ARG_ENABLE(rrdcgi,[  --disable-rrdcgi        disable building of rrdcgi],
+AC_ARG_ENABLE(rrdcgi,AS_HELP_STRING([--disable-rrdcgi],[disable building of rrdcgi]),
 [],[enable_rrdcgi=yes])
 
 dnl Check if we run on a system that has fonts
@@ -110,15 +112,15 @@ AC_ARG_WITH(rrd-default-font,
 
 dnl Use mmap in rrd_update instead of seek+write
 AC_ARG_ENABLE([mmap],
-[  --disable-mmap          disable mmap in rrd_update, use seek+write instead],
+AS_HELP_STRING([--disable-mmap],[disable mmap in rrd_update, use seek+write instead]),
 [],
 [enable_mmap=yes])
 
-AC_ARG_ENABLE(pthread,[  --disable-pthread       disable multithread support],
+AC_ARG_ENABLE(pthread,AS_HELP_STRING([--disable-pthread],[disable multithread support]),
 [],[enable_pthread=yes])
 
 AC_ARG_ENABLE(static-programs,
-     [  --enable-static-programs  Build static programs],
+     AS_HELP_STRING([--enable-static-programs],[Build static programs]),
      [case "${enableval}" in
        yes) staticprogs=yes ;;
        no)  staticprogs=no ;;
@@ -131,13 +133,29 @@ CONFIGURE_PART(Audit Compilation Environment)
 
 
 dnl Check for the compiler and static/shared library creation.
-AC_PROG_CC
 AC_PROG_CPP
+AC_PROG_CC
+AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
 
 dnl Try to detect/use GNU features
 CFLAGS="$CFLAGS -D_GNU_SOURCE"
 
+dnl check for -Werror separatly
+dnl (quite a few autotool checks do not work with -Werror; also, the
+dnl check for -Werror fails after checking and adding the other flags)
+AC_CACHE_CHECK([if gcc likes the -Werror flag], rd_cv_gcc_flag__Werror,
+  [AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[]], [[return 0 ]])],
+    [rd_cv_gcc_flag__Werror="yes"],
+    [rd_cv_gcc_flag__Werror="no"])])
+if test "x$rd_cv_gcc_flag__Werror" = "xyes"; then
+  WERROR="-Werror"
+else
+  WERROR=""
+fi
+AC_SUBST(WERROR)
+
 dnl which flags does the compiler support?
 if test "x$GCC" = "xyes"; then
   for flag in -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do
@@ -188,7 +206,7 @@ AC_C_BIGENDIAN
 dnl for each function found we get a definition in config.h 
 dnl of the form HAVE_FUNCTION
 
-AC_CHECK_FUNCS(tzset fsync mbstowcs opendir readdir chdir chroot getuid setlocale strerror snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday)
+AC_CHECK_FUNCS(tzset fsync mbstowcs opendir readdir chdir chroot getuid setlocale strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday)
 
 AC_FUNC_STRERROR_R
 
@@ -246,45 +264,8 @@ AC_CHECK_FUNCS(posix_fadvise)
 
 CONFIGURE_PART(Libintl Processing)
 
-
-dnl gettext
-GETTEXT_PACKAGE=rrdtool
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package])
-
-AM_GLIB_GNU_GETTEXT()
-
-AC_ARG_ENABLE(libintl,[  --disable-libintl        i18n support (libintl)],
-[],[enable_libintl=yes])
-
-if test x$enable_libintl = xyes; then
-  IT_PROG_INTLTOOL([0.35.0],[no-xml])
-fi
-
-if test x$enable_libintl = xyes -a x$MSGFMT = xno; then
-  AC_MSG_WARN(I could not find msgfmt. Diabeling libintl build.)
-  enable_libintl=no
-fi
-
-if test x$enable_libintl = xyes; then
-  AC_CHECK_HEADERS(libintl.h,[],[AC_MSG_RESULT(disabeling libintl build); enable_libintl=no])
-fi
-
-if test x$enable_libintl = xyes ; then
-  dnl it seems bsd synstems need to link against libintl
-  dnl when compiling rrdupdate. lets check        
-  AC_CHECK_LIB(intl, libintl_gettext,[LIB_LIBINTL="-lintl"])
-fi
-
-dnl use for linking rrdupdate
-AC_SUBST(LIB_LIBINTL)
-
-dnl do not touch the po stuff if we are not going to build intl
-AM_CONDITIONAL(BUILD_LIBINTL,[test x$enable_libintl = xyes])
-
-if test x$enable_libintl = xyes; then
-   AC_DEFINE([BUILD_LIBINTL], [], [Use this in code sections to mark them for libintl build])
-fi
+AM_GNU_GETTEXT_VERSION(0.14.4)
+AM_GNU_GETTEXT()
 
 CONFIGURE_PART(IEEE Math Checks)
  
@@ -331,7 +312,7 @@ case "${target}" in
 esac])
 ])
 
-dnl the test does not seem to work on solaris 2.8/9
+dnl the test does not seem to work on solaris 2.8
 dnl so lets fix this by hand
 case "${target}" in
   *-solaris2.8) ac_cv_have_broken_isfinite=yes ;;
@@ -472,6 +453,24 @@ AC_LANG_POP(C)
 
 CONFIGURE_PART(Find 3rd-Party Libraries)
 
+AC_ARG_ENABLE(libdbi,AS_HELP_STRING([--disable-libdbi],[do not build in support for libdbi]),[have_libdbi=no],[
+  XXX=$LIBS
+  LIBS="$LIBS -ldbi -ldl"
+  AC_MSG_CHECKING(for libdbi)
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([[#include <dbi/dbi.h>]], 
+                     [[dbi_initialize(NULL)]]
+                    )
+    ],[AC_DEFINE(HAVE_LIBDBI,[1],[have got libdbi installed])
+       AC_MSG_RESULT([yes])
+       have_libdbi=yes
+    ],[LIBS=$XXX
+       AC_MSG_RESULT([no])
+       have_libdbi=no
+    ]
+  )
+])
+AM_CONDITIONAL(BUILD_LIBDBI,[test $have_libdbi != no])
 
 AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no])
 
@@ -486,7 +485,7 @@ EX_CHECK_ALL(cairo,      cairo_font_options_create,     cairo.h,
 EX_CHECK_ALL(cairo,      cairo_svg_surface_create,      cairo-svg.h,            cairo-svg,   1.4.6,  http://cairographics.org/releases/, "")
 EX_CHECK_ALL(cairo,      cairo_pdf_surface_create,      cairo-pdf.h,            cairo-pdf,   1.4.6,  http://cairographics.org/releases/, "")
 EX_CHECK_ALL(cairo,      cairo_ps_surface_create,       cairo-ps.h,             cairo-ps,    1.4.6,  http://cairographics.org/releases/, "")
-dnl EX_CHECK_ALL(glib-2.0,   glib_check_version,        glib.h,                 glib-2.0,    2.12.12, ftp://ftp.gtk.org/pub/glib/2.12/, "")
+EX_CHECK_ALL(glib-2.0,   glib_check_version,            glib.h,                 glib-2.0,    2.12.12, ftp://ftp.gtk.org/pub/glib/2.12/, "")
 EX_CHECK_ALL(pango-1.0,  pango_cairo_context_set_font_options,  pango/pango.h,  pangocairo,  1.17,    http://ftp.gnome.org/pub/GNOME/sources/pango/1.17, "")
 EX_CHECK_ALL(xml2,       xmlParseFile,                  libxml/parser.h,        libxml-2.0,        2.6.31,  http://xmlsoft.org/downloads.html, /usr/include/libxml2)
 
@@ -510,7 +509,7 @@ AC_PATH_PROG(POD2MAN, pod2man, no)
 AC_PATH_PROG(POD2HTML, pod2html, no)
 
 
-AC_ARG_ENABLE(perl,[  --disable-perl          do not build the perl modules],
+AC_ARG_ENABLE(perl,AS_HELP_STRING([--disable-perl],[do not build the perl modules]),
 [],[enable_perl=yes])
 
 
@@ -551,19 +550,15 @@ AC_MSG_CHECKING(Perl Modules to build)
 AC_MSG_RESULT(${COMP_PERL:-No Perl Modules will be built})
 
 # Options to pass when configuring perl module
-ppref=$prefix
-test "$ppref" = 'NONE' && ppref=$ac_default_prefix
+langpref=$prefix
+test "$langpref" = '$(DESTDIR)NONE' && langpref='$(DESTDIR)'$ac_default_prefix
+test "$langpref" = "NONE" && langpref=$ac_default_prefix
 
-PERL_MAKE_OPTIONS="PREFIX="'$(DESTDIR)'"$ppref LIB="'$(DESTDIR)'"$ppref/lib/perl/$PERL_VERSION"
+PERL_MAKE_OPTIONS="PREFIX=$langpref LIB=$langpref/lib/perl/$PERL_VERSION"
 
 dnl pass additional perl options when generating Makefile from Makefile.PL
 AC_ARG_ENABLE(perl-site-install,
-[  --enable-perl-site-install   by default the rrdtool perl modules are installed
-                         together with rrdtool in $prefix/lib/perl. You have to
-                          put a 'use lib qw($prefix/lib/perl)' into your scripts
-                          when you want to use them. When you set this option
-                          the perl modules will get installed wherever
-                          your perl setup thinks it is best.],
+AS_HELP_STRING([--enable-perl-site-install],[by default the rrdtool perl modules are installed together with rrdtool in $prefix/lib/perl. You have to put a 'use lib qw($prefix/lib/perl)' into your scripts when you want to use them. When you set this option the perl modules will get installed wherever your perl setup thinks it is best.]),
 [PERL_MAKE_OPTIONS=],[])
 
 if test ! -z "$PERLCC"; then
@@ -598,7 +593,7 @@ AC_SUBST(PERL_VERSION)
 dnl Check for Ruby.
 AC_PATH_PROG(RUBY, ruby, no)
 
-AC_ARG_ENABLE(ruby,[  --disable-ruby          do not build the ruby modules],
+AC_ARG_ENABLE(ruby,AS_HELP_STRING([--disable-ruby],[do not build the ruby modules]),
 [],[enable_ruby=yes])
 
 AC_MSG_CHECKING(if ruby modules can be built)
@@ -616,16 +611,10 @@ else
        fi                              
 fi
 
-rpref=$prefix
-test "$rpref" = 'NONE' && rpref=$ac_default_prefix
-
 dnl pass additional ruby options when generating Makefile from Makefile.PL
 AC_ARG_ENABLE(ruby-site-install,
-[  --enable-ruby-site-install   by default the rrdtool ruby modules are installed
-                         together with rrdtool in $prefix/lib/ruby. You have to
-                          add $prefix/lib/ruby/$ruby_version/$sitearch to you $: variable
-                          for ruby to find the RRD.so file.],
-[RUBY_MAKE_OPTIONS=],[RUBY_MAKE_OPTIONS="sitedir="'$(DESTDIR)'"$rpref/lib/ruby"])
+AS_HELP_STRING([--enable-ruby-site-install],[by default the rrdtool ruby modules are installed together with rrdtool in $prefix/lib/ruby. You have to add $prefix/lib/ruby/$ruby_version/$sitearch to your $: variable for ruby to find the RRD.so file.]),
+[RUBY_MAKE_OPTIONS=],[RUBY_MAKE_OPTIONS="sitedir=$langpref/lib/ruby"])
 
     
 AC_ARG_WITH(ruby-options,
@@ -639,10 +628,150 @@ AC_SUBST(RUBY_MAKE_OPTIONS)
 AC_SUBST(RUBY)
 AC_SUBST(COMP_RUBY)
 
+dnl Check for Lua.
+AC_PATH_PROG(LUA, lua, no)
+
+AC_ARG_ENABLE(lua,AS_HELP_STRING([--disable-lua],[do not build the lua modules]),
+[],[enable_lua=yes])
+
+COMP_LUA=
+if test "$LUA" = "no" -o "$enable_lua" = "no"; then
+  enable_lua=no
+else
+  AC_MSG_CHECKING(for lua >= 5.0)
+  read LUA_MAJOR LUA_MINOR LUA_POINT <<LUA_EOF
+    $($LUA -v 2>&1 | cut -f2 -d' ' | sed -e 's/\./ /g')
+LUA_EOF
+  if test 0$LUA_MAJOR -lt 5; then
+    AC_MSG_RESULT([no, version found is $LUA_MAJOR.$LUA_MINOR])
+  else
+    AC_MSG_RESULT([$LUA_MAJOR.$LUA_MINOR found])
+    lua_vdot=$LUA_MAJOR.$LUA_MINOR
+    lua_vndot=$LUA_MAJOR$LUA_MINOR
+    lua_version=$LUA_MAJOR.$LUA_MINOR.$LUA_POINT
+    AC_CHECK_HEADERS(lua$lua_vndot/lua.h,
+      [AC_CHECK_HEADERS(lua$lua_vndot/lualib.h,
+        [AC_CHECK_HEADER(lua$lua_vndot/lauxlib.h,
+          [lua_headerdir=lua$lua_vndot],
+          [])],
+        [])],
+      [AC_CHECK_HEADERS(lua$lua_vdot/lua.h,
+        [AC_CHECK_HEADERS(lua$lua_vdot/lualib.h,
+          [AC_CHECK_HEADER(lua$lua_vdot/lauxlib.h,
+            [lua_headerdir=lua$lua_vdot],
+            [])],
+          [])],
+        [AC_CHECK_HEADERS(lua.h,
+          [AC_CHECK_HEADERS(lualib.h,
+            [AC_CHECK_HEADER(lauxlib.h,
+              [lua_headerdir=""],
+              [lua_headerdir="no"])],
+            [])],
+          [])])])
+
+    if test "$lua_headerdir" = "no"; then
+      enable_lua=no
+    else
+      COMP_LUA=lua
+    fi
+
+    if test "$COMP_LUA" != "lua"; then
+      enable_lua=no
+      AC_MSG_WARN([Lua $lua_vdot found but not lua.h, lualib.h and lauxlib.h! Please install the -dev packages for Lua $lua_vdot])
+    else
+      # OK, headers found, let's check the libraries (LIBS is not used)
+      LIBS=
+      lua_havelib=no
+      LUA_HAVE_COMPAT51=DONT_HAVE_COMPAT51
+      AC_SEARCH_LIBS(lua_call, lua$lua_vdot lua$lua_vndot lua,
+        [AC_SEARCH_LIBS(luaL_register, lua$lua_vdot lua$lua_vndot lua,
+          [lua_havelib=LUA$lua_vndot],
+          [AC_SEARCH_LIBS(luaL_module, lualib$lua_vndot lualib$lua_vdot lualib,
+            [lua_havelib=$lua_vndot; $LUA -l compat-5.1 2>/dev/null;
+             test "$?" = "0" && LUA_HAVE_COMPAT51=HAVE_COMPAT51],
+            [AC_SEARCH_LIBS(luaL_openlib, lualib$lua_vdot lualib$lua_vndot lualib,
+              [lua_havelib=$lua_vndot],
+              [COMP_LUA=], [-lm])], [-lm])], [-lm])],
+        [COMP_LUA=], [-lm])
+      lua_libs=$LIBS
+      LIBS=
+
+      # Options to pass when configuring Lua module
+      if test  "$lua_havelib" != "no"; then
+        # OK, headers and libs found. Try to set lua flags
+        # and modules installation dirs with pkg-config
+        if test "$PKGCONFIG" != "no"; then
+          if test "$lua_vndot" = "50"; then
+            lua_pkg_prefix=lualib
+          else
+            lua_pkg_prefix=lua
+          fi
+          # try with dot, without dot and finally without version
+          for f in $lua_pkg_prefix$lua_vdot $lua_pkg_prefix$lua_vndot $lua_pkg_prefix; do
+            lua_exec_prefix=`$PKGCONFIG --variable=prefix $f 2>/dev/null`
+            # same binaries?
+            if test "$lua_exec_prefix/bin/lua" = "$LUA"; then 
+                # OK, found CFLAGS. Get Lua LFLAGS and modules install dir
+                LUA_CFLAGS=`$PKGCONFIG --cflags $f 2>/dev/null`
+                LUA_LFLAGS=`$PKGCONFIG --libs $f 2>/dev/null`
+                LUA_INSTALL_CMOD=`$PKGCONFIG --variable=INSTALL_CMOD $f 2>/dev/null`
+                LUA_INSTALL_LMOD=`$PKGCONFIG --variable=INSTALL_LMOD $f 2>/dev/null`
+                break
+            fi
+          done
+        fi
+
+        LUA_RRD_LIBDIR="$langpref/lib/lua/$lua_vdot"
+        # if lua 5.0 can't find compat-5.1, force installation of
+        # compat-5.1.lua together with RRDtool.
+        if test "$lua_vdot" = "5.0" -a "$LUA_HAVE_COMPAT51" != "HAVE_COMPAT51"; then
+          lua_need_compat51=1 
+          LUA_INSTALL_LMOD="$LUA_RRD_LIBDIR"
+        fi
+
+        # if not set with pkg-config, use default values in src packages compat-5.1, lua 5.1
+        if test "$LUA_CFLAGS" = ""; then
+          AC_MSG_WARN(Setting Lua include and lib flags to defaults in compat-5.1 and lua 5.1 sources)
+          LUA_CFLAGS="-I/usr/local/include -I/usr/local/include/lua -I/usr/local/include/lua/$lua_vdot"
+          LUA_LFLAGS="-L/usr/local/lib -L/usr/local/lib/lua -L/usr/local/lib/lua/$lua_vdot $lua_libs"
+          LUA_INSTALL_CMOD="/usr/local/lib/lua/$lua_vdot"
+        fi
+
+        dnl pass additional lua options
+        dnl if lua-site-install is not set, overwrite LUA_INSTALL_CMOD already
+        dnl found and install together with RRDtool, under $langpref.
+        AC_ARG_ENABLE(lua-site-install,
+        AS_HELP_STRING([--enable-lua-site-install],[by default the lua module is installed together with rrdtool in $prefix/lib/lua/$lua_version. You have to add $prefix/lib/lua/$lua_version/?.so to package.cpath for lua to find 'rrd.so'. For lua 5.0 you may also need to change LUA_PATH to the same dir, to require 'compat-5.1'. When you set this option the lua modules will get installed wherever your Lua setup thinks it is best. WARNING: if you set this option, system lua modules compat-5.1.lua and rrd.so, if any, may be overwritten.]),
+        [],
+        [LUA_INSTALL_CMOD="$LUA_RRD_LIBDIR"; LUA_INSTALL_LMOD="$LUA_RRD_LIBDIR"])
+
+        LUA_DEFINES="-DLUA$lua_vndot -D$LUA_HAVE_COMPAT51"
+        AC_SUBST(LUA)
+        AC_SUBST(COMP_LUA)
+        AC_SUBST(LUA_INSTALL_CMOD)
+        AC_SUBST(LUA_INSTALL_LMOD)
+        AC_SUBST(LUA_CFLAGS)
+        AC_SUBST(LUA_LFLAGS)
+       AC_SUBST(LUA_DEFINES)
+      else
+        enable_lua=no
+        AC_MSG_RESULT([Lua headers found but not the libraries! Please reinstall the dev packages for Lua $LUA_MAJOR.$LUA_MINOR])
+      fi
+    fi
+  fi
+fi
+dnl If Lua 5.0, we need compat-5.1. Add ours unless already
+dnl integrated as in Debian/Ubuntu 5.0 -dev packages.
+AM_CONDITIONAL(LUA_NEED_OUR_COMPAT51,
+      [test "$lua_vdot" = "5.0" -a "$LUA_HAVE_COMPAT51" != "HAVE_COMPAT51"])
+AM_CONDITIONAL(LUA_SITE_CINSTALL, [test "$LUA_INSTALL_CMOD" != "$LUA_RRD_LIBDIR"])
+AM_CONDITIONAL(LUA_SITE_LINSTALL, [test "$LUA_INSTALL_LMOD" != "$LUA_RRD_LIBDIR"])
+AM_CONDITIONAL(LUA50, [test "$lua_vndot" = "50"])
+AM_CONDITIONAL(BUILD_LUA, [test "$enable_lua" = "yes"])
 
 enable_tcl_site=no
 
-AC_ARG_ENABLE(tcl,[  --disable-tcl           do not build the tcl modules],
+AC_ARG_ENABLE(tcl,AS_HELP_STRING([--disable-tcl],[do not build the tcl modules]),
 [],[enable_tcl=yes])
 
 if test  "$enable_tcl" = "yes"; then
@@ -671,7 +800,7 @@ if test  "$enable_tcl" = "yes"; then
          TCL_INCLUDE_SPEC="$TCL_INCLUDE_SPEC -I$TCL_INC_DIR"
        fi
   fi
-  AC_ARG_ENABLE(tcl,[  --enable-tcl-site        install the tcl extension in the tcl tree],
+  AC_ARG_ENABLE(tcl,AS_HELP_STRING([--enable-tcl-site],[install the tcl extension in the tcl tree]),
   [],[enable_tcl_site=yes])
 
 fi
@@ -691,7 +820,7 @@ AC_SUBST(TCL_VERSION)
 AC_SUBST(TCL_PACKAGE_DIR)
 AC_SUBST(TCL_INCLUDE_SPEC)
 
-AC_ARG_ENABLE(python,[  --disable-python        do not build the python modules],
+AC_ARG_ENABLE(python,AS_HELP_STRING([--disable-python],[do not build the python modules]),
 [],[enable_python=yes])
 
 if test  "$enable_python" = "yes"; then
@@ -727,17 +856,24 @@ AC_CONFIG_FILES([examples/minmax.pl])
 AC_CONFIG_FILES([examples/4charts.pl])
 AC_CONFIG_FILES([examples/perftest.pl])
 AC_CONFIG_FILES([examples/Makefile])
+AC_CONFIG_FILES([examples/rrdcached/Makefile])
 AC_CONFIG_FILES([doc/Makefile])
-AC_CONFIG_FILES([po/Makefile.in])
+AC_CONFIG_FILES([po/Makefile.in]) 
+AC_CONFIG_FILES([intl/Makefile]) 
 AC_CONFIG_FILES([src/Makefile])
 AC_CONFIG_FILES([src/librrd.sym.in])
-AC_CONFIG_FILES([src/librrd.pc])          
+AC_CONFIG_FILES([src/librrd.pc])
 AC_CONFIG_FILES([bindings/Makefile])
 AC_CONFIG_FILES([bindings/tcl/Makefile])
 AC_CONFIG_FILES([bindings/tcl/ifOctets.tcl])
 AC_CONFIG_FILES([Makefile])          
+AC_CONFIG_FILES([bindings/lua/Makefile])
 
 AC_CONFIG_COMMANDS([default],[[ chmod +x examples/*.pl]],[[]])
+
+dnl intl requires our config to be called config.h. indulge it.
+AC_CONFIG_COMMANDS_POST([ test -f config.h || ln -s rrd_config.h config.h ])
+
 AC_OUTPUT
 
 AC_MSG_CHECKING(in)
@@ -768,11 +904,21 @@ echo "          Perl Options: $PERL_MAKE_OPTIONS"
 echo "          Ruby Modules: $COMP_RUBY"
 echo "           Ruby Binary: $RUBY"
 echo "          Ruby Options: $RUBY_MAKE_OPTIONS"
+echo "    Build Lua Bindings: $enable_lua"
+if test "$enable_lua" = "yes"; then
+echo "            Lua Binary: $LUA"
+echo "           Lua Version: $lua_version"
+echo "     Lua C-modules dir: $LUA_INSTALL_CMOD"
+if test "$lua_need_compat51" = "1"; then
+echo "   Lua Lua-modules dir: $LUA_INSTALL_LMOD"
+fi
+fi
 echo "    Build Tcl Bindings: $enable_tcl"
 echo " Build Python Bindings: $enable_python"
 echo "          Build rrdcgi: $enable_rrdcgi"
 echo "       Build librrd MT: $enable_pthread"
-echo "     Link with libintl: $enable_libintl"
+echo "           Use gettext: $USE_NLS"
+echo "           With libDBI: $have_libdbi"
 echo
 echo "             Libraries: $ALL_LIBS"
 echo
diff --git a/depcomp b/depcomp
index e5f9736c7239301c765e2d7abefb9bb9b9237ac5..df8eea7e4ce8862105fcd7929b20bdb45488048b 100755 (executable)
--- a/depcomp
+++ b/depcomp
@@ -1,10 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2007-03-29.01
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ scriptversion=2007-03-29.01
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -87,6 +85,15 @@ if test "$depmode" = dashXmstdout; then
    depmode=dashmstdout
 fi
 
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
@@ -192,14 +199,14 @@ sgi)
 ' < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
     tr '
-' ' ' >> $depfile
-    echo >> $depfile
+' ' ' >> "$depfile"
+    echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
     tr ' ' '
 ' < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
+   >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -328,7 +335,12 @@ hp2)
   if test -f "$tmpdepfile"; then
     sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
     # Add `dependent.h:' lines.
-    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+    sed -ne '2,${
+              s/^ *//
+              s/ \\*$//
+              s/$/:/
+              p
+            }' "$tmpdepfile" >> "$depfile"
   else
     echo "#dummy" > "$depfile"
   fi
@@ -404,7 +416,7 @@ dashmstdout)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -455,32 +467,39 @@ makedepend)
   "$@" || exit $?
   # Remove any Libtool call
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
   fi
   # X makedepend
   shift
-  cleared=no
-  for arg in "$@"; do
+  cleared=no eat=no
+  for arg
+  do
     case $cleared in
     no)
       set ""; shift
       cleared=yes ;;
     esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
     case "$arg" in
     -D*|-I*)
       set fnord "$@" "$arg"; shift ;;
     # Strip any option that makedepend may not understand.  Remove
     # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
     -*|$object)
       ;;
     *)
       set fnord "$@" "$arg"; shift ;;
     esac
   done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
@@ -500,7 +519,7 @@ cpp)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -538,13 +557,27 @@ cpp)
 
 msvisualcpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
+  # always write the preprocessed file to stdout.
   "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
   IFS=" "
   for arg
   do
     case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
        set fnord "$@"
        shift
@@ -557,16 +590,23 @@ msvisualcpp)
        ;;
     esac
   done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
   echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 none)
   exec "$@"
   ;;
@@ -585,5 +625,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
index 16fd61755698fb51666b6a369102d089c144adaf..617beb3625f3a71b7bf4b4761005a4668099ea1a 100644 (file)
@@ -10,11 +10,18 @@ CLEANFILES = *.1 *.html *.txt *-dircache RRD?.pod *.pdf *~ core *itemcache *.rej
 
 POD = bin_dec_hex.pod        rrddump.pod            rrdgraph_examples.pod  rrdrestore.pod         rrdupdate.pod  \
       cdeftutorial.pod       rrdfetch.pod           rrdgraph_graph.pod     rrdthreads.pod         rrdxport.pod   \
-      rpntutorial.pod        rrdfirst.pod           rrdgraph_rpn.pod       rrdtool.pod                           \
-      rrd-beginners.pod      rrdinfo.pod            rrdtune.pod            rrdbuild.pod                          \
+      rpntutorial.pod        rrdfirst.pod           rrdgraph_rpn.pod       rrdtool.pod            rrdcached.pod  \
+      rrd-beginners.pod      rrdinfo.pod            rrdtune.pod            rrdbuild.pod           rrdflushcached.pod   \
       rrdcgi.pod             rrdgraph.pod           rrdlast.pod            rrdlastupdate.pod                     \
-      rrdcreate.pod          rrdgraph_data.pod      rrdresize.pod          rrdtutorial.pod                       
+      rrdcreate.pod          rrdgraph_data.pod      rrdresize.pod          rrdtutorial.pod        librrd.pod
 
+if BUILD_LIBDBI
+  POD += rrdgraph_libdbi.pod
+endif
+
+if BUILD_LUA
+  POD += rrdlua.pod
+endif
 
 PMP = RRDs.pod RRDp.pod
 
@@ -24,7 +31,7 @@ HTML = $(POD:.pod=.html) $(PMP:.pod=.html)
 PDF = $(MAN:.1=.pdf)
 
 # what should go into the distribution
-EXTRA_DIST= $(POD) $(HTML) $(MAN) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd
+EXTRA_DIST= $(POD) $(HTML) $(MAN) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd rrdgraph_libdbi.pod rrdlua.pod
 
 idocdir = $(RRDDOCDIR)/txt
 idoc_DATA = $(POD) $(TXT)
@@ -39,22 +46,22 @@ all-local: link txt man html-local
        perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}'  $<  > $@
 
 .pod.1 .pm.1 .pl.1:
-       @POD2MAN@ --release=$(VERSION) --center=rrdtool $<  > $@
+       $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool $<  > $@
 
 .1.txt:
-       GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
+       $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
 
 .1.pdf:
-       @TROFF@ -man $< | ps2pdf - $@
+       $(AM_V_GEN)@TROFF@ -man $< | ps2pdf - $@
 
 .pm.html .pod.html .pl.html:
-       @POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
+       $(AM_V_GEN)@POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
 
 RRDs.pod:
-       $(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
+       $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
 
 RRDp.pod:
-       $(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
+       $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
 
 link: RRDp.pod RRDs.pod
 
@@ -69,4 +76,4 @@ pdf-local: $(PDF)
 pod: $(POD)
 
 install-data-hook:
-       cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html
+       $(AM_V_GEN)cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html
index 9b8f94844351fb31b4d35f4bbfbd25975848af94..fe4852eee9d9b4c235fa76d89d3163a353adfae1 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.11 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,8 +17,9 @@
 
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -33,16 +35,42 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
+@BUILD_LIBDBI_TRUE@am__append_1 = rrdgraph_libdbi.pod
+@BUILD_LUA_TRUE@am__append_2 = rrdlua.pod
 subdir = doc
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
+       $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
+       $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \
+       $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
+       $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
+       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/rrd_config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -50,28 +78,42 @@ am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(idocdir)" "$(DESTDIR)$(ihtmldir)" \
        "$(DESTDIR)$(imandir)"
-idocDATA_INSTALL = $(INSTALL_DATA)
-ihtmlDATA_INSTALL = $(INSTALL_DATA)
-imanDATA_INSTALL = $(INSTALL_DATA)
 DATA = $(idoc_DATA) $(ihtml_DATA) $(iman_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
 ALL_LIBS = @ALL_LIBS@
-ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-CATALOGS = @CATALOGS@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+COMP_LUA = @COMP_LUA@
 COMP_PERL = @COMP_PERL@
 COMP_PYTHON = @COMP_PYTHON@
 COMP_RUBY = @COMP_RUBY@
@@ -90,37 +132,50 @@ ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
+GENCAT = @GENCAT@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_WPRINTF = @HAVE_WPRINTF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
 LIBVERS = @LIBVERS@
-LIB_LIBINTL = @LIB_LIBINTL@
 LIPO = @LIPO@
 LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
+LUA = @LUA@
+LUA_CFLAGS = @LUA_CFLAGS@
+LUA_DEFINES = @LUA_DEFINES@
+LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@
+LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@
+LUA_LFLAGS = @LUA_LFLAGS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
 MSGMERGE = @MSGMERGE@
 MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@
 MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@
@@ -151,10 +206,7 @@ PERL_VERSION = @PERL_VERSION@
 PKGCONFIG = @PKGCONFIG@
 POD2HTML = @POD2HTML@
 POD2MAN = @POD2MAN@
-POFILES = @POFILES@
 POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -186,8 +238,10 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
 TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
 TCL_VERSION = @TCL_VERSION@
 TROFF = @TROFF@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WERROR = @WERROR@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -256,13 +310,14 @@ SUFFIXES = .pod .1 .man .html .txt .pm .pdf .inc
 
 #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
 CLEANFILES = *.1 *.html *.txt *-dircache RRD?.pod *.pdf *~ core *itemcache *.rej *.orig *.tmp
-POD = bin_dec_hex.pod        rrddump.pod            rrdgraph_examples.pod  rrdrestore.pod         rrdupdate.pod  \
-      cdeftutorial.pod       rrdfetch.pod           rrdgraph_graph.pod     rrdthreads.pod         rrdxport.pod   \
-      rpntutorial.pod        rrdfirst.pod           rrdgraph_rpn.pod       rrdtool.pod                           \
-      rrd-beginners.pod      rrdinfo.pod            rrdtune.pod            rrdbuild.pod                          \
-      rrdcgi.pod             rrdgraph.pod           rrdlast.pod            rrdlastupdate.pod                     \
-      rrdcreate.pod          rrdgraph_data.pod      rrdresize.pod          rrdtutorial.pod                       
-
+POD = bin_dec_hex.pod rrddump.pod rrdgraph_examples.pod rrdrestore.pod \
+       rrdupdate.pod cdeftutorial.pod rrdfetch.pod rrdgraph_graph.pod \
+       rrdthreads.pod rrdxport.pod rpntutorial.pod rrdfirst.pod \
+       rrdgraph_rpn.pod rrdtool.pod rrdcached.pod rrd-beginners.pod \
+       rrdinfo.pod rrdtune.pod rrdbuild.pod rrdflushcached.pod \
+       rrdcgi.pod rrdgraph.pod rrdlast.pod rrdlastupdate.pod \
+       rrdcreate.pod rrdgraph_data.pod rrdresize.pod rrdtutorial.pod \
+       librrd.pod $(am__append_1) $(am__append_2)
 PMP = RRDs.pod RRDp.pod
 MAN = $(POD:.pod=.1)
 TXT = $(MAN:.1=.txt)
@@ -270,7 +325,7 @@ HTML = $(POD:.pod=.html) $(PMP:.pod=.html)
 PDF = $(MAN:.1=.pdf)
 
 # what should go into the distribution
-EXTRA_DIST = $(POD) $(HTML) $(MAN) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd
+EXTRA_DIST = $(POD) $(HTML) $(MAN) $(TXT) rrdtool-dump.dtd rrdtool-xport.dtd rrdgraph_libdbi.pod rrdlua.pod
 idocdir = $(RRDDOCDIR)/txt
 idoc_DATA = $(POD) $(TXT)
 ihtmldir = $(RRDDOCDIR)/html
@@ -290,9 +345,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  doc/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  doc/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnu doc/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -310,6 +365,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -319,54 +375,63 @@ clean-libtool:
 install-idocDATA: $(idoc_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(idocdir)" || $(MKDIR_P) "$(DESTDIR)$(idocdir)"
-       @list='$(idoc_DATA)'; for p in $$list; do \
+       @list='$(idoc_DATA)'; test -n "$(idocdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(idocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idocdir)/$$f'"; \
-         $(idocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idocdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(idocdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(idocdir)" || exit $$?; \
        done
 
 uninstall-idocDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(idoc_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(idocdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(idocdir)/$$f"; \
-       done
+       @list='$(idoc_DATA)'; test -n "$(idocdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(idocdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(idocdir)" && rm -f $$files
 install-ihtmlDATA: $(ihtml_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(ihtmldir)" || $(MKDIR_P) "$(DESTDIR)$(ihtmldir)"
-       @list='$(ihtml_DATA)'; for p in $$list; do \
+       @list='$(ihtml_DATA)'; test -n "$(ihtmldir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(ihtmlDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(ihtmldir)/$$f'"; \
-         $(ihtmlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(ihtmldir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ihtmldir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(ihtmldir)" || exit $$?; \
        done
 
 uninstall-ihtmlDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(ihtml_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(ihtmldir)/$$f'"; \
-         rm -f "$(DESTDIR)$(ihtmldir)/$$f"; \
-       done
+       @list='$(ihtml_DATA)'; test -n "$(ihtmldir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(ihtmldir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(ihtmldir)" && rm -f $$files
 install-imanDATA: $(iman_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(imandir)" || $(MKDIR_P) "$(DESTDIR)$(imandir)"
-       @list='$(iman_DATA)'; for p in $$list; do \
+       @list='$(iman_DATA)'; test -n "$(imandir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(imanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(imandir)/$$f'"; \
-         $(imanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(imandir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(imandir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(imandir)" || exit $$?; \
        done
 
 uninstall-imanDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(iman_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(imandir)/$$f'"; \
-         rm -f "$(DESTDIR)$(imandir)/$$f"; \
-       done
+       @list='$(iman_DATA)'; test -n "$(imandir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(imandir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(imandir)" && rm -f $$files
 tags: TAGS
 TAGS:
 
@@ -390,13 +455,17 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -428,6 +497,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -455,21 +525,30 @@ info-am:
 install-data-am: install-idocDATA install-ihtmlDATA install-imanDATA
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-data-hook
-
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -515,22 +594,22 @@ all-local: link txt man html-local
        perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}'  $<  > $@
 
 .pod.1 .pm.1 .pl.1:
-       @POD2MAN@ --release=$(VERSION) --center=rrdtool $<  > $@
+       $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool $<  > $@
 
 .1.txt:
-       GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
+       $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
 
 .1.pdf:
-       @TROFF@ -man $< | ps2pdf - $@
+       $(AM_V_GEN)@TROFF@ -man $< | ps2pdf - $@
 
 .pm.html .pod.html .pl.html:
-       @POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
+       $(AM_V_GEN)@POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
 
 RRDs.pod:
-       $(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
+       $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
 
 RRDp.pod:
-       $(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
+       $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
 
 link: RRDp.pod RRDs.pod
 
@@ -545,7 +624,8 @@ pdf-local: $(PDF)
 pod: $(POD)
 
 install-data-hook:
-       cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html
+       $(AM_V_GEN)cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index a27a2118bf508afe0d8654c06f20aea3c534c92d..295e62f84617902c668b4d9530c792d9de3b3798 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>RRDp</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -57,62 +49,74 @@ data, <strong>RRDp::read</strong> will return an undefined variable.</p>
 <p>If you import the PERFORMANCE variables into your namespace, 
 you can access RRDtool's internal performance measurements.</p>
 <dl>
-<dt><strong><a name="use_rrdp" class="item">use <strong>RRDp</strong></a></strong></dt>
-
+<dt><strong><a name="item_use_rrdp">use <strong>RRDp</strong></a></strong><br />
+</dt>
 <dd>
-<p>Load the RRDp::pipe module.</p>
+Load the RRDp::pipe module.
 </dd>
-<dt><strong><a name="rrdp_start_path_to_rrdtool_executable" class="item"><strong>RRDp::start</strong> <em>path to RRDtool executable</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrdp_3a_3astart_path_to_rrdtool_executable"><strong>RRDp::start</strong> <em>path to RRDtool executable</em></a></strong><br />
+</dt>
 <dd>
-<p>start RRDtool. The argument must be the path to the RRDtool executable</p>
+start RRDtool. The argument must be the path to the RRDtool executable
+</dd>
+<p></p>
+<dt><strong><a name="item_rrdp_3a_3acmd_rrdtool_commandline"><strong>RRDp::cmd</strong> <em>rrdtool commandline</em></a></strong><br />
+</dt>
+<dd>
+pass commands on to RRDtool. check the RRDtool documentation for
+more info on the RRDtool commands.
 </dd>
-<dt><strong><a name="rrdp_cmd_rrdtool_commandline" class="item"><strong>RRDp::cmd</strong> <em>rrdtool commandline</em></a></strong></dt>
-
 <dd>
-<p>pass commands on to RRDtool. check the RRDtool documentation for
-more info on the RRDtool commands.</p>
 <p><strong>Note</strong>: Due to design limitations, <strong>RRDp::cmd</strong> does not support the
 <code>graph -</code> command - use <code>graphv -</code> instead.</p>
 </dd>
-<dt><strong><a name="_answer" class="item">$answer = <strong>RRDp::read</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__24answer__3d_rrdp_3a_3aread">$answer = <strong>RRDp::read</strong></a></strong><br />
+</dt>
 <dd>
-<p>read RRDtool's response to your command. Note that the $answer variable will
+read RRDtool's response to your command. Note that the $answer variable will
 only contain a pointer to the returned data. The reason for this is, that
 RRDtool can potentially return quite excessive amounts of data
 and we don't want to copy this around in memory. So when you want to 
 access the contents of $answer you have to use $$answer which dereferences
-the variable.</p>
+the variable.
 </dd>
-<dt><strong><a name="_status" class="item">$status = <strong>RRDp::end</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__24status__3d_rrdp_3a_3aend">$status = <strong>RRDp::end</strong></a></strong><br />
+</dt>
 <dd>
-<p>terminates RRDtool and returns RRDtool's status ...</p>
+terminates RRDtool and returns RRDtool's status ...
 </dd>
-<dt><strong><a name="_rrdp__user_" class="item"><strong>$RRDp::user</strong>,  <strong>$RRDp::sys</strong>, <strong>$RRDp::real</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__24rrdp_3a_3auser_2c__24rrdp_3a_3asys_2c__24rrdp_3"><strong>$RRDp::user</strong>,  <strong>$RRDp::sys</strong>, <strong>$RRDp::real</strong></a></strong><br />
+</dt>
 <dd>
-<p>these variables will contain totals of the user time, system time and
+these variables will contain totals of the user time, system time and
 real time as seen by RRDtool.  User time is the time RRDtool is
 running, System time is the time spend in system calls and real time
-is the total time RRDtool has been running.</p>
+is the total time RRDtool has been running.
+</dd>
+<dd>
 <p>The difference between user + system and real is the time spent
 waiting for things like the hard disk and new input from the perl
 script.</p>
 </dd>
-<dt><strong><a name="_rrdp__error_mode" class="item"><strong>$RRDp::error_mode</strong> and <strong>$RRDp::error</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__24rrdp_3a_3aerror_mode_and__24rrdp_3a_3aerror"><strong>$RRDp::error_mode</strong> and <strong>$RRDp::error</strong></a></strong><br />
+</dt>
 <dd>
-<p>If you set the variable $RRDp::error_mode to the value 'catch' before you run RRDp::read a potential
+If you set the variable $RRDp::error_mode to the value 'catch' before you run RRDp::read a potential
 ERROR message will not cause the program to abort but will be returned in this variable. If no error
-occurs the variable will be empty.</p>
+occurs the variable will be empty.
+</dd>
+<dd>
 <pre>
  $RRDp::error_mode = 'catch';
  RRDp::cmd qw(info file.rrd);
  print $RRDp::error if $RRDp::error;</pre>
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index f64d608a620e7c04b1fb8eae836048a2d8e8511e..45da6e7a27278bf3ae8e16a762301c6e57beb559 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>RRDs</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#note">NOTE</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -58,7 +50,8 @@
   RRDs::tune ...
   RRDs::times(start, end)
   RRDs::dump ...
-  RRDs::restore ...</pre>
+  RRDs::restore ...
+  RRDs::flushcached ...</pre>
 <p>
 </p>
 <hr />
@@ -78,7 +71,7 @@ RRDtool documentation. The command line call</p>
 <pre>
  --template=in:out</pre>
 <p>is also valid.</p>
-<p>The RRDs::times function takes two parameters:  a &quot;start&quot; and &quot;end&quot; time.
+<p>The RRDs::times function takes two parameters:  a ``start'' and ``end'' time.
 These should be specified in the <strong>AT-STYLE TIME SPECIFICATION</strong> format
 used by RRDtool.  See the <strong>rrdfetch</strong> documentation for a detailed
 explanation on how to specify time.</p>
@@ -145,7 +138,7 @@ integers, a pointer to an array and a pointer to a array of pointers.</p>
     print &quot;\n&quot;;
   }</pre>
 <p><strong>RRDs::times</strong> returns two integers which are the number of seconds since
-epoch (1970-01-01) for the supplied &quot;start&quot; and &quot;end&quot; arguments, respectively.</p>
+epoch (1970-01-01) for the supplied ``start'' and ``end'' arguments, respectively.</p>
 <p>See the examples directory for more ways to use this extension.</p>
 <p>
 </p>
index fdecfa3c6de8cdc4c9a0e66efa67e4e22e22b3ba..f6aef5be917be0ddf121fa7591e19d043bacbc20 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "BIN_DEC_HEX 1"
-.TH BIN_DEC_HEX 1 "2009-02-21" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH BIN_DEC_HEX 1 "2009-02-21" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 bin_dec_hex \- How to use binary, decimal, and hexadecimal notation.
 .SH "DESCRIPTION"
@@ -141,7 +142,7 @@ it is not the first one.
 .PP
 If this sounds cryptic to you, this is what I've just said in numbers:
 .PP
-.Vb 10
+.Vb 14
 \&     0
 \&     1
 \&     2
@@ -178,7 +179,7 @@ digits. They only use two different symbols, namely \*(L"0\*(R" and \*(L"1\*(R".
 the same rules to this set of digits and you get the binary numbering
 system:
 .PP
-.Vb 10
+.Vb 14
 \&     0
 \&     1
 \&    10
@@ -245,7 +246,9 @@ representations, but with eight different symbols.
 \& Octal       (8)
 \& Decimal     (10)
 \& Hexadecimal (16)
-\&
+.Ve
+.PP
+.Vb 23
 \& (2)    (8) (10) (16)
 \& 00000   0    0    0
 \& 00001   1    1    1
@@ -354,7 +357,7 @@ It is the same in all other representations:
 This example can not be done for binary as that system only uses two
 symbols. Another example:
 .PP
-\&\f(CW%1010\fR would be
+%1010 would be
 .PP
 .Vb 4
 \& 1 * 2^3
@@ -410,8 +413,8 @@ The other method builds up the number from the right. Let's try 41'029
 again.  Divide by 16 and do not use fractions (only whole numbers).
 .PP
 .Vb 4
-\& 41\*(Aq029 / 16 is 2\*(Aq564 with a remainder of 5. Write down 5.
-\& 2\*(Aq564 / 16 is 160 with a remainder of 4. Write the 4 before the 5.
+\& 41'029 / 16 is 2'564 with a remainder of 5. Write down 5.
+\& 2'564 / 16 is 160 with a remainder of 4. Write the 4 before the 5.
 \& 160 / 16 is 10 with no remainder. Prepend 45 with 0.
 \& 10 / 16 is below one. End here and prepend 0xA. End up with 0xA045.
 .Ve
@@ -429,7 +432,7 @@ has the advantage that you can see very easily if you should write down
 a zero or a one: if you divide by two the remainder will be zero if it
 is an even number and one if it is an odd number:
 .PP
-.Vb 10
+.Vb 16
 \& 41029 / 2 = 20514 remainder 1
 \& 20514 / 2 = 10257 remainder 0
 \& 10257 / 2 =  5128 remainder 1
@@ -472,7 +475,9 @@ Group \f(CW%1010000001000101\fR by three and convert into octal:
 \& %1 010 000 001 000 101
 \& %001 010 000 001 000 101
 \&    1   2   0   1   0   5 \-\-> 0120105
-\&
+.Ve
+.PP
+.Vb 3
 \& So: %1010000001000101 = 0120105 = 0xA045 = 41029
 \& Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029(10)
 \& Or: 1010000001000101(2) = 120105(8) = A045(16) = 41029
index 729deb9c4152583f7231894fba6c6ede6740da94..7296b1c3a7f274c59759497aff774ac463f93098 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>bin_dec_hex</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#description">DESCRIPTION</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -60,16 +52,16 @@ it is not the first one.</p>
 <p>and so on.</p>
 <p>Each time the digit nine is incremented, it is reset to 0 and the
 position before (to the left) is incremented (from 0 to 1). Then
-number 9 can be seen as &quot;00009&quot; and when we should increment 9, we
+number 9 can be seen as ``00009'' and when we should increment 9, we
 reset it to zero and increment the digit just before the 9 so the
-number becomes &quot;00010&quot;. Leading zeros we don't write except if it is
+number becomes ``00010''. Leading zeros we don't write except if it is
 the only digit (number 0). And of course, we write zeros if they occur
 anywhere inside or at the end of a number:</p>
 <pre>
  &quot;00010&quot; -&gt; &quot; 0010&quot; -&gt; &quot; 010&quot; -&gt; &quot;  10&quot;, but not &quot;  1 &quot;.</pre>
 <p>This was pretty basic, you already knew this. Why did I tell it?
 Well, computers usually do not represent numbers with 10 different
-digits. They only use two different symbols, namely &quot;0&quot; and &quot;1&quot;. Apply
+digits. They only use two different symbols, namely ``0'' and ``1''. Apply
 the same rules to this set of digits and you get the binary numbering
 system:</p>
 <pre>
@@ -96,7 +88,7 @@ numbering system or base.  Normally, if we do not explicitly specify
 the numbering system used, we implicitly use the decimal system. If we
 want to use any other numbering system, we'll have to make that
 clear. There are a few widely adopted methods to do so. One common
-form is to write 1010(2) which means that you wrote down a number in
+form is to write <code>1010(2)</code> which means that you wrote down a number in
 its binary representation. It is the number ten. If you would write
 1010 without specifying the base, the number is interpreted as one
 thousand and ten using base 10.</p>
@@ -113,7 +105,7 @@ on the context.</p>
 (...programming...), but the numbers will have large
 representations. The number 65'535 (often in the decimal system a ' is
 used to separate blocks of three digits for readability) would be
-written down as 1111111111111111(2) which is 16 times the digit 1.
+written down as <code>1111111111111111(2)</code> which is 16 times the digit 1.
 This is difficult and prone to errors. Therefore, we usually would use
 another base, called hexadecimal. It uses 16 different symbols. First
 the symbols from the decimal system are used, thereafter we continue
@@ -172,14 +164,14 @@ each digit, write down its binary equivalent.</p>
 <p>Computers (or rather the parsers running on them) would have a hard
 time converting a number like 1234(16). Therefore hexadecimal numbers
 are specified with a prefix. This prefix depends on the language
-you're writing in. Some of the prefixes are &quot;0x&quot; for C, &quot;$&quot; for
-Pascal, &quot;#&quot; for HTML.  It is common to assume that if a number starts
+you're writing in. Some of the prefixes are ``0x'' for C, ``$'' for
+Pascal, ``#'' for HTML.  It is common to assume that if a number starts
 with a zero, it is octal. It does not matter what is used as long as
-you know what it is. I will use &quot;0x&quot; for hexadecimal, &quot;%&quot; for binary
-and &quot;0&quot; for octal.  The following numbers are all the same, just their
+you know what it is. I will use ``0x'' for hexadecimal, ``%'' for binary
+and ``0'' for octal.  The following numbers are all the same, just their
 representation (base) is different: 021 0x11 17 %00010001</p>
 <p>To do arithmetics and conversions you need to understand one more thing.
-It is something you already know but perhaps you do not &quot;see&quot; it yet:</p>
+It is something you already know but perhaps you do not ``see'' it yet:</p>
 <p>If you write down 1234, (no prefix, so it is decimal) you are talking
 about the number one thousand, two hundred and thirty four. In sort of
 a formula:</p>
@@ -194,7 +186,7 @@ a formula:</p>
  2 * 10^2
  3 * 10^1
  4 * 10^0</pre>
-<p>where ^ means &quot;to the power of&quot;.</p>
+<p>where ^ means ``to the power of''.</p>
 <p>We are using the base 10, and the positions 0,1,2 and 3.
 The right-most position should NOT be multiplied with 10. The second
 from the right should be multiplied one time with 10. The third from
@@ -231,8 +223,8 @@ yet another way afterwards.</p>
 <p>First you need to know how many positions will be used in the other
 system. To do so, you need to know the maximum numbers you'll be
 using. Well, that's not as hard as it looks. In decimal, the maximum
-number that you can form with two digits is &quot;99&quot;. The maximum for
-three: &quot;999&quot;. The next number would need an extra position. Reverse
+number that you can form with two digits is ``99''. The maximum for
+three: ``999''. The next number would need an extra position. Reverse
 this idea and you will see that the number can be found by taking 10^3
 (10*10*10 is 1000) minus 1 or 10^2 minus one.</p>
 <p>This can be done for hexadecimal as well:</p>
@@ -249,12 +241,12 @@ from 1 to 15 (0x1 to 0xF). Do the same for the other positions.</p>
 <p>Let's try with 41'029. It is smaller than 16^4 but bigger than 16^3-1. This
 means that we have to use four positions.
 We can subtract 16^3 from 41'029 ten times without going below zero.
-The left-most digit will therefore be &quot;A&quot;, so we have 0xA????.
+The left-most digit will therefore be ``A'', so we have 0xA????.
 The number is reduced to 41'029 - 10*4'096 = 41'029-40'960 = 69.
 69 is smaller than 16^3 but not bigger than 16^2-1. The second digit
-is therefore &quot;0&quot; and we now have 0xA0??.
+is therefore ``0'' and we now have 0xA0??.
 69 is smaller than 16^2 and bigger than 16^1-1. We can subtract 16^1
-(which is just plain 16) four times and write down &quot;4&quot; to get 0xA04?.
+(which is just plain 16) four times and write down ``4'' to get 0xA04?.
 Subtract 64 from 69 (69 - 4*16) and the last digit is 5 --&gt; 0xA045.</p>
 <p>The other method builds up the number from the right. Let's try 41'029
 again.  Divide by 16 and do not use fractions (only whole numbers).</p>
@@ -341,7 +333,7 @@ find that you didn't make mistakes. In the end, you'll do calculi in
 other bases as easily as you do them in decimal.</p>
 <p>When the numbers get bigger, you'll have to realize that a computer is
 not called a computer just to have a nice name. There are many
-different calculators available, use them. For Unix you could use &quot;bc&quot;
+different calculators available, use them. For Unix you could use ``bc''
 which is short for Binary Calculator. It calculates not only in
 decimal, but in all bases you'll ever want to use (among them Binary).</p>
 <p>For people on Windows:
index 4af9de3f1c5c68ca8d68e44e9f28167301e0fd3e..55607153de9f46f9bbb1bdfb981131511845b4e7 100644 (file)
@@ -6,8 +6,8 @@ N\bNA\bAM\bME\bE
        bin_dec_hex - How to use binary, decimal, and hexadecimal notation.
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-       Most people use the decimal numbering system. This system uses ten
-       symbols to represent numbers. When those ten symbols are used up, they
+       Most people use the decimal numbering system. This system uses ten sym-
+       bols to represent numbers. When those ten symbols are used up, they
        start all over again and increment the position to the left. The digit
        0 is only shown if it is the only symbol in the sequence, or if it is
        not the first one.
@@ -31,9 +31,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        and so on.
 
-       Each time the digit nine is incremented, it is reset to 0 and the
-       position before (to the left) is incremented (from 0 to 1). Then number
-       can be seen as "00009" and when we should increment 9, we reset it to
+       Each time the digit nine is incremented, it is reset to 0 and the posi-
+       tion before (to the left) is incremented (from 0 to 1). Then number 9
+       can be seen as "00009" and when we should increment 9, we reset it to
        zero and increment the digit just before the 9 so the number becomes
        "00010". Leading zeros we don't write except if it is the only digit
        (number 0). And of course, we write zeros if they occur anywhere inside
@@ -66,39 +66,39 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        If you count the number of rows, you'll see that these are again 14
        different numbers. The numbers are the same and mean the same as in the
        first list, we just used a different representation. This means that
-       you have to know the representation used, or as it is called the
-       numbering system or base.  Normally, if we do not explicitly specify
-       the numbering system used, we implicitly use the decimal system. If we
-       want to use any other numbering system, we'll have to make that clear.
-       There are a few widely adopted methods to do so. One common form is to
-       write 1010(2) which means that you wrote down a number in its binary
-       representation. It is the number ten. If you would write 1010 without
-       specifying the base, the number is interpreted as one thousand and ten
-       using base 10.
-
-       In books, another form is common. It uses subscripts (little
-       characters, more or less in between two rows). You can leave out the
-       parentheses in that case and write down the number in normal characters
-       followed by a little two just behind it.
+       you have to know the representation used, or as it is called the num-
+       bering system or base.  Normally, if we do not explicitly specify the
+       numbering system used, we implicitly use the decimal system. If we want
+       to use any other numbering system, we'll have to make that clear. There
+       are a few widely adopted methods to do so. One common form is to write
+       1010(2) which means that you wrote down a number in its binary repre-
+       sentation. It is the number ten. If you would write 1010 without speci-
+       fying the base, the number is interpreted as one thousand and ten using
+       base 10.
+
+       In books, another form is common. It uses subscripts (little charac-
+       ters, more or less in between two rows). You can leave out the paren-
+       theses in that case and write down the number in normal characters fol-
+       lowed by a little two just behind it.
 
        As the numbering system used is also called the base, we talk of the
        number 1100 base 2, the number 12 base 10.
 
-       Within the binary system, it is common to write leading zeros. The
-       numbers are written down in series of four, eight or sixteen depending
-       on the context.
+       Within the binary system, it is common to write leading zeros. The num-
+       bers are written down in series of four, eight or sixteen depending on
+       the context.
 
-       We can use the binary form when talking to computers
-       (...programming...), but the numbers will have large representations.
-       The number 65'535 (often in the decimal system a ' is used to separate
-       blocks of three digits for readability) would be written down as
+       We can use the binary form when talking to computers (...program-
+       ming...), but the numbers will have large representations. The number
+       65'535 (often in the decimal system a ' is used to separate blocks of
+       three digits for readability) would be written down as
        1111111111111111(2) which is 16 times the digit 1.  This is difficult
        and prone to errors. Therefore, we usually would use another base,
        called hexadecimal. It uses 16 different symbols. First the symbols
-       from the decimal system are used, thereafter we continue with
-       alphabetic characters. We get 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D,
-       E and F. This system is chosen because the hexadecimal form can be
-       converted into the binary system very easily (and back).
+       from the decimal system are used, thereafter we continue with alpha-
+       betic characters. We get 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E
+       and F. This system is chosen because the hexadecimal form can be con-
+       verted into the binary system very easily (and back).
 
        There is yet another system in use, called the octal system. This was
        more common in the old days, but is not used very often anymore. As you
@@ -137,11 +137,10 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        Most computers used nowadays are using bytes of eight bits. This means
        that they store eight bits at a time. You can see why the octal system
-       is not the most practical for that: You'd need three digits to
-       represent the eight bits and this means that you'd have to use one
-       complete digit to represent only two bits (2+3+3=8). This is a waste.
-       For hexadecimal digits, you need only two digits which are used
-       completely:
+       is not the most practical for that: You'd need three digits to repre-
+       sent the eight bits and this means that you'd have to use one complete
+       digit to represent only two bits (2+3+3=8). This is a waste. For hex-
+       adecimal digits, you need only two digits which are used completely:
 
         (2)      (8)  (10) (16)
         11111111 377  255   FF
@@ -160,8 +159,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        for HTML.  It is common to assume that if a number starts with a zero,
        it is octal. It does not matter what is used as long as you know what
        it is. I will use "0x" for hexadecimal, "%" for binary and "0" for
-       octal.  The following numbers are all the same, just their
-       representation (base) is different: 021 0x11 17 %00010001
+       octal.  The following numbers are all the same, just their representa-
+       tion (base) is different: 021 0x11 17 %00010001
 
        To do arithmetics and conversions you need to understand one more
        thing.  It is something you already know but perhaps you do not "see"
@@ -270,9 +269,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        Which method to use is up to you. Use whatever works for you.  I use
        them both without being able to tell what method I use in each case, it
        just depends on the number, I think. Fact is, some numbers will occur
-       frequently while programming. If the number is close to one I am
-       familiar with, then I will use the first method (like 32'770 which is
-       into 32'768 + 2 and I just know that it is 0x8000 + 0x2 = 0x8002).
+       frequently while programming. If the number is close to one I am famil-
+       iar with, then I will use the first method (like 32'770 which is into
+       32'768 + 2 and I just know that it is 0x8000 + 0x2 = 0x8002).
 
        For binary the same approach can be used. The base is 2 and not 16, and
        the number of positions will grow rapidly. Using the second method has
@@ -349,19 +348,18 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        For low values, try to do the calculations yourself, then check them
        with a calculator. The more you do the calculations yourself, the more
-       you'll find that you didn't make mistakes. In the end, you'll do
-       calculi in other bases as easily as you do them in decimal.
+       you'll find that you didn't make mistakes. In the end, you'll do cal-
+       culi in other bases as easily as you do them in decimal.
 
        When the numbers get bigger, you'll have to realize that a computer is
-       not called a computer just to have a nice name. There are many
-       different calculators available, use them. For Unix you could use "bc"
-       which is short for Binary Calculator. It calculates not only in
-       decimal, but in all bases you'll ever want to use (among them Binary).
+       not called a computer just to have a nice name. There are many differ-
+       ent calculators available, use them. For Unix you could use "bc" which
+       is short for Binary Calculator. It calculates not only in decimal, but
+       in all bases you'll ever want to use (among them Binary).
 
-       For people on Windows: Start the calculator
-       (start->programs->accessories->calculator) and if necessary click
-       view->scientific. You now have a scientific calculator and can compute
-       in binary or hexadecimal.
+       For people on Windows: Start the calculator (start->programs->acces-
+       sories->calculator) and if necessary click view->scientific. You now
+       have a scientific calculator and can compute in binary or hexadecimal.
 
 A\bAU\bUT\bTH\bHO\bOR\bR
        I hope you enjoyed the examples and their descriptions. If you do, help
@@ -373,4 +371,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2009-02-21                    BIN_DEC_HEX(1)
+1.3.99909060808                   2009-02-21                    BIN_DEC_HEX(1)
index 9afdf9e47cf776754ec67d5708238e9f37192530..937d629264eb550559ab0b59622dc583917b92ca 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "CDEFTUTORIAL 1"
-.TH CDEFTUTORIAL 1 "2009-02-21" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH CDEFTUTORIAL 1 "2009-02-21" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 cdeftutorial \- Alex van den Bogaerdt's CDEF tutorial
 .SH "DESCRIPTION"
@@ -142,7 +143,7 @@ to add it.  I will then try to provide an answer in the next release
 of this tutorial.  No feedback equals no changes! Additions to
 this document are also welcome.  \*(-- Alex van den Bogaerdt
 <alex@vandenbogaerdt.nl>
-.SS "Why this tutorial?"
+.Sh "Why this tutorial?"
 .IX Subsection "Why this tutorial?"
 One of the powerful parts of RRDtool is its ability to do all sorts
 of calculations on the data retrieved from its databases. However,
@@ -155,7 +156,7 @@ If you are happy with the official documentation, you may find this
 document too simple or even boring. If you do choose to read this
 tutorial, I also expect you to have read and fully understand my
 other tutorial.
-.SS "More reading"
+.Sh "More reading"
 .IX Subsection "More reading"
 If you have difficulties with the way I try to explain it please read
 Steve Rader's rpntutorial. It may help you understand how this all works.
@@ -204,7 +205,7 @@ same as the variable named in the \s-1DEF\s0 (inbytes)!
 .IX Header "RPN-expressions"
 \&\s-1RPN\s0 is short-hand for Reverse Polish Notation. It works as follows.
 You put the variables or numbers on a stack. You also put operations
-(things-to-do) on the stack and this stack is then processed. The result
+(things\-to\-do) on the stack and this stack is then processed. The result
 will be placed on the stack. At the end, there should be exactly one
 number left: the outcome of the series of operations. If there is not
 exactly one number left, RRDtool will complain loudly.
@@ -328,7 +329,7 @@ add b to c and then add a to the result. This makes it possible to
 rewrite the \s-1RPN\s0 into \f(CW\*(C`CDEF:result=a,b,c,d,e,+,+,+,+\*(C'\fR which is
 evaluated differently:
 .PP
-.Vb 10
+.Vb 13
 \&   push value of variable a on the stack: a
 \&   push value of variable b on the stack: a b
 \&   push value of variable c on the stack: a b c
@@ -376,7 +377,7 @@ Just do all the math by hand to see what happens, I'm sure this will
 solve most, if not all, problems you encounter.
 .SH "Some special numbers"
 .IX Header "Some special numbers"
-.SS "The unknown value"
+.Sh "The unknown value"
 .IX Subsection "The unknown value"
 Sometimes collecting your data will fail. This can be very common,
 especially when querying over busy links. RRDtool can be configured
@@ -403,12 +404,12 @@ every minute:
 .PP
 .Vb 7
 \&   counter value    resulting rate
-\&   10\*(Aq000
-\&   10\*(Aq060            1; (10\*(Aq060\-10\*(Aq000)/60 == 1
-\&   10\*(Aq120            1; (10\*(Aq120\-10\*(Aq060)/60 == 1
-\&   unknown           unknown; you don\*(Aqt know the last value
-\&   10\*(Aq240            unknown; you don\*(Aqt know the previous value
-\&   10\*(Aq300            1; (10\*(Aq300\-10\*(Aq240)/60 == 1
+\&   10'000
+\&   10'060            1; (10'060\-10'000)/60 == 1
+\&   10'120            1; (10'120\-10'060)/60 == 1
+\&   unknown           unknown; you don't know the last value
+\&   10'240            unknown; you don't know the previous value
+\&   10'300            1; (10'300\-10'240)/60 == 1
 .Ve
 .PP
 If the \s-1CDP\s0 was to be calculated from the last five updates, it would get
@@ -420,7 +421,7 @@ would be unknown.
 You have to decide the proper values for heartbeat, number of PDPs per
 \&\s-1CDP\s0 and the xff factor. As you can see from the previous text they define
 the behavior of your \s-1RRA\s0.
-.SS "Working with unknown data in your database"
+.Sh "Working with unknown data in your database"
 .IX Subsection "Working with unknown data in your database"
 As you have read in the previous chapter, entries in an \s-1RRA\s0 can be
 set to the unknown value. If you do calculations with this type of
@@ -445,7 +446,7 @@ wasn't installed yet!) but you know that the data rate through the device
 had to be zero (because of the same reason: it was not installed).
 .PP
 There are some examples below that make this change.
-.SS "Infinity"
+.Sh "Infinity"
 .IX Subsection "Infinity"
 Infinite data is another form of a special number. It cannot be
 graphed because by definition you would never reach the infinite
@@ -461,7 +462,7 @@ vertical dimensions. You can think of it as drawing an \s-1AREA\s0 with an
 infinite height and displaying only the part that is visible in the
 current graph. This is probably a good way to approximate infinity
 and it sure allows for some neat tricks. See below for examples.
-.SS "Working with unknown data and infinity"
+.Sh "Working with unknown data and infinity"
 .IX Subsection "Working with unknown data and infinity"
 Sometimes you would like to discard unknown data and pretend it is zero
 (or any other value for that matter) and sometimes you would like to
@@ -470,7 +471,7 @@ This is why CDEFs have support for unknown data. There are also examples
 available that show unknown data by using infinity.
 .SH "Some examples"
 .IX Header "Some examples"
-.SS "Example: using a recently created \s-1RRD\s0"
+.Sh "Example: using a recently created \s-1RRD\s0"
 .IX Subsection "Example: using a recently created RRD"
 You are keeping statistics on your router for over a year now. Recently
 you installed an extra router and you would like to show the combined
@@ -530,7 +531,9 @@ If you want to check this \s-1RPN\s0 expression, just mimic RRDtool behavior:
 \&   CDEF:result=value,UN,0,value,IF  (value,UN) is not true so it becomes 0
 \&   CDEF:result=0,0,value,IF         "IF" will return the 3rd value
 \&   CDEF:result=value                The known value is returned
-\&
+.Ve
+.PP
+.Vb 4
 \&   For the unknown value, this happens:
 \&   CDEF:result=value,UN,0,value,IF  (value,UN) is true so it becomes 1
 \&   CDEF:result=1,0,value,IF         "IF" sees 1 and returns the 2nd value
@@ -542,7 +545,7 @@ can use that other value.
 .PP
 Eventually, when all unknown data is removed from the \s-1RRD\s0, you may want
 to remove this rule so that unknown data is properly displayed.
-.SS "Example: better handling of unknown data, by using time"
+.Sh "Example: better handling of unknown data, by using time"
 .IX Subsection "Example: better handling of unknown data, by using time"
 The above example has one drawback. If you do log unknown data in
 your database after installing your new equipment, it will also be
@@ -612,9 +615,13 @@ so lets do it quick:
 \&      where x represents "time>937521357"
 \&      where a represents the original value
 \&      where b represents the outcome of the previous example
-\&
+.Ve
+.PP
+.Vb 1
 \&   time>937521357       \-\-> TIME,937521357,GT
-\&
+.Ve
+.PP
+.Vb 4
 \&   if (x) then a else b \-\-> x,a,b,IF
 \&   substitute x         \-\-> TIME,937521357,GT,a,b,IF
 \&   substitute a         \-\-> TIME,937521357,GT,value,b,IF
@@ -626,7 +633,7 @@ We end up with:
 .PP
 This looks very complex, however, as you can see, it was not too hard to
 come up with.
-.SS "Example: Pretending weird data isn't there"
+.Sh "Example: Pretending weird data isn't there"
 .IX Subsection "Example: Pretending weird data isn't there"
 Suppose you have a problem that shows up as huge spikes in your graph.
 You know this happens and why, so you decide to work around the problem.
@@ -663,7 +670,7 @@ The two \s-1CDEF\s0 expressions would be:
 \&    CDEF:result=number,100000,GT,UNKN,number,IF
 \&    CDEF:result=number,100000,GT,100000,number,IF
 .Ve
-.SS "Example: working on a certain time span"
+.Sh "Example: working on a certain time span"
 .IX Subsection "Example: working on a certain time span"
 If you want a graph that spans a few weeks, but would only want to
 see some routers' data for one week, you need to \*(L"hide\*(R" the rest of
@@ -707,7 +714,7 @@ could also do it the other way around:
 .Ve
 .PP
 This will return an \s-1UNKNOWN\s0 if either comparison returns true.
-.SS "Example: You suspect to have problems and want to see unknown data."
+.Sh "Example: You suspect to have problems and want to see unknown data."
 .IX Subsection "Example: You suspect to have problems and want to see unknown data."
 Suppose you add up the number of active users on several terminal servers.
 If one of them doesn't give an answer (or an incorrect one) you get \*(L"NaN\*(R"
@@ -753,7 +760,7 @@ be filled in on the graph at that particular time.
 \&   AREA:allusers#0000FF:combined user count
 \&   AREA:wrongdata#FF0000:unknown data
 .Ve
-.SS "Same example useful with STACKed data:"
+.Sh "Same example useful with STACKed data:"
 .IX Subsection "Same example useful with STACKed data:"
 If you use stack in the previous example (as I would do) then you don't
 add up the values. Therefore, there is no relationship between the
@@ -806,7 +813,7 @@ If you do so, you won't be able to use these next GPRINTs:
 .Ve
 .SH "The examples from the RRD graph manual page"
 .IX Header "The examples from the RRD graph manual page"
-.SS "Degrees Celsius vs. Degrees Fahrenheit"
+.Sh "Degrees Celsius vs. Degrees Fahrenheit"
 .IX Subsection "Degrees Celsius vs. Degrees Fahrenheit"
 To convert Celsius into Fahrenheit use the formula
 F=9/5*C+32
@@ -835,7 +842,7 @@ as follows:
 \&   6. push function "plus" and process it
 \&      the stack contains now the temperature in Fahrenheit
 .Ve
-.SS "Changing unknown into zero"
+.Sh "Changing unknown into zero"
 .IX Subsection "Changing unknown into zero"
 .Vb 9
 \&   rrdtool graph demo.png \-\-title="Demo Graph" \e
@@ -871,9 +878,9 @@ easy to see that we add \*(L"d\*(R" and \*(L"h\*(R", and multiply the result wit
 The end result is that we have added \*(L"idat1\*(R" and \*(L"idat2\*(R" and in the
 process we effectively ignored unknown values. The result is multiplied
 by eight, most likely to convert bytes/s to bits/s.
-.SS "Infinity demo"
+.Sh "Infinity demo"
 .IX Subsection "Infinity demo"
-.Vb 10
+.Vb 13
 \&   rrdtool graph example.png \-\-title="INF demo" \e
 \&      DEF:val1=some.rrd:ds0:AVERAGE \e
 \&      DEF:val2=some.rrd:ds1:AVERAGE \e
@@ -934,31 +941,36 @@ If your data can also have negative values you also need to overwrite
 the other half of your graph. This can be done in a relatively simple
 way: what you need is the \*(L"wipeout\*(R" variable and place a negative
 sign before it:  \*(L"CDEF:wipeout2=wipeout,\-1,*\*(R"
-.SS "Filtering data"
+.Sh "Filtering data"
 .IX Subsection "Filtering data"
 You may do some complex data filtering:
 .PP
 .Vb 1
 \&  MEDIAN FILTER: filters shot noise
-\&
+.Ve
+.PP
+.Vb 7
 \&    DEF:var=database.rrd:traffic:AVERAGE
 \&    CDEF:prev1=PREV(var)
 \&    CDEF:prev2=PREV(prev1)
 \&    CDEF:prev3=PREV(prev2)
 \&    CDEF:median=prev1,prev2,prev3,+,+,3,/
 \&    LINE3:median#000077:filtered
-\&    LINE1:prev2#007700:\*(Aqraw data\*(Aq
-\&
-\&
+\&    LINE1:prev2#007700:'raw data'
+.Ve
+.PP
+.Vb 1
 \&  DERIVATE:
-\&
+.Ve
+.PP
+.Vb 7
 \&    DEF:var=database.rrd:traffic:AVERAGE
 \&    CDEF:prev1=PREV(var)
 \&    CDEF:time=TIME
 \&    CDEF:prevtime=PREV(time)
 \&    CDEF:derivate=var,prev1,\-,time,prevtime,\-,/
 \&    LINE3:derivate#000077:derivate
-\&    LINE1:var#007700:\*(Aqraw data\*(Aq
+\&    LINE1:var#007700:'raw data'
 .Ve
 .SH "Out of ideas for now"
 .IX Header "Out of ideas for now"
index 63c40b6185cfcd77997249afb8183cedb85f8c75..167ed46e2ad3e6f09a92ea827b3c41365489f332 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>cdeftutorial</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
@@ -27,7 +23,7 @@
 
        <li><a href="#what_are_cdefs">What are CDEFs?</a></li>
        <li><a href="#syntax">Syntax</a></li>
-       <li><a href="#rpn_expressions">RPN-expressions</a></li>
+       <li><a href="#rpnexpressions">RPN-expressions</a></li>
        <li><a href="#converting_your_wishes_to_rpn">Converting your wishes to RPN</a></li>
        <li><a href="#some_special_numbers">Some special numbers</a></li>
        <ul>
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -108,7 +100,7 @@ Steve Rader's <a href="././rpntutorial.html">the rpntutorial manpage</a>. It may
 </p>
 <hr />
 <h1><a name="what_are_cdefs">What are CDEFs?</a></h1>
-<p>When retrieving data from an RRD, you are using a &quot;DEF&quot; to work with
+<p>When retrieving data from an RRD, you are using a ``DEF'' to work with
 that data. Think of it as a variable that changes over time (where
 time is the x-axis). The value of this variable is what is found in
 the database at that particular time and you can't do any
@@ -121,16 +113,16 @@ from DEFs and perform calculations on them.</p>
 <pre>
    DEF:var_name_1=some.rrd:ds_name:CF
    CDEF:var_name_2=RPN_expression</pre>
-<p>You first define &quot;var_name_1&quot; to be data collected from data source
-&quot;ds_name&quot; found in RRD &quot;some.rrd&quot; with consolidation function &quot;CF&quot;.</p>
-<p>Assume the ifInOctets SNMP counter is saved in mrtg.rrd as the DS &quot;in&quot;.
+<p>You first define ``var_name_1'' to be data collected from data source
+``ds_name'' found in RRD ``some.rrd'' with consolidation function ``CF''.</p>
+<p>Assume the ifInOctets SNMP counter is saved in mrtg.rrd as the DS ``in''.
 Then the following DEF defines a variable for the average of that
 data source:</p>
 <pre>
    DEF:inbytes=mrtg.rrd:in:AVERAGE</pre>
 <p>Say you want to display bits per second (instead of bytes per second
 as stored in the database.)  You have to define a calculation
-(hence &quot;CDEF&quot;) on variable &quot;inbytes&quot; and use that variable (inbits)
+(hence ``CDEF'') on variable ``inbytes'' and use that variable (inbits)
 instead of the original:</p>
 <pre>
    CDEF:inbits=inbytes,8,*</pre>
@@ -142,7 +134,7 @@ same as the variable named in the DEF (inbytes)!</p>
 <p>
 </p>
 <hr />
-<h1><a name="rpn_expressions">RPN-expressions</a></h1>
+<h1><a name="rpnexpressions">RPN-expressions</a></h1>
 <p>RPN is short-hand for Reverse Polish Notation. It works as follows.
 You put the variables or numbers on a stack. You also put operations
 (things-to-do) on the stack and this stack is then processed. The result
@@ -151,47 +143,45 @@ number left: the outcome of the series of operations. If there is not
 exactly one number left, RRDtool will complain loudly.</p>
 <p>Above multiplication by eight will look like:</p>
 <ol>
-<li>
-<p>Start with an empty stack</p>
-</li>
-<li>
-<p>Put the content of variable inbytes on the stack</p>
-</li>
-<li>
-<p>Put the number eight on the stack</p>
-</li>
-<li>
-<p>Put the operation multiply on the stack</p>
-</li>
-<li>
-<p>Process the stack</p>
-</li>
-<li>
-<p>Retrieve the value from the stack and put it in variable inbits</p>
-</li>
-</ol>
+<li></li>
+Start with an empty stack
+<p></p>
+<li></li>
+Put the content of variable inbytes on the stack
+<p></p>
+<li></li>
+Put the number eight on the stack
+<p></p>
+<li></li>
+Put the operation multiply on the stack
+<p></p>
+<li></li>
+Process the stack
+<p></p>
+<li></li>
+Retrieve the value from the stack and put it in variable inbits
+<p></p></ol>
 <p>We will now do an example with real numbers. Suppose the variable
 inbytes would have value 10, the stack would be:</p>
 <ol>
-<li>
-<p>||</p>
-</li>
-<li>
-<p>|10|</p>
-</li>
-<li>
-<p>|10|8|</p>
-</li>
-<li>
-<p>|10|8|*|</p>
-</li>
-<li>
-<p>|80|</p>
-</li>
-<li>
-<p>||</p>
-</li>
-</ol>
+<li></li>
+||
+<p></p>
+<li></li>
+|10|
+<p></p>
+<li></li>
+|10|8|
+<p></p>
+<li></li>
+|10|8|*|
+<p></p>
+<li></li>
+|80|
+<p></p>
+<li></li>
+||
+<p></p></ol>
 <p>Processing the stack (step 5) will retrieve one value from the stack
 (from the right at step 4). This is the operation multiply and this
 takes two values off the stack as input. The result is put back on the
@@ -201,7 +191,7 @@ Generally speaking you have the following order:</p>
 <pre>
    y = A - B  --&gt;  y=minus(A,B)  --&gt;  CDEF:y=A,B,-</pre>
 <p>This is not very intuitive (at least most people don't think so). For
-the function f(A,B) you reverse the position of &quot;f&quot;, but you do not
+the function <code>f(A,B)</code> you reverse the position of ``f'', but you do not
 reverse the order of the variables.</p>
 <p>
 </p>
@@ -220,7 +210,7 @@ are monitoring.</p>
    router3.rrd with link1in link2in</pre>
 <p>Suppose you would like to add up all these counters, except for link2in
 inside router2.rrd. You need to do:</p>
-<p>(in this example, &quot;router1.rrd:link1in&quot; means the DS link1in inside the
+<p>(in this example, ``router1.rrd:link1in'' means the DS link1in inside the
 RRD router1.rrd)</p>
 <pre>
    router1.rrd:link1in
@@ -283,10 +273,10 @@ choose the order yourself, you have to start with the multiplication
 and then add a to it. You may alter the position of b and c, you must
 not alter the position of a and b.</p>
 <p>You have to take this in consideration when converting this expression
-into RPN. Read it as: &quot;Add the outcome of b*c to a&quot; and then it is
+into RPN. Read it as: ``Add the outcome of b*c to a'' and then it is
 easy to write the RPN expression: <code>result=a,b,c,*,+</code>
 Another expression that would return the same: <code>result=b,c,*,a,+</code></p>
-<p>In normal math, you may encounter something like &quot;a*(b+c)&quot; and this
+<p>In normal math, you may encounter something like ``a*(b+c)'' and this
 can also be converted into RPN. The parenthesis just tell you to first
 add b and c, and then multiply a with the result. Again, now it is
 easy to write it in RPN: <code>result=a,b,c,+,*</code>. Note that this is very
@@ -306,21 +296,20 @@ solve most, if not all, problems you encounter.</p>
 <h2><a name="the_unknown_value">The unknown value</a></h2>
 <p>Sometimes collecting your data will fail. This can be very common,
 especially when querying over busy links. RRDtool can be configured
-to allow for one (or even more) unknown value(s) and calculate the missing
+to allow for one (or even more) unknown <code>value(s)</code> and calculate the missing
 update. You can, for instance, query your device every minute. This is
 creating one so called PDP or primary data point per minute. If you
 defined your RRD to contain an RRA that stores 5-minute values, you need
 five of those PDPs to create one CDP (consolidated data point).
 These PDPs can become unknown in two cases:</p>
 <ol>
-<li>
-<p>The updates are too far apart. This is tuned using the &quot;heartbeat&quot; setting.</p>
-</li>
-<li>
-<p>The update was set to unknown on purpose by inserting no value (using the
-template option) or by using &quot;U&quot; as the value to insert.</p>
-</li>
-</ol>
+<li></li>
+The updates are too far apart. This is tuned using the ``heartbeat'' setting.
+<p></p>
+<li></li>
+The update was set to unknown on purpose by inserting no value (using the
+template option) or by using ``U'' as the value to insert.
+<p></p></ol>
 <p>When a CDP is calculated, another mechanism determines if this CDP is valid
 or not. If there are too many PDPs unknown, the CDP is unknown as well.
 This is determined by the xff factor. Please note that one unknown counter
@@ -352,7 +341,7 @@ set to the unknown value. If you do calculations with this type of
 value, the result has to be unknown too. This means that an expression
 such as <code>result=a,b,+</code> will be unknown if either a or b is unknown.
 It would be wrong to just ignore the unknown value and return the value
-of the other parameter. By doing so, you would assume &quot;unknown&quot; means &quot;zero&quot;
+of the other parameter. By doing so, you would assume ``unknown'' means ``zero''
 and this is not true.</p>
 <p>There has been a case where somebody was collecting data for over a year.
 A new piece of equipment was installed, a new RRD was created and the
@@ -404,38 +393,37 @@ throughput for these two devices.</p>
 will add known data (from router.rrd) to unknown data (from router2.rrd) for
 the bigger part of your stats. You could solve this in a few ways:</p>
 <ul>
-<li>
-<p>While creating the new database, fill it with zeros from the start to now.
+<li></li>
+While creating the new database, fill it with zeros from the start to now.
 You have to make the database start at or before the least recent time in
-the other database.</p>
-</li>
-<li>
-<p>Alternatively, you could use CDEF and alter unknown data to zero.</p>
-</li>
-</ul>
+the other database.
+<p></p>
+<li></li>
+Alternatively, you could use CDEF and alter unknown data to zero.
+<p></p></ul>
 <p>Both methods have their pros and cons. The first method is troublesome and
 if you want to do that you have to figure it out yourself. It is not
 possible to create a database filled with zeros, you have to put them in
 manually. Implementing the second method is described next:</p>
-<p>What we want is: &quot;if the value is unknown, replace it with zero&quot;. This
+<p>What we want is: ``if the value is unknown, replace it with zero''. This
 could be written in pseudo-code as:  if (value is unknown) then (zero)
-else (value). When reading the <a href="././rrdgraph.html">the rrdgraph manpage</a> manual you notice the &quot;UN&quot;
-function that returns zero or one. You also notice the &quot;IF&quot; function
+else (value). When reading the <a href="././rrdgraph.html">the rrdgraph manpage</a> manual you notice the ``UN''
+function that returns zero or one. You also notice the ``IF'' function
 that takes zero or one as input.</p>
-<p>First look at the &quot;IF&quot; function. It takes three values from the stack,
+<p>First look at the ``IF'' function. It takes three values from the stack,
 the first value is the decision point, the second value is returned to
-the stack if the evaluation is &quot;true&quot; and if not, the third value is
-returned to the stack. We want the &quot;UN&quot; function to decide what happens
+the stack if the evaluation is ``true'' and if not, the third value is
+returned to the stack. We want the ``UN'' function to decide what happens
 so we combine those two functions in one CDEF.</p>
-<p>Lets write down the two possible paths for the &quot;IF&quot; function:</p>
+<p>Lets write down the two possible paths for the ``IF'' function:</p>
 <pre>
    if true  return a
    if false return b</pre>
-<p>In RPN:  <code>result=x,a,b,IF</code> where &quot;x&quot; is either true or false.</p>
-<p>Now we have to fill in &quot;x&quot;, this should be the &quot;(value is unknown)&quot; part
+<p>In RPN:  <code>result=x,a,b,IF</code> where ``x'' is either true or false.</p>
+<p>Now we have to fill in ``x'', this should be the ``(value is unknown)'' part
 and this is in RPN:  <code>result=value,UN</code></p>
 <p>We now combine them: <code>result=value,UN,a,b,IF</code> and when we fill in the
-appropriate things for &quot;a&quot; and &quot;b&quot; we're finished:</p>
+appropriate things for ``a'' and ``b'' we're finished:</p>
 <p><code>CDEF:result=value,UN,0,value,IF</code></p>
 <p>You may want to read Steve Rader's RPN guide if you have difficulties
 with the way I explained this last example.</p>
@@ -462,22 +450,21 @@ your database after installing your new equipment, it will also be
 translated into zero and therefore you won't see that there was a
 problem. This is not good and what you really want to do is:</p>
 <ul>
-<li>
-<p>If there is unknown data, look at the time that this sample was taken.</p>
-</li>
-<li>
-<p>If the unknown value is before time xxx, make it zero.</p>
-</li>
-<li>
-<p>If it is after time xxx, leave it as unknown data.</p>
-</li>
-</ul>
+<li></li>
+If there is unknown data, look at the time that this sample was taken.
+<p></p>
+<li></li>
+If the unknown value is before time xxx, make it zero.
+<p></p>
+<li></li>
+If it is after time xxx, leave it as unknown data.
+<p></p></ul>
 <p>This is doable: you can compare the time that the sample was taken
 to some known time. Assuming you started to monitor your device on
 Friday September 17, 1999, 00:35:57 MET DST. Translate this time in seconds
 since 1970-01-01 and it becomes 937'521'357. If you process unknown values
 that were received after this time, you want to leave them unknown and
-if they were &quot;received&quot; before this time, you want to translate them
+if they were ``received'' before this time, you want to translate them
 into zero (so you can effectively ignore them while adding them to your
 other routers counters).</p>
 <p>Translating Friday September 17, 1999, 00:35:57 MET DST into 937'521'357 can
@@ -490,16 +477,15 @@ known. There are several other ways of doing this, just pick one.</p>
 values different depending on the time that the sample was taken.
 This is a three step process:</p>
 <ol>
-<li>
-<p>If the timestamp of the value is after 937'521'357, leave it as is.</p>
-</li>
-<li>
-<p>If the value is a known value, leave it as is.</p>
-</li>
-<li>
-<p>Change the unknown value into zero.</p>
-</li>
-</ol>
+<li></li>
+If the timestamp of the value is after 937'521'357, leave it as is.
+<p></p>
+<li></li>
+If the value is a known value, leave it as is.
+<p></p>
+<li></li>
+Change the unknown value into zero.
+<p></p></ol>
 <p>Lets look at part one:</p>
 <pre>
     if (true) return the original value</pre>
@@ -509,10 +495,10 @@ This is a three step process:</p>
     if (false) return &quot;b&quot;</pre>
 <p>We need to calculate true or false from step 1. There is a function
 available that returns the timestamp for the current sample. It is
-called, how surprisingly, &quot;TIME&quot;. This time has to be compared to
-a constant number, we need &quot;GT&quot;. The output of &quot;GT&quot; is true or false
-and this is good input to &quot;IF&quot;. We want &quot;if (time &gt; 937521357) then
-(return a) else (return b)&quot;.</p>
+called, how surprisingly, ``TIME''. This time has to be compared to
+a constant number, we need ``GT''. The output of ``GT'' is true or false
+and this is good input to ``IF''. We want ``if (time &gt; 937521357) then
+(return a) else (return b)''.</p>
 <p>This process was already described thoroughly in the previous chapter
 so lets do it quick:</p>
 <pre>
@@ -541,27 +527,26 @@ so you get almost 10mb/s while the rest of your network activity does
 not produce numbers higher than 100kb/s.</p>
 <p>There are two options:</p>
 <ol>
-<li>
-<p>If the number exceeds 100kb/s it is wrong and you want it masked out
-by changing it into unknown.</p>
-</li>
-<li>
-<p>You don't want the graph to show more than 100kb/s.</p>
-</li>
-</ol>
+<li></li>
+If the number exceeds 100kb/s it is wrong and you want it masked out
+by changing it into unknown.
+<p></p>
+<li></li>
+You don't want the graph to show more than 100kb/s.
+<p></p></ol>
 <p>Pseudo code: if (number &gt; 100) then unknown else number
 or
 Pseudo code: if (number &gt; 100) then 100 else number.</p>
-<p>The second &quot;problem&quot; may also be solved by using the rigid option of
+<p>The second ``problem'' may also be solved by using the rigid option of
 RRDtool graph, however this has not the same result. In this example
 you can end up with a graph that does autoscaling. Also, if you use
 the numbers to display maxima they will be set to 100kb/s.</p>
-<p>We use &quot;IF&quot; and &quot;GT&quot; again. &quot;if (x) then (y) else (z)&quot; is written
-down as &quot;CDEF:result=x,y,z,IF&quot;; now fill in x, y and z.
-For x you fill in &quot;number greater than 100kb/s&quot; becoming
-&quot;number,100000,GT&quot; (kilo is 1'000 and b/s is what we measure!).
-The &quot;z&quot; part is &quot;number&quot; in both cases and the &quot;y&quot; part is either
-&quot;UNKN&quot; for unknown or &quot;100000&quot; for 100kb/s.</p>
+<p>We use ``IF'' and ``GT'' again. ``if (x) then (y) else (z)'' is written
+down as ``CDEF:result=x,y,z,IF''; now fill in x, y and z.
+For x you fill in ``number greater than 100kb/s'' becoming
+``number,100000,GT'' (kilo is 1'000 and b/s is what we measure!).
+The ``z'' part is ``number'' in both cases and the ``y'' part is either
+``UNKN'' for unknown or ``100000'' for 100kb/s.</p>
 <p>The two CDEF expressions would be:</p>
 <pre>
     CDEF:result=number,100000,GT,UNKN,number,IF
@@ -570,7 +555,7 @@ The &quot;z&quot; part is &quot;number&quot; in both cases and the &quot;y&quot;
 </p>
 <h2><a name="example__working_on_a_certain_time_span">Example: working on a certain time span</a></h2>
 <p>If you want a graph that spans a few weeks, but would only want to
-see some routers' data for one week, you need to &quot;hide&quot; the rest of
+see some routers' data for one week, you need to ``hide'' the rest of
 the time frame. Don't ask me when this would be useful, it's just
 here for the example :)</p>
 <p>We need to compare the time stamp to a begin date and an end date.
@@ -580,14 +565,14 @@ Comparing isn't difficult:</p>
         TIME,endtime,LE</pre>
 <p>These two parts of the CDEF produce either 0 for false or 1 for true.
 We can now check if they are both 0 (or 1) using a few IF statements
-but, as Wataru Satoh pointed out, we can use the &quot;*&quot; or &quot;+&quot; functions
+but, as Wataru Satoh pointed out, we can use the ``*'' or ``+'' functions
 as logical AND and logical OR.</p>
-<p>For &quot;*&quot;, the result will be zero (false) if either one of the two
-operators is zero.  For &quot;+&quot;, the result will only be false (0) when
+<p>For ``*'', the result will be zero (false) if either one of the two
+operators is zero.  For ``+'', the result will only be false (0) when
 two false (0) operators will be added.  Warning: *any* number not
-equal to 0 will be considered &quot;true&quot;. This means that, for instance,
-&quot;-1,1,+&quot; (which should be &quot;true or true&quot;) will become FALSE ...
-In other words, use &quot;+&quot; only if you know for sure that you have positive
+equal to 0 will be considered ``true''. This means that, for instance,
+``-1,1,+'' (which should be ``true or true'') will become FALSE ...
+In other words, use ``+'' only if you know for sure that you have positive
 numbers (or zero) only.</p>
 <p>Let's compile the complete CDEF:</p>
 <pre>
@@ -603,8 +588,8 @@ could also do it the other way around:</p>
 </p>
 <h2><a name="example__you_suspect_to_have_problems_and_want_to_see_unknown_data_">Example: You suspect to have problems and want to see unknown data.</a></h2>
 <p>Suppose you add up the number of active users on several terminal servers.
-If one of them doesn't give an answer (or an incorrect one) you get &quot;NaN&quot;
-in the database (&quot;Not a Number&quot;) and NaN is evaluated as Unknown.</p>
+If one of them doesn't give an answer (or an incorrect one) you get ``NaN''
+in the database (``Not a Number'') and NaN is evaluated as Unknown.</p>
 <p>In this case, you would like to be alerted to it and the sum of the
 remaining values is of no value to you.</p>
 <p>It would be something like:</p>
@@ -621,12 +606,12 @@ bright red line, not a gap.</p>
 there is an unknown value:</p>
 <pre>
     CDEF:wrongdata=allusers,UN,INF,UNKN,IF</pre>
-<p>&quot;allusers,UN&quot; will evaluate to either true or false, it is the (x) part
-of the &quot;IF&quot; function and it checks if allusers is unknown.
-The (y) part of the &quot;IF&quot; function is set to &quot;INF&quot; (which means infinity)
-and the (z) part of the function returns &quot;UNKN&quot;.</p>
+<p>``allusers,UN'' will evaluate to either true or false, it is the (x) part
+of the ``IF'' function and it checks if allusers is unknown.
+The (y) part of the ``IF'' function is set to ``INF'' (which means infinity)
+and the (z) part of the function returns ``UNKN''.</p>
 <p>The logic is: if (allusers == unknown) then return INF else return UNKN.</p>
-<p>You can now use AREA to display this &quot;wrongdata&quot; in bright red. If it
+<p>You can now use AREA to display this ``wrongdata'' in bright red. If it
 is unknown (because allusers is known) then the red AREA won't show up.
 If the value is INF (because allusers is unknown) then the red AREA will
 be filled in on the graph at that particular time.</p>
@@ -642,7 +627,7 @@ four values and you don't get a single value to test.
 Suppose users3 would be unknown at one point in time: users1 is plotted,
 users2 is stacked on top of users1, users3 is unknown and therefore
 nothing happens, users4 is stacked on top of users2.
-Add the extra CDEFs anyway and use them to overlay the &quot;normal&quot; graph:</p>
+Add the extra CDEFs anyway and use them to overlay the ``normal'' graph:</p>
 <pre>
    DEF:users1=location1.rrd:onlineTS1:LAST
    DEF:users2=location1.rrd:onlineTS2:LAST
@@ -655,20 +640,19 @@ Add the extra CDEFs anyway and use them to overlay the &quot;normal&quot; graph:
    STACK:users3#00FFFF:users at ts3
    STACK:users4#FFFF00:users at ts4
    AREA:wrongdata#FF0000:unknown data</pre>
-<p>If there is unknown data in one of users1..users4, the &quot;wrongdata&quot; AREA
+<p>If there is unknown data in one of users1..users4, the ``wrongdata'' AREA
 will be drawn and because it starts at the X-axis and has infinite height
 it will effectively overwrite the STACKed parts.</p>
-<p>You could combine the two CDEF lines into one (we don't use &quot;allusers&quot;)
+<p>You could combine the two CDEF lines into one (we don't use ``allusers'')
 if you like.  But there are good reasons for writing two CDEFS:</p>
 <ul>
-<li>
-<p>It improves the readability of the script.</p>
-</li>
-<li>
-<p>It can be used inside GPRINT to display the total number of users.</p>
-</li>
-</ul>
-<p>If you choose to combine them, you can substitute the &quot;allusers&quot; in the
+<li></li>
+It improves the readability of the script.
+<p></p>
+<li></li>
+It can be used inside GPRINT to display the total number of users.
+<p></p></ul>
+<p>If you choose to combine them, you can substitute the ``allusers'' in the
 second CDEF with the part after the equal sign from the first line:</p>
 <pre>
    CDEF:wrongdata=users1,users2,users3,users4,+,+,+,UN,INF,UNKN,IF</pre>
@@ -694,8 +678,8 @@ F=9/5*C+32</p>
       CDEF:far=9,5,/,cel,*,32,+ \
       LINE2:cel#00a000:&quot;D. Celsius&quot; \
       LINE2:far#ff0000:&quot;D. Fahrenheit\c&quot;</pre>
-<p>This example gets the DS called &quot;exhaust&quot; from database &quot;demo.rrd&quot;
-and puts the values in variable &quot;cel&quot;. The CDEF used is evaluated
+<p>This example gets the DS called ``exhaust'' from database ``demo.rrd''
+and puts the values in variable ``cel''. The CDEF used is evaluated
 as follows:</p>
 <pre>
    CDEF:far=9,5,/,cel,*,32,+
@@ -729,14 +713,14 @@ get:</p>
  0        --&gt; b
  idat1    --&gt; c
  if (a) then (b) else (c)</pre>
-<p>The result is therefore &quot;0&quot; if it is true that &quot;idat1&quot; equals &quot;UN&quot;.
-If not, the original value of &quot;idat1&quot; is put back on the stack.
-Lets call this answer &quot;d&quot;. The process is repeated for the next
+<p>The result is therefore ``0'' if it is true that ``idat1'' equals ``UN''.
+If not, the original value of ``idat1'' is put back on the stack.
+Lets call this answer ``d''. The process is repeated for the next
 five items on the stack, it is done the same and will return answer
-&quot;h&quot;. The resulting stack is therefore &quot;d,h&quot;.
-The expression has been simplified to &quot;d,h,+,8,*&quot; and it will now be
-easy to see that we add &quot;d&quot; and &quot;h&quot;, and multiply the result with eight.</p>
-<p>The end result is that we have added &quot;idat1&quot; and &quot;idat2&quot; and in the
+``h''. The resulting stack is therefore ``d,h''.
+The expression has been simplified to ``d,h,+,8,*'' and it will now be
+easy to see that we add ``d'' and ``h'', and multiply the result with eight.</p>
+<p>The end result is that we have added ``idat1'' and ``idat2'' and in the
 process we effectively ignored unknown values. The result is multiplied
 by eight, most likely to convert bytes/s to bits/s.</p>
 <p>
@@ -757,25 +741,25 @@ by eight, most likely to convert bytes/s to bits/s.</p>
       STACK:val4#FFC000:Value4 \
       AREA:whipeout#FF0000:Unknown</pre>
 <p>This demo demonstrates two ways to use infinity. It is a bit tricky
-to see what happens in the &quot;background&quot; CDEF.</p>
+to see what happens in the ``background'' CDEF.</p>
 <pre>
    &quot;val4,POP,TIME,7200,%,3600,LE,INF,UNKN,IF&quot;</pre>
-<p>This RPN takes the value of &quot;val4&quot; as input and then immediately
-removes it from the stack using &quot;POP&quot;. The stack is now empty but
+<p>This RPN takes the value of ``val4'' as input and then immediately
+removes it from the stack using ``POP''. The stack is now empty but
 as a side effect we now know the time that this sample was taken.
-This time is put on the stack by the &quot;TIME&quot; function.</p>
-<p>&quot;TIME,7200,%&quot; takes the modulo of time and 7'200 (which is two hours).
+This time is put on the stack by the ``TIME'' function.</p>
+<p>``TIME,7200,%'' takes the modulo of time and 7'200 (which is two hours).
 The resulting value on the stack will be a number in the range from
 0 to 7199.</p>
 <p>For people who don't know the modulo function: it is the remainder
 after an integer division. If you divide 16 by 3, the answer would
-be 5 and the remainder would be 1. So, &quot;16,3,%&quot; returns 1.</p>
-<p>We have the result of &quot;TIME,7200,%&quot; on the stack, lets call this
-&quot;a&quot;. The start of the RPN has become &quot;a,3600,LE&quot; and this checks
-if &quot;a&quot; is less or equal than &quot;3600&quot;. It is true half of the time.
+be 5 and the remainder would be 1. So, ``16,3,%'' returns 1.</p>
+<p>We have the result of ``TIME,7200,%'' on the stack, lets call this
+``a''. The start of the RPN has become ``a,3600,LE'' and this checks
+if ``a'' is less or equal than ``3600''. It is true half of the time.
 We now have to process the rest of the RPN and this is only a simple
-&quot;IF&quot; function that returns either &quot;INF&quot; or &quot;UNKN&quot; depending on the
-time. This is returned to variable &quot;background&quot;.</p>
+``IF'' function that returns either ``INF'' or ``UNKN'' depending on the
+time. This is returned to variable ``background''.</p>
 <p>The second CDEF has been discussed earlier in this document so we
 won't do that here.</p>
 <p>Now you can draw the different layers. Start with the background
@@ -789,8 +773,8 @@ four variables are valid. This is why you use the second CDEF, it
 will overlay the data with an AREA so the data cannot be seen anymore.</p>
 <p>If your data can also have negative values you also need to overwrite
 the other half of your graph. This can be done in a relatively simple
-way: what you need is the &quot;wipeout&quot; variable and place a negative
-sign before it:  &quot;CDEF:wipeout2=wipeout,-1,*&quot;</p>
+way: what you need is the ``wipeout'' variable and place a negative
+sign before it:  ``CDEF:wipeout2=wipeout,-1,*''</p>
 <p>
 </p>
 <h2><a name="filtering_data">Filtering data</a></h2>
index 2bd8fd66f76e1f8335cee9264f0efe5d093ba016..1c17046c64c047afcbc5e6dfc4ebc047d1504388 100644 (file)
@@ -617,7 +617,7 @@ numbers (or zero) only.
 Let's compile the complete CDEF:
 
        DEF:ds0=router1.rrd:AVERAGE
-        CDEF:ds0modified=TIME,begintime,GT,TIME,endtime,LE,*,ds0,UNKN,IF    
+       CDEF:ds0modified=TIME,begintime,GT,TIME,endtime,LE,*,ds0,UNKN,IF
 
 This will return the value of ds0 if both comparisons return true. You
 could also do it the other way around:
index ce0817fb61320ba96e38b142cfd34d0ff645c284..c67ecaa0998a6884d6402220d829536dda137a0b 100644 (file)
@@ -12,23 +12,25 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        If you think some important feature is not explained properly, and if
        adding it to this document would benefit most users, please do ask me
        to add it.  I will then try to provide an answer in the next release of
-       this tutorial.  No feedback equals no changes! Additions to this
-       document are also welcome.  -- Alex van den Bogaerdt
-       <alex@vandenbogaerdt.nl>
+       this tutorial.  No feedback equals no changes! Additions to this docu-
+       ment are also welcome.  -- Alex van den Bogaerdt <alex@vandenbo-
+       gaerdt.nl>
+
+       W\bWh\bhy\by t\bth\bhi\bis\bs t\btu\but\bto\bor\bri\bia\bal\bl?\b?
 
-   W\bWh\bhy\by t\bth\bhi\bis\bs t\btu\but\bto\bor\bri\bia\bal\bl?\b?
        One of the powerful parts of RRDtool is its ability to do all sorts of
-       calculations on the data retrieved from its databases. However,
-       RRDtool's many options and syntax make it difficult for the average
-       user to understand. The manuals are good at explaining what these
-       options do; however they do not (and should not) explain in detail why
-       they are useful. As with my RRDtool tutorial: if you want a simple
-       document in simple language you should read this tutorial.  If you are
-       happy with the official documentation, you may find this document too
-       simple or even boring. If you do choose to read this tutorial, I also
-       expect you to have read and fully understand my other tutorial.
-
-   M\bMo\bor\bre\be r\bre\bea\bad\bdi\bin\bng\bg
+       calculations on the data retrieved from its databases. However, RRD-
+       tool's many options and syntax make it difficult for the average user
+       to understand. The manuals are good at explaining what these options
+       do; however they do not (and should not) explain in detail why they are
+       useful. As with my RRDtool tutorial: if you want a simple document in
+       simple language you should read this tutorial.  If you are happy with
+       the official documentation, you may find this document too simple or
+       even boring. If you do choose to read this tutorial, I also expect you
+       to have read and fully understand my other tutorial.
+
+       M\bMo\bor\bre\be r\bre\bea\bad\bdi\bin\bng\bg
+
        If you have difficulties with the way I try to explain it please read
        Steve Rader's rpntutorial. It may help you understand how this all
        works.
@@ -119,9 +121,9 @@ R\bRP\bPN\bN-\b-e\bex\bxp\bpr\bre\bes\bss\bsi\bio\bon\bns\bs
        reverse the order of the variables.
 
 C\bCo\bon\bnv\bve\ber\brt\bti\bin\bng\bg y\byo\bou\bur\br w\bwi\bis\bsh\bhe\bes\bs t\bto\bo R\bRP\bPN\bN
-       First, get a clear picture of what you want to do. Break down the
-       problem in smaller portions until they cannot be split anymore. Then it
-       is rather simple to convert your ideas into RPN.
+       First, get a clear picture of what you want to do. Break down the prob-
+       lem in smaller portions until they cannot be split anymore. Then it is
+       rather simple to convert your ideas into RPN.
 
        Suppose you have several RRDs and would like to add up some counters in
        them. These could be, for instance, the counters for every WAN link you
@@ -181,8 +183,8 @@ C\bCo\bon\bnv\bve\ber\brt\bti\bin\bng\bg y\byo\bou\bur\br w\bwi\bis\bsh\bhe\bes\bs t\bto\bo R\bRP\bPN\bN
        This is correct but it can be made more clear to humans. It does not
        matter if you add a to b and then add c to the result or first add b to
        c and then add a to the result. This makes it possible to rewrite the
-       RPN into "CDEF:result=a,b,c,d,e,+,+,+,+" which is evaluated
-       differently:
+       RPN into "CDEF:result=a,b,c,d,e,+,+,+,+" which is evaluated differ-
+       ently:
 
           push value of variable a on the stack: a
           push value of variable b on the stack: a b
@@ -220,8 +222,8 @@ C\bCo\bon\bnv\bve\ber\brt\bti\bin\bng\bg y\byo\bou\bur\br w\bwi\bis\bsh\bhe\bes\bs t\bto\bo R\bRP\bPN\bN
        also be converted into RPN. The parenthesis just tell you to first add
        b and c, and then multiply a with the result. Again, now it is easy to
        write it in RPN: "result=a,b,c,+,*". Note that this is very similar to
-       one of the expressions in the previous paragraph, only the
-       multiplication and the addition changed places.
+       one of the expressions in the previous paragraph, only the multiplica-
+       tion and the addition changed places.
 
        When you have problems with RPN or when RRDtool is complaining, it's
        usually a good thing to write down the stack on a piece of paper and
@@ -230,7 +232,8 @@ C\bCo\bon\bnv\bve\ber\brt\bti\bin\bng\bg y\byo\bou\bur\br w\bwi\bis\bsh\bhe\bes\bs t\bto\bo R\bRP\bPN\bN
        solve most, if not all, problems you encounter.
 
 S\bSo\bom\bme\be s\bsp\bpe\bec\bci\bia\bal\bl n\bnu\bum\bmb\bbe\ber\brs\bs
-   T\bTh\bhe\be u\bun\bnk\bkn\bno\bow\bwn\bn v\bva\bal\blu\bue\be
+       T\bTh\bhe\be u\bun\bnk\bkn\bno\bow\bwn\bn v\bva\bal\blu\bue\be
+
        Sometimes collecting your data will fail. This can be very common,
        especially when querying over busy links. RRDtool can be configured to
        allow for one (or even more) unknown value(s) and calculate the missing
@@ -273,7 +276,8 @@ S\bSo\bom\bme\be s\bsp\bpe\bec\bci\bia\bal\bl n\bnu\bum\bmb\bbe\ber\brs\bs
        CDP and the xff factor. As you can see from the previous text they
        define the behavior of your RRA.
 
-   W\bWo\bor\brk\bki\bin\bng\bg w\bwi\bit\bth\bh u\bun\bnk\bkn\bno\bow\bwn\bn d\bda\bat\bta\ba i\bin\bn y\byo\bou\bur\br d\bda\bat\bta\bab\bba\bas\bse\be
+       W\bWo\bor\brk\bki\bin\bng\bg w\bwi\bit\bth\bh u\bun\bnk\bkn\bno\bow\bwn\bn d\bda\bat\bta\ba i\bin\bn y\byo\bou\bur\br d\bda\bat\bta\bab\bba\bas\bse\be
+
        As you have read in the previous chapter, entries in an RRA can be set
        to the unknown value. If you do calculations with this type of value,
        the result has to be unknown too. This means that an expression such as
@@ -299,14 +303,15 @@ S\bSo\bom\bme\be s\bsp\bpe\bec\bci\bia\bal\bl n\bnu\bum\bmb\bbe\ber\brs\bs
 
        There are some examples below that make this change.
 
-   I\bIn\bnf\bfi\bin\bni\bit\bty\by
+       I\bIn\bnf\bfi\bin\bni\bit\bty\by
+
        Infinite data is another form of a special number. It cannot be graphed
        because by definition you would never reach the infinite value. You can
-       think of positive and negative infinity depending on the position
-       relative to zero.
+       think of positive and negative infinity depending on the position rela-
+       tive to zero.
 
-       RRDtool is capable of representing (-not- graphing!) infinity by
-       stopping at its current maximum (for positive infinity) or minimum (for
+       RRDtool is capable of representing (-not- graphing!) infinity by stop-
+       ping at its current maximum (for positive infinity) or minimum (for
        negative infinity) without knowing this maximum (minimum).
 
        Infinity in RRDtool is mostly used to draw an AREA without knowing its
@@ -315,15 +320,17 @@ S\bSo\bom\bme\be s\bsp\bpe\bec\bci\bia\bal\bl n\bnu\bum\bmb\bbe\ber\brs\bs
        current graph. This is probably a good way to approximate infinity and
        it sure allows for some neat tricks. See below for examples.
 
-   W\bWo\bor\brk\bki\bin\bng\bg w\bwi\bit\bth\bh u\bun\bnk\bkn\bno\bow\bwn\bn d\bda\bat\bta\ba a\ban\bnd\bd i\bin\bnf\bfi\bin\bni\bit\bty\by
+       W\bWo\bor\brk\bki\bin\bng\bg w\bwi\bit\bth\bh u\bun\bnk\bkn\bno\bow\bwn\bn d\bda\bat\bta\ba a\ban\bnd\bd i\bin\bnf\bfi\bin\bni\bit\bty\by
+
        Sometimes you would like to discard unknown data and pretend it is zero
        (or any other value for that matter) and sometimes you would like to
        pretend that known data is unknown (to discard known-to-be-wrong data).
-       This is why CDEFs have support for unknown data. There are also
-       examples available that show unknown data by using infinity.
+       This is why CDEFs have support for unknown data. There are also exam-
+       ples available that show unknown data by using infinity.
 
 S\bSo\bom\bme\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs
-   E\bEx\bxa\bam\bmp\bpl\ble\be:\b: u\bus\bsi\bin\bng\bg a\ba r\bre\bec\bce\ben\bnt\btl\bly\by c\bcr\bre\bea\bat\bte\bed\bd R\bRR\bRD\bD
+       E\bEx\bxa\bam\bmp\bpl\ble\be:\b: u\bus\bsi\bin\bng\bg a\ba r\bre\bec\bce\ben\bnt\btl\bly\by c\bcr\bre\bea\bat\bte\bed\bd R\bRR\bRD\bD
+
        You are keeping statistics on your router for over a year now. Recently
        you installed an extra router and you would like to show the combined
        throughput for these two devices.
@@ -392,11 +399,12 @@ S\bSo\bom\bme\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs
        Eventually, when all unknown data is removed from the RRD, you may want
        to remove this rule so that unknown data is properly displayed.
 
-   E\bEx\bxa\bam\bmp\bpl\ble\be:\b: b\bbe\bet\btt\bte\ber\br h\bha\ban\bnd\bdl\bli\bin\bng\bg o\bof\bf u\bun\bnk\bkn\bno\bow\bwn\bn d\bda\bat\bta\ba,\b, b\bby\by u\bus\bsi\bin\bng\bg t\bti\bim\bme\be
+       E\bEx\bxa\bam\bmp\bpl\ble\be:\b: b\bbe\bet\btt\bte\ber\br h\bha\ban\bnd\bdl\bli\bin\bng\bg o\bof\bf u\bun\bnk\bkn\bno\bow\bwn\bn d\bda\bat\bta\ba,\b, b\bby\by u\bus\bsi\bin\bng\bg t\bti\bim\bme\be
+
        The above example has one drawback. If you do log unknown data in your
-       database after installing your new equipment, it will also be
-       translated into zero and therefore you won't see that there was a
-       problem. This is not good and what you really want to do is:
+       database after installing your new equipment, it will also be trans-
+       lated into zero and therefore you won't see that there was a problem.
+       This is not good and what you really want to do is:
 
        ·   If there is unknown data, look at the time that this sample was
            taken.
@@ -422,9 +430,9 @@ S\bSo\bom\bme\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs
        You could also dump the database and see where the data starts to be
        known. There are several other ways of doing this, just pick one.
 
-       Now we have to create the magic that allows us to process unknown
-       values different depending on the time that the sample was taken.  This
-       is a three step process:
+       Now we have to create the magic that allows us to process unknown val-
+       ues different depending on the time that the sample was taken.  This is
+       a three step process:
 
        1.  If the timestamp of the value is after 937'521'357, leave it as is.
 
@@ -469,12 +477,13 @@ S\bSo\bom\bme\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs
        This looks very complex, however, as you can see, it was not too hard
        to come up with.
 
-   E\bEx\bxa\bam\bmp\bpl\ble\be:\b: P\bPr\bre\bet\bte\ben\bnd\bdi\bin\bng\bg w\bwe\bei\bir\brd\bd d\bda\bat\bta\ba i\bis\bsn\bn'\b't\bt t\bth\bhe\ber\bre\be
+       E\bEx\bxa\bam\bmp\bpl\ble\be:\b: P\bPr\bre\bet\bte\ben\bnd\bdi\bin\bng\bg w\bwe\bei\bir\brd\bd d\bda\bat\bta\ba i\bis\bsn\bn'\b't\bt t\bth\bhe\ber\bre\be
+
        Suppose you have a problem that shows up as huge spikes in your graph.
-       You know this happens and why, so you decide to work around the
-       problem.  Perhaps you're using your network to do a backup at night and
-       by doing so you get almost 10mb/s while the rest of your network
-       activity does not produce numbers higher than 100kb/s.
+       You know this happens and why, so you decide to work around the prob-
+       lem.  Perhaps you're using your network to do a backup at night and by
+       doing so you get almost 10mb/s while the rest of your network activity
+       does not produce numbers higher than 100kb/s.
 
        There are two options:
 
@@ -503,7 +512,8 @@ S\bSo\bom\bme\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs
            CDEF:result=number,100000,GT,UNKN,number,IF
            CDEF:result=number,100000,GT,100000,number,IF
 
-   E\bEx\bxa\bam\bmp\bpl\ble\be:\b: w\bwo\bor\brk\bki\bin\bng\bg o\bon\bn a\ba c\bce\ber\brt\bta\bai\bin\bn t\bti\bim\bme\be s\bsp\bpa\ban\bn
+       E\bEx\bxa\bam\bmp\bpl\ble\be:\b: w\bwo\bor\brk\bki\bin\bng\bg o\bon\bn a\ba c\bce\ber\brt\bta\bai\bin\bn t\bti\bim\bme\be s\bsp\bpa\ban\bn
+
        If you want a graph that spans a few weeks, but would only want to see
        some routers' data for one week, you need to "hide" the rest of the
        time frame. Don't ask me when this would be useful, it's just here for
@@ -520,8 +530,8 @@ S\bSo\bom\bme\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs
        but, as Wataru Satoh pointed out, we can use the "*" or "+" functions
        as logical AND and logical OR.
 
-       For "*", the result will be zero (false) if either one of the two
-       operators is zero.  For "+", the result will only be false (0) when two
+       For "*", the result will be zero (false) if either one of the two oper-
+       ators is zero.  For "+", the result will only be false (0) when two
        false (0) operators will be added.  Warning: *any* number not equal to
        0 will be considered "true". This means that, for instance, "-1,1,+"
        (which should be "true or true") will become FALSE ...  In other words,
@@ -541,7 +551,8 @@ S\bSo\bom\bme\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs
 
        This will return an UNKNOWN if either comparison returns true.
 
-   E\bEx\bxa\bam\bmp\bpl\ble\be:\b: Y\bYo\bou\bu s\bsu\bus\bsp\bpe\bec\bct\bt t\bto\bo h\bha\bav\bve\be p\bpr\bro\bob\bbl\ble\bem\bms\bs a\ban\bnd\bd w\bwa\ban\bnt\bt t\bto\bo s\bse\bee\be u\bun\bnk\bkn\bno\bow\bwn\bn d\bda\bat\bta\ba.\b.
+       E\bEx\bxa\bam\bmp\bpl\ble\be:\b: Y\bYo\bou\bu s\bsu\bus\bsp\bpe\bec\bct\bt t\bto\bo h\bha\bav\bve\be p\bpr\bro\bob\bbl\ble\bem\bms\bs a\ban\bnd\bd w\bwa\ban\bnt\bt t\bto\bo s\bse\bee\be u\bun\bnk\bkn\bno\bow\bwn\bn d\bda\bat\bta\ba.\b.
+
        Suppose you add up the number of active users on several terminal
        servers.  If one of them doesn't give an answer (or an incorrect one)
        you get "NaN" in the database ("Not a Number") and NaN is evaluated as
@@ -583,7 +594,8 @@ S\bSo\bom\bme\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs
           AREA:allusers#0000FF:combined user count
           AREA:wrongdata#FF0000:unknown data
 
-   S\bSa\bam\bme\be e\bex\bxa\bam\bmp\bpl\ble\be u\bus\bse\bef\bfu\bul\bl w\bwi\bit\bth\bh S\bST\bTA\bAC\bCK\bKe\bed\bd d\bda\bat\bta\ba:\b:
+       S\bSa\bam\bme\be e\bex\bxa\bam\bmp\bpl\ble\be u\bus\bse\bef\bfu\bul\bl w\bwi\bit\bth\bh S\bST\bTA\bAC\bCK\bKe\bed\bd d\bda\bat\bta\ba:\b:
+
        If you use stack in the previous example (as I would do) then you don't
        add up the values. Therefore, there is no relationship between the four
        values and you don't get a single value to test.  Suppose users3 would
@@ -629,7 +641,8 @@ S\bSo\bom\bme\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs
           GPRINT:allusers:LAST:"Current: %6.0lf\n"
 
 T\bTh\bhe\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs f\bfr\bro\bom\bm t\bth\bhe\be R\bRR\bRD\bD g\bgr\bra\bap\bph\bh m\bma\ban\bnu\bua\bal\bl p\bpa\bag\bge\be
-   D\bDe\beg\bgr\bre\bee\bes\bs C\bCe\bel\bls\bsi\biu\bus\bs v\bvs\bs.\b. D\bDe\beg\bgr\bre\bee\bes\bs F\bFa\bah\bhr\bre\ben\bnh\bhe\bei\bit\bt
+       D\bDe\beg\bgr\bre\bee\bes\bs C\bCe\bel\bls\bsi\biu\bus\bs v\bvs\bs.\b. D\bDe\beg\bgr\bre\bee\bes\bs F\bFa\bah\bhr\bre\ben\bnh\bhe\bei\bit\bt
+
        To convert Celsius into Fahrenheit use the formula F=9/5*C+32
 
           rrdtool graph demo.png --title="Demo Graph" \
@@ -639,8 +652,8 @@ T\bTh\bhe\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs f\bfr\bro\bom\bm t\bth\bhe\be R\bRR\bRD\bD g\bgr\bra\bap\bp
              LINE2:far#ff0000:"D. Fahrenheit\c"
 
        This example gets the DS called "exhaust" from database "demo.rrd" and
-       puts the values in variable "cel". The CDEF used is evaluated as
-       follows:
+       puts the values in variable "cel". The CDEF used is evaluated as fol-
+       lows:
 
           CDEF:far=9,5,/,cel,*,32,+
           1. push 9, push 5
@@ -653,7 +666,8 @@ T\bTh\bhe\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs f\bfr\bro\bom\bm t\bth\bhe\be R\bRR\bRD\bD g\bgr\bra\bap\bp
           6. push function "plus" and process it
              the stack contains now the temperature in Fahrenheit
 
-   C\bCh\bha\ban\bng\bgi\bin\bng\bg u\bun\bnk\bkn\bno\bow\bwn\bn i\bin\bnt\bto\bo z\bze\ber\bro\bo
+       C\bCh\bha\ban\bng\bgi\bin\bng\bg u\bun\bnk\bkn\bno\bow\bwn\bn i\bin\bnt\bto\bo z\bze\ber\bro\bo
+
           rrdtool graph demo.png --title="Demo Graph" \
              DEF:idat1=interface1.rrd:ds0:AVERAGE \
              DEF:idat2=interface2.rrd:ds0:AVERAGE \
@@ -685,7 +699,8 @@ T\bTh\bhe\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs f\bfr\bro\bom\bm t\bth\bhe\be R\bRR\bRD\bD g\bgr\bra\bap\bp
        process we effectively ignored unknown values. The result is multiplied
        by eight, most likely to convert bytes/s to bits/s.
 
-   I\bIn\bnf\bfi\bin\bni\bit\bty\by d\bde\bem\bmo\bo
+       I\bIn\bnf\bfi\bin\bni\bit\bty\by d\bde\bem\bmo\bo
+
           rrdtool graph example.png --title="INF demo" \
              DEF:val1=some.rrd:ds0:AVERAGE \
              DEF:val2=some.rrd:ds1:AVERAGE \
@@ -736,15 +751,16 @@ T\bTh\bhe\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs f\bfr\bro\bom\bm t\bth\bhe\be R\bRR\bRD\bD g\bgr\bra\bap\bp
        background. Suppose one of val1..val4 would be unknown, in that case
        you end up with only three bars stacked on top of each other.  You
        don't want to see this because the data is only valid when all four
-       variables are valid. This is why you use the second CDEF, it will
-       overlay the data with an AREA so the data cannot be seen anymore.
+       variables are valid. This is why you use the second CDEF, it will over-
+       lay the data with an AREA so the data cannot be seen anymore.
 
        If your data can also have negative values you also need to overwrite
        the other half of your graph. This can be done in a relatively simple
        way: what you need is the "wipeout" variable and place a negative sign
        before it:  "CDEF:wipeout2=wipeout,-1,*"
 
-   F\bFi\bil\blt\bte\ber\bri\bin\bng\bg d\bda\bat\bta\ba
+       F\bFi\bil\blt\bte\ber\bri\bin\bng\bg d\bda\bat\bta\ba
+
        You may do some complex data filtering:
 
          MEDIAN FILTER: filters shot noise
@@ -757,7 +773,6 @@ T\bTh\bhe\be e\bex\bxa\bam\bmp\bpl\ble\bes\bs f\bfr\bro\bom\bm t\bth\bhe\be R\bRR\bRD\bD g\bgr\bra\bap\bp
            LINE3:median#000077:filtered
            LINE1:prev2#007700:'raw data'
 
-
          DERIVATE:
 
            DEF:var=database.rrd:traffic:AVERAGE
@@ -784,4 +799,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2009-02-21                   CDEFTUTORIAL(1)
+1.3.99909060808                   2009-02-21                   CDEFTUTORIAL(1)
diff --git a/doc/librrd.1 b/doc/librrd.1
new file mode 100644 (file)
index 0000000..277bff9
--- /dev/null
@@ -0,0 +1,187 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "LIBRRD 1"
+.TH LIBRRD 1 "2009-04-20" "1.3.99909060808" "rrdtool"
+.SH "NAME"
+librrd \- RRD library functions
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBlibrrd\fR contains most of the functionality in \fBRRDTool\fR.  The command
+line utilities and language bindings are often just wrappers around the
+code contained in \fBlibrrd\fR.
+.PP
+This manual page documents the \fBlibrrd\fR \s-1API\s0.
+.PP
+\&\fB\s-1NOTE:\s0\fR This document is a work in progress, and should be considered
+incomplete as long as this warning persists.  For more information about
+the \fBlibrrd\fR functions, always consult the source code.
+.SH "UTILITY FUNCTIONS"
+.IX Header "UTILITY FUNCTIONS"
+.IP "\fB\f(BIrrd_random()\fB\fR" 4
+.IX Item "rrd_random()"
+Generates random numbers just like \fIrandom()\fR.  This further ensures that
+the random number generator is seeded exactly once per process.
+.IP "\fBrrd_add_ptr(void ***dest, size_t *dest_size, void *src)\fR" 4
+.IX Item "rrd_add_ptr(void ***dest, size_t *dest_size, void *src)"
+Dynamically resize the array pointed to by \f(CW\*(C`dest\*(C'\fR.  \f(CW\*(C`dest_size\*(C'\fR is a
+pointer to the current size of \f(CW\*(C`dest\*(C'\fR.  Upon successful \fIrealloc()\fR, the
+\&\f(CW\*(C`dest_size\*(C'\fR is incremented by 1 and the \f(CW\*(C`src\*(C'\fR pointer is stored at the
+end of the new \f(CW\*(C`dest\*(C'\fR.  Returns 1 on success, 0 on failure.
+.Sp
+.Vb 5
+\&    type **arr = NULL;
+\&    type *elem = "whatever";
+\&    size_t arr_size = 0;
+\&    if (!rrd_add_ptr(&arr, &arr_size, elem))
+\&        handle_failure();
+.Ve
+.IP "\fBrrd_add_strdup(char ***dest, size_t *dest_size, char *src)\fR" 4
+.IX Item "rrd_add_strdup(char ***dest, size_t *dest_size, char *src)"
+Like \f(CW\*(C`rrd_add_ptr\*(C'\fR, except adds a \f(CW\*(C`strdup\*(C'\fR of the source string.
+.Sp
+.Vb 5
+\&    char **arr = NULL;
+\&    size_t arr_size = NULL;
+\&    char *str  = "example text";
+\&    if (!rrd_add_strdup(&arr, &arr_size, str))
+\&        handle_failure();
+.Ve
+.IP "\fBrrd_free_ptrs(void ***src, size_t *cnt)\fR" 4
+.IX Item "rrd_free_ptrs(void ***src, size_t *cnt)"
+Free an array of pointers allocated by \f(CW\*(C`rrd_add_ptr\*(C'\fR or
+\&\f(CW\*(C`rrd_add_strdup\*(C'\fR.  Also frees the array pointer itself.  On return, the
+source pointer will be \s-1NULL\s0 and the count will be zero.
+.Sp
+.Vb 3
+\&    /* created as above */
+\&    rrd_free_ptrs(&arr, &arr_size);
+\&    /* here, arr == NULL && arr_size == 0 */
+.Ve
diff --git a/doc/librrd.html b/doc/librrd.html
new file mode 100644 (file)
index 0000000..471e6f3
--- /dev/null
@@ -0,0 +1,99 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>librrd</title>
+<link rev="made" href="mailto:root@localhost" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+<!--
+
+<ul>
+
+       <li><a href="#name">NAME</a></li>
+       <li><a href="#description">DESCRIPTION</a></li>
+       <li><a href="#utility_functions">UTILITY FUNCTIONS</a></li>
+</ul>
+-->
+<!-- INDEX END -->
+
+<p>
+</p>
+<hr />
+<h1><a name="name">NAME</a></h1>
+<p>librrd - RRD library functions</p>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p><strong>librrd</strong> contains most of the functionality in <strong>RRDTool</strong>.  The command
+line utilities and language bindings are often just wrappers around the
+code contained in <strong>librrd</strong>.</p>
+<p>This manual page documents the <strong>librrd</strong> API.</p>
+<p><strong>NOTE:</strong> This document is a work in progress, and should be considered
+incomplete as long as this warning persists.  For more information about
+the <strong>librrd</strong> functions, always consult the source code.</p>
+<p>
+</p>
+<hr />
+<h1><a name="utility_functions">UTILITY FUNCTIONS</a></h1>
+<dl>
+<dt><strong><a name="item_rrd_random"><strong>rrd_random()</strong></a></strong><br />
+</dt>
+<dd>
+Generates random numbers just like random().  This further ensures that
+the random number generator is seeded exactly once per process.
+</dd>
+<p></p>
+<dt><strong><a name="item_rrd_add_ptr"><strong>rrd_add_ptr(void ***dest, size_t *dest_size, void *src)</strong></a></strong><br />
+</dt>
+<dd>
+Dynamically resize the array pointed to by <code>dest</code>.  <code>dest_size</code> is a
+pointer to the current size of <code>dest</code>.  Upon successful realloc(), the
+<code>dest_size</code> is incremented by 1 and the <code>src</code> pointer is stored at the
+end of the new <code>dest</code>.  Returns 1 on success, 0 on failure.
+</dd>
+<dd>
+<pre>
+    type **arr = NULL;
+    type *elem = &quot;whatever&quot;;
+    size_t arr_size = 0;
+    if (!rrd_add_ptr(&amp;arr, &amp;arr_size, elem))
+        handle_failure();</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item_rrd_add_strdup"><strong>rrd_add_strdup(char ***dest, size_t *dest_size, char *src)</strong></a></strong><br />
+</dt>
+<dd>
+Like <a href="#item_rrd_add_ptr"><code>rrd_add_ptr</code></a>, except adds a <code>strdup</code> of the source string.
+</dd>
+<dd>
+<pre>
+    char **arr = NULL;
+    size_t arr_size = NULL;
+    char *str  = &quot;example text&quot;;
+    if (!rrd_add_strdup(&amp;arr, &amp;arr_size, str))
+        handle_failure();</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item_rrd_free_ptrs"><strong>rrd_free_ptrs(void ***src, size_t *cnt)</strong></a></strong><br />
+</dt>
+<dd>
+Free an array of pointers allocated by <a href="#item_rrd_add_ptr"><code>rrd_add_ptr</code></a> or
+<a href="#item_rrd_add_strdup"><code>rrd_add_strdup</code></a>.  Also frees the array pointer itself.  On return, the
+source pointer will be NULL and the count will be zero.
+</dd>
+<dd>
+<pre>
+    /* created as above */
+    rrd_free_ptrs(&amp;arr, &amp;arr_size);
+    /* here, arr == NULL &amp;&amp; arr_size == 0 */</pre>
+</dd>
+<p></p></dl>
+
+</body>
+
+</html>
diff --git a/doc/librrd.pod b/doc/librrd.pod
new file mode 100644 (file)
index 0000000..52cf18e
--- /dev/null
@@ -0,0 +1,61 @@
+=pod
+
+=head1 NAME
+
+librrd - RRD library functions
+
+=head1 DESCRIPTION
+
+B<librrd> contains most of the functionality in B<RRDTool>.  The command
+line utilities and language bindings are often just wrappers around the
+code contained in B<librrd>.
+
+This manual page documents the B<librrd> API.
+
+B<NOTE:> This document is a work in progress, and should be considered
+incomplete as long as this warning persists.  For more information about
+the B<librrd> functions, always consult the source code.
+
+=head1 UTILITY FUNCTIONS
+
+=over
+
+=item B<rrd_random()>
+
+Generates random numbers just like random().  This further ensures that
+the random number generator is seeded exactly once per process.
+
+=item B<rrd_add_ptr(void ***dest, size_t *dest_size, void *src)>
+
+Dynamically resize the array pointed to by C<dest>.  C<dest_size> is a
+pointer to the current size of C<dest>.  Upon successful realloc(), the
+C<dest_size> is incremented by 1 and the C<src> pointer is stored at the
+end of the new C<dest>.  Returns 1 on success, 0 on failure.
+
+    type **arr = NULL;
+    type *elem = "whatever";
+    size_t arr_size = 0;
+    if (!rrd_add_ptr(&arr, &arr_size, elem))
+        handle_failure();
+
+=item B<rrd_add_strdup(char ***dest, size_t *dest_size, char *src)>
+
+Like C<rrd_add_ptr>, except adds a C<strdup> of the source string.
+
+    char **arr = NULL;
+    size_t arr_size = NULL;
+    char *str  = "example text";
+    if (!rrd_add_strdup(&arr, &arr_size, str))
+        handle_failure();
+
+=item B<rrd_free_ptrs(void ***src, size_t *cnt)>
+
+Free an array of pointers allocated by C<rrd_add_ptr> or
+C<rrd_add_strdup>.  Also frees the array pointer itself.  On return, the
+source pointer will be NULL and the count will be zero.
+
+    /* created as above */
+    rrd_free_ptrs(&arr, &arr_size);
+    /* here, arr == NULL && arr_size == 0 */
+
+=back
diff --git a/doc/librrd.txt b/doc/librrd.txt
new file mode 100644 (file)
index 0000000..da82e48
--- /dev/null
@@ -0,0 +1,58 @@
+LIBRRD(1)                           rrdtool                          LIBRRD(1)
+
+
+
+N\bNA\bAM\bME\bE
+       librrd - RRD library functions
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+       l\bli\bib\bbr\brr\brd\bd contains most of the functionality in R\bRR\bRD\bDT\bTo\boo\bol\bl.  The command line
+       utilities and language bindings are often just wrappers around the code
+       contained in l\bli\bib\bbr\brr\brd\bd.
+
+       This manual page documents the l\bli\bib\bbr\brr\brd\bd API.
+
+       N\bNO\bOT\bTE\bE:\b: This document is a work in progress, and should be considered
+       incomplete as long as this warning persists.  For more information
+       about the l\bli\bib\bbr\brr\brd\bd functions, always consult the source code.
+
+U\bUT\bTI\bIL\bLI\bIT\bTY\bY F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
+       _\br\br_\br\br_\bd\bd_\b_\b__\br\br_\ba\ba_\bn\bn_\bd\bd_\bo\bo_\bm\bm_\b(\b(_\b)\b)
+           Generates random numbers just like _\br_\ba_\bn_\bd_\bo_\bm_\b(_\b).  This further ensures
+           that the random number generator is seeded exactly once per pro-
+           cess.
+
+       r\brr\brd\bd_\b_a\bad\bdd\bd_\b_p\bpt\btr\br(\b(v\bvo\boi\bid\bd *\b**\b**\b*d\bde\bes\bst\bt,\b, s\bsi\biz\bze\be_\b_t\bt *\b*d\bde\bes\bst\bt_\b_s\bsi\biz\bze\be,\b, v\bvo\boi\bid\bd *\b*s\bsr\brc\bc)\b)
+           Dynamically resize the array pointed to by "dest".  "dest_size" is
+           a pointer to the current size of "dest".  Upon successful _\br_\be_\ba_\bl_\b-
+           _\bl_\bo_\bc_\b(_\b), the "dest_size" is incremented by 1 and the "src" pointer is
+           stored at the end of the new "dest".  Returns 1 on success, 0 on
+           failure.
+
+               type **arr = NULL;
+               type *elem = "whatever";
+               size_t arr_size = 0;
+               if (!rrd_add_ptr(&arr, &arr_size, elem))
+                   handle_failure();
+
+       r\brr\brd\bd_\b_a\bad\bdd\bd_\b_s\bst\btr\brd\bdu\bup\bp(\b(c\bch\bha\bar\br *\b**\b**\b*d\bde\bes\bst\bt,\b, s\bsi\biz\bze\be_\b_t\bt *\b*d\bde\bes\bst\bt_\b_s\bsi\biz\bze\be,\b, c\bch\bha\bar\br *\b*s\bsr\brc\bc)\b)
+           Like "rrd_add_ptr", except adds a "strdup" of the source string.
+
+               char **arr = NULL;
+               size_t arr_size = NULL;
+               char *str  = "example text";
+               if (!rrd_add_strdup(&arr, &arr_size, str))
+                   handle_failure();
+
+       r\brr\brd\bd_\b_f\bfr\bre\bee\be_\b_p\bpt\btr\brs\bs(\b(v\bvo\boi\bid\bd *\b**\b**\b*s\bsr\brc\bc,\b, s\bsi\biz\bze\be_\b_t\bt *\b*c\bcn\bnt\bt)\b)
+           Free an array of pointers allocated by "rrd_add_ptr" or
+           "rrd_add_strdup".  Also frees the array pointer itself.  On return,
+           the source pointer will be NULL and the count will be zero.
+
+               /* created as above */
+               rrd_free_ptrs(&arr, &arr_size);
+               /* here, arr == NULL && arr_size == 0 */
+
+
+
+1.3.99909060808                   2009-04-20                         LIBRRD(1)
index c820b8125cdc8a5b89a30cf1bf211e82b50060f6..5a74d62c0f4faccadd12a7bf3c05aa193a35512f 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RPNTUTORIAL 1"
-.TH RPNTUTORIAL 1 "2008-12-22" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RPNTUTORIAL 1 "2008-12-22" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rpntutorial \- Reading RRDtool RPN Expressions by Steve Rader
 .SH "DESCRIPTION"
index 74d8754758e5d3e75038ba02525a22973e4ae005..b5dd26e3ebca2d656acbf7a7a42c05b0ad646f1a 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rpntutorial</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#exercises">Exercises</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -51,14 +43,14 @@ they appear.  These operators act on the two values on the stack
 preceding them (to the left).  Read these two values on the stack
 from left to right inserting the operator in the middle.  If the
 resulting statement is true, then replace the three values from the
-stack with &quot;1&quot;.  If the statement if false, replace the three values
-with &quot;0&quot;.</p>
-<p>For example, think about &quot;2,1,GT&quot;.  This RPN expression could be
-read as &quot;is two greater than one?&quot;  The answer to that question is
-&quot;true&quot;.  So the three values should be replaced with &quot;1&quot;.  Thus the
+stack with ``1''.  If the statement if false, replace the three values
+with ``0''.</p>
+<p>For example, think about ``2,1,GT''.  This RPN expression could be
+read as ``is two greater than one?''  The answer to that question is
+``true''.  So the three values should be replaced with ``1''.  Thus the
 RPN expression 2,1,GT evaluates to 1.</p>
-<p>Now consider &quot;2,1,LE&quot;.  This RPN expression could be read as &quot;is
-two less than or equal to one?&quot;.   The natural response is &quot;no&quot;
+<p>Now consider ``2,1,LE''.  This RPN expression could be read as ``is
+two less than or equal to one?''.   The natural response is ``no''
 and thus the RPN expression 2,1,LE evaluates to 0.</p>
 <p>
 </p>
@@ -66,21 +58,21 @@ and thus the RPN expression 2,1,LE evaluates to 0.</p>
 <h1><a name="reading_the_if_operator">Reading the IF Operator</a></h1>
 <p>The IF RPN logic operator can be straightforward also.  The key
 to reading IF operators is to understand that the condition part
-of the traditional &quot;if X than Y else Z&quot; notation has *already*
+of the traditional ``if X than Y else Z'' notation has *already*
 been evaluated.  So the IF operator acts on only one value on the
 stack: the third value to the left of the IF value.  The second
-value to the left of the IF corresponds to the true (&quot;Y&quot;) branch.
+value to the left of the IF corresponds to the true (``Y'') branch.
 And the first value to the left of the IF corresponds to the false
-(&quot;Z&quot;) branch.  Read the RPN expression &quot;X,Y,Z,IF&quot; from left to
-right like so: &quot;if X then Y else Z&quot;.</p>
-<p>For example, consider &quot;1,10,100,IF&quot;.  It looks bizarre to me.
-But when I read &quot;if 1 then 10 else 100&quot; it's crystal clear: 1 is true
+(``Z'') branch.  Read the RPN expression ``X,Y,Z,IF'' from left to
+right like so: ``if X then Y else Z''.</p>
+<p>For example, consider ``1,10,100,IF''.  It looks bizarre to me.
+But when I read ``if 1 then 10 else 100'' it's crystal clear: 1 is true
 so the answer is 10.  Note that only zero is false; all other values
-are true.  &quot;2,20,200,IF&quot; (&quot;if 2 then 20 else 200&quot;) evaluates to 20.
-And &quot;0,1,2,IF&quot; (&quot;if 0 then 1 else 2) evaluates to 2.</p>
+are true.  ``2,20,200,IF'' (``if 2 then 20 else 200'') evaluates to 20.
+And ``0,1,2,IF'' (``if 0 then 1 else 2) evaluates to 2.</p>
 <p>Notice that none of the above examples really simulate the whole
-&quot;if X then Y else Z&quot; statement.  This is because computer programmers
-read this statement as &quot;if Some Condition then Y else Z&quot;.  So it's
+``if X then Y else Z'' statement.  This is because computer programmers
+read this statement as ``if Some Condition then Y else Z''.  So it's
 important to be able to read IF operators along with the LT, LE,
 GT, GE and EQ operators.</p>
 <p>
@@ -93,9 +85,9 @@ you must know the algorithm for evaluating RPN expressions:
 iterate searches from the left to the right looking for an operator.
 When it's found, apply that operator by popping the operator and some
 number of values (and by definition, not operators) off the stack.</p>
-<p>For example, the stack &quot;1,2,3,+,+&quot; gets &quot;2,3,+&quot; evaluated (as &quot;2+3&quot;)
+<p>For example, the stack ``1,2,3,+,+'' gets ``2,3,+'' evaluated (as ``2+3'')
 during the first iteration and is replaced by 5.  This results in
-the stack &quot;1,5,+&quot;.  Finally, &quot;1,5,+&quot; is evaluated resulting in the
+the stack ``1,5,+''.  Finally, ``1,5,+'' is evaluated resulting in the
 answer 6.  For convenience, it's useful to write this set of
 operations as:</p>
 <pre>
@@ -106,10 +98,10 @@ operations as:</p>
 with multiple logic operators:</p>
 <pre>
  1) 20,10,GT,10,20,IF  eval is 20,10,GT = 1     result is 1,10,20,IF</pre>
-<p>read the eval as pop &quot;20 is greater than 10&quot; so push 1</p>
+<p>read the eval as pop ``20 is greater than 10'' so push 1</p>
 <pre>
  2) 1,10,20,IF         eval is 1,10,20,IF = 10  result is 10</pre>
-<p>read pop &quot;if 1 then 10 else 20&quot; so push 10.  Only 10 is left so
+<p>read pop ``if 1 then 10 else 20'' so push 10.  Only 10 is left so
 10 is the answer.</p>
 <p>Let's read a complex RPN expression that also has the traditional
 multiplication operator:</p>
@@ -119,29 +111,29 @@ multiplication operator:</p>
  3) 0,128,8,*,IF                     eval 128,8,*       result is 1024
  4) 0,7000,1024,IF                                      result is 1024</pre>
 <p>Now let's go back to the first example of multiple logic operators,
-but replace the value 20 with the variable &quot;input&quot;:</p>
+but replace the value 20 with the variable ``input'':</p>
 <pre>
  1) input,10,GT,10,input,IF  eval is input,10,GT  ( lets call this A )</pre>
-<p>Read eval as &quot;if input &gt; 10 then true&quot; and replace &quot;input,10,GT&quot;
-with &quot;A&quot;:</p>
+<p>Read eval as ``if input &gt; 10 then true'' and replace ``input,10,GT''
+with ``A'':</p>
 <pre>
  2) A,10,input,IF            eval is A,10,input,IF</pre>
-<p>read &quot;if A then 10 else input&quot;.  Now replace A with it's verbose
+<p>read ``if A then 10 else input''.  Now replace A with it's verbose
 description again and--voila!--you have a easily readable description
 of the expression:</p>
 <pre>
  if input &gt; 10 then 10 else input</pre>
 <p>Finally, let's go back to the first most complex example and replace
-the value 128 with &quot;input&quot;:</p>
+the value 128 with ``input'':</p>
 <pre>
  1) input,8,*,7000,GT,7000,input,8,*,IF  eval input,8,*     result is A</pre>
-<p>where A is &quot;input * 8&quot;</p>
+<p>where A is ``input * 8''</p>
 <pre>
  2) A,7000,GT,7000,input,8,*,IF          eval is A,7000,GT  result is B</pre>
-<p>where B is &quot;if ((input * 8) &gt; 7000) then true&quot;</p>
+<p>where B is ``if ((input * 8) &gt; 7000) then true''</p>
 <pre>
  3) B,7000,input,8,*,IF                  eval is input,8,*  result is C</pre>
-<p>where C is &quot;input * 8&quot;</p>
+<p>where C is ``input * 8''</p>
 <pre>
  4) B,7000,C,IF</pre>
 <p>At last we have a readable decoding of the complex RPN expression with
@@ -153,7 +145,7 @@ a variable:</p>
 <hr />
 <h1><a name="exercises">Exercises</a></h1>
 <p>Exercise 1:</p>
-<p>Compute &quot;3,2,*,1,+ and &quot;3,2,1,+,*&quot; by hand.  Rewrite them in
+<p>Compute ``3,2,*,1,+ and ''3,2,1,+,*`` by hand.  Rewrite them in
 traditional notation.  Explain why they have different answers.</p>
 <p>Answer 1:</p>
 <pre>
@@ -164,7 +156,7 @@ traditional notation.  Explain why they have different answers.</p>
 <p>One may be tempted to shorten the expression</p>
 <pre>
  input,8,*,56000,GT,56000,input,*,8,IF</pre>
-<p>by removing the redundant use of &quot;input,8,*&quot; like so:</p>
+<p>by removing the redundant use of ``input,8,*'' like so:</p>
 <pre>
  input,56000,GT,56000,input,IF,8,*</pre>
 <p>Use traditional notation to show these expressions are not the same.
index 561de007b6dcec74371c82993962e00b37d417dc..aa95f7b51e2f11abd5b0a05607d92c52f3c56af6 100644 (file)
@@ -19,8 +19,8 @@ R\bRe\bea\bad\bdi\bin\bng\bg C\bCo\bom\bmp\bpa\bar\bri\bis\bso\bon\bn O\bOp\bpe\ber\bra\bat\bto\bor\brs\bs
 
        For example, think about "2,1,GT".  This RPN expression could be read
        as "is two greater than one?"  The answer to that question is "true".
-       So the three values should be replaced with "1".  Thus the RPN
-       expression 2,1,GT evaluates to 1.
+       So the three values should be replaced with "1".  Thus the RPN expres-
+       sion 2,1,GT evaluates to 1.
 
        Now consider "2,1,LE".  This RPN expression could be read as "is two
        less than or equal to one?".   The natural response is "no" and thus
@@ -33,8 +33,8 @@ R\bRe\bea\bad\bdi\bin\bng\bg t\bth\bhe\be I\bIF\bF O\bOp\bpe\ber\bra\bat\bto\bor\br
        So the IF operator acts on only one value on the stack: the third value
        to the left of the IF value.  The second value to the left of the IF
        corresponds to the true ("Y") branch.  And the first value to the left
-       of the IF corresponds to the false ("Z") branch.  Read the RPN
-       expression "X,Y,Z,IF" from left to right like so: "if X then Y else Z".
+       of the IF corresponds to the false ("Z") branch.  Read the RPN expres-
+       sion "X,Y,Z,IF" from left to right like so: "if X then Y else Z".
 
        For example, consider "1,10,100,IF".  It looks bizarre to me.  But when
        I read "if 1 then 10 else 100" it's crystal clear: 1 is true so the
@@ -49,12 +49,12 @@ R\bRe\bea\bad\bdi\bin\bng\bg t\bth\bhe\be I\bIF\bF O\bOp\bpe\ber\bra\bat\bto\bor\br
        operators.
 
 S\bSo\bom\bme\be E\bEx\bxa\bam\bmp\bpl\ble\bes\bs
-       While compound expressions can look overly complex, they can be
-       considered elegantly simple.  To quickly comprehend RPN expressions,
-       you must know the algorithm for evaluating RPN expressions: iterate
-       searches from the left to the right looking for an operator.  When it's
-       found, apply that operator by popping the operator and some number of
-       values (and by definition, not operators) off the stack.
+       While compound expressions can look overly complex, they can be consid-
+       ered elegantly simple.  To quickly comprehend RPN expressions, you must
+       know the algorithm for evaluating RPN expressions: iterate searches
+       from the left to the right looking for an operator.  When it's found,
+       apply that operator by popping the operator and some number of values
+       (and by definition, not operators) off the stack.
 
        For example, the stack "1,2,3,+,+" gets "2,3,+" evaluated (as "2+3")
        during the first iteration and is replaced by 5.  This results in the
@@ -65,8 +65,8 @@ S\bSo\bom\bme\be E\bEx\bxa\bam\bmp\bpl\ble\bes\bs
         2) 1,5,+        eval is 1,5,+ = 6    result is 6
         3) 6
 
-       Let's use that notation to conveniently solve some complex RPN
-       expressions with multiple logic operators:
+       Let's use that notation to conveniently solve some complex RPN expres-
+       sions with multiple logic operators:
 
         1) 20,10,GT,10,20,IF  eval is 20,10,GT = 1     result is 1,10,20,IF
 
@@ -77,8 +77,8 @@ S\bSo\bom\bme\be E\bEx\bxa\bam\bmp\bpl\ble\bes\bs
        read pop "if 1 then 10 else 20" so push 10.  Only 10 is left so 10 is
        the answer.
 
-       Let's read a complex RPN expression that also has the traditional
-       multiplication operator:
+       Let's read a complex RPN expression that also has the traditional mul-
+       tiplication operator:
 
         1) 128,8,*,7000,GT,7000,128,8,*,IF  eval 128,8,*       result is 1024
         2) 1024,7000,GT,7000,128,8,*,IF     eval 1024,7000,GT  result is 0
@@ -126,8 +126,8 @@ S\bSo\bom\bme\be E\bEx\bxa\bam\bmp\bpl\ble\bes\bs
 E\bEx\bxe\ber\brc\bci\bis\bse\bes\bs
        Exercise 1:
 
-       Compute "3,2,*,1,+ and "3,2,1,+,*" by hand.  Rewrite them in
-       traditional notation.  Explain why they have different answers.
+       Compute "3,2,*,1,+ and "3,2,1,+,*" by hand.  Rewrite them in tradi-
+       tional notation.  Explain why they have different answers.
 
        Answer 1:
 
@@ -187,4 +187,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2008-12-22                    RPNTUTORIAL(1)
+1.3.99909060808                   2008-12-22                    RPNTUTORIAL(1)
index d36a4ce19904331530ecda6a915a4f87bd342756..5c10b1008aa6e55042af6db52b9f432c18778e97 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRD-BEGINNERS 1"
-.TH RRD-BEGINNERS 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRD-BEGINNERS 1 "2008-03-15" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrd\-beginners \- RRDtool Beginners' Guide
 .SH "SYNOPSIS"
@@ -142,7 +143,7 @@ databases. With help of an example, it explains the structure of RRDtool
 database. This is followed by an overview of the \*(L"graph\*(R" feature of RRDtool.
 At the end, it has sample scripts that illustrate the
 usage/wrapping of RRDtool within Shell or Perl scripts.
-.SS "What makes RRDtool so special?"
+.Sh "What makes RRDtool so special?"
 .IX Subsection "What makes RRDtool so special?"
 RRDtool is \s-1GNU\s0 licensed software developed by Tobias Oetiker, a system
 manager at the Swiss Federal Institute of Technology. Though it is a
@@ -180,7 +181,7 @@ various operations on \s-1RRD\s0 databases. This command set can be accessed
 from the command line, as well as from Shell or Perl scripts. The
 scripts act as wrappers for accessing data stored in RRDtool
 databases.
-.SS "Understanding by an example"
+.Sh "Understanding by an example"
 .IX Subsection "Understanding by an example"
 The structure of an \s-1RRD\s0 database is different than other linear databases.
 Other databases define tables with columns, and many other parameters. These
@@ -306,7 +307,7 @@ individual \s-1RRA\s0 will save data for all the DSs in the database. For
 example, if a database has 3 DSs and daily, weekly, monthly, and
 yearly RRAs are declared, then each \s-1RRA\s0 will hold data from all 3 data
 sources.
-.SS "Graphical Magic"
+.Sh "Graphical Magic"
 .IX Subsection "Graphical Magic"
 Another important feature of RRDtool is its ability to create
 graphs. The \*(L"graph\*(R" command uses the \*(L"fetch\*(R" command internally to
@@ -342,7 +343,7 @@ plotted in the order they are defined in the graph command. Therefore
 care must be taken to define \s-1STACK\s0 only after defining \s-1AREA/LINE\s0. It
 is also possible to put formatted comments within the graph.  Detailed
 instructions can be found in the graph manual.
-.SS "Wrapping RRDtool within Shell/Perl script"
+.Sh "Wrapping RRDtool within Shell/Perl script"
 .IX Subsection "Wrapping RRDtool within Shell/Perl script"
 After understanding RRDtool it is now a time to actually use RRDtool
 in scripts. Tasks involved in network management are data collection,
@@ -354,20 +355,20 @@ generation is done using Perl scripts. These scripts are shown below:
 \fIShell script (collects data, updates database)\fR
 .IX Subsection "Shell script (collects data, updates database)"
 .PP
-.Vb 10
+.Vb 14
 \& #!/bin/sh
 \& a=0
 \& while [ "$a" == 0 ]; do
 \& snmpwalk \-c public 192.168.1.250 hrSWRunPerfMem > snmp_reply
-\&     total_mem=\`awk \*(AqBEGIN {tot_mem=0}
+\&     total_mem=`awk 'BEGIN {tot_mem=0}
 \&                           { if ($NF == "KBytes")
 \&                             {tot_mem=tot_mem+$(NF\-1)}
 \&                           }
-\&                     END {print tot_mem}\*(Aq snmp_reply\`
+\&                     END {print tot_mem}' snmp_reply`
 \&     # I can use N as a replacement for the current time
 \&     rrdtool update target.rrd N:$total_mem
 \&     # sleep until the next 300 seconds are full
-\&     perl \-e \*(Aqsleep 300 \- time % 300\*(Aq
+\&     perl \-e 'sleep 300 \- time % 300'
 \& done # end of while loop
 .Ve
 .PP
@@ -378,14 +379,18 @@ generation is done using Perl scripts. These scripts are shown below:
 \& #!/usr/bin/perl \-w
 \& # This script fetches data from target.rrd, creates a graph of memory
 \& # consumption on the target (Dual P3 Processor 1 GHz, 656 MB RAM)
-\&
+.Ve
+.PP
+.Vb 6
 \& # call the RRD perl module
 \& use lib qw( /usr/local/rrdtool\-1.0.41/lib/perl ../lib/perl );
 \& use RRDs;
 \& my $cur_time = time();                # set current time
 \& my $end_time = $cur_time \- 86400;     # set end time to 24 hours ago
 \& my $start_time = $end_time \- 2592000; # set start 30 days in the past
-\&
+.Ve
+.PP
+.Vb 58
 \& # fetch average values from the RRD database between start and end time
 \& my ($start,$step,$ds_names,$data) =
 \&     RRDs::fetch("target.rrd", "AVERAGE",
index 6b097d307296eb6dc96b864b8ed2bc8e3063bd17..fde0164e1e02d164a4bbcd8239e60f11727b510f 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrd-beginners</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
 
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -59,7 +51,7 @@
 <p>This manual is an attempt to assist beginners in understanding the concepts
 of RRDtool. It sheds a light on differences between RRDtool and other
 databases. With help of an example, it explains the structure of RRDtool
-database. This is followed by an overview of the &quot;graph&quot; feature of RRDtool.
+database. This is followed by an overview of the ``graph'' feature of RRDtool.
 At the end, it has sample scripts that illustrate the
 usage/wrapping of RRDtool within Shell or Perl scripts.</p>
 <p>
@@ -70,34 +62,33 @@ manager at the Swiss Federal Institute of Technology. Though it is a
 database, there are distinct differences between RRDtool databases and other
 databases as listed below:</p>
 <ul>
-<li>
-<p>RRDtool stores data; that makes it a back-end tool. The RRDtool command set
+<li></li>
+RRDtool stores data; that makes it a back-end tool. The RRDtool command set
 allows the creation of graphs; that makes it a front-end tool as well. Other
-databases just store data and can not create graphs.</p>
-</li>
-<li>
-<p>In case of linear databases, new data gets appended at the bottom of
+databases just store data and can not create graphs.
+<p></p>
+<li></li>
+In case of linear databases, new data gets appended at the bottom of
 the database table. Thus its size keeps on increasing, whereas the size of
 an RRDtool database is determined at creation time. Imagine an RRDtool
 database as the perimeter of a circle. Data is added along the
 perimeter. When new data reaches the starting point, it overwrites
 existing data. This way, the size of an RRDtool database always
-remains constant. The name &quot;Round Robin&quot; stems from this behavior.</p>
-</li>
-<li>
-<p>Other databases store the values as supplied. RRDtool can be configured to
+remains constant. The name ``Round Robin'' stems from this behavior.
+<p></p>
+<li></li>
+Other databases store the values as supplied. RRDtool can be configured to
 calculate the rate of change from the previous to the current value and
-store this information instead.</p>
-</li>
-<li>
-<p>Other databases get updated when values are supplied. The RRDtool database
+store this information instead.
+<p></p>
+<li></li>
+Other databases get updated when values are supplied. The RRDtool database
 is structured in such a way that it needs data at predefined time
 intervals. If it does not get a new value during the interval, it stores an
 UNKNOWN value for that interval. So, when using the RRDtool database, it is
 imperative to use scripts that run at regular intervals to ensure a constant
-data flow to update the RRDtool database.</p>
-</li>
-</ul>
+data flow to update the RRDtool database.
+<p></p></ul>
 <p>RRDtool is designed to store time series of data. With every data
 update, an associated time stamp is stored. Time is always expressed
 in seconds passed since epoch (01-01-1970). RRDtool can be installed
@@ -130,7 +121,7 @@ best explained with an example.</p>
          DS:mem:GAUGE:600:0:671744 \
          RRA:AVERAGE:0.5:12:24 \
          RRA:AVERAGE:0.5:288:31</pre>
-<p>This example creates a database named <em class="file">target.rrd</em>. Start time
+<p>This example creates a database named <em>target.rrd</em>. Start time
 (1'023'654'125) is specified in total number of seconds since epoch
 (time in seconds since 01-01-1970). While updating the database, the
 update time is also specified.  This update time MUST be large (later)
@@ -217,7 +208,7 @@ sources.</p>
 </p>
 <h2><a name="graphical_magic">Graphical Magic</a></h2>
 <p>Another important feature of RRDtool is its ability to create
-graphs. The &quot;graph&quot; command uses the &quot;fetch&quot; command internally to
+graphs. The ``graph'' command uses the ``fetch'' command internally to
 retrieve values from the database. With the retrieved values it draws
 graphs as defined by the parameters supplied on the command line. A
 single graph can show different DS (Data Sources) from a database. It
@@ -236,14 +227,14 @@ for retrieving the values? RRDtool looks at several things when making
 its choice. First it makes sure that the RRA covers as much of the
 graphing time frame as possible. Second it looks at the resolution of
 the RRA compared to the resolution of the graph. It tries to find one
-which has the same or higher better resolution. With the &quot;-r&quot; option
+which has the same or higher better resolution. With the ``-r'' option
 you can force RRDtool to assume a different resolution than the one
 calculated from the pixel width of the graph.</p>
 <p>Values of different variables can be presented in 5 different shapes
 in a graph - AREA, LINE1, LINE2, LINE3, and STACK. AREA is represented
 by a solid colored area with values as the boundary of this
 area. LINE1/2/3 (increasing width) are just plain lines representing
-the values. STACK is also an area but it is &quot;stack&quot;ed on top AREA or
+the values. STACK is also an area but it is ``stack''ed on top AREA or
 LINE1/2/3. Another important thing to note is that variables are
 plotted in the order they are defined in the graph command. Therefore
 care must be taken to define STACK only after defining AREA/LINE. It
index 019f9c904208a99245edb1b8f445b44b486f899f..1db47e3d14350aec61c5802226b82ba5a2e16e83 100644 (file)
@@ -9,14 +9,15 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
        Helping new RRDtool users to understand the basics of RRDtool
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-       This manual is an attempt to assist beginners in understanding the
-       concepts of RRDtool. It sheds a light on differences between RRDtool
-       and other databases. With help of an example, it explains the structure
-       of RRDtool database. This is followed by an overview of the "graph"
-       feature of RRDtool.  At the end, it has sample scripts that illustrate
-       the usage/wrapping of RRDtool within Shell or Perl scripts.
-
-   W\bWh\bha\bat\bt m\bma\bak\bke\bes\bs R\bRR\bRD\bDt\bto\boo\bol\bl s\bso\bo s\bsp\bpe\bec\bci\bia\bal\bl?\b?
+       This manual is an attempt to assist beginners in understanding the con-
+       cepts of RRDtool. It sheds a light on differences between RRDtool and
+       other databases. With help of an example, it explains the structure of
+       RRDtool database. This is followed by an overview of the "graph" fea-
+       ture of RRDtool.  At the end, it has sample scripts that illustrate the
+       usage/wrapping of RRDtool within Shell or Perl scripts.
+
+       W\bWh\bha\bat\bt m\bma\bak\bke\bes\bs R\bRR\bRD\bDt\bto\boo\bol\bl s\bso\bo s\bsp\bpe\bec\bci\bia\bal\bl?\b?
+
        RRDtool is GNU licensed software developed by Tobias Oetiker, a system
        manager at the Swiss Federal Institute of Technology. Though it is a
        database, there are distinct differences between RRDtool databases and
@@ -24,39 +25,40 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        ·   RRDtool stores data; that makes it a back-end tool. The RRDtool
            command set allows the creation of graphs; that makes it a front-
-           end tool as well. Other databases just store data and can not
-           create graphs.
+           end tool as well. Other databases just store data and can not cre-
+           ate graphs.
 
        ·   In case of linear databases, new data gets appended at the bottom
            of the database table. Thus its size keeps on increasing, whereas
            the size of an RRDtool database is determined at creation time.
            Imagine an RRDtool database as the perimeter of a circle. Data is
            added along the perimeter. When new data reaches the starting
-           point, it overwrites existing data. This way, the size of an
-           RRDtool database always remains constant. The name "Round Robin"
-           stems from this behavior.
+           point, it overwrites existing data. This way, the size of an RRD-
+           tool database always remains constant. The name "Round Robin" stems
+           from this behavior.
 
-       ·   Other databases store the values as supplied. RRDtool can be
-           configured to calculate the rate of change from the previous to the
+       ·   Other databases store the values as supplied. RRDtool can be con-
+           figured to calculate the rate of change from the previous to the
            current value and store this information instead.
 
        ·   Other databases get updated when values are supplied. The RRDtool
-           database is structured in such a way that it needs data at
-           predefined time intervals. If it does not get a new value during
-           the interval, it stores an UNKNOWN value for that interval. So,
-           when using the RRDtool database, it is imperative to use scripts
-           that run at regular intervals to ensure a constant data flow to
-           update the RRDtool database.
+           database is structured in such a way that it needs data at prede-
+           fined time intervals. If it does not get a new value during the
+           interval, it stores an UNKNOWN value for that interval. So, when
+           using the RRDtool database, it is imperative to use scripts that
+           run at regular intervals to ensure a constant data flow to update
+           the RRDtool database.
 
        RRDtool is designed to store time series of data. With every data
        update, an associated time stamp is stored. Time is always expressed in
        seconds passed since epoch (01-01-1970). RRDtool can be installed on
-       Unix as well as Windows. It comes with a command set to carry out
-       various operations on RRD databases. This command set can be accessed
-       from the command line, as well as from Shell or Perl scripts. The
-       scripts act as wrappers for accessing data stored in RRDtool databases.
+       Unix as well as Windows. It comes with a command set to carry out vari-
+       ous operations on RRD databases. This command set can be accessed from
+       the command line, as well as from Shell or Perl scripts. The scripts
+       act as wrappers for accessing data stored in RRDtool databases.
+
+       U\bUn\bnd\bde\ber\brs\bst\bta\ban\bnd\bdi\bin\bng\bg b\bby\by a\ban\bn e\bex\bxa\bam\bmp\bpl\ble\be
 
-   U\bUn\bnd\bde\ber\brs\bst\bta\ban\bnd\bdi\bin\bng\bg b\bby\by a\ban\bn e\bex\bxa\bam\bmp\bpl\ble\be
        The structure of an RRD database is different than other linear
        databases.  Other databases define tables with columns, and many other
        parameters. These definitions sometimes are very complex, especially in
@@ -67,9 +69,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        also defined. Because of its structure, the definition of an RRDtool
        database also includes a provision to specify specific actions to take
        in the absence of update values. Data Source (DS), heartbeat, Date
-       Source Type (DST), Round Robin Archive (RRA), and Consolidation
-       Function (CF) are some of the terminologies related to RRDtool
-       databases.
+       Source Type (DST), Round Robin Archive (RRA), and Consolidation Func-
+       tion (CF) are some of the terminologies related to RRDtool databases.
 
        The structure of a database and the terminology associated with it can
        be best explained with an example.
@@ -103,9 +104,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        (\b(P\bPD\bDP\bP)\b). In our example mentioned above, a new PDP is generated every 300
        seconds.
 
-       Note, that if you do NOT supply new datapoints exactly every 300
-       seconds, this is not a problem, RRDtool will interpolate the data
-       accordingly.
+       Note, that if you do NOT supply new datapoints exactly every 300 sec-
+       onds, this is not a problem, RRDtool will interpolate the data accord-
+       ingly.
 
        D\bDS\bST\bT (Data Source Type) defines the type of the DS. It can be COUNTER,
        DERIVE, ABSOLUTE, GAUGE. A DS declared as COUNTER will save the rate of
@@ -121,9 +122,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        Thus it just stores the current value divided by the step interval (300
        seconds in our example). GAUGE does not save the rate of change. It
        saves the actual value itself. There are no divisions or calculations.
-       Memory consumption in a server is a typical example of gauge. The
-       difference between the different types DSTs can be explained better
-       with the following example:
+       Memory consumption in a server is a typical example of gauge. The dif-
+       ference between the different types DSTs can be explained better with
+       the following example:
 
         Values       = 300, 600, 900, 1200
         Step         = 300 seconds
@@ -132,23 +133,23 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
         ABSOLUTE DS  =    1,  2,   3,    4
         GAUGE DS     = 300, 600, 900, 1200
 
-       The next parameter is h\bhe\bea\bar\brt\btb\bbe\bea\bat\bt. In our example, heartbeat is 600
-       seconds. If the database does not get a new PDP within 300 seconds, it
+       The next parameter is h\bhe\bea\bar\brt\btb\bbe\bea\bat\bt. In our example, heartbeat is 600 sec-
+       onds. If the database does not get a new PDP within 300 seconds, it
        will wait for another 300 seconds (total 600 seconds).  If it doesn't
        receive any PDP within 600 seconds, it will save an UNKNOWN value into
        the database. This UNKNOWN value is a special feature of RRDtool - it
        is much better than to assume a missing value was 0 (zero) or any other
-       number which might also be a valid data value.  For example, the
-       traffic flow counter on a router keeps increasing. Lets say, a value is
+       number which might also be a valid data value.  For example, the traf-
+       fic flow counter on a router keeps increasing. Lets say, a value is
        missed for an interval and 0 is stored instead of UNKNOWN. Now when the
        next value becomes available, it will calculate the difference between
        the current value and the previous value (0) which is not correct. So,
        inserting the value UNKNOWN makes much more sense here.
 
-       The next two parameters are the minimum and maximum value,
-       respectively. If the variable to be stored has predictable maximum and
-       minimum values, this should be specified here. Any update value falling
-       out of this range will be stored as UNKNOWN.
+       The next two parameters are the minimum and maximum value, respec-
+       tively. If the variable to be stored has predictable maximum and mini-
+       mum values, this should be specified here. Any update value falling out
+       of this range will be stored as UNKNOWN.
 
        The next line declares a round robin archive (RRA). The syntax for
        declaring an RRA is
@@ -163,56 +164,58 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        Lets have a look at the example above. For the first RRA, 12 (steps)
        PDPs (DS variables) are AVERAGEed (CF) to form one CDP. 24 (rows) of
-       theses CDPs are archived. Each PDP occurs at 300 seconds. 12 PDPs
-       represent 12 times 300 seconds which is 1 hour. It means 1 CDP (which
-       is equal to 12 PDPs) represents data worth 1 hour. 24 such CDPs
-       represent 1 day (1 hour times 24 CDPs). This means, this RRA is an
-       archive for one day. After 24 CDPs, CDP number 25 will replace the 1st
-       CDP. The second RRA saves 31 CDPs; each CPD represents an AVERAGE value
-       for a day (288 PDPs, each covering 300 seconds = 24 hours). Therefore
-       this RRA is an archive for one month. A single database can have many
-       RRAs. If there are multiple DSs, each individual RRA will save data for
-       all the DSs in the database. For example, if a database has 3 DSs and
+       theses CDPs are archived. Each PDP occurs at 300 seconds. 12 PDPs rep-
+       resent 12 times 300 seconds which is 1 hour. It means 1 CDP (which is
+       equal to 12 PDPs) represents data worth 1 hour. 24 such CDPs represent
+       1 day (1 hour times 24 CDPs). This means, this RRA is an archive for
+       one day. After 24 CDPs, CDP number 25 will replace the 1st CDP. The
+       second RRA saves 31 CDPs; each CPD represents an AVERAGE value for a
+       day (288 PDPs, each covering 300 seconds = 24 hours). Therefore this
+       RRA is an archive for one month. A single database can have many RRAs.
+       If there are multiple DSs, each individual RRA will save data for all
+       the DSs in the database. For example, if a database has 3 DSs and
        daily, weekly, monthly, and yearly RRAs are declared, then each RRA
        will hold data from all 3 data sources.
 
-   G\bGr\bra\bap\bph\bhi\bic\bca\bal\bl M\bMa\bag\bgi\bic\bc
+       G\bGr\bra\bap\bph\bhi\bic\bca\bal\bl M\bMa\bag\bgi\bic\bc
+
        Another important feature of RRDtool is its ability to create graphs.
        The "graph" command uses the "fetch" command internally to retrieve
        values from the database. With the retrieved values it draws graphs as
        defined by the parameters supplied on the command line. A single graph
-       can show different DS (Data Sources) from a database. It is also
-       possible to show the values from more than one database in a single
-       graph. Often, it is necessary to perform some math on the values
-       retrieved from the database before plotting them. For example, in SNMP
-       replies, memory consumption values are usually specified in KBytes and
-       traffic flow on interfaces is specified in Bytes. Graphs for these
-       values will be more meaningful if values are represented in MBytes and
-       mbps. The RRDtool graph command allows to define such conversions.
-       Apart from mathematical calculations, it is also possible to perform
-       logical operations such as greater than, less than, and if/then/else.
-       If a database contains more than one RRA archive, then a question may
-       arise - how does RRDtool decide which RRA archive to use for retrieving
-       the values? RRDtool looks at several things when making its choice.
-       First it makes sure that the RRA covers as much of the graphing time
-       frame as possible. Second it looks at the resolution of the RRA
-       compared to the resolution of the graph. It tries to find one which has
-       the same or higher better resolution. With the "-r" option you can
-       force RRDtool to assume a different resolution than the one calculated
-       from the pixel width of the graph.
+       can show different DS (Data Sources) from a database. It is also possi-
+       ble to show the values from more than one database in a single graph.
+       Often, it is necessary to perform some math on the values retrieved
+       from the database before plotting them. For example, in SNMP replies,
+       memory consumption values are usually specified in KBytes and traffic
+       flow on interfaces is specified in Bytes. Graphs for these values will
+       be more meaningful if values are represented in MBytes and mbps. The
+       RRDtool graph command allows to define such conversions. Apart from
+       mathematical calculations, it is also possible to perform logical oper-
+       ations such as greater than, less than, and if/then/else. If a database
+       contains more than one RRA archive, then a question may arise - how
+       does RRDtool decide which RRA archive to use for retrieving the values?
+       RRDtool looks at several things when making its choice. First it makes
+       sure that the RRA covers as much of the graphing time frame as possi-
+       ble. Second it looks at the resolution of the RRA compared to the reso-
+       lution of the graph. It tries to find one which has the same or higher
+       better resolution. With the "-r" option you can force RRDtool to assume
+       a different resolution than the one calculated from the pixel width of
+       the graph.
 
        Values of different variables can be presented in 5 different shapes in
        a graph - AREA, LINE1, LINE2, LINE3, and STACK. AREA is represented by
        a solid colored area with values as the boundary of this area.
-       LINE1/2/3 (increasing width) are just plain lines representing the
-       values. STACK is also an area but it is "stack"ed on top AREA or
-       LINE1/2/3. Another important thing to note is that variables are
-       plotted in the order they are defined in the graph command. Therefore
-       care must be taken to define STACK only after defining AREA/LINE. It is
-       also possible to put formatted comments within the graph.  Detailed
-       instructions can be found in the graph manual.
-
-   W\bWr\bra\bap\bpp\bpi\bin\bng\bg R\bRR\bRD\bDt\bto\boo\bol\bl w\bwi\bit\bth\bhi\bin\bn S\bSh\bhe\bel\bll\bl/\b/P\bPe\ber\brl\bl s\bsc\bcr\bri\bip\bpt\bt
+       LINE1/2/3 (increasing width) are just plain lines representing the val-
+       ues. STACK is also an area but it is "stack"ed on top AREA or
+       LINE1/2/3. Another important thing to note is that variables are plot-
+       ted in the order they are defined in the graph command. Therefore care
+       must be taken to define STACK only after defining AREA/LINE. It is also
+       possible to put formatted comments within the graph.  Detailed instruc-
+       tions can be found in the graph manual.
+
+       W\bWr\bra\bap\bpp\bpi\bin\bng\bg R\bRR\bRD\bDt\bto\boo\bol\bl w\bwi\bit\bth\bhi\bin\bn S\bSh\bhe\bel\bll\bl/\b/P\bPe\ber\brl\bl s\bsc\bcr\bri\bip\bpt\bt
+
        After understanding RRDtool it is now a time to actually use RRDtool in
        scripts. Tasks involved in network management are data collection, data
        storage, and data retrieval. In the following example, the previously
@@ -315,4 +318,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2008-03-15                  RRD-BEGINNERS(1)
+1.3.99909060808                   2008-03-15                  RRD-BEGINNERS(1)
index 77dece4301309b86d5ea1ac6146b6dc8f4f44e98..cc01820f627e9774248d0ea0b032b2f2ca650604 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDBUILD 1"
-.TH RRDBUILD 1 "2009-05-19" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDBUILD 1 "2008-12-26" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdbuild \- Instructions for building RRDtool
 .SH "OVERVIEW"
@@ -162,7 +163,7 @@ Once you have decided. Save the two locations into environment variables.
 .PP
 .Vb 2
 \& BUILD_DIR=/tmp/rrdbuild
-\& INSTALL_DIR=/usr/local/rrdtool\-1.3.8
+\& INSTALL_DIR=/usr/local/rrdtool\-1.3.2
 .Ve
 .PP
 If your \fI/tmp\fR is mounted with the option noexec (\s-1RHEL\s0 seems todo that) you have to choose
@@ -176,12 +177,12 @@ Now make sure the \s-1BUILD_DIR\s0 exists and go there:
 .Ve
 .PP
 Lets first assume you already have all the necessary libraries
-pre-installed.
+pre\-installed. 
 .PP
 .Vb 4
-\& wget http://oss.oetiker.ch/rrdtool/pub/rrdtool\-1.3.8.tar.gz
-\& gunzip \-c rrdtool\-1.3.8.tar.gz | tar xf \-
-\& cd rrdtool\-1.3.8
+\& wget http://oss.oetiker.ch/rrdtool/pub/rrdtool\-1.3.2.tar.gz
+\& gunzip \-c rrdtool\-1.3.2.tar.gz | tar xf \-
+\& cd rrdtool\-1.3.2
 \& ./configure \-\-prefix=$INSTALL_DIR && make && make install
 .Ve
 .PP
@@ -192,12 +193,12 @@ Ok, this was very optimistic. This try will probably have ended with
 If your \s-1OS\s0 lets you install additional packages from a software repository,
 you may get away with installing the missing packages. When the packages are
 installed, run configure again and try to compile again. Below you find some
-hints on getting your \s-1OS\s0 ready for the rrdtool compilation.
+hints on getting your \s-1OS\s0 ready for the rrdtool compilation. 
 .PP
 Additions to this list are welcome. In general rrdtool should work with the
 latest versions of the libraries. The versions listed here are just what was
 current when I tested this.
-.SS "OpenSolaris 2008.05"
+.Sh "OpenSolaris 2008.05"
 .IX Subsection "OpenSolaris 2008.05"
 Just add a compiler and the gnome development package:
 .PP
@@ -212,7 +213,7 @@ bad since OpenSolaris does not include an \fIxrender.pc\fR file. Use Perl to
 fix this:
 .PP
 .Vb 1
-\& perl \-i~ \-p \-e \*(Aqs/(Requires.*?)\es*xrender.*/$1/\*(Aq /usr/lib/pkgconfig/cairo.pc
+\& perl \-i~ \-p \-e 's/(Requires.*?)\es*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc
 .Ve
 .PP
 Make sure rrdtool finds your new compiler
@@ -229,7 +230,7 @@ of installing it yourself). You have to call configure with the
 .Ve
 .PP
 option.
-.SS "Debian / Ubuntu"
+.Sh "Debian / Ubuntu"
 .IX Subsection "Debian / Ubuntu"
 Use apt-get to make sure you have all that is required. A number
 of packages will get added through dependencies.
@@ -237,7 +238,7 @@ of packages will get added through dependencies.
 .Vb 1
 \& apt\-get install libpango1.0\-dev libxml2\-dev
 .Ve
-.SS "Gentoo"
+.Sh "Gentoo"
 .IX Subsection "Gentoo"
 In Gentoo installing rrdtool is really simple you just need to \fBemerge
 rrdtool\fR. All dependencies will be handled automatically by the portage
@@ -272,7 +273,7 @@ libpng and zlib are pretty standard so you will probably have them on your
 system anyway. Freetype, Fontinst, Cairo, Pango may be installed, but it is
 possible that they are pretty old and thus don't live up to our
 expectations, so you may want to compile their latest versions.
-.SS "General build tips for \s-1AIX\s0"
+.Sh "General build tips for \s-1AIX\s0"
 .IX Subsection "General build tips for AIX"
 If you are working with \s-1AIX\s0, you may find the \fB\-\-disable\-shared\fR option
 will cause things to break for you. In that case you may have to install the
@@ -287,7 +288,7 @@ Another hint to get rrdtool working on \s-1AIX\s0 is to use the \s-1IBM\s0 \s-1X
 .Ve
 .PP
 (Better instructions for \s-1AIX\s0 welcome!)
-.SS "Build Instructions"
+.Sh "Build Instructions"
 .IX Subsection "Build Instructions"
 Some libraries want to know where other libraries are. For this to work,
 set the following environment variable
@@ -312,13 +313,12 @@ the syntax again differs from system to system:
 if you are using the Sun Studio/Forte compiler, you may also want to set
 .Sp
 .Vb 2
-\& export CFLAGS="\-xO3 \-xcode=pic13"   (SPARC)
-\& export CFLAGS="\-xO3 \-Kpic"          (x86)
+\& CFLAGS="\-xO3 \-xcode=pic13"   (SPARC)
+\& CFLAGS="\-xO3 \-Kpic"          (x86)
 .Ve
 .IP "Linux" 4
 .IX Item "Linux"
-.Vb 2
-\& export CFLAGS="\-O3 \-fPIC"
+.Vb 1
 \& export LDFLAGS="\-Wl,\-\-rpath \-Wl,${INSTALL_DIR}/lib"
 .Ve
 .IP "\s-1HPUX\s0" 4
@@ -357,7 +357,7 @@ not available natively, here is how to compile it.
 \& wget http://pkgconfig.freedesktop.org/releases/pkg\-config\-0.23.tar.gz
 \& gunzip \-c pkg\-config\-0.23.tar.gz | tar xf \-
 \& cd pkg\-config\-0.23
-\& ./configure \-\-prefix=$INSTALL_DIR
+\& ./configure \-\-prefix=$INSTALL_DIR CFLAGS="\-O3 \-fPIC"
 \& $MAKE
 \& $MAKE install
 .Ve
@@ -372,14 +372,14 @@ environment variable will be helpful.
 \fIBuilding zlib\fR
 .IX Subsection "Building zlib"
 .PP
-Chances are very high that you already have that on your system ...
+Chances are very high that you already have that on your system ... 
 .PP
 .Vb 7
 \& cd $BUILD_DIR
 \& wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib\-1.2.3.tar.gz
 \& gunzip \-c zlib\-1.2.3.tar.gz | tar xf \-
 \& cd zlib\-1.2.3
-\& ./configure \-\-prefix=$INSTALL_DIR \-\-shared
+\& ./configure \-\-prefix=$INSTALL_DIR CFLAGS="\-O3 \-fPIC" \-\-shared
 \& $MAKE
 \& $MAKE install
 .Ve
@@ -396,8 +396,8 @@ the end of line 4 means that line 4 and line 5 are on one line.
 \& cd $BUILD_DIR
 \& wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng\-1.2.18.tar.gz
 \& gunzip \-c libpng\-1.2.18.tar.gz | tar xf \-
-\& cd libpng\-1.2.18
-\& ./configure \-\-prefix=$INSTALL_DIR
+\& cd libpng\-1.2.10
+\& env CFLAGS="\-O3 \-fPIC" ./configure \-\-prefix=$INSTALL_DIR
 \& $MAKE
 \& $MAKE install
 .Ve
@@ -430,7 +430,7 @@ add the following at the start the configure line:
 \& wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2\-2.6.32.tar.gz
 \& gunzip \-c libxml2\-2.6.32.tar.gz | tar xf \-
 \& cd libxml2\-2.6.32
-\& ./configure \-\-prefix=$INSTALL_DIR
+\& ./configure \-\-prefix=$INSTALL_DIR CFLAGS="\-O3 \-fPIC"
 \& $MAKE
 \& $MAKE install
 .Ve
@@ -448,7 +448,7 @@ config file.
 \& wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig\-2.4.2.tar.gz
 \& gunzip \-c fontconfig\-2.4.2.tar.gz   | tar xf \-
 \& cd fontconfig\-2.4.2
-\& ./configure \-\-prefix=$INSTALL_DIR \-\-with\-freetype\-config=$INSTALL_DIR/bin/freetype\-config
+\& ./configure \-\-prefix=$INSTALL_DIR CFLAGS="\-O3 \-fPIC" \-\-with\-freetype\-config=$INSTALL_DIR/bin/freetype\-config
 \& $MAKE
 \& $MAKE install
 .Ve
@@ -461,7 +461,7 @@ config file.
 \& wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman\-0.10.0.tar.gz
 \& gunzip \-c pixman\-0.10.0.tar.gz  | tar xf \-
 \& cd pixman\-0.10.0
-\& ./configure \-\-prefix=$INSTALL_DIR
+\& ./configure \-\-prefix=$INSTALL_DIR CFLAGS="\-O3 \-fPIC"
 \& $MAKE
 \& $MAKE install
 .Ve
@@ -469,15 +469,16 @@ config file.
 \fIBuilding Cairo\fR
 .IX Subsection "Building Cairo"
 .PP
-.Vb 10
+.Vb 11
 \& cd $BUILD_DIR
 \& wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo\-1.6.4.tar.gz
 \& gunzip \-c cairo\-1.6.4.tar.gz   | tar xf \-
-\& cd cairo\-1.6.4
+\& cd cairo\-1.4.10
 \& ./configure \-\-prefix=$INSTALL_DIR \e
 \&    \-\-enable\-xlib=no \e
 \&    \-\-enable\-xlib\-render=no \e
-\&    \-\-enable\-win32=no
+\&    \-\-enable\-win32=no \e
+\&    CFLAGS="\-O3 \-fPIC"
 \& $MAKE
 \& $MAKE install
 .Ve
@@ -490,7 +491,7 @@ config file.
 \& wget http://oss.oetiker.ch/rrdtool/pub/libs/glib\-2.15.4.tar.gz
 \& gunzip \-c glib\-2.15.4.tar.gz  | tar xf \-
 \& cd glib\-2.15.4
-\& ./configure \-\-prefix=$INSTALL_DIR
+\& ./configure \-\-prefix=$INSTALL_DIR CFLAGS="\-O3 \-fPIC"
 \& $MAKE
 \& $MAKE install
 .Ve
@@ -503,11 +504,11 @@ config file.
 \& wget http://oss.oetiker.ch/rrdtool/pub/libs/pango\-1.21.1.tar.bz2
 \& bunzip2 \-c pango\-1.21.1.tar.bz2 | tar xf \-
 \& cd pango\-1.21.1
-\& ./configure \-\-prefix=$INSTALL_DIR \-\-without\-x
+\& ./configure \-\-prefix=$INSTALL_DIR CFLAGS="\-O3 \-fPIC" \-\-without\-x
 \& $MAKE
 \& $MAKE install
 .Ve
-.SS "Building rrdtool (second try)"
+.Sh "Building rrdtool (second try)"
 .IX Subsection "Building rrdtool (second try)"
 Now all the dependent libraries are built and you can try again. This time
 you tell configure where it should be looking for libraries and include
@@ -520,7 +521,7 @@ tcl setups that would prevent rrdtool from building if they are included in
 their current state.
 .PP
 .Vb 5
-\& cd $BUILD_DIR/rrdtool\-1.3.8
+\& cd $BUILD_DIR/rrdtool\-1.3.2
 \& ./configure \-\-prefix=$INSTALL_DIR \-\-disable\-tcl \-\-disable\-python
 \& $MAKE clean
 \& $MAKE
@@ -532,7 +533,7 @@ one shipping with Solaris) you will need the Sun Forte compiler installed on
 your box or you have to hand-tune bindings/perl\-shared/Makefile while
 building!
 .PP
-Now go to \fI\f(CI$INSTALL_DIR\fI\fR\fB/share/rrdtool/examples/\fR and run them to see if
+Now go to \fI$INSTALL_DIR\fR\fB/share/rrdtool/examples/\fR and run them to see if
 your build has been successful.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
index 27e088c05f3ce1e257cae2772e5b1f6eba8559a3..563623a12651f6a322c0ed556fec11686b7ca168 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdbuild</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
 
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -74,7 +66,7 @@ may already be installed on your system. You have to compile copies of the other
 ones before you can build RRDtool.</p>
 <p>This document will tell you about all the necessary steps to get going.</p>
 <p>These instructions assume you are using a <strong>bash</strong> shell. If you use csh/tcsh,
-then you can either type <em class="file">bash</em> to switch to bash for the compilation or if
+then you can either type <em>bash</em> to switch to bash for the compilation or if
 you know what you are doing just replace the export bits with
 setenv.</p>
 <p>We further assume that your copies of <strong>tar</strong> and <strong>make</strong> are actually <strong>GNU
@@ -86,18 +78,17 @@ tar</strong> and <strong>GNU make</strong> respectively. It could be that they a
 <h1><a name="optimistic_build">OPTIMISTIC BUILD</a></h1>
 <p>Before you start to build RRDtool, you have to decide two things:</p>
 <ol>
-<li>
-<p>In which directory you want to build the software.</p>
-</li>
-<li>
-<p>Where you want to install the software.</p>
-</li>
-</ol>
+<li></li>
+In which directory you want to build the software.
+<p></p>
+<li></li>
+Where you want to install the software.
+<p></p></ol>
 <p>Once you have decided. Save the two locations into environment variables.</p>
 <pre>
  BUILD_DIR=/tmp/rrdbuild
- INSTALL_DIR=/usr/local/rrdtool-1.3.8</pre>
-<p>If your <em class="file">/tmp</em> is mounted with the option noexec (RHEL seems todo that) you have to choose
+ INSTALL_DIR=/usr/local/rrdtool-1.3.2</pre>
+<p>If your <em>/tmp</em> is mounted with the option noexec (RHEL seems todo that) you have to choose
 a different directory!</p>
 <p>Now make sure the BUILD_DIR exists and go there:</p>
 <pre>
@@ -106,9 +97,9 @@ a different directory!</p>
 <p>Lets first assume you already have all the necessary libraries
 pre-installed.</p>
 <pre>
- wget <a href="http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.8.tar.gz">http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.8.tar.gz</a>
- gunzip -c rrdtool-1.3.8.tar.gz | tar xf -
- cd rrdtool-1.3.8
+ wget <a href="http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.2.tar.gz">http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.2.tar.gz</a>
+ gunzip -c rrdtool-1.3.2.tar.gz | tar xf -
+ cd rrdtool-1.3.2
  ./configure --prefix=$INSTALL_DIR &amp;&amp; make &amp;&amp; make install</pre>
 <p>Ok, this was very optimistic. This try will probably have ended with
 <strong>configure</strong> complaining about several missing libraries.</p>
@@ -130,9 +121,9 @@ current when I tested this.</p>
 <pre>
  pkg install sunstudioexpress
  pkg install SUNWgnome-common-devel</pre>
-<p>There is a problem with <em class="file">cairo.pc</em> on OpenSolaris. It suggests that
+<p>There is a problem with <em>cairo.pc</em> on OpenSolaris. It suggests that
 xrender is required for compilation with cairo. This is not true and also
-bad since OpenSolaris does not include an <em class="file">xrender.pc</em> file. Use Perl to
+bad since OpenSolaris does not include an <em>xrender.pc</em> file. Use Perl to
 fix this:</p>
 <pre>
  perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc</pre>
@@ -168,7 +159,7 @@ flags are available:</p>
  tcl    - build and install tcl language bindings
  rrdcgi - build and install rrdcgi</pre>
 <p>After you've decided which USE flags you need, set them either in
-<em class="file">make.conf</em> or <em class="file">/etc/portage/package.use</em> and finally run:</p>
+<em>make.conf</em> or <em>/etc/portage/package.use</em> and finally run:</p>
 <pre>
  # emerge -va rrdtool</pre>
 <p>Take a look at Gentoo handbook for further details on how to manage USE
@@ -203,37 +194,40 @@ set the following environment variable</p>
 <pre>
  export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig
  export PATH=$INSTALL_DIR/bin:$PATH</pre>
-<p>The above relies on the presence of the <em class="file">pkgconfig</em> program. Below you find instructions
+<p>The above relies on the presence of the <em>pkgconfig</em> program. Below you find instructions
 on how to compile pkgconfig.</p>
 <p>Since we are compiling libraries dynamically, they must know where to find
 each other. This is done by setting an appropriate LDFLAGS. Unfortunately,
 the syntax again differs from system to system:</p>
 <dl>
-<dt><strong><a name="solaris" class="item">Solaris</a></strong></dt>
-
+<dt><strong><a name="item_solaris">Solaris</a></strong><br />
+</dt>
 <dd>
 <pre>
  export LDFLAGS=-R${INSTALL_DIR}/lib</pre>
+</dd>
+<dd>
 <p>if you are using the Sun Studio/Forte compiler, you may also want to set</p>
+</dd>
+<dd>
 <pre>
export CFLAGS=&quot;-xO3 -xcode=pic13&quot;   (SPARC)
export CFLAGS=&quot;-xO3 -Kpic&quot;          (x86)</pre>
+ CFLAGS=&quot;-xO3 -xcode=pic13&quot;   (SPARC)
+ CFLAGS=&quot;-xO3 -Kpic&quot;          (x86)</pre>
 </dd>
-<dt><strong><a name="linux" class="item">Linux</a></strong></dt>
-
+<dt><strong><a name="item_linux">Linux</a></strong><br />
+</dt>
 <dd>
 <pre>
- export CFLAGS=&quot;-O3 -fPIC&quot;
  export LDFLAGS=&quot;-Wl,--rpath -Wl,${INSTALL_DIR}/lib&quot;</pre>
 </dd>
-<dt><strong><a name="hpux" class="item">HPUX</a></strong></dt>
-
+<dt><strong><a name="item_hpux">HPUX</a></strong><br />
+</dt>
 <dd>
 <pre>
  export LDFLAGS=&quot;+b${INSTALL_DIR}/lib&quot;</pre>
 </dd>
-<dt><strong><a name="aix" class="item">AIX</a></strong></dt>
-
+<dt><strong><a name="item_aix">AIX</a></strong><br />
+</dt>
 <dd>
 <pre>
  export LDFLAGS=&quot;-Wl,-blibpath:${INSTALL_DIR}/lib&quot;</pre>
@@ -257,7 +251,7 @@ not available natively, here is how to compile it.</p>
  wget <a href="http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz">http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz</a>
  gunzip -c pkg-config-0.23.tar.gz | tar xf -
  cd pkg-config-0.23
- ./configure --prefix=$INSTALL_DIR
+ ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot;
  $MAKE
  $MAKE install</pre>
 <p>After installing pkgconfig in a custom directory, setting up the corresponding
@@ -273,7 +267,7 @@ environment variable will be helpful.</p>
  wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz</a>
  gunzip -c zlib-1.2.3.tar.gz | tar xf -
  cd zlib-1.2.3
- ./configure --prefix=$INSTALL_DIR --shared
+ ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot; --shared
  $MAKE
  $MAKE install</pre>
 <p>
@@ -287,8 +281,8 @@ the end of line 4 means that line 4 and line 5 are on one line.</p>
  cd $BUILD_DIR
  wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz</a>
  gunzip -c libpng-1.2.18.tar.gz | tar xf -
- cd libpng-1.2.18
- ./configure --prefix=$INSTALL_DIR
+ cd libpng-1.2.10
env CFLAGS=&quot;-O3 -fPIC&quot; ./configure --prefix=$INSTALL_DIR
  $MAKE
  $MAKE install</pre>
 <p>
@@ -314,7 +308,7 @@ add the following at the start the configure line:</p>
  wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz</a>
  gunzip -c libxml2-2.6.32.tar.gz | tar xf -
  cd libxml2-2.6.32
- ./configure --prefix=$INSTALL_DIR
+ ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot;
  $MAKE
  $MAKE install</pre>
 <p>
@@ -329,7 +323,7 @@ config file.</p>
  wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz</a>
  gunzip -c fontconfig-2.4.2.tar.gz   | tar xf -
  cd fontconfig-2.4.2
- ./configure --prefix=$INSTALL_DIR --with-freetype-config=$INSTALL_DIR/bin/freetype-config
+ ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot; --with-freetype-config=$INSTALL_DIR/bin/freetype-config
  $MAKE
  $MAKE install</pre>
 <p>
@@ -340,7 +334,7 @@ config file.</p>
  wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz</a>
  gunzip -c pixman-0.10.0.tar.gz  | tar xf -
  cd pixman-0.10.0
- ./configure --prefix=$INSTALL_DIR
+ ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot;
  $MAKE
  $MAKE install</pre>
 <p>
@@ -350,11 +344,12 @@ config file.</p>
  cd $BUILD_DIR
  wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz</a>
  gunzip -c cairo-1.6.4.tar.gz   | tar xf -
- cd cairo-1.6.4
+ cd cairo-1.4.10
  ./configure --prefix=$INSTALL_DIR \
     --enable-xlib=no \
     --enable-xlib-render=no \
-    --enable-win32=no
+    --enable-win32=no \
+    CFLAGS=&quot;-O3 -fPIC&quot;
  $MAKE
  $MAKE install</pre>
 <p>
@@ -365,7 +360,7 @@ config file.</p>
  wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz">http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz</a>
  gunzip -c glib-2.15.4.tar.gz  | tar xf -
  cd glib-2.15.4
- ./configure --prefix=$INSTALL_DIR
+ ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot;
  $MAKE
  $MAKE install</pre>
 <p>
@@ -376,7 +371,7 @@ config file.</p>
  wget <a href="http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2">http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2</a>
  bunzip2 -c pango-1.21.1.tar.bz2 | tar xf -
  cd pango-1.21.1
- ./configure --prefix=$INSTALL_DIR --without-x
+ ./configure --prefix=$INSTALL_DIR CFLAGS=&quot;-O3 -fPIC&quot; --without-x
  $MAKE
  $MAKE install</pre>
 <p>
@@ -391,7 +386,7 @@ because it seems that a fair number of people have ill configured python and
 tcl setups that would prevent rrdtool from building if they are included in
 their current state.</p>
 <pre>
- cd $BUILD_DIR/rrdtool-1.3.8
+ cd $BUILD_DIR/rrdtool-1.3.2
  ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
  $MAKE clean
  $MAKE
index 4e420826293c34dc0aa086164273aeb365eca9b4..24570fbf09211660d3adce93901578a2a0c33ee7 100644 (file)
@@ -41,7 +41,7 @@ Where you want to install the software.
 Once you have decided. Save the two locations into environment variables.
 
  BUILD_DIR=/tmp/rrdbuild
- INSTALL_DIR=/usr/local/rrdtool-1.3.8
+ INSTALL_DIR=/usr/local/rrdtool-1.3.2
 
 
 If your F</tmp> is mounted with the option noexec (RHEL seems todo that) you have to choose
@@ -55,9 +55,9 @@ Now make sure the BUILD_DIR exists and go there:
 Lets first assume you already have all the necessary libraries
 pre-installed. 
 
- wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.8.tar.gz
- gunzip -c rrdtool-1.3.8.tar.gz | tar xf -
- cd rrdtool-1.3.8
+ wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.2.tar.gz
+ gunzip -c rrdtool-1.3.2.tar.gz | tar xf -
+ cd rrdtool-1.3.2
  ./configure --prefix=$INSTALL_DIR && make && make install
 
 Ok, this was very optimistic. This try will probably have ended with
@@ -176,13 +176,11 @@ the syntax again differs from system to system:
 
 if you are using the Sun Studio/Forte compiler, you may also want to set
 
- export CFLAGS="-xO3 -xcode=pic13"   (SPARC)
- export CFLAGS="-xO3 -Kpic"          (x86)
-
+ CFLAGS="-xO3 -xcode=pic13"   (SPARC)
+ CFLAGS="-xO3 -Kpic"          (x86)
 
 =item Linux
 
- export CFLAGS="-O3 -fPIC"
  export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib" 
 
 =item HPUX
@@ -214,7 +212,7 @@ not available natively, here is how to compile it.
  wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
  gunzip -c pkg-config-0.23.tar.gz | tar xf -
  cd pkg-config-0.23
- ./configure --prefix=$INSTALL_DIR
+ ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
  $MAKE
  $MAKE install
 
@@ -231,7 +229,7 @@ Chances are very high that you already have that on your system ...
  wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz
  gunzip -c zlib-1.2.3.tar.gz | tar xf -
  cd zlib-1.2.3
- ./configure --prefix=$INSTALL_DIR --shared
+ ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --shared
  $MAKE
  $MAKE install
 
@@ -245,8 +243,8 @@ the end of line 4 means that line 4 and line 5 are on one line.
  cd $BUILD_DIR
  wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz
  gunzip -c libpng-1.2.18.tar.gz | tar xf -
- cd libpng-1.2.18
- ./configure --prefix=$INSTALL_DIR
+ cd libpng-1.2.10
env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR
  $MAKE
  $MAKE install
 
@@ -271,7 +269,7 @@ add the following at the start the configure line:
  wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz
  gunzip -c libxml2-2.6.32.tar.gz | tar xf -
  cd libxml2-2.6.32
- ./configure --prefix=$INSTALL_DIR
+ ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
  $MAKE
  $MAKE install
 
@@ -286,7 +284,7 @@ config file.
  wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
  gunzip -c fontconfig-2.4.2.tar.gz   | tar xf -
  cd fontconfig-2.4.2
- ./configure --prefix=$INSTALL_DIR --with-freetype-config=$INSTALL_DIR/bin/freetype-config
+ ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --with-freetype-config=$INSTALL_DIR/bin/freetype-config
  $MAKE
  $MAKE install
 
@@ -296,7 +294,7 @@ config file.
  wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz
  gunzip -c pixman-0.10.0.tar.gz  | tar xf -
  cd pixman-0.10.0
- ./configure --prefix=$INSTALL_DIR
+ ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
  $MAKE
  $MAKE install
 
@@ -305,11 +303,12 @@ config file.
  cd $BUILD_DIR
  wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
  gunzip -c cairo-1.6.4.tar.gz   | tar xf -
- cd cairo-1.6.4
+ cd cairo-1.4.10
  ./configure --prefix=$INSTALL_DIR \
     --enable-xlib=no \
     --enable-xlib-render=no \
-    --enable-win32=no
+    --enable-win32=no \
+    CFLAGS="-O3 -fPIC"
  $MAKE
  $MAKE install
 
@@ -319,7 +318,7 @@ config file.
  wget http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz
  gunzip -c glib-2.15.4.tar.gz  | tar xf -
  cd glib-2.15.4
- ./configure --prefix=$INSTALL_DIR
+ ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
  $MAKE
  $MAKE install
 
@@ -329,7 +328,7 @@ config file.
  wget http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2
  bunzip2 -c pango-1.21.1.tar.bz2 | tar xf -
  cd pango-1.21.1
- ./configure --prefix=$INSTALL_DIR --without-x
+ ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --without-x
  $MAKE
  $MAKE install
 
@@ -345,7 +344,7 @@ because it seems that a fair number of people have ill configured python and
 tcl setups that would prevent rrdtool from building if they are included in
 their current state.
 
- cd $BUILD_DIR/rrdtool-1.3.8
+ cd $BUILD_DIR/rrdtool-1.3.2
  ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
  $MAKE clean
  $MAKE
index bea116f497e20bf508601e15d156b777e1dde8cd..b284bde7db59541718ee2b177b3241f3100e7abb 100644 (file)
@@ -16,9 +16,9 @@ O\bOV\bVE\bER\bRV\bVI\bIE\bEW\bW
        This document will tell you about all the necessary steps to get going.
 
        These instructions assume you are using a b\bba\bas\bsh\bh shell. If you use
-       csh/tcsh, then you can either type _\bb_\ba_\bs_\bh to switch to bash for the
-       compilation or if you know what you are doing just replace the export
-       bits with setenv.
+       csh/tcsh, then you can either type _\bb_\ba_\bs_\bh to switch to bash for the com-
+       pilation or if you know what you are doing just replace the export bits
+       with setenv.
 
        We further assume that your copies of t\bta\bar\br and m\bma\bak\bke\be are actually G\bGN\bNU\bU t\bta\bar\br
        and G\bGN\bNU\bU m\bma\bak\bke\be respectively. It could be that they are installed as g\bgt\bta\bar\br
@@ -31,11 +31,11 @@ O\bOP\bPT\bTI\bIM\bMI\bIS\bST\bTI\bIC\bC B\bBU\bUI\bIL\bLD\bD
 
        2.  Where you want to install the software.
 
-       Once you have decided. Save the two locations into environment
-       variables.
+       Once you have decided. Save the two locations into environment vari-
+       ables.
 
         BUILD_DIR=/tmp/rrdbuild
-        INSTALL_DIR=/usr/local/rrdtool-1.3.8
+        INSTALL_DIR=/usr/local/rrdtool-1.3.2
 
        If your _\b/_\bt_\bm_\bp is mounted with the option noexec (RHEL seems todo that)
        you have to choose a different directory!
@@ -45,38 +45,39 @@ O\bOP\bPT\bTI\bIM\bMI\bIS\bST\bTI\bIC\bC B\bBU\bUI\bIL\bLD\bD
         mkdir -p $BUILD_DIR
         cd $BUILD_DIR
 
-       Lets first assume you already have all the necessary libraries pre-
-       installed.
+       Lets first assume you already have all the necessary libraries
+       pre-installed.
 
-        wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.8.tar.gz
-        gunzip -c rrdtool-1.3.8.tar.gz | tar xf -
-        cd rrdtool-1.3.8
+        wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.2.tar.gz
+        gunzip -c rrdtool-1.3.2.tar.gz | tar xf -
+        cd rrdtool-1.3.2
         ./configure --prefix=$INSTALL_DIR && make && make install
 
        Ok, this was very optimistic. This try will probably have ended with
        c\bco\bon\bnf\bfi\big\bgu\bur\bre\be complaining about several missing libraries.
 
 I\bIN\bNS\bST\bTA\bAL\bLL\bLI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
-       If your OS lets you install additional packages from a software
-       repository, you may get away with installing the missing packages. When
-       the packages are installed, run configure again and try to compile
-       again. Below you find some hints on getting your OS ready for the
-       rrdtool compilation.
+       If your OS lets you install additional packages from a software reposi-
+       tory, you may get away with installing the missing packages. When the
+       packages are installed, run configure again and try to compile again.
+       Below you find some hints on getting your OS ready for the rrdtool com-
+       pilation.
 
        Additions to this list are welcome. In general rrdtool should work with
        the latest versions of the libraries. The versions listed here are just
        what was current when I tested this.
 
-   O\bOp\bpe\ben\bnS\bSo\bol\bla\bar\bri\bis\bs 2\b20\b00\b08\b8.\b.0\b05\b5
+       O\bOp\bpe\ben\bnS\bSo\bol\bla\bar\bri\bis\bs 2\b20\b00\b08\b8.\b.0\b05\b5
+
        Just add a compiler and the gnome development package:
 
         pkg install sunstudioexpress
         pkg install SUNWgnome-common-devel
 
-       There is a problem with _\bc_\ba_\bi_\br_\bo_\b._\bp_\bc on OpenSolaris. It suggests that
-       xrender is required for compilation with cairo. This is not true and
-       also bad since OpenSolaris does not include an _\bx_\br_\be_\bn_\bd_\be_\br_\b._\bp_\bc file. Use
-       Perl to fix this:
+       There is a problem with _\bc_\ba_\bi_\br_\bo_\b._\bp_\bc on OpenSolaris. It suggests that xren-
+       der is required for compilation with cairo. This is not true and also
+       bad since OpenSolaris does not include an _\bx_\br_\be_\bn_\bd_\be_\br_\b._\bp_\bc file. Use Perl to
+       fix this:
 
         perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc
 
@@ -91,18 +92,20 @@ I\bIN\bNS\bST\bTA\bAL\bLL\bLI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
 
        option.
 
-   D\bDe\beb\bbi\bia\ban\bn /\b/ U\bUb\bbu\bun\bnt\btu\bu
+       D\bDe\beb\bbi\bia\ban\bn /\b/ U\bUb\bbu\bun\bnt\btu\bu
+
        Use apt-get to make sure you have all that is required. A number of
        packages will get added through dependencies.
 
         apt-get install libpango1.0-dev libxml2-dev
 
-   G\bGe\ben\bnt\bto\boo\bo
+       G\bGe\ben\bnt\bto\boo\bo
+
        In Gentoo installing rrdtool is really simple you just need to e\bem\bme\ber\brg\bge\be
        r\brr\brd\bdt\bto\boo\bol\bl. All dependencies will be handled automatically by the portage
        system. The only thing you should care about are USE flags, which allow
-       you fine tune features rrdtool will be built with. Currently the
-       following USE flags are available:
+       you fine tune features rrdtool will be built with. Currently the fol-
+       lowing USE flags are available:
 
         doc    - install .html and .txt documentation
                  into /usr/share/doc/rrdtool-1.x.xx/
@@ -129,21 +132,23 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
        don't live up to our expectations, so you may want to compile their
        latest versions.
 
-   G\bGe\ben\bne\ber\bra\bal\bl b\bbu\bui\bil\bld\bd t\bti\bip\bps\bs f\bfo\bor\br A\bAI\bIX\bX
+       G\bGe\ben\bne\ber\bra\bal\bl b\bbu\bui\bil\bld\bd t\bti\bip\bps\bs f\bfo\bor\br A\bAI\bIX\bX
+
        If you are working with AIX, you may find the -\b--\b-d\bdi\bis\bsa\bab\bbl\ble\be-\b-s\bsh\bha\bar\bre\bed\bd option
        will cause things to break for you. In that case you may have to
        install the shared libraries into the rrdtool PREFIX and work with
        -\b--\b-d\bdi\bis\bsa\bab\bbl\ble\be-\b-s\bst\bta\bat\bti\bic\bc instead.
 
-       Another hint to get rrdtool working on AIX is to use the IBM XL C
-       Compiler:
+       Another hint to get rrdtool working on AIX is to use the IBM XL C Com-
+       piler:
 
         export CC=/usr/vac/bin/cc
         export PERLCC=$CC
 
        (Better instructions for AIX welcome!)
 
-   B\bBu\bui\bil\bld\bd I\bIn\bns\bst\btr\bru\buc\bct\bti\bio\bon\bns\bs
+       B\bBu\bui\bil\bld\bd I\bIn\bns\bst\btr\bru\buc\bct\bti\bio\bon\bns\bs
+
        Some libraries want to know where other libraries are. For this to
        work, set the following environment variable
 
@@ -154,8 +159,8 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
        find instructions on how to compile pkgconfig.
 
        Since we are compiling libraries dynamically, they must know where to
-       find each other. This is done by setting an appropriate LDFLAGS.
-       Unfortunately, the syntax again differs from system to system:
+       find each other. This is done by setting an appropriate LDFLAGS. Unfor-
+       tunately, the syntax again differs from system to system:
 
        Solaris
             export LDFLAGS=-R${INSTALL_DIR}/lib
@@ -163,11 +168,10 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
            if you are using the Sun Studio/Forte compiler, you may also want
            to set
 
-            export CFLAGS="-xO3 -xcode=pic13"   (SPARC)
-            export CFLAGS="-xO3 -Kpic"          (x86)
+            CFLAGS="-xO3 -xcode=pic13"   (SPARC)
+            CFLAGS="-xO3 -Kpic"          (x86)
 
        Linux
-            export CFLAGS="-O3 -fPIC"
             export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib"
 
        HPUX
@@ -188,18 +192,18 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
        _\bB_\bu_\bi_\bl_\bd_\bi_\bn_\bg _\bp_\bk_\bg_\bc_\bo_\bn_\bf_\bi_\bg
 
        As mentioned above, without pkgconfig the whole build process will be
-       lots of pain and suffering, so make sure you have a copy on your
-       system. If it is not available natively, here is how to compile it.
+       lots of pain and suffering, so make sure you have a copy on your sys-
+       tem. If it is not available natively, here is how to compile it.
 
         wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
         gunzip -c pkg-config-0.23.tar.gz | tar xf -
         cd pkg-config-0.23
-        ./configure --prefix=$INSTALL_DIR
+        ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
         $MAKE
         $MAKE install
 
-       After installing pkgconfig in a custom directory, setting up the
-       corresponding environment variable will be helpful.
+       After installing pkgconfig in a custom directory, setting up the corre-
+       sponding environment variable will be helpful.
 
         export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config
 
@@ -211,7 +215,7 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
         wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz
         gunzip -c zlib-1.2.3.tar.gz | tar xf -
         cd zlib-1.2.3
-        ./configure --prefix=$INSTALL_DIR --shared
+        ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --shared
         $MAKE
         $MAKE install
 
@@ -225,8 +229,8 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
         cd $BUILD_DIR
         wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz
         gunzip -c libpng-1.2.18.tar.gz | tar xf -
-        cd libpng-1.2.18
-        ./configure --prefix=$INSTALL_DIR
+        cd libpng-1.2.10
+        env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR
         $MAKE
         $MAKE install
 
@@ -251,7 +255,7 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
         wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz
         gunzip -c libxml2-2.6.32.tar.gz | tar xf -
         cd libxml2-2.6.32
-        ./configure --prefix=$INSTALL_DIR
+        ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
         $MAKE
         $MAKE install
 
@@ -259,14 +263,14 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
 
        Note that fontconfig has a run time configuration file in
        INSTALL_DIR/etc you may want to adjust that so that fontconfig finds
-       the fonts on your system.  Run the fc-cache program to build the
-       fontconfig cache after changing the config file.
+       the fonts on your system.  Run the fc-cache program to build the font-
+       config cache after changing the config file.
 
         cd $BUILD_DIR
         wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
         gunzip -c fontconfig-2.4.2.tar.gz   | tar xf -
         cd fontconfig-2.4.2
-        ./configure --prefix=$INSTALL_DIR --with-freetype-config=$INSTALL_DIR/bin/freetype-config
+        ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --with-freetype-config=$INSTALL_DIR/bin/freetype-config
         $MAKE
         $MAKE install
 
@@ -276,7 +280,7 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
         wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz
         gunzip -c pixman-0.10.0.tar.gz  | tar xf -
         cd pixman-0.10.0
-        ./configure --prefix=$INSTALL_DIR
+        ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
         $MAKE
         $MAKE install
 
@@ -285,11 +289,12 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
         cd $BUILD_DIR
         wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
         gunzip -c cairo-1.6.4.tar.gz   | tar xf -
-        cd cairo-1.6.4
+        cd cairo-1.4.10
         ./configure --prefix=$INSTALL_DIR \
            --enable-xlib=no \
            --enable-xlib-render=no \
-           --enable-win32=no
+           --enable-win32=no \
+           CFLAGS="-O3 -fPIC"
         $MAKE
         $MAKE install
 
@@ -299,7 +304,7 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
         wget http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz
         gunzip -c glib-2.15.4.tar.gz  | tar xf -
         cd glib-2.15.4
-        ./configure --prefix=$INSTALL_DIR
+        ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
         $MAKE
         $MAKE install
 
@@ -309,11 +314,12 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
         wget http://oss.oetiker.ch/rrdtool/pub/libs/pango-1.21.1.tar.bz2
         bunzip2 -c pango-1.21.1.tar.bz2 | tar xf -
         cd pango-1.21.1
-        ./configure --prefix=$INSTALL_DIR --without-x
+        ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --without-x
         $MAKE
         $MAKE install
 
-   B\bBu\bui\bil\bld\bdi\bin\bng\bg r\brr\brd\bdt\bto\boo\bol\bl (\b(s\bse\bec\bco\bon\bnd\bd t\btr\bry\by)\b)
+       B\bBu\bui\bil\bld\bdi\bin\bng\bg r\brr\brd\bdt\bto\boo\bol\bl (\b(s\bse\bec\bco\bon\bnd\bd t\btr\bry\by)\b)
+
        Now all the dependent libraries are built and you can try again. This
        time you tell configure where it should be looking for libraries and
        include files. This is done via environment variables. Depending on the
@@ -325,7 +331,7 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
        python and tcl setups that would prevent rrdtool from building if they
        are included in their current state.
 
-        cd $BUILD_DIR/rrdtool-1.3.8
+        cd $BUILD_DIR/rrdtool-1.3.2
         ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
         $MAKE clean
         $MAKE
@@ -333,8 +339,8 @@ B\bBU\bUI\bIL\bLD\bDI\bIN\bNG\bG D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNC\bCI\bIE\bES\bS
 
        SOLARIS HINT: if you want to build  the Perl module for the native Perl
        (the one shipping with Solaris) you will need the Sun Forte compiler
-       installed on your box or you have to hand-tune
-       bindings/perl-shared/Makefile while building!
+       installed on your box or you have to hand-tune bind-
+       ings/perl-shared/Makefile while building!
 
        Now go to _\b$_\bI_\bN_\bS_\bT_\bA_\bL_\bL_\b__\bD_\bI_\bR/\b/s\bsh\bha\bar\bre\be/\b/r\brr\brd\bdt\bto\boo\bol\bl/\b/e\bex\bxa\bam\bmp\bpl\ble\bes\bs/\b/ and run them to see if
        your build has been successful.
@@ -344,4 +350,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2009-05-19                       RRDBUILD(1)
+1.3.99909060808                   2008-12-26                       RRDBUILD(1)
diff --git a/doc/rrdcached.1 b/doc/rrdcached.1
new file mode 100644 (file)
index 0000000..70ba28e
--- /dev/null
@@ -0,0 +1,646 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "RRDCACHED 1"
+.TH RRDCACHED 1 "2009-04-09" "1.3.99909060808" "rrdtool"
+.SH "NAME"
+rrdcached \- Data caching daemon for rrdtool
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBrrdcached\fR
+[\fB\-l/\-L\fR\ \fIaddress\fR]
+[\fB\-w\fR\ \fItimeout\fR]
+[\fB\-z\fR\ \fIdelay\fR]
+[\fB\-f\fR\ \fItimeout\fR]
+[\fB\-p\fR\ \fIpid_file\fR]
+[\fB\-t\fR\ \fIwrite_threads\fR]
+[\fB\-j\fR\ \fIjournal_dir\fR]
+[\-F]
+[\-g]
+[\fB\-b\fR\ \fIbase_dir\fR\ [\fB\-B\fR]]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBrrdcached\fR is a daemon that receives updates to existing \s-1RRD\s0 files,
+accumulates them and, if enough have been received or a defined time has
+passed, writes the updates to the \s-1RRD\s0 file. A \fIflush\fR command may be used to
+force writing of values to disk, so that graphing facilities and similar can
+work with up-to-date data.
+.PP
+The daemon was written with big setups in mind. Those setups usually run into
+\&\s-1IO\s0\ related problems sooner or later for reasons that are beyond the scope
+of this document. Check the wiki at the RRDTool homepage for details. Also
+check \*(L"\s-1SECURITY\s0 \s-1CONSIDERATIONS\s0\*(R" below before using this daemon! A detailed
+description of how the daemon operates can be found in the \*(L"\s-1HOW\s0 \s-1IT\s0 \s-1WORKS\s0\*(R"
+section below.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-l\fR \fIaddress\fR" 4
+.IX Item "-l address"
+Tells the daemon to bind to \fIaddress\fR and accept incoming connections on that
+socket. If \fIaddress\fR begins with \f(CW\*(C`unix:\*(C'\fR, everything following that prefix is
+interpreted as the path to a \s-1UNIX\s0 domain socket. Otherwise the address or node
+name are resolved using getaddrinfo.
+.Sp
+For network sockets, a port may be specified by using the form
+\&\f(CW\*(C`\f(CB[\f(CW\f(CIaddress\f(CW\f(CB]:\f(CW\f(CIport\f(CW\*(C'\fR. If the address is an IPv4 address or a fully
+qualified domain name (i.\ e. the address contains at least one dot
+(\f(CW\*(C`.\*(C'\fR)), the square brackets can be omitted, resulting in the (simpler)
+\&\f(CW\*(C`\f(CIaddress\f(CW\f(CB:\f(CW\f(CIport\f(CW\*(C'\fR pattern.. The default port is \fB42217/udp\fR.
+.Sp
+The following formats are accepted. Please note that the address of the \s-1UNIX\s0
+domain socket \fBmust\fR start with a slash in the second case!
+.Sp
+.Vb 5
+\&   unix:</path/to/unix.sock>
+\&   /<path/to/unix.sock>
+\&   <hostname\-or\-ip>
+\&   [<hostname\-or\-ip>]:<port>
+\&   <hostname\-or\-ipv4>:<port>
+.Ve
+.Sp
+If the \fB\-l\fR option is not specified the default address,
+\&\f(CW\*(C`unix:/tmp/rrdcached.sock\*(C'\fR, will be used.
+.IP "\fB\-L\fR \fIaddress\fR" 4
+.IX Item "-L address"
+Same as \fB\-l\fR, except creates a low-privilege socket.  See \fB\s-1SECURITY\s0
+\&\s-1CONSIDERATIONS\s0\fR for more information.
+.IP "\fB\-w\fR \fItimeout\fR" 4
+.IX Item "-w timeout"
+Data is written to disk every \fItimeout\fR seconds. If this option is not
+specified the default interval of 300\ seconds will be used.
+.IP "\fB\-z\fR \fIdelay\fR" 4
+.IX Item "-z delay"
+If specified, rrdcached will delay writing of each \s-1RRD\s0 for a random number
+of seconds in the range\ [0,\fIdelay\fR).  This will avoid too many
+writes being queued simultaneously.  This value should be no greater than
+the value specified in \fB\-w\fR.  By default, there is no delay.
+.IP "\fB\-f\fR \fItimeout\fR" 4
+.IX Item "-f timeout"
+Every \fItimeout\fR seconds the entire cache is searched for old values which are
+written to disk. This only concerns files to which updates have stopped, so
+setting this to a high value, such as 3600\ seconds, is acceptable in most
+cases. This timeout defaults to 3600\ seconds.
+.IP "\fB\-p\fR \fIfile\fR" 4
+.IX Item "-p file"
+Sets the name and location of the PID\-file. If not specified, the default,
+\&\f(CW\*(C`\f(CI$localststedir\f(CW/run/rrdcached.pid\*(C'\fR will be used.
+.IP "\fB\-t\fR \fIwrite_threads\fR" 4
+.IX Item "-t write_threads"
+Specifies the number of threads used for writing \s-1RRD\s0 files.  The default
+is\ 4.  Increasing this number will allow rrdcached to have more
+simultaneous I/O requests into the kernel.  This may allow the kernel to
+re-order disk writes, resulting in better disk throughput.
+.IP "\fB\-j\fR \fIdir\fR" 4
+.IX Item "-j dir"
+Write updates to a journal in \fIdir\fR.  In the event of a program or system
+crash, this will allow the daemon to write any updates that were pending
+at the time of the crash.
+.Sp
+On startup, the daemon will check for journal files in this directory.  If
+found, all updates therein will be read into memory before the daemon
+starts accepting new connections.
+.Sp
+The journal will be rotated with the same frequency as the flush timer
+given by \fB\-f\fR.
+.Sp
+When journaling is enabled, the daemon will use a fast shutdown procedure.
+Rather than flushing all files to disk, it will make sure the journal is
+properly written and exit immediately.  Although the \s-1RRD\s0 data files are
+not fully up\-to\-date, no information is lost; all pending updates will be
+replayed from the journal next time the daemon starts up.
+.Sp
+To disable fast shutdown, use the \fB\-F\fR option.
+.IP "\fB\-F\fR" 4
+.IX Item "-F"
+\&\s-1ALWAYS\s0 flush all updates to the \s-1RRD\s0 data files when the daemon is shut
+down, regardless of journal setting.
+.IP "\fB\-g\fR" 4
+.IX Item "-g"
+Run in the foreground.  The daemon will not \fIfork()\fR.
+.IP "\fB\-b\fR \fIdir\fR" 4
+.IX Item "-b dir"
+The daemon will change into a specific directory at startup. All files passed
+to the daemon, that are specified by a \fBrelative\fR path, will be interpreted
+to be relative to this directory. If not given the default, \f(CW\*(C`/tmp\*(C'\fR, will be
+used.
+.Sp
+.Vb 10
+\&  +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+\&  ! Command line           ! File updated           !
+\&  +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+\&  ! foo.rrd                ! /tmp/foo.rrd           !
+\&  ! foo/bar.rrd            ! /tmp/foo/bar.rrd       !
+\&  ! /var/lib/rrd/foo.rrd   ! /var/lib/rrd/foo.rrd   !
+\&  +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
+\&  Paths given on the command  line and paths actually
+\&  updated by the daemon,  assuming the base directory
+\&  "/tmp".
+.Ve
+.Sp
+\&\fB\s-1WARNING:\s0\fR The paths up to and including the base directory \fB\s-1MUST\s0 \s-1NOT\s0 \s-1BE\s0\fR
+symbolic links.  In other words, if the base directory is
+specified as:
+.Sp
+.Vb 1
+\&    \-b /base/dir/somewhere
+.Ve
+.Sp
+\&... then \fB\s-1NONE\s0\fR of the following should be symbolic links:
+.Sp
+.Vb 3
+\&    /base
+\&    /base/dir
+\&    /base/dir/somewhere
+.Ve
+.IP "\fB\-B\fR" 4
+.IX Item "-B"
+Only permit writes into the base directory specified in \fB\-b\fR (and any
+sub\-directories).  This does \fB\s-1NOT\s0\fR detect symbolic links.  Paths
+containing \f(CW\*(C`../\*(C'\fR will also be blocked.
+.SH "AFFECTED RRDTOOL COMMANDS"
+.IX Header "AFFECTED RRDTOOL COMMANDS"
+The following commands may be made aware of the \fBrrdcached\fR using the command
+line argument \fB\-\-daemon\fR or the environment variable \fB\s-1RRDCACHED_ADDRESS\s0\fR:
+.IP "\fBdump\fR" 4
+.IX Item "dump"
+.PD 0
+.IP "\fBfetch\fR" 4
+.IX Item "fetch"
+.IP "\fBflush\fR" 4
+.IX Item "flush"
+.IP "\fBgraph\fR" 4
+.IX Item "graph"
+.IP "\fBgraphv\fR" 4
+.IX Item "graphv"
+.IP "\fBinfo\fR" 4
+.IX Item "info"
+.IP "\fBlast\fR" 4
+.IX Item "last"
+.IP "\fBlastupdate\fR" 4
+.IX Item "lastupdate"
+.IP "\fBupdate\fR" 4
+.IX Item "update"
+.IP "\fBxport\fR" 4
+.IX Item "xport"
+.PD
+.PP
+The \fBupdate\fR command can send values to the daemon instead of writing them to
+the disk itself. All other commands can send a \fB\s-1FLUSH\s0\fR command (see below) to
+the daemon before accessing the files, so they work with up-to-date data even
+if the cache timeout is large.
+.SH "ERROR REPORTING"
+.IX Header "ERROR REPORTING"
+The daemon reports errors in one of two ways: During startup, error messages
+are printed to \f(CW\*(C`STDERR\*(C'\fR. One of the steps when starting up is to fork to the
+background and closing \f(CW\*(C`STDERR\*(C'\fR \- after this writing directly to the user is
+no longer possible. Once this has happened, the daemon will send log messages
+to the system logging daemon using \fIsyslog\fR\|(3). The facility used is
+\&\f(CW\*(C`LOG_DAEMON\*(C'\fR.
+.SH "HOW IT WORKS"
+.IX Header "HOW IT WORKS"
+When receiving an update, \fBrrdcached\fR does not write to disk but looks for an
+entry for that file in its internal tree. If not found, an entry is created
+including the current time (called \*(L"First\*(R" in the diagram below). This time is
+\&\fBnot\fR the time specified on the command line but the time the operating system
+considers to be \*(L"now\*(R". The value and time of the value (called \*(L"Time\*(R" in the
+diagram below) are appended to the tree node.
+.PP
+When appending a value to a tree node, it is checked whether it's time to write
+the values to disk. Values are written to disk if
+\&\f(CW\*(C`now()\ \-\ First\ >=\ timeout\*(C'\fR, where \f(CW\*(C`timeout\*(C'\fR is the timeout specified
+using the \fB\-w\fR option, see \s-1OPTIONS\s0. If the values are \*(L"old enough\*(R" they
+will be enqueued in the \*(L"update queue\*(R", i.\ e. they will be appended to
+the linked list shown below.  Because the tree nodes and the elements of the
+linked list are the same data structures in memory, any update to a file that
+has already been enqueued will be written with the next write to the \s-1RRD\s0 file,
+too.
+.PP
+A separate \*(L"update thread\*(R" constantly dequeues the first element in the update
+queue and writes all its values to the appropriate file. So as long as the
+update queue is not empty files are written at the highest possible rate.
+.PP
+Since the timeout of files is checked only when new values are added to the
+file, \*(L"dead\*(R" files, i.\ e. files that are not updated anymore, would never
+be written to disk. Therefore, every now and then, controlled by the \fB\-f\fR
+option, the entire tree is walked and all \*(L"old\*(R" values are enqueued. Since this
+only affects \*(L"dead\*(R" files and walking the tree is relatively expensive, you
+should set the \*(L"flush interval\*(R" to a reasonably high value. The default is
+3600\ seconds (one hour).
+.PP
+The downside of caching values is that they won't show up in graphs generated
+from the \s-1RRD\s0\ files. To get around this, the daemon provides the \*(L"flush
+command\*(R" to flush specific files. This means that the file is inserted at the
+\&\fBhead\fR of the update queue or moved there if it is already enqueued. The flush
+command will return only after the file's pending updates have been written
+to disk.
+.PP
+.Vb 25
+\& +\-\-\-\-\-\-+   +\-\-\-\-\-\-+                               +\-\-\-\-\-\-+
+\& ! head !   ! root !                               ! tail !
+\& +\-\-\-+\-\-+   +\-\-\-+\-\-+                               +\-\-\-+\-\-+
+\&     !         /\e                                      !
+\&     !        /  \e                                     !
+\&     !       /\e  /\e                                    !
+\&     !      /\e/\e \e `\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- ... \-\-\-\-\-\-\-\-,    !
+\&     V     /      `\-\-\-\-\-\-\-,                       !    V
+\& +\-\-\-+\-\-\-\-+\-\-\-+    +\-\-\-\-\-\-+\-\-\-\-\-+             +\-\-\-+\-\-\-\-+\-\-\-+
+\& ! File:  foo !    ! File:  bar !             ! File:  qux !
+\& ! First: 101 !    ! First: 119 !             ! First: 180 !
+\& ! Next:&bar \-+\-\-\->! Next:&... \-+\-\-\-> ... \-\-\->! Next:NULL  !
+\& | Prev:NULL  !<\-\-\-+\-Prev:&foo  !<\-\-\- ... \-\-\-\-+\-Prev: &... !
+\& +============+    +============+             +============+
+\& ! Time:  100 !    ! Time:  120 !             ! Time:  180 !
+\& ! Value:  10 !    ! Value: 0.1 !             ! Value: 2,2 !
+\& +\-\-\-\-\-\-\-\-\-\-\-\-+    +\-\-\-\-\-\-\-\-\-\-\-\-+             +\-\-\-\-\-\-\-\-\-\-\-\-+
+\& ! Time:  110 !    ! Time:  130 !             ! Time:  190 !
+\& ! Value:  26 !    ! Value: 0.1 !             ! Value: 7,3 !
+\& +\-\-\-\-\-\-\-\-\-\-\-\-+    +\-\-\-\-\-\-\-\-\-\-\-\-+             +\-\-\-\-\-\-\-\-\-\-\-\-+
+\& :            :    :            :             :            :
+\& +\-\-\-\-\-\-\-\-\-\-\-\-+    +\-\-\-\-\-\-\-\-\-\-\-\-+             +\-\-\-\-\-\-\-\-\-\-\-\-+
+\& ! Time:  230 !    ! Time:  250 !             ! Time:  310 !
+\& ! Value:  42 !    ! Value: 0.2 !             ! Value: 1,2 !
+\& +\-\-\-\-\-\-\-\-\-\-\-\-+    +\-\-\-\-\-\-\-\-\-\-\-\-+             +\-\-\-\-\-\-\-\-\-\-\-\-+
+.Ve
+.PP
+The above diagram demonstrates:
+.IP "\(bu" 4
+Files/values are stored in a (balanced) tree.
+.IP "\(bu" 4
+Tree nodes and entries in the update queue are the same data structure.
+.IP "\(bu" 4
+The local time (\*(L"First\*(R") and the time specified in updates (\*(L"Time\*(R") may differ.  
+.IP "\(bu" 4
+Timed out values are inserted at the \*(L"tail\*(R".
+.IP "\(bu" 4
+Explicitly flushed values are inserted at the \*(L"head\*(R".
+.IP "\(bu" 4
+\&\s-1ASCII\s0 art rocks.
+.SH "SECURITY CONSIDERATIONS"
+.IX Header "SECURITY CONSIDERATIONS"
+The client/server protocol does not have any authentication or
+authorization mechanism.  Therefore, take care to restrict which users can
+connect to the daemon.
+.PP
+Control sockets are divided into high-privilege (\fB\-l\fR) and low-privilege
+(\fB\-L\fR) sockets.  High-privilege sockets accept all commands, whereas
+low-privilege sockets accept only \fB\s-1FLUSH\s0\fR, \fB\s-1STATS\s0\fR, and \fB\s-1HELP\s0\fR.
+.PP
+For a multi-user environment where only certain users require read/write
+access, the recommended configuration uses two sockets as follows:
+.IP "\fB\-l\fR \fI/protected/dir/rrd.sock\fR" 4
+.IX Item "-l /protected/dir/rrd.sock"
+Create a high-privilege unix-domain socket.  This should be protected with
+the same Unix permissions that are used to protect the \s-1RRD\s0 files.  Updates
+should be directed to this socket.
+.IP "\fB\-L\fR \fI127.0.0.1\fR" 4
+.IX Item "-L 127.0.0.1"
+Create a low-privilege \s-1TCP\s0 socket listening on localhost.  All users on
+the local system may use this to trigger \s-1FLUSH\s0 of individual files.  Users
+with read-only access should be directed to this socket.
+.PP
+If you (want to) use the network capability, i.\ e. let the daemon bind to
+an IPv4 or IPv6 socket, it is \fByour\fR job to install a packet filter or similar
+mechanism to prevent unauthorized connections. Unless you have a dedicated \s-1VLAN\s0
+or \s-1VPN\s0 for this, using the network option is probably a bad idea!
+.PP
+The daemon will blindly write to any file it gets told, so you really should
+create a separate user just for this daemon. Also it does not do any sanity
+checks, so if it gets told to write values for a time far in the future, your
+files will be messed up good!
+.PP
+You have been warned.
+.SH "PROTOCOL"
+.IX Header "PROTOCOL"
+The daemon communicates with clients using a line based \s-1ASCII\s0 protocol which is
+easy to read and easy to type. This makes it easy for scripts to implement the
+protocol and possible for users to use telnet to connect to the daemon
+and test stuff \*(L"by hand\*(R".
+.PP
+The protocol is line based, this means that each record consists of one or more
+lines. A line is terminated by the line feed character \f(CW0x0A\fR, commonly
+written as \f(CW\*(C`\en\*(C'\fR. In the examples below, this character will be written as
+\&\f(CW\*(C`<LF>\*(C'\fR (\*(L"line feed\*(R").
+.PP
+After the connection has been established, the client is expected to send a
+\&\*(L"command\*(R". A command consists of the command keyword, possibly some arguments,
+and a terminating newline character. For a list of commands, see
+\&\*(L"Valid Commands\*(R" below.
+.PP
+Example:
+.PP
+.Vb 1
+\&  FLUSH /tmp/foo.rrd<LF>
+.Ve
+.PP
+The daemon answers with a line consisting of a status code and a short status
+message, separated by one or more space characters. A negative status code
+signals an error, a positive status code or zero signal success. If the status
+code is greater than zero, it indicates the number of lines that follow the
+status line.
+.PP
+Examples:
+.PP
+.Vb 1
+\& 0 Success<LF>
+.Ve
+.PP
+.Vb 3
+\& 2 Two lines follow<LF>
+\& This is the first line<LF>
+\& And this is the second line<LF>
+.Ve
+.Sh "Valid Commands"
+.IX Subsection "Valid Commands"
+The following commands are understood by the daemon:
+.IP "\fB\s-1FLUSH\s0\fR \fIfilename\fR" 4
+.IX Item "FLUSH filename"
+Causes the daemon to put \fIfilename\fR to the \fBhead\fR of the update queue
+(possibly moving it there if the node is already enqueued). The answer will be
+sent \fBafter\fR the node has been dequeued.
+.IP "\fB\s-1FLUSHALL\s0\fR" 4
+.IX Item "FLUSHALL"
+Causes the daemon to start flushing \s-1ALL\s0 pending values to disk.  This
+returns immediately, even though the writes may take a long time.
+.IP "\fB\s-1PENDING\s0\fR \fIfilename\fR" 4
+.IX Item "PENDING filename"
+Shows any \*(L"pending\*(R" updates for a file, in order.  The updates shown have
+not yet been written to the underlying \s-1RRD\s0 file.
+.IP "\fB\s-1FORGET\s0\fR \fIfilename\fR" 4
+.IX Item "FORGET filename"
+Removes \fIfilename\fR from the cache.  Any pending updates \fB\s-1WILL\s0 \s-1BE\s0 \s-1LOST\s0\fR.
+.IP "\fB\s-1QUEUE\s0\fR" 4
+.IX Item "QUEUE"
+Shows the files that are on the output queue.  Returns zero or more lines
+in the following format, where <num_vals> is the number of values
+to be written for the <file>:
+.Sp
+.Vb 1
+\&    <num_vals> <file>
+.Ve
+.IP "\fB\s-1HELP\s0\fR [\fIcommand\fR]" 4
+.IX Item "HELP [command]"
+Returns a short usage message. If no command is given, or \fIcommand\fR is
+\&\fB\s-1HELP\s0\fR, a list of commands supported by the daemon is returned. Otherwise a
+short description, possibly containing a pointer to a manual page, is returned.
+Obviously, this is meant for interactive usage and the format in which the
+commands and usage summaries are returned is not well defined.
+.IP "\fB\s-1STATS\s0\fR" 4
+.IX Item "STATS"
+Returns a list of metrics which can be used to measure the daemons performance
+and check its status. For a description of the values returned, see
+\&\*(L"Performance Values\*(R" below.
+.Sp
+The format in which the values are returned is similar to many other line based
+protocols: Each value is printed on a separate line, each consisting of the
+name of the value, a colon, one or more spaces and the actual value.
+.Sp
+Example:
+.Sp
+.Vb 10
+\& 9 Statistics follow
+\& QueueLength: 0
+\& UpdatesReceived: 30
+\& FlushesReceived: 2
+\& UpdatesWritten: 13
+\& DataSetsWritten: 390
+\& TreeNodesNumber: 13
+\& TreeDepth: 4
+\& JournalBytes: 190
+\& JournalRotate: 0
+.Ve
+.IP "\fB\s-1UPDATE\s0\fR \fIfilename\fR \fIvalues\fR [\fIvalues\fR ...]" 4
+.IX Item "UPDATE filename values [values ...]"
+Adds more data to a filename. This is \fBthe\fR operation the daemon was designed
+for, so describing the mechanism again is unnecessary. Read \*(L"\s-1HOW\s0 \s-1IT\s0 \s-1WORKS\s0\*(R"
+above for a detailed explanation.
+.Sp
+Note that rrdcached only accepts absolute timestamps in the update values.
+Updates strings like \*(L"N:1:2:3\*(R" are automatically converted to absolute
+time by the \s-1RRD\s0 client library before sending to rrdcached.
+.IP "\fB\s-1WROTE\s0\fR \fIfilename\fR" 4
+.IX Item "WROTE filename"
+This command is written to the journal after a file is successfully
+written out to disk.  It is used during journal replay to determine which
+updates have already been applied.  It is \fIonly\fR valid in the journal; it
+is not accepted from the other command channels.
+.IP "\fB\s-1BATCH\s0\fR" 4
+.IX Item "BATCH"
+This command initiates the bulk load of multiple commands.  This is
+designed for installations with extremely high update rates, since it
+permits more than one command to be issued per \fIread()\fR and \fIwrite()\fR.
+.Sp
+All commands are executed just as they would be if given individually,
+except for output to the user.  Messages indicating success are
+suppressed, and error messages are delayed until the client is finished.
+.Sp
+Command processing is finished when the client sends a dot (\*(L".\*(R") on its
+own line.  After the client has finished, the server responds with an
+error count and the list of error messages (if any).  Each error messages
+indicates the number of the command to which it corresponds, and the error
+message itself.  The first user command after \fB\s-1BATCH\s0\fR is command number one.
+.Sp
+.Vb 9
+\&    client:  BATCH
+\&    server:  0 Go ahead.  End with dot '.' on its own line.
+\&    client:  UPDATE x.rrd 1223661439:1:2:3            <\-\-\- command #1
+\&    client:  UPDATE y.rrd 1223661440:3:4:5            <\-\-\- command #2
+\&    client:  and so on...
+\&    client:  .
+\&    server:  2 Errors
+\&    server:  1 message for command 1
+\&    server:  12 message for command 12
+.Ve
+.IP "\fB\s-1QUIT\s0\fR" 4
+.IX Item "QUIT"
+Disconnect from rrdcached.
+.Sh "Performance Values"
+.IX Subsection "Performance Values"
+The following counters are returned by the \fB\s-1STATS\s0\fR command:
+.IP "\fBQueueLength\fR \fI(unsigned 64bit integer)\fR" 4
+.IX Item "QueueLength (unsigned 64bit integer)"
+Number of nodes currently enqueued in the update queue.
+.IP "\fBUpdatesReceived\fR \fI(unsigned 64bit integer)\fR" 4
+.IX Item "UpdatesReceived (unsigned 64bit integer)"
+Number of \s-1UPDATE\s0 commands received.
+.IP "\fBFlushesReceived\fR \fI(unsigned 64bit integer)\fR" 4
+.IX Item "FlushesReceived (unsigned 64bit integer)"
+Number of \s-1FLUSH\s0 commands received.
+.IP "\fBUpdatesWritten\fR \fI(unsigned 64bit integer)\fR" 4
+.IX Item "UpdatesWritten (unsigned 64bit integer)"
+Total number of updates, i.\ e. calls to \f(CW\*(C`rrd_update_r\*(C'\fR, since the
+daemon was started.
+.IP "\fBDataSetsWritten\fR \fI(unsigned 64bit integer)\fR" 4
+.IX Item "DataSetsWritten (unsigned 64bit integer)"
+Total number of \*(L"data sets\*(R" written to disk since the daemon was
+started. A data set is one or more values passed to the \fB\s-1UPDATE\s0\fR
+command. For example: \f(CW\*(C`1223661439:123:456\*(C'\fR is one data set with two
+values. The term \*(L"data set\*(R" is used to prevent confusion whether
+individual values or groups of values are counted.
+.IP "\fBTreeNodesNumber\fR \fI(unsigned 64bit integer)\fR" 4
+.IX Item "TreeNodesNumber (unsigned 64bit integer)"
+Number of nodes in the cache.
+.IP "\fBTreeDepth\fR \fI(unsigned 64bit integer)\fR" 4
+.IX Item "TreeDepth (unsigned 64bit integer)"
+Depth of the tree used for fast key lookup.
+.IP "\fBJournalBytes\fR \fI(unsigned 64bit integer)\fR" 4
+.IX Item "JournalBytes (unsigned 64bit integer)"
+Total number of bytes written to the journal since startup.
+.IP "\fBJournalRotate\fR \fI(unsigned 64bit integer)\fR" 4
+.IX Item "JournalRotate (unsigned 64bit integer)"
+Number of times the journal has been rotated since startup.
+.SH "SIGNALS"
+.IX Header "SIGNALS"
+.IP "\s-1SIGINT\s0 and \s-1SIGTERM\s0" 4
+.IX Item "SIGINT and SIGTERM"
+The daemon exits normally on receipt of either of these signals.  Pending
+updates are handled in accordance with the \fB\-j\fR and \fB\-F\fR options.
+.IP "\s-1SIGUSR1\s0" 4
+.IX Item "SIGUSR1"
+The daemon exits \s-1AFTER\s0 flushing all updates out to disk.  This may take a
+while.
+.IP "\s-1SIGUSR2\s0" 4
+.IX Item "SIGUSR2"
+The daemon exits immediately, without flushing updates out to disk.
+Pending updates will be replayed from the journal when the daemon starts
+up again.  \fB\s-1WARNING:\s0 if journaling (\-j) is \s-1NOT\s0 enabled, any pending
+updates \s-1WILL\s0 \s-1BE\s0 \s-1LOST\s0\fR.
+.SH "BUGS"
+.IX Header "BUGS"
+No known bugs at the moment.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+rrdtool, rrdgraph
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+\&\fBrrdcached\fR and this manual page have been written by Florian Forster
+<octo\ at\ verplant.org>.
+.SH "CONTRIBUTORS"
+.IX Header "CONTRIBUTORS"
+kevin brintnall <kbrint@rufus.net>
diff --git a/doc/rrdcached.html b/doc/rrdcached.html
new file mode 100644 (file)
index 0000000..6bd0a37
--- /dev/null
@@ -0,0 +1,700 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>rrdcached</title>
+<link rev="made" href="mailto:root@localhost" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+<!--
+
+<ul>
+
+       <li><a href="#name">NAME</a></li>
+       <li><a href="#synopsis">SYNOPSIS</a></li>
+       <li><a href="#description">DESCRIPTION</a></li>
+       <li><a href="#options">OPTIONS</a></li>
+       <li><a href="#affected_rrdtool_commands">AFFECTED RRDTOOL COMMANDS</a></li>
+       <li><a href="#error_reporting">ERROR REPORTING</a></li>
+       <li><a href="#how_it_works">HOW IT WORKS</a></li>
+       <li><a href="#security_considerations">SECURITY CONSIDERATIONS</a></li>
+       <li><a href="#protocol">PROTOCOL</a></li>
+       <ul>
+
+               <li><a href="#valid_commands">Valid Commands</a></li>
+               <li><a href="#performance_values">Performance Values</a></li>
+       </ul>
+
+       <li><a href="#signals">SIGNALS</a></li>
+       <li><a href="#bugs">BUGS</a></li>
+       <li><a href="#see_also">SEE ALSO</a></li>
+       <li><a href="#author">AUTHOR</a></li>
+       <li><a href="#contributors">CONTRIBUTORS</a></li>
+</ul>
+-->
+<!-- INDEX END -->
+
+<p>
+</p>
+<hr />
+<h1><a name="name">NAME</a></h1>
+<p>rrdcached - Data caching daemon for rrdtool</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<p><strong>rrdcached</strong>
+[<strong>-l/-L</strong>&nbsp;<em>address</em>]
+[<strong>-w</strong>&nbsp;<em>timeout</em>]
+[<strong>-z</strong>&nbsp;<em>delay</em>]
+[<strong>-f</strong>&nbsp;<em>timeout</em>]
+[<strong>-p</strong>&nbsp;<em>pid_file</em>]
+[<strong>-t</strong>&nbsp;<em>write_threads</em>]
+[<strong>-j</strong>&nbsp;<em>journal_dir</em>]
+[-F]
+[-g]
+[<strong>-b</strong>&nbsp;<em>base_dir</em>&nbsp;[<strong>-B</strong>]]</p>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p><strong>rrdcached</strong> is a daemon that receives updates to existing RRD files,
+accumulates them and, if enough have been received or a defined time has
+passed, writes the updates to the RRD file. A <em>flush</em> command may be used to
+force writing of values to disk, so that graphing facilities and similar can
+work with up-to-date data.</p>
+<p>The daemon was written with big setups in mind. Those setups usually run into
+IO&nbsp;related problems sooner or later for reasons that are beyond the scope
+of this document. Check the wiki at the RRDTool homepage for details. Also
+check <a href="#security_considerations">SECURITY CONSIDERATIONS</a> below before using this daemon! A detailed
+description of how the daemon operates can be found in the <a href="#how_it_works">HOW IT WORKS</a>
+section below.</p>
+<p>
+</p>
+<hr />
+<h1><a name="options">OPTIONS</a></h1>
+<dl>
+<dt><strong><a name="item__2dl_address"><strong>-l</strong> <em>address</em></a></strong><br />
+</dt>
+<dd>
+Tells the daemon to bind to <em>address</em> and accept incoming connections on that
+socket. If <em>address</em> begins with <code>unix:</code>, everything following that prefix is
+interpreted as the path to a UNIX domain socket. Otherwise the address or node
+name are resolved using <em>getaddrinfo</em>.
+</dd>
+<dd>
+<p>For network sockets, a port may be specified by using the form
+<code>[address]:port</code>. If the address is an IPv4 address or a fully
+qualified domain name (i.&nbsp;e. the address contains at least one dot
+(<code>.</code>)), the square brackets can be omitted, resulting in the (simpler)
+<code>address:port</code> pattern.. The default port is <strong>42217/udp</strong>.</p>
+</dd>
+<dd>
+<p>The following formats are accepted. Please note that the address of the UNIX
+domain socket <strong>must</strong> start with a slash in the second case!</p>
+</dd>
+<dd>
+<pre>
+   unix:&lt;/path/to/unix.sock&gt;
+   /&lt;path/to/unix.sock&gt;
+   &lt;hostname-or-ip&gt;
+   [&lt;hostname-or-ip&gt;]:&lt;port&gt;
+   &lt;hostname-or-ipv4&gt;:&lt;port&gt;</pre>
+</dd>
+<dd>
+<p>If the <strong>-l</strong> option is not specified the default address,
+<code>unix:/tmp/rrdcached.sock</code>, will be used.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item__2dl_address"><strong>-L</strong> <em>address</em></a></strong><br />
+</dt>
+<dd>
+Same as <strong>-l</strong>, except creates a low-privilege socket.  See <strong>SECURITY
+CONSIDERATIONS</strong> for more information.
+</dd>
+<p></p>
+<dt><strong><a name="item__2dw_timeout"><strong>-w</strong> <em>timeout</em></a></strong><br />
+</dt>
+<dd>
+Data is written to disk every <em>timeout</em> seconds. If this option is not
+specified the default interval of 300&nbsp;seconds will be used.
+</dd>
+<p></p>
+<dt><strong><a name="item__2dz_delay"><strong>-z</strong> <em>delay</em></a></strong><br />
+</dt>
+<dd>
+If specified, rrdcached will delay writing of each RRD for a random number
+of seconds in the range&nbsp;[0,<em>delay</em>).  This will avoid too many
+writes being queued simultaneously.  This value should be no greater than
+the value specified in <strong>-w</strong>.  By default, there is no delay.
+</dd>
+<p></p>
+<dt><strong><a name="item__2df_timeout"><strong>-f</strong> <em>timeout</em></a></strong><br />
+</dt>
+<dd>
+Every <em>timeout</em> seconds the entire cache is searched for old values which are
+written to disk. This only concerns files to which updates have stopped, so
+setting this to a high value, such as 3600&nbsp;seconds, is acceptable in most
+cases. This timeout defaults to 3600&nbsp;seconds.
+</dd>
+<p></p>
+<dt><strong><a name="item__2dp_file"><strong>-p</strong> <em>file</em></a></strong><br />
+</dt>
+<dd>
+Sets the name and location of the PID-file. If not specified, the default,
+<code>$localststedir/run/rrdcached.pid</code> will be used.
+</dd>
+<p></p>
+<dt><strong><a name="item__2dt_write_threads"><strong>-t</strong> <em>write_threads</em></a></strong><br />
+</dt>
+<dd>
+Specifies the number of threads used for writing RRD files.  The default
+is&nbsp;4.  Increasing this number will allow rrdcached to have more
+simultaneous I/O requests into the kernel.  This may allow the kernel to
+re-order disk writes, resulting in better disk throughput.
+</dd>
+<p></p>
+<dt><strong><a name="item__2dj_dir"><strong>-j</strong> <em>dir</em></a></strong><br />
+</dt>
+<dd>
+Write updates to a journal in <em>dir</em>.  In the event of a program or system
+crash, this will allow the daemon to write any updates that were pending
+at the time of the crash.
+</dd>
+<dd>
+<p>On startup, the daemon will check for journal files in this directory.  If
+found, all updates therein will be read into memory before the daemon
+starts accepting new connections.</p>
+</dd>
+<dd>
+<p>The journal will be rotated with the same frequency as the flush timer
+given by <strong>-f</strong>.</p>
+</dd>
+<dd>
+<p>When journaling is enabled, the daemon will use a fast shutdown procedure.
+Rather than flushing all files to disk, it will make sure the journal is
+properly written and exit immediately.  Although the RRD data files are
+not fully up-to-date, no information is lost; all pending updates will be
+replayed from the journal next time the daemon starts up.</p>
+</dd>
+<dd>
+<p>To disable fast shutdown, use the <strong>-F</strong> option.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item__2df"><strong>-F</strong></a></strong><br />
+</dt>
+<dd>
+ALWAYS flush all updates to the RRD data files when the daemon is shut
+down, regardless of journal setting.
+</dd>
+<p></p>
+<dt><strong><a name="item__2dg"><strong>-g</strong></a></strong><br />
+</dt>
+<dd>
+Run in the foreground.  The daemon will not fork().
+</dd>
+<p></p>
+<dt><strong><a name="item__2db_dir"><strong>-b</strong> <em>dir</em></a></strong><br />
+</dt>
+<dd>
+The daemon will change into a specific directory at startup. All files passed
+to the daemon, that are specified by a <strong>relative</strong> path, will be interpreted
+to be relative to this directory. If not given the default, <code>/tmp</code>, will be
+used.
+</dd>
+<dd>
+<pre>
+  +------------------------+------------------------+
+  ! Command line           ! File updated           !
+  +------------------------+------------------------+
+  ! foo.rrd                ! /tmp/foo.rrd           !
+  ! foo/bar.rrd            ! /tmp/foo/bar.rrd       !
+  ! /var/lib/rrd/foo.rrd   ! /var/lib/rrd/foo.rrd   !
+  +------------------------+------------------------+
+  Paths given on the command  line and paths actually
+  updated by the daemon,  assuming the base directory
+  &quot;/tmp&quot;.</pre>
+</dd>
+<dd>
+<p><strong>WARNING:</strong> The paths up to and including the base directory <strong>MUST NOT BE</strong>
+symbolic links.  In other words, if the base directory is
+specified as:</p>
+</dd>
+<dd>
+<pre>
+    -b /base/dir/somewhere</pre>
+</dd>
+<dd>
+<p>... then <strong>NONE</strong> of the following should be symbolic links:</p>
+</dd>
+<dd>
+<pre>
+    /base
+    /base/dir
+    /base/dir/somewhere</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item__2db"><strong>-B</strong></a></strong><br />
+</dt>
+<dd>
+Only permit writes into the base directory specified in <strong>-b</strong> (and any
+sub-directories).  This does <strong>NOT</strong> detect symbolic links.  Paths
+containing <code>../</code> will also be blocked.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="affected_rrdtool_commands">AFFECTED RRDTOOL COMMANDS</a></h1>
+<p>The following commands may be made aware of the <strong>rrdcached</strong> using the command
+line argument <strong>--daemon</strong> or the environment variable <strong>RRDCACHED_ADDRESS</strong>:</p>
+<dl>
+<dt><strong><a name="item_dump"><strong>dump</strong></a></strong><br />
+</dt>
+<dt><strong><a name="item_fetch"><strong>fetch</strong></a></strong><br />
+</dt>
+<dt><strong><a name="item_flush"><strong>flush</strong></a></strong><br />
+</dt>
+<dt><strong><a name="item_graph"><strong>graph</strong></a></strong><br />
+</dt>
+<dt><strong><a name="item_graphv"><strong>graphv</strong></a></strong><br />
+</dt>
+<dt><strong><a name="item_info"><strong>info</strong></a></strong><br />
+</dt>
+<dt><strong><a name="item_last"><strong>last</strong></a></strong><br />
+</dt>
+<dt><strong><a name="item_lastupdate"><strong>lastupdate</strong></a></strong><br />
+</dt>
+<dt><strong><a name="item_update"><strong>update</strong></a></strong><br />
+</dt>
+<dt><strong><a name="item_xport"><strong>xport</strong></a></strong><br />
+</dt>
+</dl>
+<p>The <strong>update</strong> command can send values to the daemon instead of writing them to
+the disk itself. All other commands can send a <strong>FLUSH</strong> command (see below) to
+the daemon before accessing the files, so they work with up-to-date data even
+if the cache timeout is large.</p>
+<p>
+</p>
+<hr />
+<h1><a name="error_reporting">ERROR REPORTING</a></h1>
+<p>The daemon reports errors in one of two ways: During startup, error messages
+are printed to <code>STDERR</code>. One of the steps when starting up is to fork to the
+background and closing <code>STDERR</code> - after this writing directly to the user is
+no longer possible. Once this has happened, the daemon will send log messages
+to the system logging daemon using <em>syslog(3)</em>. The facility used is
+<code>LOG_DAEMON</code>.</p>
+<p>
+</p>
+<hr />
+<h1><a name="how_it_works">HOW IT WORKS</a></h1>
+<p>When receiving an update, <strong>rrdcached</strong> does not write to disk but looks for an
+entry for that file in its internal tree. If not found, an entry is created
+including the current time (called ``First'' in the diagram below). This time is
+<strong>not</strong> the time specified on the command line but the time the operating system
+considers to be ``now''. The value and time of the value (called ``Time'' in the
+diagram below) are appended to the tree node.</p>
+<p>When appending a value to a tree node, it is checked whether it's time to write
+the values to disk. Values are written to disk if
+<code>now()&nbsp;-&nbsp;First&nbsp;&gt;=&nbsp;timeout</code>, where <code>timeout</code> is the timeout specified
+using the <strong>-w</strong> option, see <em>OPTIONS</em>. If the values are ``old enough'' they
+will be enqueued in the ``update queue'', i.&nbsp;e. they will be appended to
+the linked list shown below.  Because the tree nodes and the elements of the
+linked list are the same data structures in memory, any update to a file that
+has already been enqueued will be written with the next write to the RRD file,
+too.</p>
+<p>A separate ``update thread'' constantly dequeues the first element in the update
+queue and writes all its values to the appropriate file. So as long as the
+update queue is not empty files are written at the highest possible rate.</p>
+<p>Since the timeout of files is checked only when new values are added to the
+file, ``dead'' files, i.&nbsp;e. files that are not updated anymore, would never
+be written to disk. Therefore, every now and then, controlled by the <strong>-f</strong>
+option, the entire tree is walked and all ``old'' values are enqueued. Since this
+only affects ``dead'' files and walking the tree is relatively expensive, you
+should set the ``flush interval'' to a reasonably high value. The default is
+3600&nbsp;seconds (one hour).</p>
+<p>The downside of caching values is that they won't show up in graphs generated
+from the RRD&nbsp;files. To get around this, the daemon provides the ``flush
+command'' to flush specific files. This means that the file is inserted at the
+<strong>head</strong> of the update queue or moved there if it is already enqueued. The flush
+command will return only after the file's pending updates have been written
+to disk.</p>
+<pre>
+ +------+   +------+                               +------+
+ ! head !   ! root !                               ! tail !
+ +---+--+   +---+--+                               +---+--+
+     !         /\                                      !
+     !        /  \                                     !
+     !       /\  /\                                    !
+     !      /\/\ \ `----------------- ... --------,    !
+     V     /      `-------,                       !    V
+ +---+----+---+    +------+-----+             +---+----+---+
+ ! File:  foo !    ! File:  bar !             ! File:  qux !
+ ! First: 101 !    ! First: 119 !             ! First: 180 !
+ ! Next:&amp;bar -+---&gt;! Next:&amp;... -+---&gt; ... ---&gt;! Next:NULL  !
+ | Prev:NULL  !&lt;---+-Prev:&amp;foo  !&lt;--- ... ----+-Prev: &amp;... !
+ +============+    +============+             +============+
+ ! Time:  100 !    ! Time:  120 !             ! Time:  180 !
+ ! Value:  10 !    ! Value: 0.1 !             ! Value: 2,2 !
+ +------------+    +------------+             +------------+
+ ! Time:  110 !    ! Time:  130 !             ! Time:  190 !
+ ! Value:  26 !    ! Value: 0.1 !             ! Value: 7,3 !
+ +------------+    +------------+             +------------+
+ :            :    :            :             :            :
+ +------------+    +------------+             +------------+
+ ! Time:  230 !    ! Time:  250 !             ! Time:  310 !
+ ! Value:  42 !    ! Value: 0.2 !             ! Value: 1,2 !
+ +------------+    +------------+             +------------+</pre>
+<p>The above diagram demonstrates:</p>
+<ul>
+<li></li>
+Files/values are stored in a (balanced) tree.
+<p></p>
+<li></li>
+Tree nodes and entries in the update queue are the same data structure.
+<p></p>
+<li></li>
+The local time (``First'') and the time specified in updates (``Time'') may differ.
+<p></p>
+<li></li>
+Timed out values are inserted at the ``tail''.
+<p></p>
+<li></li>
+Explicitly flushed values are inserted at the ``head''.
+<p></p>
+<li></li>
+ASCII art rocks.
+<p></p></ul>
+<p>
+</p>
+<hr />
+<h1><a name="security_considerations">SECURITY CONSIDERATIONS</a></h1>
+<p>The client/server protocol does not have any authentication or
+authorization mechanism.  Therefore, take care to restrict which users can
+connect to the daemon.</p>
+<p>Control sockets are divided into high-privilege (<strong>-l</strong>) and low-privilege
+(<strong>-L</strong>) sockets.  High-privilege sockets accept all commands, whereas
+low-privilege sockets accept only <strong>FLUSH</strong>, <strong>STATS</strong>, and <strong>HELP</strong>.</p>
+<p>For a multi-user environment where only certain users require read/write
+access, the recommended configuration uses two sockets as follows:</p>
+<dl>
+<dt><strong><a name="item__2dl__2fprotected_2fdir_2frrd_2esock"><strong>-l</strong> <em>/protected/dir/rrd.sock</em></a></strong><br />
+</dt>
+<dd>
+Create a high-privilege unix-domain socket.  This should be protected with
+the same Unix permissions that are used to protect the RRD files.  Updates
+should be directed to this socket.
+</dd>
+<p></p>
+<dt><strong><a name="item__2dl_127_2e0_2e0_2e1"><strong>-L</strong> <em>127.0.0.1</em></a></strong><br />
+</dt>
+<dd>
+Create a low-privilege TCP socket listening on localhost.  All users on
+the local system may use this to trigger FLUSH of individual files.  Users
+with read-only access should be directed to this socket.
+</dd>
+<p></p></dl>
+<p>If you (want to) use the network capability, i.&nbsp;e. let the daemon bind to
+an IPv4 or IPv6 socket, it is <strong>your</strong> job to install a packet filter or similar
+mechanism to prevent unauthorized connections. Unless you have a dedicated VLAN
+or VPN for this, using the network option is probably a bad idea!</p>
+<p>The daemon will blindly write to any file it gets told, so you really should
+create a separate user just for this daemon. Also it does not do any sanity
+checks, so if it gets told to write values for a time far in the future, your
+files will be messed up good!</p>
+<p>You have been warned.</p>
+<p>
+</p>
+<hr />
+<h1><a name="protocol">PROTOCOL</a></h1>
+<p>The daemon communicates with clients using a line based ASCII protocol which is
+easy to read and easy to type. This makes it easy for scripts to implement the
+protocol and possible for users to use <em>telnet</em> to connect to the daemon
+and test stuff ``by hand''.</p>
+<p>The protocol is line based, this means that each record consists of one or more
+lines. A line is terminated by the line feed character <code>0x0A</code>, commonly
+written as <code>\n</code>. In the examples below, this character will be written as
+<code>&lt;LF&gt;</code> (``line feed'').</p>
+<p>After the connection has been established, the client is expected to send a
+``command''. A command consists of the command keyword, possibly some arguments,
+and a terminating newline character. For a list of commands, see
+<a href="#valid_commands">Valid Commands</a> below.</p>
+<p>Example:</p>
+<pre>
+  FLUSH /tmp/foo.rrd&lt;LF&gt;</pre>
+<p>The daemon answers with a line consisting of a status code and a short status
+message, separated by one or more space characters. A negative status code
+signals an error, a positive status code or zero signal success. If the status
+code is greater than zero, it indicates the number of lines that follow the
+status line.</p>
+<p>Examples:</p>
+<pre>
+ 0 Success&lt;LF&gt;</pre>
+<pre>
+ 2 Two lines follow&lt;LF&gt;
+ This is the first line&lt;LF&gt;
+ And this is the second line&lt;LF&gt;</pre>
+<p>
+</p>
+<h2><a name="valid_commands">Valid Commands</a></h2>
+<p>The following commands are understood by the daemon:</p>
+<dl>
+<dt><strong><a name="item_flush_filename"><strong>FLUSH</strong> <em>filename</em></a></strong><br />
+</dt>
+<dd>
+Causes the daemon to put <em>filename</em> to the <strong>head</strong> of the update queue
+(possibly moving it there if the node is already enqueued). The answer will be
+sent <strong>after</strong> the node has been dequeued.
+</dd>
+<p></p>
+<dt><strong><a name="item_flushall"><strong>FLUSHALL</strong></a></strong><br />
+</dt>
+<dd>
+Causes the daemon to start flushing ALL pending values to disk.  This
+returns immediately, even though the writes may take a long time.
+</dd>
+<p></p>
+<dt><strong><a name="item_pending_filename"><strong>PENDING</strong> <em>filename</em></a></strong><br />
+</dt>
+<dd>
+Shows any ``pending'' updates for a file, in order.  The updates shown have
+not yet been written to the underlying RRD file.
+</dd>
+<p></p>
+<dt><strong><a name="item_forget_filename"><strong>FORGET</strong> <em>filename</em></a></strong><br />
+</dt>
+<dd>
+Removes <em>filename</em> from the cache.  Any pending updates <strong>WILL BE LOST</strong>.
+</dd>
+<p></p>
+<dt><strong><a name="item_queue"><strong>QUEUE</strong></a></strong><br />
+</dt>
+<dd>
+Shows the files that are on the output queue.  Returns zero or more lines
+in the following format, where &lt;num_vals&gt; is the number of values
+to be written for the &lt;file&gt;:
+</dd>
+<dd>
+<pre>
+    &lt;num_vals&gt; &lt;file&gt;</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item_help__5bcommand_5d"><strong>HELP</strong> [<em>command</em>]</a></strong><br />
+</dt>
+<dd>
+Returns a short usage message. If no command is given, or <em>command</em> is
+<strong>HELP</strong>, a list of commands supported by the daemon is returned. Otherwise a
+short description, possibly containing a pointer to a manual page, is returned.
+Obviously, this is meant for interactive usage and the format in which the
+commands and usage summaries are returned is not well defined.
+</dd>
+<p></p>
+<dt><strong><a name="item_stats"><strong>STATS</strong></a></strong><br />
+</dt>
+<dd>
+Returns a list of metrics which can be used to measure the daemons performance
+and check its status. For a description of the values returned, see
+<a href="#performance_values">Performance Values</a> below.
+</dd>
+<dd>
+<p>The format in which the values are returned is similar to many other line based
+protocols: Each value is printed on a separate line, each consisting of the
+name of the value, a colon, one or more spaces and the actual value.</p>
+</dd>
+<dd>
+<p>Example:</p>
+</dd>
+<dd>
+<pre>
+ 9 Statistics follow
+ QueueLength: 0
+ UpdatesReceived: 30
+ FlushesReceived: 2
+ UpdatesWritten: 13
+ DataSetsWritten: 390
+ TreeNodesNumber: 13
+ TreeDepth: 4
+ JournalBytes: 190
+ JournalRotate: 0</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item_update_filename_values__5bvalues__2e_2e_2e_5d"><strong>UPDATE</strong> <em>filename</em> <em>values</em> [<em>values</em> ...]</a></strong><br />
+</dt>
+<dd>
+Adds more data to a filename. This is <strong>the</strong> operation the daemon was designed
+for, so describing the mechanism again is unnecessary. Read <a href="#how_it_works">HOW IT WORKS</a>
+above for a detailed explanation.
+</dd>
+<dd>
+<p>Note that rrdcached only accepts absolute timestamps in the update values.
+Updates strings like ``N:1:2:3'' are automatically converted to absolute
+time by the RRD client library before sending to rrdcached.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_wrote_filename"><strong>WROTE</strong> <em>filename</em></a></strong><br />
+</dt>
+<dd>
+This command is written to the journal after a file is successfully
+written out to disk.  It is used during journal replay to determine which
+updates have already been applied.  It is <em>only</em> valid in the journal; it
+is not accepted from the other command channels.
+</dd>
+<p></p>
+<dt><strong><a name="item_batch"><strong>BATCH</strong></a></strong><br />
+</dt>
+<dd>
+This command initiates the bulk load of multiple commands.  This is
+designed for installations with extremely high update rates, since it
+permits more than one command to be issued per <code>read()</code> and write().
+</dd>
+<dd>
+<p>All commands are executed just as they would be if given individually,
+except for output to the user.  Messages indicating success are
+suppressed, and error messages are delayed until the client is finished.</p>
+</dd>
+<dd>
+<p>Command processing is finished when the client sends a dot (``.'') on its
+own line.  After the client has finished, the server responds with an
+error count and the list of error messages (if any).  Each error messages
+indicates the number of the command to which it corresponds, and the error
+message itself.  The first user command after <strong>BATCH</strong> is command number one.</p>
+</dd>
+<dd>
+<pre>
+    client:  BATCH
+    server:  0 Go ahead.  End with dot '.' on its own line.
+    client:  UPDATE x.rrd 1223661439:1:2:3            &lt;--- command #1
+    client:  UPDATE y.rrd 1223661440:3:4:5            &lt;--- command #2
+    client:  and so on...
+    client:  .
+    server:  2 Errors
+    server:  1 message for command 1
+    server:  12 message for command 12</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item_quit"><strong>QUIT</strong></a></strong><br />
+</dt>
+<dd>
+Disconnect from rrdcached.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<h2><a name="performance_values">Performance Values</a></h2>
+<p>The following counters are returned by the <strong>STATS</strong> command:</p>
+<dl>
+<dt><strong><a name="item_queuelength"><strong>QueueLength</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
+</dt>
+<dd>
+Number of nodes currently enqueued in the update queue.
+</dd>
+<p></p>
+<dt><strong><a name="item_updatesreceived"><strong>UpdatesReceived</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
+</dt>
+<dd>
+Number of UPDATE commands received.
+</dd>
+<p></p>
+<dt><strong><a name="item_flushesreceived"><strong>FlushesReceived</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
+</dt>
+<dd>
+Number of FLUSH commands received.
+</dd>
+<p></p>
+<dt><strong><a name="item_updateswritten"><strong>UpdatesWritten</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
+</dt>
+<dd>
+Total number of updates, i.&nbsp;e. calls to <code>rrd_update_r</code>, since the
+daemon was started.
+</dd>
+<p></p>
+<dt><strong><a name="item_datasetswritten"><strong>DataSetsWritten</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
+</dt>
+<dd>
+Total number of ``data sets'' written to disk since the daemon was
+started. A data set is one or more values passed to the <strong>UPDATE</strong>
+command. For example: <code>1223661439:123:456</code> is one data set with two
+values. The term ``data set'' is used to prevent confusion whether
+individual values or groups of values are counted.
+</dd>
+<p></p>
+<dt><strong><a name="item_treenodesnumber"><strong>TreeNodesNumber</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
+</dt>
+<dd>
+Number of nodes in the cache.
+</dd>
+<p></p>
+<dt><strong><a name="item_treedepth"><strong>TreeDepth</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
+</dt>
+<dd>
+Depth of the tree used for fast key lookup.
+</dd>
+<p></p>
+<dt><strong><a name="item_journalbytes"><strong>JournalBytes</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
+</dt>
+<dd>
+Total number of bytes written to the journal since startup.
+</dd>
+<p></p>
+<dt><strong><a name="item_journalrotate"><strong>JournalRotate</strong> <em>(unsigned 64bit integer)</em></a></strong><br />
+</dt>
+<dd>
+Number of times the journal has been rotated since startup.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="signals">SIGNALS</a></h1>
+<dl>
+<dt><strong><a name="item_sigint_and_sigterm">SIGINT and SIGTERM</a></strong><br />
+</dt>
+<dd>
+The daemon exits normally on receipt of either of these signals.  Pending
+updates are handled in accordance with the <strong>-j</strong> and <strong>-F</strong> options.
+</dd>
+<p></p>
+<dt><strong><a name="item_sigusr1">SIGUSR1</a></strong><br />
+</dt>
+<dd>
+The daemon exits AFTER flushing all updates out to disk.  This may take a
+while.
+</dd>
+<p></p>
+<dt><strong><a name="item_sigusr2">SIGUSR2</a></strong><br />
+</dt>
+<dd>
+The daemon exits immediately, without flushing updates out to disk.
+Pending updates will be replayed from the journal when the daemon starts
+up again.  <strong>WARNING: if journaling (-j) is NOT enabled, any pending
+updates WILL BE LOST</strong>.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="bugs">BUGS</a></h1>
+<p>No known bugs at the moment.</p>
+<p>
+</p>
+<hr />
+<h1><a name="see_also">SEE ALSO</a></h1>
+<p><a href="././rrdtool.html">the rrdtool manpage</a>, <a href="././rrdgraph.html">the rrdgraph manpage</a></p>
+<p>
+</p>
+<hr />
+<h1><a name="author">AUTHOR</a></h1>
+<p><strong>rrdcached</strong> and this manual page have been written by Florian Forster
+&lt;octo&nbsp;at&nbsp;verplant.org&gt;.</p>
+<p>
+</p>
+<hr />
+<h1><a name="contributors">CONTRIBUTORS</a></h1>
+<p>kevin brintnall &lt;<a href="mailto:kbrint@rufus.net">kbrint@rufus.net</a>&gt;</p>
+
+</body>
+
+</html>
diff --git a/doc/rrdcached.pod b/doc/rrdcached.pod
new file mode 100644 (file)
index 0000000..5113c2d
--- /dev/null
@@ -0,0 +1,586 @@
+=pod
+
+=head1 NAME
+
+rrdcached - Data caching daemon for rrdtool
+
+=head1 SYNOPSIS
+
+B<rrdcached>
+[B<-l/-L>E<nbsp>I<address>]
+[B<-w>E<nbsp>I<timeout>]
+[B<-z>E<nbsp>I<delay>]
+[B<-f>E<nbsp>I<timeout>]
+[B<-p>E<nbsp>I<pid_file>]
+[B<-t>E<nbsp>I<write_threads>]
+[B<-j>E<nbsp>I<journal_dir>]
+[-F]
+[-g]
+[B<-b>E<nbsp>I<base_dir>E<nbsp>[B<-B>]]
+
+=head1 DESCRIPTION
+
+B<rrdcached> is a daemon that receives updates to existing RRD files,
+accumulates them and, if enough have been received or a defined time has
+passed, writes the updates to the RRD file. A I<flush> command may be used to
+force writing of values to disk, so that graphing facilities and similar can
+work with up-to-date data.
+
+The daemon was written with big setups in mind. Those setups usually run into
+IOE<nbsp>related problems sooner or later for reasons that are beyond the scope
+of this document. Check the wiki at the RRDTool homepage for details. Also
+check L<SECURITY CONSIDERATIONS> below before using this daemon! A detailed
+description of how the daemon operates can be found in the L<HOW IT WORKS>
+section below.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-l> I<address>
+
+Tells the daemon to bind to I<address> and accept incoming connections on that
+socket. If I<address> begins with C<unix:>, everything following that prefix is
+interpreted as the path to a UNIX domain socket. Otherwise the address or node
+name are resolved using L<getaddrinfo>.
+
+For network sockets, a port may be specified by using the form
+C<B<[>I<address>B<]:>I<port>>. If the address is an IPv4 address or a fully
+qualified domain name (i.E<nbsp>e. the address contains at least one dot
+(C<.>)), the square brackets can be omitted, resulting in the (simpler)
+C<I<address>B<:>I<port>> pattern.. The default port is B<42217/udp>.
+
+The following formats are accepted. Please note that the address of the UNIX
+domain socket B<must> start with a slash in the second case!
+
+   unix:</path/to/unix.sock>
+   /<path/to/unix.sock>
+   <hostname-or-ip>
+   [<hostname-or-ip>]:<port>
+   <hostname-or-ipv4>:<port>
+
+If the B<-l> option is not specified the default address,
+C<unix:/tmp/rrdcached.sock>, will be used.
+
+=item B<-L> I<address>
+
+Same as B<-l>, except creates a low-privilege socket.  See B<SECURITY
+CONSIDERATIONS> for more information.
+
+=item B<-w> I<timeout>
+
+Data is written to disk every I<timeout> seconds. If this option is not
+specified the default interval of 300E<nbsp>seconds will be used.
+
+=item B<-z> I<delay>
+
+If specified, rrdcached will delay writing of each RRD for a random number
+of seconds in the rangeE<nbsp>[0,I<delay>).  This will avoid too many
+writes being queued simultaneously.  This value should be no greater than
+the value specified in B<-w>.  By default, there is no delay.
+
+=item B<-f> I<timeout>
+
+Every I<timeout> seconds the entire cache is searched for old values which are
+written to disk. This only concerns files to which updates have stopped, so
+setting this to a high value, such as 3600E<nbsp>seconds, is acceptable in most
+cases. This timeout defaults to 3600E<nbsp>seconds.
+
+=item B<-p> I<file>
+
+Sets the name and location of the PID-file. If not specified, the default,
+C<I<$localststedir>/run/rrdcached.pid> will be used.
+
+=item B<-t> I<write_threads>
+
+Specifies the number of threads used for writing RRD files.  The default
+isE<nbsp>4.  Increasing this number will allow rrdcached to have more
+simultaneous I/O requests into the kernel.  This may allow the kernel to
+re-order disk writes, resulting in better disk throughput.
+
+=item B<-j> I<dir>
+
+Write updates to a journal in I<dir>.  In the event of a program or system
+crash, this will allow the daemon to write any updates that were pending
+at the time of the crash.
+
+On startup, the daemon will check for journal files in this directory.  If
+found, all updates therein will be read into memory before the daemon
+starts accepting new connections.
+
+The journal will be rotated with the same frequency as the flush timer
+given by B<-f>.
+
+When journaling is enabled, the daemon will use a fast shutdown procedure.
+Rather than flushing all files to disk, it will make sure the journal is
+properly written and exit immediately.  Although the RRD data files are
+not fully up-to-date, no information is lost; all pending updates will be
+replayed from the journal next time the daemon starts up.
+
+To disable fast shutdown, use the B<-F> option.
+
+=item B<-F>
+
+ALWAYS flush all updates to the RRD data files when the daemon is shut
+down, regardless of journal setting.
+
+=item B<-g>
+
+Run in the foreground.  The daemon will not fork().
+
+=item B<-b> I<dir>
+
+The daemon will change into a specific directory at startup. All files passed
+to the daemon, that are specified by a B<relative> path, will be interpreted
+to be relative to this directory. If not given the default, C</tmp>, will be
+used.
+
+  +------------------------+------------------------+
+  ! Command line           ! File updated           !
+  +------------------------+------------------------+
+  ! foo.rrd                ! /tmp/foo.rrd           !
+  ! foo/bar.rrd            ! /tmp/foo/bar.rrd       !
+  ! /var/lib/rrd/foo.rrd   ! /var/lib/rrd/foo.rrd   !
+  +------------------------+------------------------+
+  Paths given on the command  line and paths actually
+  updated by the daemon,  assuming the base directory
+  "/tmp".
+
+B<WARNING:> The paths up to and including the base directory B<MUST NOT BE>
+symbolic links.  In other words, if the base directory is
+specified as:
+
+    -b /base/dir/somewhere
+
+... then B<NONE> of the following should be symbolic links:
+
+    /base
+    /base/dir
+    /base/dir/somewhere
+
+=item B<-B>
+
+Only permit writes into the base directory specified in B<-b> (and any
+sub-directories).  This does B<NOT> detect symbolic links.  Paths
+containing C<../> will also be blocked.
+
+=back
+
+=head1 AFFECTED RRDTOOL COMMANDS
+
+The following commands may be made aware of the B<rrdcached> using the command
+line argument B<--daemon> or the environment variable B<RRDCACHED_ADDRESS>:
+
+=over 4
+
+=item B<dump>
+
+=item B<fetch>
+
+=item B<flush>
+
+=item B<graph>
+
+=item B<graphv>
+
+=item B<info>
+
+=item B<last>
+
+=item B<lastupdate>
+
+=item B<update>
+
+=item B<xport>
+
+=back
+
+The B<update> command can send values to the daemon instead of writing them to
+the disk itself. All other commands can send a B<FLUSH> command (see below) to
+the daemon before accessing the files, so they work with up-to-date data even
+if the cache timeout is large.
+
+=head1 ERROR REPORTING
+
+The daemon reports errors in one of two ways: During startup, error messages
+are printed to C<STDERR>. One of the steps when starting up is to fork to the
+background and closing C<STDERR> - after this writing directly to the user is
+no longer possible. Once this has happened, the daemon will send log messages
+to the system logging daemon using L<syslog(3)>. The facility used is
+C<LOG_DAEMON>.
+
+=head1 HOW IT WORKS
+
+When receiving an update, B<rrdcached> does not write to disk but looks for an
+entry for that file in its internal tree. If not found, an entry is created
+including the current time (called "First" in the diagram below). This time is
+B<not> the time specified on the command line but the time the operating system
+considers to be "now". The value and time of the value (called "Time" in the
+diagram below) are appended to the tree node.
+
+When appending a value to a tree node, it is checked whether it's time to write
+the values to disk. Values are written to disk if
+S<C<now() - First E<gt>= timeout>>, where C<timeout> is the timeout specified
+using the B<-w> option, see L<OPTIONS>. If the values are "old enough" they
+will be enqueued in the "update queue", i.E<nbsp>e. they will be appended to
+the linked list shown below.  Because the tree nodes and the elements of the
+linked list are the same data structures in memory, any update to a file that
+has already been enqueued will be written with the next write to the RRD file,
+too.
+
+A separate "update thread" constantly dequeues the first element in the update
+queue and writes all its values to the appropriate file. So as long as the
+update queue is not empty files are written at the highest possible rate.
+
+Since the timeout of files is checked only when new values are added to the
+file, "dead" files, i.E<nbsp>e. files that are not updated anymore, would never
+be written to disk. Therefore, every now and then, controlled by the B<-f>
+option, the entire tree is walked and all "old" values are enqueued. Since this
+only affects "dead" files and walking the tree is relatively expensive, you
+should set the "flush interval" to a reasonably high value. The default is
+3600E<nbsp>seconds (one hour).
+
+The downside of caching values is that they won't show up in graphs generated
+from the RRDE<nbsp>files. To get around this, the daemon provides the "flush
+command" to flush specific files. This means that the file is inserted at the
+B<head> of the update queue or moved there if it is already enqueued. The flush
+command will return only after the file's pending updates have been written
+to disk.
+
+ +------+   +------+                               +------+
+ ! head !   ! root !                               ! tail !
+ +---+--+   +---+--+                               +---+--+
+     !         /\                                      !
+     !        /  \                                     !
+     !       /\  /\                                    !
+     !      /\/\ \ `----------------- ... --------,    !
+     V     /      `-------,                       !    V
+ +---+----+---+    +------+-----+             +---+----+---+
+ ! File:  foo !    ! File:  bar !             ! File:  qux !
+ ! First: 101 !    ! First: 119 !             ! First: 180 !
+ ! Next:&bar -+--->! Next:&... -+---> ... --->! Next:NULL  !
+ | Prev:NULL  !<---+-Prev:&foo  !<--- ... ----+-Prev: &... !
+ +============+    +============+             +============+
+ ! Time:  100 !    ! Time:  120 !             ! Time:  180 !
+ ! Value:  10 !    ! Value: 0.1 !             ! Value: 2,2 !
+ +------------+    +------------+             +------------+
+ ! Time:  110 !    ! Time:  130 !             ! Time:  190 !
+ ! Value:  26 !    ! Value: 0.1 !             ! Value: 7,3 !
+ +------------+    +------------+             +------------+
+ :            :    :            :             :            :
+ +------------+    +------------+             +------------+
+ ! Time:  230 !    ! Time:  250 !             ! Time:  310 !
+ ! Value:  42 !    ! Value: 0.2 !             ! Value: 1,2 !
+ +------------+    +------------+             +------------+
+
+The above diagram demonstrates:
+
+=over
+
+=item *
+
+Files/values are stored in a (balanced) tree.
+
+=item *
+
+Tree nodes and entries in the update queue are the same data structure.
+
+=item *
+
+The local time ("First") and the time specified in updates ("Time") may differ.  
+
+=item *
+
+Timed out values are inserted at the "tail".
+
+=item *
+
+Explicitly flushed values are inserted at the "head".
+
+=item *
+
+ASCII art rocks.
+
+=back
+
+=head1 SECURITY CONSIDERATIONS
+
+The client/server protocol does not have any authentication or
+authorization mechanism.  Therefore, take care to restrict which users can
+connect to the daemon.
+
+Control sockets are divided into high-privilege (B<-l>) and low-privilege
+(B<-L>) sockets.  High-privilege sockets accept all commands, whereas
+low-privilege sockets accept only B<FLUSH>, B<STATS>, and B<HELP>.
+
+For a multi-user environment where only certain users require read/write
+access, the recommended configuration uses two sockets as follows:
+
+=over
+
+=item B<-l> I</protected/dir/rrd.sock>
+
+Create a high-privilege unix-domain socket.  This should be protected with
+the same Unix permissions that are used to protect the RRD files.  Updates
+should be directed to this socket.
+
+=item B<-L> I<127.0.0.1>
+
+Create a low-privilege TCP socket listening on localhost.  All users on
+the local system may use this to trigger FLUSH of individual files.  Users
+with read-only access should be directed to this socket.
+
+=back
+
+If you (want to) use the network capability, i.E<nbsp>e. let the daemon bind to
+an IPv4 or IPv6 socket, it is B<your> job to install a packet filter or similar
+mechanism to prevent unauthorized connections. Unless you have a dedicated VLAN
+or VPN for this, using the network option is probably a bad idea!
+
+The daemon will blindly write to any file it gets told, so you really should
+create a separate user just for this daemon. Also it does not do any sanity
+checks, so if it gets told to write values for a time far in the future, your
+files will be messed up good!
+
+You have been warned.
+
+=head1 PROTOCOL
+
+The daemon communicates with clients using a line based ASCII protocol which is
+easy to read and easy to type. This makes it easy for scripts to implement the
+protocol and possible for users to use L<telnet> to connect to the daemon
+and test stuff "by hand".
+
+The protocol is line based, this means that each record consists of one or more
+lines. A line is terminated by the line feed character C<0x0A>, commonly
+written as C<\n>. In the examples below, this character will be written as
+C<E<lt>LFE<gt>> ("line feed").
+
+After the connection has been established, the client is expected to send a
+"command". A command consists of the command keyword, possibly some arguments,
+and a terminating newline character. For a list of commands, see
+L<Valid Commands> below.
+
+Example:
+
+  FLUSH /tmp/foo.rrd<LF>
+
+The daemon answers with a line consisting of a status code and a short status
+message, separated by one or more space characters. A negative status code
+signals an error, a positive status code or zero signal success. If the status
+code is greater than zero, it indicates the number of lines that follow the
+status line.
+
+Examples:
+
+ 0 Success<LF>
+
+ 2 Two lines follow<LF>
+ This is the first line<LF>
+ And this is the second line<LF>
+
+=head2 Valid Commands
+
+The following commands are understood by the daemon:
+
+=over 4
+
+=item B<FLUSH> I<filename>
+
+Causes the daemon to put I<filename> to the B<head> of the update queue
+(possibly moving it there if the node is already enqueued). The answer will be
+sent B<after> the node has been dequeued.
+
+=item B<FLUSHALL>
+
+Causes the daemon to start flushing ALL pending values to disk.  This
+returns immediately, even though the writes may take a long time.
+
+=item B<PENDING> I<filename>
+
+Shows any "pending" updates for a file, in order.  The updates shown have
+not yet been written to the underlying RRD file.
+
+=item B<FORGET> I<filename>
+
+Removes I<filename> from the cache.  Any pending updates B<WILL BE LOST>.
+
+=item B<QUEUE>
+
+Shows the files that are on the output queue.  Returns zero or more lines
+in the following format, where E<lt>num_valsE<gt> is the number of values
+to be written for the E<lt>fileE<gt>:
+
+    <num_vals> <file>
+
+=item B<HELP> [I<command>]
+
+Returns a short usage message. If no command is given, or I<command> is
+B<HELP>, a list of commands supported by the daemon is returned. Otherwise a
+short description, possibly containing a pointer to a manual page, is returned.
+Obviously, this is meant for interactive usage and the format in which the
+commands and usage summaries are returned is not well defined.
+
+=item B<STATS>
+
+Returns a list of metrics which can be used to measure the daemons performance
+and check its status. For a description of the values returned, see
+L<Performance Values> below.
+
+The format in which the values are returned is similar to many other line based
+protocols: Each value is printed on a separate line, each consisting of the
+name of the value, a colon, one or more spaces and the actual value.
+
+Example:
+
+ 9 Statistics follow
+ QueueLength: 0
+ UpdatesReceived: 30
+ FlushesReceived: 2
+ UpdatesWritten: 13
+ DataSetsWritten: 390
+ TreeNodesNumber: 13
+ TreeDepth: 4
+ JournalBytes: 190
+ JournalRotate: 0
+
+=item B<UPDATE> I<filename> I<values> [I<values> ...]
+
+Adds more data to a filename. This is B<the> operation the daemon was designed
+for, so describing the mechanism again is unnecessary. Read L<HOW IT WORKS>
+above for a detailed explanation.
+
+Note that rrdcached only accepts absolute timestamps in the update values.
+Updates strings like "N:1:2:3" are automatically converted to absolute
+time by the RRD client library before sending to rrdcached.
+
+=item B<WROTE> I<filename>
+
+This command is written to the journal after a file is successfully
+written out to disk.  It is used during journal replay to determine which
+updates have already been applied.  It is I<only> valid in the journal; it
+is not accepted from the other command channels.
+
+=item B<BATCH>
+
+This command initiates the bulk load of multiple commands.  This is
+designed for installations with extremely high update rates, since it
+permits more than one command to be issued per read() and write().
+
+All commands are executed just as they would be if given individually,
+except for output to the user.  Messages indicating success are
+suppressed, and error messages are delayed until the client is finished.
+
+Command processing is finished when the client sends a dot (".") on its
+own line.  After the client has finished, the server responds with an
+error count and the list of error messages (if any).  Each error messages
+indicates the number of the command to which it corresponds, and the error
+message itself.  The first user command after B<BATCH> is command number one.
+
+    client:  BATCH
+    server:  0 Go ahead.  End with dot '.' on its own line.
+    client:  UPDATE x.rrd 1223661439:1:2:3            <--- command #1
+    client:  UPDATE y.rrd 1223661440:3:4:5            <--- command #2
+    client:  and so on...
+    client:  .
+    server:  2 Errors
+    server:  1 message for command 1
+    server:  12 message for command 12
+
+=item B<QUIT>
+
+Disconnect from rrdcached.
+
+=back
+
+=head2 Performance Values
+
+The following counters are returned by the B<STATS> command:
+
+=over 4
+
+=item B<QueueLength> I<(unsigned 64bit integer)>
+
+Number of nodes currently enqueued in the update queue.
+
+=item B<UpdatesReceived> I<(unsigned 64bit integer)>
+
+Number of UPDATE commands received.
+
+=item B<FlushesReceived> I<(unsigned 64bit integer)>
+
+Number of FLUSH commands received.
+
+=item B<UpdatesWritten> I<(unsigned 64bit integer)>
+
+Total number of updates, i.E<nbsp>e. calls to C<rrd_update_r>, since the
+daemon was started.
+
+=item B<DataSetsWritten> I<(unsigned 64bit integer)>
+
+Total number of "data sets" written to disk since the daemon was
+started. A data set is one or more values passed to the B<UPDATE>
+command. For example: C<1223661439:123:456> is one data set with two
+values. The term "data set" is used to prevent confusion whether
+individual values or groups of values are counted.
+
+=item B<TreeNodesNumber> I<(unsigned 64bit integer)>
+
+Number of nodes in the cache.
+
+=item B<TreeDepth> I<(unsigned 64bit integer)>
+
+Depth of the tree used for fast key lookup.
+
+=item B<JournalBytes> I<(unsigned 64bit integer)>
+
+Total number of bytes written to the journal since startup.
+
+=item B<JournalRotate> I<(unsigned 64bit integer)>
+
+Number of times the journal has been rotated since startup.
+
+=back
+
+=head1 SIGNALS
+
+=over 4
+
+=item SIGINT and SIGTERM
+
+The daemon exits normally on receipt of either of these signals.  Pending
+updates are handled in accordance with the B<-j> and B<-F> options.
+
+=item SIGUSR1
+
+The daemon exits AFTER flushing all updates out to disk.  This may take a
+while.
+
+=item SIGUSR2
+
+The daemon exits immediately, without flushing updates out to disk.
+Pending updates will be replayed from the journal when the daemon starts
+up again.  B<WARNING: if journaling (-j) is NOT enabled, any pending
+updates WILL BE LOST>.
+
+=back
+
+=head1 BUGS
+
+No known bugs at the moment.
+
+=head1 SEE ALSO
+
+L<rrdtool>, L<rrdgraph>
+
+=head1 AUTHOR
+
+B<rrdcached> and this manual page have been written by Florian Forster
+E<lt>octoE<nbsp>atE<nbsp>verplant.orgE<gt>.
+
+=head1 CONTRIBUTORS
+
+kevin brintnall E<lt>kbrint@rufus.netE<gt>
+
+=cut
+
diff --git a/doc/rrdcached.txt b/doc/rrdcached.txt
new file mode 100644 (file)
index 0000000..32d3674
--- /dev/null
@@ -0,0 +1,498 @@
+RRDCACHED(1)                        rrdtool                       RRDCACHED(1)
+
+
+
+N\bNA\bAM\bME\bE
+       rrdcached - Data caching daemon for rrdtool
+
+S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
+       r\brr\brd\bdc\bca\bac\bch\bhe\bed\bd [-\b-l\bl/\b/-\b-L\bL _\ba_\bd_\bd_\br_\be_\bs_\bs] [-\b-w\bw _\bt_\bi_\bm_\be_\bo_\bu_\bt] [-\b-z\bz _\bd_\be_\bl_\ba_\by] [-\b-f\bf _\bt_\bi_\bm_\be_\bo_\bu_\bt]
+       [-\b-p\bp _\bp_\bi_\bd_\b__\bf_\bi_\bl_\be] [-\b-t\bt _\bw_\br_\bi_\bt_\be_\b__\bt_\bh_\br_\be_\ba_\bd_\bs] [-\b-j\bj _\bj_\bo_\bu_\br_\bn_\ba_\bl_\b__\bd_\bi_\br] [-F] [-g]
+       [-\b-b\bb _\bb_\ba_\bs_\be_\b__\bd_\bi_\br [-\b-B\bB]]
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+       r\brr\brd\bdc\bca\bac\bch\bhe\bed\bd is a daemon that receives updates to existing RRD files,
+       accumulates them and, if enough have been received or a defined time
+       has passed, writes the updates to the RRD file. A _\bf_\bl_\bu_\bs_\bh command may be
+       used to force writing of values to disk, so that graphing facilities
+       and similar can work with up-to-date data.
+
+       The daemon was written with big setups in mind. Those setups usually
+       run into IO related problems sooner or later for reasons that are
+       beyond the scope of this document. Check the wiki at the RRDTool home-
+       page for details. Also check "SECURITY CONSIDERATIONS" below before
+       using this daemon! A detailed description of how the daemon operates
+       can be found in the "HOW IT WORKS" section below.
+
+O\bOP\bPT\bTI\bIO\bON\bNS\bS
+       -\b-l\bl _\ba_\bd_\bd_\br_\be_\bs_\bs
+           Tells the daemon to bind to _\ba_\bd_\bd_\br_\be_\bs_\bs and accept incoming connections
+           on that socket. If _\ba_\bd_\bd_\br_\be_\bs_\bs begins with "unix:", everything follow-
+           ing that prefix is interpreted as the path to a UNIX domain socket.
+           Otherwise the address or node name are resolved using getaddrinfo.
+
+           For network sockets, a port may be specified by using the form
+           "[address]:port". If the address is an IPv4 address or a fully
+           qualified domain name (i. e. the address contains at least one dot
+           (".")), the square brackets can be omitted, resulting in the (sim-
+           pler) "address:port" pattern.. The default port is 4\b42\b22\b21\b17\b7/\b/u\bud\bdp\bp.
+
+           The following formats are accepted. Please note that the address of
+           the UNIX domain socket m\bmu\bus\bst\bt start with a slash in the second case!
+
+              unix:</path/to/unix.sock>
+              /<path/to/unix.sock>
+              <hostname-or-ip>
+              [<hostname-or-ip>]:<port>
+              <hostname-or-ipv4>:<port>
+
+           If the -\b-l\bl option is not specified the default address,
+           "unix:/tmp/rrdcached.sock", will be used.
+
+       -\b-L\bL _\ba_\bd_\bd_\br_\be_\bs_\bs
+           Same as -\b-l\bl, except creates a low-privilege socket.  See S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY
+           C\bCO\bON\bNS\bSI\bID\bDE\bER\bRA\bAT\bTI\bIO\bON\bNS\bS for more information.
+
+       -\b-w\bw _\bt_\bi_\bm_\be_\bo_\bu_\bt
+           Data is written to disk every _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. If this option is
+           not specified the default interval of 300 seconds will be used.
+
+       -\b-z\bz _\bd_\be_\bl_\ba_\by
+           If specified, rrdcached will delay writing of each RRD for a random
+           number of seconds in the range [0,_\bd_\be_\bl_\ba_\by).  This will avoid too many
+           writes being queued simultaneously.  This value should be no
+           greater than the value specified in -\b-w\bw.  By default, there is no
+           delay.
+
+       -\b-f\bf _\bt_\bi_\bm_\be_\bo_\bu_\bt
+           Every _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds the entire cache is searched for old values
+           which are written to disk. This only concerns files to which
+           updates have stopped, so setting this to a high value, such as
+           3600 seconds, is acceptable in most cases. This timeout defaults to
+           3600 seconds.
+
+       -\b-p\bp _\bf_\bi_\bl_\be
+           Sets the name and location of the PID-file. If not specified, the
+           default, "$localststedir/run/rrdcached.pid" will be used.
+
+       -\b-t\bt _\bw_\br_\bi_\bt_\be_\b__\bt_\bh_\br_\be_\ba_\bd_\bs
+           Specifies the number of threads used for writing RRD files.  The
+           default is 4.  Increasing this number will allow rrdcached to have
+           more simultaneous I/O requests into the kernel.  This may allow the
+           kernel to re-order disk writes, resulting in better disk through-
+           put.
+
+       -\b-j\bj _\bd_\bi_\br
+           Write updates to a journal in _\bd_\bi_\br.  In the event of a program or
+           system crash, this will allow the daemon to write any updates that
+           were pending at the time of the crash.
+
+           On startup, the daemon will check for journal files in this direc-
+           tory.  If found, all updates therein will be read into memory
+           before the daemon starts accepting new connections.
+
+           The journal will be rotated with the same frequency as the flush
+           timer given by -\b-f\bf.
+
+           When journaling is enabled, the daemon will use a fast shutdown
+           procedure.  Rather than flushing all files to disk, it will make
+           sure the journal is properly written and exit immediately.
+           Although the RRD data files are not fully up-to-date, no informa-
+           tion is lost; all pending updates will be replayed from the journal
+           next time the daemon starts up.
+
+           To disable fast shutdown, use the -\b-F\bF option.
+
+       -\b-F\bF  ALWAYS flush all updates to the RRD data files when the daemon is
+           shut down, regardless of journal setting.
+
+       -\b-g\bg  Run in the foreground.  The daemon will not _\bf_\bo_\br_\bk_\b(_\b).
+
+       -\b-b\bb _\bd_\bi_\br
+           The daemon will change into a specific directory at startup. All
+           files passed to the daemon, that are specified by a r\bre\bel\bla\bat\bti\biv\bve\be path,
+           will be interpreted to be relative to this directory. If not given
+           the default, "/tmp", will be used.
+
+             +------------------------+------------------------+
+             ! Command line           ! File updated           !
+             +------------------------+------------------------+
+             ! foo.rrd                ! /tmp/foo.rrd           !
+             ! foo/bar.rrd            ! /tmp/foo/bar.rrd       !
+             ! /var/lib/rrd/foo.rrd   ! /var/lib/rrd/foo.rrd   !
+             +------------------------+------------------------+
+             Paths given on the command  line and paths actually
+             updated by the daemon,  assuming the base directory
+             "/tmp".
+
+           W\bWA\bAR\bRN\bNI\bIN\bNG\bG:\b: The paths up to and including the base directory M\bMU\bUS\bST\bT N\bNO\bOT\bT
+           B\bBE\bE symbolic links.  In other words, if the base directory is speci-
+           fied as:
+
+               -b /base/dir/somewhere
+
+           ... then N\bNO\bON\bNE\bE of the following should be symbolic links:
+
+               /base
+               /base/dir
+               /base/dir/somewhere
+
+       -\b-B\bB  Only permit writes into the base directory specified in -\b-b\bb (and any
+           sub-directories).  This does N\bNO\bOT\bT detect symbolic links.  Paths con-
+           taining "../" will also be blocked.
+
+A\bAF\bFF\bFE\bEC\bCT\bTE\bED\bD R\bRR\bRD\bDT\bTO\bOO\bOL\bL C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
+       The following commands may be made aware of the r\brr\brd\bdc\bca\bac\bch\bhe\bed\bd using the
+       command line argument -\b--\b-d\bda\bae\bem\bmo\bon\bn or the environment variable R\bRR\bRD\bD-\b-
+       C\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS:
+
+       d\bdu\bum\bmp\bp
+       f\bfe\bet\btc\bch\bh
+       f\bfl\blu\bus\bsh\bh
+       g\bgr\bra\bap\bph\bh
+       g\bgr\bra\bap\bph\bhv\bv
+       i\bin\bnf\bfo\bo
+       l\bla\bas\bst\bt
+       l\bla\bas\bst\btu\bup\bpd\bda\bat\bte\be
+       u\bup\bpd\bda\bat\bte\be
+       x\bxp\bpo\bor\brt\bt
+
+       The u\bup\bpd\bda\bat\bte\be command can send values to the daemon instead of writing
+       them to the disk itself. All other commands can send a F\bFL\bLU\bUS\bSH\bH command
+       (see below) to the daemon before accessing the files, so they work with
+       up-to-date data even if the cache timeout is large.
+
+E\bER\bRR\bRO\bOR\bR R\bRE\bEP\bPO\bOR\bRT\bTI\bIN\bNG\bG
+       The daemon reports errors in one of two ways: During startup, error
+       messages are printed to "STDERR". One of the steps when starting up is
+       to fork to the background and closing "STDERR" - after this writing
+       directly to the user is no longer possible. Once this has happened, the
+       daemon will send log messages to the system logging daemon using _\bs_\by_\bs_\b-
+       _\bl_\bo_\bg(3). The facility used is "LOG_DAEMON".
+
+H\bHO\bOW\bW I\bIT\bT W\bWO\bOR\bRK\bKS\bS
+       When receiving an update, r\brr\brd\bdc\bca\bac\bch\bhe\bed\bd does not write to disk but looks
+       for an entry for that file in its internal tree. If not found, an entry
+       is created including the current time (called "First" in the diagram
+       below). This time is n\bno\bot\bt the time specified on the command line but the
+       time the operating system considers to be "now". The value and time of
+       the value (called "Time" in the diagram below) are appended to the tree
+       node.
+
+       When appending a value to a tree node, it is checked whether it's time
+       to write the values to disk. Values are written to disk if
+       "now() - First >= timeout", where "timeout" is the timeout specified
+       using the -\b-w\bw option, see OPTIONS. If the values are "old enough" they
+       will be enqueued in the "update queue", i. e. they will be appended to
+       the linked list shown below.  Because the tree nodes and the elements
+       of the linked list are the same data structures in memory, any update
+       to a file that has already been enqueued will be written with the next
+       write to the RRD file, too.
+
+       A separate "update thread" constantly dequeues the first element in the
+       update queue and writes all its values to the appropriate file. So as
+       long as the update queue is not empty files are written at the highest
+       possible rate.
+
+       Since the timeout of files is checked only when new values are added to
+       the file, "dead" files, i. e. files that are not updated anymore, would
+       never be written to disk. Therefore, every now and then, controlled by
+       the -\b-f\bf option, the entire tree is walked and all "old" values are
+       enqueued. Since this only affects "dead" files and walking the tree is
+       relatively expensive, you should set the "flush interval" to a reason-
+       ably high value. The default is 3600 seconds (one hour).
+
+       The downside of caching values is that they won't show up in graphs
+       generated from the RRD files. To get around this, the daemon provides
+       the "flush command" to flush specific files. This means that the file
+       is inserted at the h\bhe\bea\bad\bd of the update queue or moved there if it is
+       already enqueued. The flush command will return only after the file's
+       pending updates have been written to disk.
+
+        +------+   +------+                               +------+
+        ! head !   ! root !                               ! tail !
+        +---+--+   +---+--+                               +---+--+
+            !         /\                                      !
+            !        /  \                                     !
+            !       /\  /\                                    !
+            !      /\/\ \ `----------------- ... --------,    !
+            V     /      `-------,                       !    V
+        +---+----+---+    +------+-----+             +---+----+---+
+        ! File:  foo !    ! File:  bar !             ! File:  qux !
+        ! First: 101 !    ! First: 119 !             ! First: 180 !
+        ! Next:&bar -+--->! Next:&... -+---> ... --->! Next:NULL  !
+        | Prev:NULL  !<---+-Prev:&foo  !<--- ... ----+-Prev: &... !
+        +============+    +============+             +============+
+        ! Time:  100 !    ! Time:  120 !             ! Time:  180 !
+        ! Value:  10 !    ! Value: 0.1 !             ! Value: 2,2 !
+        +------------+    +------------+             +------------+
+        ! Time:  110 !    ! Time:  130 !             ! Time:  190 !
+        ! Value:  26 !    ! Value: 0.1 !             ! Value: 7,3 !
+        +------------+    +------------+             +------------+
+        :            :    :            :             :            :
+        +------------+    +------------+             +------------+
+        ! Time:  230 !    ! Time:  250 !             ! Time:  310 !
+        ! Value:  42 !    ! Value: 0.2 !             ! Value: 1,2 !
+        +------------+    +------------+             +------------+
+
+       The above diagram demonstrates:
+
+       ·   Files/values are stored in a (balanced) tree.
+
+       ·   Tree nodes and entries in the update queue are the same data struc-
+           ture.
+
+       ·   The local time ("First") and the time specified in updates ("Time")
+           may differ.
+
+       ·   Timed out values are inserted at the "tail".
+
+       ·   Explicitly flushed values are inserted at the "head".
+
+       ·   ASCII art rocks.
+
+S\bSE\bEC\bCU\bUR\bRI\bIT\bTY\bY C\bCO\bON\bNS\bSI\bID\bDE\bER\bRA\bAT\bTI\bIO\bON\bNS\bS
+       The client/server protocol does not have any authentication or autho-
+       rization mechanism.  Therefore, take care to restrict which users can
+       connect to the daemon.
+
+       Control sockets are divided into high-privilege (-\b-l\bl) and low-privilege
+       (-\b-L\bL) sockets.  High-privilege sockets accept all commands, whereas low-
+       privilege sockets accept only F\bFL\bLU\bUS\bSH\bH, S\bST\bTA\bAT\bTS\bS, and H\bHE\bEL\bLP\bP.
+
+       For a multi-user environment where only certain users require
+       read/write access, the recommended configuration uses two sockets as
+       follows:
+
+       -\b-l\bl _\b/_\bp_\br_\bo_\bt_\be_\bc_\bt_\be_\bd_\b/_\bd_\bi_\br_\b/_\br_\br_\bd_\b._\bs_\bo_\bc_\bk
+           Create a high-privilege unix-domain socket.  This should be pro-
+           tected with the same Unix permissions that are used to protect the
+           RRD files.  Updates should be directed to this socket.
+
+       -\b-L\bL _\b1_\b2_\b7_\b._\b0_\b._\b0_\b._\b1
+           Create a low-privilege TCP socket listening on localhost.  All
+           users on the local system may use this to trigger FLUSH of individ-
+           ual files.  Users with read-only access should be directed to this
+           socket.
+
+       If you (want to) use the network capability, i. e. let the daemon bind
+       to an IPv4 or IPv6 socket, it is y\byo\bou\bur\br job to install a packet filter or
+       similar mechanism to prevent unauthorized connections. Unless you have
+       a dedicated VLAN or VPN for this, using the network option is probably
+       a bad idea!
+
+       The daemon will blindly write to any file it gets told, so you really
+       should create a separate user just for this daemon. Also it does not do
+       any sanity checks, so if it gets told to write values for a time far in
+       the future, your files will be messed up good!
+
+       You have been warned.
+
+P\bPR\bRO\bOT\bTO\bOC\bCO\bOL\bL
+       The daemon communicates with clients using a line based ASCII protocol
+       which is easy to read and easy to type. This makes it easy for scripts
+       to implement the protocol and possible for users to use telnet to con-
+       nect to the daemon and test stuff "by hand".
+
+       The protocol is line based, this means that each record consists of one
+       or more lines. A line is terminated by the line feed character 0x0A,
+       commonly written as "\n". In the examples below, this character will be
+       written as "<LF>" ("line feed").
+
+       After the connection has been established, the client is expected to
+       send a "command". A command consists of the command keyword, possibly
+       some arguments, and a terminating newline character. For a list of com-
+       mands, see "Valid Commands" below.
+
+       Example:
+
+         FLUSH /tmp/foo.rrd<LF>
+
+       The daemon answers with a line consisting of a status code and a short
+       status message, separated by one or more space characters. A negative
+       status code signals an error, a positive status code or zero signal
+       success. If the status code is greater than zero, it indicates the num-
+       ber of lines that follow the status line.
+
+       Examples:
+
+        0 Success<LF>
+
+        2 Two lines follow<LF>
+        This is the first line<LF>
+        And this is the second line<LF>
+
+       V\bVa\bal\bli\bid\bd C\bCo\bom\bmm\bma\ban\bnd\bds\bs
+
+       The following commands are understood by the daemon:
+
+       F\bFL\bLU\bUS\bSH\bH _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+           Causes the daemon to put _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be to the h\bhe\bea\bad\bd of the update queue
+           (possibly moving it there if the node is already enqueued). The
+           answer will be sent a\baf\bft\bte\ber\br the node has been dequeued.
+
+       F\bFL\bLU\bUS\bSH\bHA\bAL\bLL\bL
+           Causes the daemon to start flushing ALL pending values to disk.
+           This returns immediately, even though the writes may take a long
+           time.
+
+       P\bPE\bEN\bND\bDI\bIN\bNG\bG _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+           Shows any "pending" updates for a file, in order.  The updates
+           shown have not yet been written to the underlying RRD file.
+
+       F\bFO\bOR\bRG\bGE\bET\bT _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+           Removes _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be from the cache.  Any pending updates W\bWI\bIL\bLL\bL B\bBE\bE L\bLO\bOS\bST\bT.
+
+       Q\bQU\bUE\bEU\bUE\bE
+           Shows the files that are on the output queue.  Returns zero or more
+           lines in the following format, where <num_vals> is the number of
+           values to be written for the <file>:
+
+               <num_vals> <file>
+
+       H\bHE\bEL\bLP\bP [_\bc_\bo_\bm_\bm_\ba_\bn_\bd]
+           Returns a short usage message. If no command is given, or _\bc_\bo_\bm_\bm_\ba_\bn_\bd
+           is H\bHE\bEL\bLP\bP, a list of commands supported by the daemon is returned.
+           Otherwise a short description, possibly containing a pointer to a
+           manual page, is returned.  Obviously, this is meant for interactive
+           usage and the format in which the commands and usage summaries are
+           returned is not well defined.
+
+       S\bST\bTA\bAT\bTS\bS
+           Returns a list of metrics which can be used to measure the daemons
+           performance and check its status. For a description of the values
+           returned, see "Performance Values" below.
+
+           The format in which the values are returned is similar to many
+           other line based protocols: Each value is printed on a separate
+           line, each consisting of the name of the value, a colon, one or
+           more spaces and the actual value.
+
+           Example:
+
+            9 Statistics follow
+            QueueLength: 0
+            UpdatesReceived: 30
+            FlushesReceived: 2
+            UpdatesWritten: 13
+            DataSetsWritten: 390
+            TreeNodesNumber: 13
+            TreeDepth: 4
+            JournalBytes: 190
+            JournalRotate: 0
+
+       U\bUP\bPD\bDA\bAT\bTE\bE _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be _\bv_\ba_\bl_\bu_\be_\bs [_\bv_\ba_\bl_\bu_\be_\bs ...]
+           Adds more data to a filename. This is t\bth\bhe\be operation the daemon was
+           designed for, so describing the mechanism again is unnecessary.
+           Read "HOW IT WORKS" above for a detailed explanation.
+
+           Note that rrdcached only accepts absolute timestamps in the update
+           values.  Updates strings like "N:1:2:3" are automatically converted
+           to absolute time by the RRD client library before sending to rrd-
+           cached.
+
+       W\bWR\bRO\bOT\bTE\bE _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+           This command is written to the journal after a file is successfully
+           written out to disk.  It is used during journal replay to determine
+           which updates have already been applied.  It is _\bo_\bn_\bl_\by valid in the
+           journal; it is not accepted from the other command channels.
+
+       B\bBA\bAT\bTC\bCH\bH
+           This command initiates the bulk load of multiple commands.  This is
+           designed for installations with extremely high update rates, since
+           it permits more than one command to be issued per _\br_\be_\ba_\bd_\b(_\b) and
+           _\bw_\br_\bi_\bt_\be_\b(_\b).
+
+           All commands are executed just as they would be if given individu-
+           ally, except for output to the user.  Messages indicating success
+           are suppressed, and error messages are delayed until the client is
+           finished.
+
+           Command processing is finished when the client sends a dot (".") on
+           its own line.  After the client has finished, the server responds
+           with an error count and the list of error messages (if any).  Each
+           error messages indicates the number of the command to which it cor-
+           responds, and the error message itself.  The first user command
+           after B\bBA\bAT\bTC\bCH\bH is command number one.
+
+               client:  BATCH
+               server:  0 Go ahead.  End with dot '.' on its own line.
+               client:  UPDATE x.rrd 1223661439:1:2:3            <--- command #1
+               client:  UPDATE y.rrd 1223661440:3:4:5            <--- command #2
+               client:  and so on...
+               client:  .
+               server:  2 Errors
+               server:  1 message for command 1
+               server:  12 message for command 12
+
+       Q\bQU\bUI\bIT\bT
+           Disconnect from rrdcached.
+
+       P\bPe\ber\brf\bfo\bor\brm\bma\ban\bnc\bce\be V\bVa\bal\blu\bue\bes\bs
+
+       The following counters are returned by the S\bST\bTA\bAT\bTS\bS command:
+
+       Q\bQu\bue\beu\bue\beL\bLe\ben\bng\bgt\bth\bh _\b(_\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\b6_\b4_\bb_\bi_\bt _\bi_\bn_\bt_\be_\bg_\be_\br_\b)
+           Number of nodes currently enqueued in the update queue.
+
+       U\bUp\bpd\bda\bat\bte\bes\bsR\bRe\bec\bce\bei\biv\bve\bed\bd _\b(_\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\b6_\b4_\bb_\bi_\bt _\bi_\bn_\bt_\be_\bg_\be_\br_\b)
+           Number of UPDATE commands received.
+
+       F\bFl\blu\bus\bsh\bhe\bes\bsR\bRe\bec\bce\bei\biv\bve\bed\bd _\b(_\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\b6_\b4_\bb_\bi_\bt _\bi_\bn_\bt_\be_\bg_\be_\br_\b)
+           Number of FLUSH commands received.
+
+       U\bUp\bpd\bda\bat\bte\bes\bsW\bWr\bri\bit\btt\bte\ben\bn _\b(_\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\b6_\b4_\bb_\bi_\bt _\bi_\bn_\bt_\be_\bg_\be_\br_\b)
+           Total number of updates, i. e. calls to "rrd_update_r", since the
+           daemon was started.
+
+       D\bDa\bat\bta\baS\bSe\bet\bts\bsW\bWr\bri\bit\btt\bte\ben\bn _\b(_\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\b6_\b4_\bb_\bi_\bt _\bi_\bn_\bt_\be_\bg_\be_\br_\b)
+           Total number of "data sets" written to disk since the daemon was
+           started. A data set is one or more values passed to the U\bUP\bPD\bDA\bAT\bTE\bE com-
+           mand. For example: "1223661439:123:456" is one data set with two
+           values. The term "data set" is used to prevent confusion whether
+           individual values or groups of values are counted.
+
+       T\bTr\bre\bee\beN\bNo\bod\bde\bes\bsN\bNu\bum\bmb\bbe\ber\br _\b(_\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\b6_\b4_\bb_\bi_\bt _\bi_\bn_\bt_\be_\bg_\be_\br_\b)
+           Number of nodes in the cache.
+
+       T\bTr\bre\bee\beD\bDe\bep\bpt\bth\bh _\b(_\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\b6_\b4_\bb_\bi_\bt _\bi_\bn_\bt_\be_\bg_\be_\br_\b)
+           Depth of the tree used for fast key lookup.
+
+       J\bJo\bou\bur\brn\bna\bal\blB\bBy\byt\bte\bes\bs _\b(_\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\b6_\b4_\bb_\bi_\bt _\bi_\bn_\bt_\be_\bg_\be_\br_\b)
+           Total number of bytes written to the journal since startup.
+
+       J\bJo\bou\bur\brn\bna\bal\blR\bRo\bot\bta\bat\bte\be _\b(_\bu_\bn_\bs_\bi_\bg_\bn_\be_\bd _\b6_\b4_\bb_\bi_\bt _\bi_\bn_\bt_\be_\bg_\be_\br_\b)
+           Number of times the journal has been rotated since startup.
+
+S\bSI\bIG\bGN\bNA\bAL\bLS\bS
+       SIGINT and SIGTERM
+           The daemon exits normally on receipt of either of these signals.
+           Pending updates are handled in accordance with the -\b-j\bj and -\b-F\bF
+           options.
+
+       SIGUSR1
+           The daemon exits AFTER flushing all updates out to disk.  This may
+           take a while.
+
+       SIGUSR2
+           The daemon exits immediately, without flushing updates out to disk.
+           Pending updates will be replayed from the journal when the daemon
+           starts up again.  W\bWA\bAR\bRN\bNI\bIN\bNG\bG:\b: i\bif\bf j\bjo\bou\bur\brn\bna\bal\bli\bin\bng\bg (\b(-\b-j\bj)\b) i\bis\bs N\bNO\bOT\bT e\ben\bna\bab\bbl\ble\bed\bd,\b, a\ban\bny\by
+           p\bpe\ben\bnd\bdi\bin\bng\bg u\bup\bpd\bda\bat\bte\bes\bs W\bWI\bIL\bLL\bL B\bBE\bE L\bLO\bOS\bST\bT.
+
+B\bBU\bUG\bGS\bS
+       No known bugs at the moment.
+
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+       rrdtool, rrdgraph
+
+A\bAU\bUT\bTH\bHO\bOR\bR
+       r\brr\brd\bdc\bca\bac\bch\bhe\bed\bd and this manual page have been written by Florian Forster
+       <octo at verplant.org>.
+
+C\bCO\bON\bNT\bTR\bRI\bIB\bBU\bUT\bTO\bOR\bRS\bS
+       kevin brintnall <kbrint@rufus.net>
+
+
+
+1.3.99909060808                   2009-04-09                      RRDCACHED(1)
index ed28c913ded02b4b8d5067ba996265908f811397..4b740106b2954843dbb6080e7d59ed110071e6a4 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDCGI 1"
-.TH RRDCGI 1 "2008-12-22" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDCGI 1 "2008-12-22" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdcgi \- Create web pages containing RRD graphs based on templates
 .SH "SYNOPSIS"
@@ -148,7 +149,7 @@ The argument parser uses the same semantics as you are used from your C\-shell.
 .IP "\fB\-\-filter\fR" 8
 .IX Item "--filter"
 Assume that rrdcgi is run as a filter and not as a cgi.
-.SS "Keywords"
+.Sh "Keywords"
 .IX Subsection "Keywords"
 .IP "\s-1RRD::CV\s0 \fIname\fR" 8
 .IX Item "RRD::CV name"
@@ -177,7 +178,7 @@ some sort of access control on the directory.
 .IP "\s-1RRD::GOODFOR\s0 \fIseconds\fR" 8
 .IX Item "RRD::GOODFOR seconds"
 Specify the number of seconds this page should remain valid. This will prompt
-the rrdcgi to output a Last-Modified, an Expire and if the number of
+the rrdcgi to output a Last\-Modified, an Expire and if the number of
 seconds is \fInegative\fR a Refresh header.
 .IP "\s-1RRD::INCLUDE\s0 \fIfilename\fR" 8
 .IX Item "RRD::INCLUDE filename"
@@ -253,7 +254,7 @@ number of the \fB\s-1PRINT\s0\fR argument. This first \fB\s-1PRINT\s0\fR has \fI
 .IX Item "RRD::INTERNAL <var>"
 This tag gets replaced by an internal var. Currently these vars are known:
 \&\s-1VERSION\s0, \s-1COMPILETIME\s0.
-These vars represent the compiled-in values.
+These vars represent the compiled-in values. 
 .SH "EXAMPLE 1"
 .IX Header "EXAMPLE 1"
 The example below creates a web pages with a single \s-1RRD\s0 graph.
@@ -268,7 +269,9 @@ The example below creates a web pages with a single \s-1RRD\s0 graph.
 \& <RRD::GRAPH demo.png \-\-lazy \-\-title="Temperatures"
 \&          DEF:cel=demo.rrd:exhaust:AVERAGE
 \&          LINE2:cel#00a000:"D. Celsius">
-\&
+.Ve
+.PP
+.Vb 3
 \& </P>
 \& </BODY>
 \& </HTML>
@@ -279,7 +282,7 @@ This script is slightly more elaborate, it allows you to run it from
 a form which sets \s-1RRD_NAME\s0. \s-1RRD_NAME\s0 is then used to select which \s-1RRD\s0
 you want to use as source for your graph.
 .PP
-.Vb 10
+.Vb 15
 \& #!/usr/local/bin/rrdcgi
 \& <HTML>
 \& <HEAD><TITLE>RRDCGI Demo</TITLE></HEAD>
@@ -295,7 +298,9 @@ you want to use as source for your graph.
 \&          \-\-title "Temperatures for "<RRD::CV::QUOTE RRD_NAME>
 \&          DEF:cel=<RRD::CV::PATH RRD_NAME>.rrd:exhaust:AVERAGE
 \&          LINE2:cel#00a000:"D. Celsius">
-\&
+.Ve
+.PP
+.Vb 3
 \& </P>
 \& </BODY>
 \& </HTML>
@@ -305,7 +310,7 @@ you want to use as source for your graph.
 This example shows how to handle the case where the \s-1RRD\s0, graphs and
 cgi-bins are separate directories
 .PP
-.Vb 10
+.Vb 14
 \& #!/.../bin/rrdcgi
 \& <HTML>
 \& <HEAD><TITLE>RRDCGI Demo</TITLE></HEAD>
@@ -313,7 +318,7 @@ cgi-bins are separate directories
 \& <H1>RRDCGI test Page</H1>
 \& <RRD::GRAPH
 \&  /.../web/pngs/testhvt.png
-\&  \-\-imginfo \*(Aq<IMG SRC=/.../pngs/%s WIDTH=%lu HEIGHT=%lu >\*(Aq
+\&  \-\-imginfo '<IMG SRC=/.../pngs/%s WIDTH=%lu HEIGHT=%lu >'
 \&  \-\-lazy \-\-start \-1d \-\-end now
 \&  DEF:http_src=/.../rrds/test.rrd:http_src:AVERAGE
 \&  AREA:http_src#00ff00:http_src
index 359a6200a88a09e05dfa5758c670d71c5e6fdfd9..67831b1a2c593ec5803c3b1ba23acfe4329f89fd 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdcgi</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#example_3">EXAMPLE 3</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -58,138 +50,172 @@ In the end it will printout a web page including the necessary CGI headers.</p>
 only for a subset of tags. This allows nesting of tags.</p>
 <p>The argument parser uses the same semantics as you are used from your C-shell.</p>
 <dl>
-<dt><strong><a name="filter" class="item"><strong>--filter</strong></a></strong></dt>
-
+<dt><strong><a name="item__2d_2dfilter"><strong>--filter</strong></a></strong><br />
+</dt>
 <dd>
-<p>Assume that rrdcgi is run as a filter and not as a cgi.</p>
+Assume that rrdcgi is run as a filter and not as a cgi.
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <h2><a name="keywords">Keywords</a></h2>
 <dl>
-<dt><strong><a name="rrd_cv_name" class="item">RRD::CV <em>name</em></a></strong></dt>
-
+<dt><strong><a name="item_rrd_3a_3acv_name">RRD::CV <em>name</em></a></strong><br />
+</dt>
 <dd>
-<p>Inserts the CGI variable of the given name.</p>
+Inserts the CGI variable of the given name.
 </dd>
-<dt><strong><a name="rrd_cv_quote_name" class="item">RRD::CV::QUOTE <em>name</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3acv_3a_3aquote_name">RRD::CV::QUOTE <em>name</em></a></strong><br />
+</dt>
 <dd>
-<p>Inserts the CGI variable of the given name but quotes it, ready for
+Inserts the CGI variable of the given name but quotes it, ready for
 use as an argument in another RRD:: tag. So even when there are spaces in the
-value of the CGI variable it will still be considered to be one argument.</p>
+value of the CGI variable it will still be considered to be one argument.
 </dd>
-<dt><strong><a name="rrd_cv_path_name" class="item">RRD::CV::PATH <em>name</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3acv_3a_3apath_name">RRD::CV::PATH <em>name</em></a></strong><br />
+</dt>
 <dd>
-<p>Inserts the CGI variable of the given name, quotes it and makes sure
+Inserts the CGI variable of the given name, quotes it and makes sure
 it starts neither with a '/' nor contains '..'. This is to make
 sure that no problematic pathnames can be introduced through the
-CGI interface.</p>
+CGI interface.
+</dd>
+<p></p>
+<dt><strong><a name="item_rrd_3a_3agetenv_variable">RRD::GETENV <em>variable</em></a></strong><br />
+</dt>
+<dd>
+Get the value of an environment variable.
 </dd>
-<dt><strong><a name="rrd_getenv_variable" class="item">RRD::GETENV <em>variable</em></a></strong></dt>
-
 <dd>
-<p>Get the value of an environment variable.</p>
 <pre>
  &lt;RRD::GETENV REMOTE_USER&gt;</pre>
+</dd>
+<dd>
 <p>might give you the name of the remote user given you are using
 some sort of access control on the directory.</p>
 </dd>
-<dt><strong><a name="rrd_goodfor_seconds" class="item">RRD::GOODFOR <em>seconds</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3agoodfor_seconds">RRD::GOODFOR <em>seconds</em></a></strong><br />
+</dt>
 <dd>
-<p>Specify the number of seconds this page should remain valid. This will prompt
+Specify the number of seconds this page should remain valid. This will prompt
 the rrdcgi to output a Last-Modified, an Expire and if the number of
-seconds is <em>negative</em> a Refresh header.</p>
+seconds is <em>negative</em> a Refresh header.
 </dd>
-<dt><strong><a name="rrd_include_filename" class="item">RRD::INCLUDE <em>filename</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3ainclude_filename">RRD::INCLUDE <em>filename</em></a></strong><br />
+</dt>
 <dd>
-<p>Include the contents of the specified file into the page returned from the cgi.</p>
+Include the contents of the specified file into the page returned from the cgi.
+</dd>
+<p></p>
+<dt><strong><a name="item_rrd_3a_3asetenv_variable_value">RRD::SETENV <em>variable</em> <em>value</em></a></strong><br />
+</dt>
+<dd>
+If you want to present your graphs in another time zone than your own, you
+could use
 </dd>
-<dt><strong><a name="rrd_setenv_variable_value" class="item">RRD::SETENV <em>variable</em> <em>value</em></a></strong></dt>
-
 <dd>
-<p>If you want to present your graphs in another time zone than your own, you
-could use</p>
 <pre>
  &lt;RRD::SETENV TZ UTC&gt;</pre>
+</dd>
+<dd>
 <p>to make sure everything is presented in Universal Time. Note that the
 values permitted to TZ depend on your OS.</p>
 </dd>
-<dt><strong><a name="rrd_setvar_variable_value" class="item">RRD::SETVAR <em>variable</em> <em>value</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3asetvar_variable_value">RRD::SETVAR <em>variable</em> <em>value</em></a></strong><br />
+</dt>
 <dd>
-<p>Analog to SETENV but for local variables.</p>
+Analog to SETENV but for local variables.
 </dd>
-<dt><strong><a name="rrd_getvar_variable" class="item">RRD::GETVAR <em>variable</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3agetvar_variable">RRD::GETVAR <em>variable</em></a></strong><br />
+</dt>
 <dd>
-<p>Analog to GETENV but for local variables.</p>
+Analog to GETENV but for local variables.
 </dd>
-<dt><strong><a name="rrd_time_last_rrd_file_strftime_format" class="item">RRD::TIME::LAST <em>rrd-file</em> <em>strftime-format</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3atime_3a_3alast_rrd_2dfile_strftime_2dform">RRD::TIME::LAST <em>rrd-file</em> <em>strftime-format</em></a></strong><br />
+</dt>
 <dd>
-<p>This gets replaced by the last modification time of the selected RRD. The
-time is <em>strftime</em>-formatted with the string specified in the second argument.</p>
+This gets replaced by the last modification time of the selected RRD. The
+time is <em>strftime</em>-formatted with the string specified in the second argument.
+</dd>
+<p></p>
+<dt><strong><a name="item_rrd_3a_3atime_3a_3anow_strftime_2dformat">RRD::TIME::NOW <em>strftime-format</em></a></strong><br />
+</dt>
+<dd>
+This gets replaced by the current time of day. The time is
+<em>strftime</em>-formatted with the string specified in the argument.
 </dd>
-<dt><strong><a name="rrd_time_now_strftime_format" class="item">RRD::TIME::NOW <em>strftime-format</em></a></strong></dt>
-
 <dd>
-<p>This gets replaced by the current time of day. The time is
-<em>strftime</em>-formatted with the string specified in the argument.</p>
 <p>Note that if you return : (colons) from your strftime format you may
 have to escape them using \ if the time is to be used as an argument
 to a GRAPH command.</p>
 </dd>
-<dt><strong><a name="rrd_time_strftime_start_end_start_spec_end_spec_strftime_format" class="item">RRD::TIME::STRFTIME <em>START|END</em> <em>start-spec</em> <em>end-spec</em> <em>strftime-format</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3atime_3a_3astrftime_start_7cend_start_2dsp">RRD::TIME::STRFTIME <em>START|END</em> <em>start-spec</em> <em>end-spec</em> <em>strftime-format</em></a></strong><br />
+</dt>
 <dd>
-<p>This gets replaced by a strftime-formatted time using the format
+This gets replaced by a strftime-formatted time using the format
 <em>strftime-format</em> on either <em>start-spec</em> or <em>end-spec</em> depending on
 whether <em>START</em> or <em>END</em> is specified.  Both <em>start-spec</em> and <em>end-spec</em>
 must be supplied as either could be relative to the other.  This is intended
 to allow pretty titles on graphs with times that are easier for non RRDtool
-folks to figure out than &quot;-2weeks&quot;.</p>
+folks to figure out than ``-2weeks''.
+</dd>
+<dd>
 <p>Note that again, if you return : (colon) from your strftime format,
 you may have to escape them using \ if the time is to be used as an
 argument to a GRAPH command.</p>
 </dd>
-<dt><strong><a name="rrd_graph_rrdgraph_arguments" class="item">RRD::GRAPH <em>rrdgraph arguments</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3agraph_rrdgraph_arguments">RRD::GRAPH <em>rrdgraph arguments</em></a></strong><br />
+</dt>
 <dd>
-<p>This tag creates the RRD graph defined by its argument and then is
+This tag creates the RRD graph defined by its argument and then is
 replaced by an appropriate &lt;IMG ... &gt; tag referring to the graph.
 The <strong>--lazy</strong> option in RRD graph can be used to make sure that graphs
 are only regenerated when they are out of date. The arguments
-to the <strong>RRD::GRAPH</strong> tag work as described in the <strong>rrdgraph</strong> manual page.</p>
+to the <strong>RRD::GRAPH</strong> tag work as described in the <strong>rrdgraph</strong> manual page.
+</dd>
+<dd>
 <p>Use the <strong>--lazy</strong> option in your RRD::GRAPH tags, to reduce the load
 on your server. This option makes sure that graphs are only regenerated when
 the old ones are out of date.</p>
+</dd>
+<dd>
 <p>If you do not specify your own <strong>--imginfo</strong> format, the following will
 be used:</p>
+</dd>
+<dd>
 <pre>
  &lt;IMG SRC=&quot;%s&quot; WIDTH=&quot;%lu&quot; HEIGHT=&quot;%lu&quot;&gt;</pre>
+</dd>
+<dd>
 <p>Note that %s stands for the filename part of the graph generated, all
 directories given in the PNG file argument will get dropped.</p>
 </dd>
-<dt><strong><a name="rrd_print_number" class="item">RRD::PRINT <em>number</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3aprint_number">RRD::PRINT <em>number</em></a></strong><br />
+</dt>
 <dd>
-<p>If the preceding  <strong>RRD::GRAPH</strong> tag contained and <strong>PRINT</strong> arguments,
+If the preceding  <strong>RRD::GRAPH</strong> tag contained and <strong>PRINT</strong> arguments,
 then you can access their output with this tag. The <em>number</em> argument refers to the
-number of the <strong>PRINT</strong> argument. This first <strong>PRINT</strong> has <em>number</em> 0.</p>
+number of the <strong>PRINT</strong> argument. This first <strong>PRINT</strong> has <em>number</em> 0.
 </dd>
-<dt><strong><a name="rrd_internal_var" class="item">RRD::INTERNAL &lt;var&gt;</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrd_3a_3ainternal__3cvar_3e">RRD::INTERNAL &lt;var&gt;</a></strong><br />
+</dt>
 <dd>
-<p>This tag gets replaced by an internal var. Currently these vars are known:
+This tag gets replaced by an internal var. Currently these vars are known:
 VERSION, COMPILETIME.
-These vars represent the compiled-in values.</p>
+These vars represent the compiled-in values.
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index 5920534b05b7f3e16d4c67743f4986a730a6301d..ee0ba0a50d57f14e7c77df77585bf53df5e0c171 100644 (file)
@@ -12,8 +12,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        r\brr\brd\bdc\bcg\bgi\bi is a sort of very limited script interpreter. Its purpose is to
        run as a cgi-program and parse a web page template containing special
        <RRD:: tags. r\brr\brd\bdc\bcg\bgi\bi will interpret and act according to these tags.  In
-       the end it will printout a web page including the necessary CGI
-       headers.
+       the end it will printout a web page including the necessary CGI head-
+       ers.
 
        r\brr\brd\bdc\bcg\bgi\bi parses the contents of the template in 3 steps. In each step it
        looks only for a subset of tags. This allows nesting of tags.
@@ -24,7 +24,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        -\b--\b-f\bfi\bil\blt\bte\ber\br
                Assume that rrdcgi is run as a filter and not as a cgi.
 
-   K\bKe\bey\byw\bwo\bor\brd\bds\bs
+       K\bKe\bey\byw\bwo\bor\brd\bds\bs
+
+
        RRD::CV _\bn_\ba_\bm_\be
                Inserts the CGI variable of the given name.
 
@@ -87,13 +89,13 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                as an argument to a GRAPH command.
 
        RRD::TIME::STRFTIME _\bS_\bT_\bA_\bR_\bT_\b|_\bE_\bN_\bD _\bs_\bt_\ba_\br_\bt_\b-_\bs_\bp_\be_\bc _\be_\bn_\bd_\b-_\bs_\bp_\be_\bc _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be_\b-_\bf_\bo_\br_\bm_\ba_\bt
-               This gets replaced by a strftime-formatted time using the
-               format _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be_\b-_\bf_\bo_\br_\bm_\ba_\bt on either _\bs_\bt_\ba_\br_\bt_\b-_\bs_\bp_\be_\bc or _\be_\bn_\bd_\b-_\bs_\bp_\be_\bc
-               depending on whether _\bS_\bT_\bA_\bR_\bT or _\bE_\bN_\bD is specified.  Both _\bs_\bt_\ba_\br_\bt_\b-
-               _\bs_\bp_\be_\band _\be_\bn_\bd_\b-_\bs_\bp_\be_\bc must be supplied as either could be relative
-               to the other.  This is intended to allow pretty titles on
-               graphs with times that are easier for non RRDtool folks to
-               figure out than "-2weeks".
+               This gets replaced by a strftime-formatted time using the for-
+               mat _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be_\b-_\bf_\bo_\br_\bm_\ba_\bt on either _\bs_\bt_\ba_\br_\bt_\b-_\bs_\bp_\be_\bc or _\be_\bn_\bd_\b-_\bs_\bp_\be_\bc depending
+               on whether _\bS_\bT_\bA_\bR_\bT or _\bE_\bN_\bD is specified.  Both _\bs_\bt_\ba_\br_\bt_\b-_\bs_\bp_\be_\bc and _\be_\bn_\bd_\b-
+               _\bs_\bp_\be_\bmust be supplied as either could be relative to the other.
+               This is intended to allow pretty titles on graphs with times
+               that are easier for non RRDtool folks to figure out than
+               "-2weeks".
 
                Note that again, if you return : (colon) from your strftime
                format, you may have to escape them using \ if the time is to
@@ -104,8 +106,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                is replaced by an appropriate <IMG ... > tag referring to the
                graph.  The -\b--\b-l\bla\baz\bzy\by option in RRD graph can be used to make sure
                that graphs are only regenerated when they are out of date. The
-               arguments to the R\bRR\bRD\bD:\b::\b:G\bGR\bRA\bAP\bPH\bH tag work as described in the
-               r\brr\brd\bdg\bgr\bra\bap\bph\bh manual page.
+               arguments to the R\bRR\bRD\bD:\b::\b:G\bGR\bRA\bAP\bPH\bH tag work as described in the r\brr\brd\bd-\b-
+               g\bgr\bra\bap\bph\bh manual page.
 
                Use the -\b--\b-l\bla\baz\bzy\by option in your RRD::GRAPH tags, to reduce the
                load on your server. This option makes sure that graphs are
@@ -116,9 +118,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
                 <IMG SRC="%s" WIDTH="%lu" HEIGHT="%lu">
 
-               Note that %s stands for the filename part of the graph
-               generated, all directories given in the PNG file argument will
-               get dropped.
+               Note that %s stands for the filename part of the graph gener-
+               ated, all directories given in the PNG file argument will get
+               dropped.
 
        RRD::PRINT _\bn_\bu_\bm_\bb_\be_\br
                If the preceding  R\bRR\bRD\bD:\b::\b:G\bGR\bRA\bAP\bPH\bH tag contained and P\bPR\bRI\bIN\bNT\bT arguments,
@@ -194,12 +196,12 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bE 3\b3
 
        Note 1: Replace /.../ with the relevant directories
 
-       Note 2: The SRC=/.../pngs should be paths from the view of the
-       webserver/browser
+       Note 2: The SRC=/.../pngs should be paths from the view of the web-
+       server/browser
 
 A\bAU\bUT\bTH\bHO\bOR\bR
        Tobias Oetiker <tobi@oetiker.ch>
 
 
 
-1.3.8                             2008-12-22                         RRDCGI(1)
+1.3.99909060808                   2008-12-22                         RRDCGI(1)
index 27b1bec70a1592144bdc002e9a7081f1dc7d98c5..501076229000429631893465defb0ec60613d6ff 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDCREATE 1"
-.TH RRDCREATE 1 "2008-06-11" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDCREATE 1 "2008-06-11" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdcreate \- Set up a new Round Robin Database
 .SH "SYNOPSIS"
@@ -143,12 +144,12 @@ rrdcreate \- Set up a new Round Robin Database
 The create function of RRDtool lets you set up new Round Robin
 Database (\fB\s-1RRD\s0\fR) files.  The file is created at its final, full size
 and filled with \fI*UNKNOWN*\fR data.
-.SS "\fIfilename\fP"
+.Sh "\fIfilename\fP"
 .IX Subsection "filename"
 The name of the \fB\s-1RRD\s0\fR you want to create. \fB\s-1RRD\s0\fR files should end
 with the extension \fI.rrd\fR. However, \fBRRDtool\fR will accept any
 filename.
-.SS "\fB\-\-start\fP|\fB\-b\fP \fIstart time\fP (default: now \- 10s)"
+.Sh "\fB\-\-start\fP|\fB\-b\fP \fIstart time\fP (default: now \- 10s)"
 .IX Subsection "--start|-b start time (default: now - 10s)"
 Specifies the time in seconds since 1970\-01\-01 \s-1UTC\s0 when the first
 value should be added to the \fB\s-1RRD\s0\fR. \fBRRDtool\fR will not accept
@@ -156,11 +157,11 @@ any data timed before or at the time specified.
 .PP
 See also AT-STYLE \s-1TIME\s0 \s-1SPECIFICATION\s0 section in the
 \&\fIrrdfetch\fR documentation for other ways to specify time.
-.SS "\fB\-\-step\fP|\fB\-s\fP \fIstep\fP (default: 300 seconds)"
+.Sh "\fB\-\-step\fP|\fB\-s\fP \fIstep\fP (default: 300 seconds)"
 .IX Subsection "--step|-s step (default: 300 seconds)"
 Specifies the base interval in seconds with which data will be fed
 into the \fB\s-1RRD\s0\fR.
-.SS "\fB\s-1DS:\s0\fP\fIds-name\fP\fB:\fP\fI\s-1DST\s0\fP\fB:\fP\fIdst arguments\fP"
+.Sh "\fB\s-1DS:\s0\fP\fIds-name\fP\fB:\fP\fI\s-1DST\s0\fP\fB:\fP\fIdst arguments\fP"
 .IX Subsection "DS:ds-name:DST:dst arguments"
 A single \fB\s-1RRD\s0\fR can accept input from several data sources (\fB\s-1DS\s0\fR),
 for example incoming and outgoing traffic on a specific communication
@@ -267,7 +268,7 @@ the \s-1RPN\s0 expression, the \s-1COMPUTE\s0 data source may only refer to the
 names of data source listed previously in the create command. This is
 similar to the restriction that \fB\s-1CDEF\s0\fRs must refer only to \fB\s-1DEF\s0\fRs
 and \fB\s-1CDEF\s0\fRs previously defined in the same graph command.
-.SS "\fB\s-1RRA:\s0\fP\fI\s-1CF\s0\fP\fB:\fP\fIcf arguments\fP"
+.Sh "\fB\s-1RRA:\s0\fP\fI\s-1CF\s0\fP\fB:\fP\fIcf arguments\fP"
 .IX Subsection "RRA:CF:cf arguments"
 The purpose of an \fB\s-1RRD\s0\fR is to store data in the round robin archives
 (\fB\s-1RRA\s0\fR). An archive consists of a number of data values or statistics for
@@ -280,7 +281,7 @@ data point\fR.
 The data is also processed with the consolidation function (\fI\s-1CF\s0\fR) of
 the archive. There are several consolidation functions that
 consolidate primary data points via an aggregate function: \fB\s-1AVERAGE\s0\fR,
-\&\fB\s-1MIN\s0\fR, \fB\s-1MAX\s0\fR, \fB\s-1LAST\s0\fR.
+\&\fB\s-1MIN\s0\fR, \fB\s-1MAX\s0\fR, \fB\s-1LAST\s0\fR. 
 .IP "\s-1AVERAGE\s0" 4
 .IX Item "AVERAGE"
 the average of the data points is stored.
@@ -492,10 +493,10 @@ sample. An extreme example of this might be a \*(L"step\*(R" of 5 minutes and a
 result in all the PDPs for that entire day period being set to the
 same average rate. \fI\-\- Don Baarda <don.baarda@baesystems.com>\fR
 .PP
-.Vb 10
+.Vb 35
 \&       time|
 \&       axis|
-\& begin_\|_|00|
+\& begin__|00|
 \&        |01|
 \&       u|02|\-\-\-\-* sample1, restart "hb"\-timer
 \&       u|03|   /
@@ -523,7 +524,7 @@ same average rate. \fI\-\- Don Baarda <don.baarda@baesystems.com>\fR
 \&        |25|   /
 \&        |26|  /
 \&        |27|\-\-\-\-* sample7, restart "hb"
-\& step2_\|_|28|   /
+\& step2__|28|   /
 \&        |22|  /
 \&        |23|\-\-\-\-* sample8, restart "hb", create "pdp" for step1, create "cdp" 
 \&        |24|   /
@@ -563,7 +564,7 @@ plots continuous data, and as such is not appropriate for plotting
 absolute amounts as for example \*(L"total bytes\*(R" sent and received in a
 router. What you probably want is plot rates that you can scale to
 bytes/hour, for example, or plot absolute amounts with another tool
-that draws bar-plots, where the delta-time is clear on the plot for
+that draws bar\-plots, where the delta-time is clear on the plot for
 each point (such that when you read the graph you see for example \s-1GB\s0
 on the y axis, days on the x axis and one bar for each day).
 .SH "EXAMPLE"
index adc0755016ed333275f93346144a3470fcd96ee6..42f0aa4210b5ca9d214f0031913811772cf58365 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdcreate</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <ul>
 
                <li><a href="#filename"><em>filename</em></a></li>
-               <li><a href="#__start__b_start_time__default__now___10s_"><strong>-start</strong>|<strong>-b</strong> <em>start time</em> (default: now - 10s)</a></li>
-               <li><a href="#__step__s_step__default__300_seconds_"><strong>-step</strong>|<strong>-s</strong> <em>step</em> (default: 300 seconds)</a></li>
-               <li><a href="#ds_ds_name_dst_dst_arguments"><strong>DS:</strong><em>ds-name</em><strong>:</strong><em>DST</em><strong>:</strong><em>dst arguments</em></a></li>
+               <li><a href="#start_b_start_time__default__now__10s_"><strong>-start</strong>|<strong>-b</strong> <em>start time</em> (default: now - 10s)</a></li>
+               <li><a href="#step_s_step__default__300_seconds_"><strong>-step</strong>|<strong>-s</strong> <em>step</em> (default: 300 seconds)</a></li>
+               <li><a href="#ds_dsname_dst_dst_arguments"><strong>DS:</strong><em>ds-name</em><strong>:</strong><em>DST</em><strong>:</strong><em>dst arguments</em></a></li>
                <li><a href="#rra_cf_cf_arguments"><strong>RRA:</strong><em>CF</em><strong>:</strong><em>cf arguments</em></a></li>
        </ul>
 
-       <li><a href="#aberrant_behavior_detection_with_holt_winters_forecasting">Aberrant Behavior Detection with Holt-Winters Forecasting</a></li>
+       <li><a href="#aberrant_behavior_detection_with_holtwinters_forecasting">Aberrant Behavior Detection with Holt-Winters Forecasting</a></li>
        <li><a href="#the_heartbeat_and_the_step">The HEARTBEAT and the STEP</a></li>
        <li><a href="#how_to_measure">HOW TO MEASURE</a></li>
        <li><a href="#example">EXAMPLE</a></li>
        <li><a href="#example_3">EXAMPLE 3</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -68,11 +60,11 @@ and filled with <em>*UNKNOWN*</em> data.</p>
 </p>
 <h2><a name="filename"><em>filename</em></a></h2>
 <p>The name of the <strong>RRD</strong> you want to create. <strong>RRD</strong> files should end
-with the extension <em class="file">.rrd</em>. However, <strong>RRDtool</strong> will accept any
+with the extension <em>.rrd</em>. However, <strong>RRDtool</strong> will accept any
 filename.</p>
 <p>
 </p>
-<h2><a name="__start__b_start_time__default__now___10s_"><strong>--start</strong>|<strong>-b</strong> <em>start time</em> (default: now - 10s)</a></h2>
+<h2><a name="start_b_start_time__default__now__10s_"><strong>--start</strong>|<strong>-b</strong> <em>start time</em> (default: now - 10s)</a></h2>
 <p>Specifies the time in seconds since 1970-01-01 UTC when the first
 value should be added to the <strong>RRD</strong>. <strong>RRDtool</strong> will not accept
 any data timed before or at the time specified.</p>
@@ -80,12 +72,12 @@ any data timed before or at the time specified.</p>
 <em>rrdfetch</em> documentation for other ways to specify time.</p>
 <p>
 </p>
-<h2><a name="__step__s_step__default__300_seconds_"><strong>--step</strong>|<strong>-s</strong> <em>step</em> (default: 300 seconds)</a></h2>
+<h2><a name="step_s_step__default__300_seconds_"><strong>--step</strong>|<strong>-s</strong> <em>step</em> (default: 300 seconds)</a></h2>
 <p>Specifies the base interval in seconds with which data will be fed
 into the <strong>RRD</strong>.</p>
 <p>
 </p>
-<h2><a name="ds_ds_name_dst_dst_arguments"><strong>DS:</strong><em>ds-name</em><strong>:</strong><em>DST</em><strong>:</strong><em>dst arguments</em></a></h2>
+<h2><a name="ds_dsname_dst_dst_arguments"><strong>DS:</strong><em>ds-name</em><strong>:</strong><em>DST</em><strong>:</strong><em>dst arguments</em></a></h2>
 <p>A single <strong>RRD</strong> can accept input from several data sources (<strong>DS</strong>),
 for example incoming and outgoing traffic on a specific communication
 line. With the <strong>DS</strong> configuration option you must define some basic
@@ -100,43 +92,53 @@ DERIVE, and ABSOLUTE the format for a data source entry is:</p>
 <p>For COMPUTE data sources, the format is:</p>
 <p><strong>DS:</strong><em>ds-name</em><strong>:</strong><em>COMPUTE</em><strong>:</strong><em>rpn-expression</em></p>
 <p>In order to decide which data source type to use, review the
-definitions that follow. Also consult the section on &quot;HOW TO MEASURE&quot;
+definitions that follow. Also consult the section on ``HOW TO MEASURE''
 for further insight.</p>
 <dl>
-<dt><strong><a name="gauge" class="item"><strong>GAUGE</strong></a></strong></dt>
-
+<dt><strong><a name="item_gauge"><strong>GAUGE</strong></a></strong><br />
+</dt>
 <dd>
-<p>is for things like temperatures or number of people in a room or the
-value of a RedHat share.</p>
+is for things like temperatures or number of people in a room or the
+value of a RedHat share.
 </dd>
-<dt><strong><a name="counter" class="item"><strong>COUNTER</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_counter"><strong>COUNTER</strong></a></strong><br />
+</dt>
 <dd>
-<p>is for continuous incrementing counters like the ifInOctets counter in
+is for continuous incrementing counters like the ifInOctets counter in
 a router. The <strong>COUNTER</strong> data source assumes that the counter never
 decreases, except when a counter overflows.  The update function takes
 the overflow into account.  The counter is stored as a per-second
 rate. When the counter overflows, RRDtool checks if the overflow
 happened at the 32bit or 64bit border and acts accordingly by adding
-an appropriate value to the result.</p>
+an appropriate value to the result.
 </dd>
-<dt><strong><a name="derive" class="item"><strong>DERIVE</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_derive"><strong>DERIVE</strong></a></strong><br />
+</dt>
 <dd>
-<p>will store the derivative of the line going from the last to the
+will store the derivative of the line going from the last to the
 current value of the data source. This can be useful for gauges, for
 example, to measure the rate of people entering or leaving a
 room. Internally, derive works exactly like COUNTER but without
 overflow checks. So if your counter does not reset at 32 or 64 bit you
-might want to use DERIVE and combine it with a MIN value of 0.</p>
+might want to use DERIVE and combine it with a MIN value of 0.
+</dd>
+<dd>
 <p><strong>NOTE on COUNTER vs DERIVE</strong></p>
+</dd>
+<dd>
 <p>by Don Baarda &lt;<a href="mailto:don.baarda@baesystems.com">don.baarda@baesystems.com</a>&gt;</p>
+</dd>
+<dd>
 <p>If you cannot tolerate ever mistaking the occasional counter reset for a
-legitimate counter wrap, and would prefer &quot;Unknowns&quot; for all legitimate
+legitimate counter wrap, and would prefer ``Unknowns'' for all legitimate
 counter wraps and resets, always use DERIVE with min=0. Otherwise, using
 COUNTER with a suitable max will return correct values for all legitimate
-counter wraps, mark some counter resets as &quot;Unknown&quot;, but can mistake some
+counter wraps, mark some counter resets as ``Unknown'', but can mistake some
 counter resets for a legitimate counter wrap.</p>
+</dd>
+<dd>
 <p>For a 5 minute step and 32-bit counter, the probability of mistaking a
 counter reset for a legitimate wrap is arguably about 0.8% per 1Mbps of
 maximum bandwidth. Note that this equates to 80% for 100Mbps interfaces, so
@@ -145,28 +147,30 @@ probably preferable. If you are using a 64bit counter, just about any max
 setting will eliminate the possibility of mistaking a reset for a counter
 wrap.</p>
 </dd>
-<dt><strong><a name="absolute" class="item"><strong>ABSOLUTE</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_absolute"><strong>ABSOLUTE</strong></a></strong><br />
+</dt>
 <dd>
-<p>is for counters which get reset upon reading. This is used for fast counters
+is for counters which get reset upon reading. This is used for fast counters
 which tend to overflow. So instead of reading them normally you reset them
 after every read to make sure you have a maximum time available before the
 next overflow. Another usage is for things you count like number of messages
-since the last update.</p>
+since the last update.
 </dd>
-<dt><strong><a name="compute" class="item"><strong>COMPUTE</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_compute"><strong>COMPUTE</strong></a></strong><br />
+</dt>
 <dd>
-<p>is for storing the result of a formula applied to other data sources
+is for storing the result of a formula applied to other data sources
 in the <strong>RRD</strong>. This data source is not supplied a value on update, but
 rather its Primary Data Points (PDPs) are computed from the PDPs of
 the data sources according to the rpn-expression that defines the
 formula. Consolidation functions are then applied normally to the PDPs
 of the COMPUTE data source (that is the rpn-expression is only applied
 to generate PDPs). In database software, such data sets are referred
-to as &quot;virtual&quot; or &quot;computed&quot; columns.</p>
+to as ``virtual'' or ``computed'' columns.
 </dd>
-</dl>
+<p></p></dl>
 <p><em>heartbeat</em> defines the maximum number of seconds that may pass
 between two updates of this data source before the value of the
 data source is assumed to be <em>*UNKNOWN*</em>.</p>
@@ -203,27 +207,30 @@ the archive. There are several consolidation functions that
 consolidate primary data points via an aggregate function: <strong>AVERAGE</strong>,
 <strong>MIN</strong>, <strong>MAX</strong>, <strong>LAST</strong>.</p>
 <dl>
-<dt><strong><a name="average" class="item">AVERAGE</a></strong></dt>
-
+<dt><strong><a name="item_average">AVERAGE</a></strong><br />
+</dt>
 <dd>
-<p>the average of the data points is stored.</p>
+the average of the data points is stored.
 </dd>
-<dt><strong><a name="min" class="item">MIN</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_min">MIN</a></strong><br />
+</dt>
 <dd>
-<p>the smallest of the data points is stored.</p>
+the smallest of the data points is stored.
 </dd>
-<dt><strong><a name="max" class="item">MAX</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_max">MAX</a></strong><br />
+</dt>
 <dd>
-<p>the largest of the data points is stored.</p>
+the largest of the data points is stored.
 </dd>
-<dt><strong><a name="last" class="item">LAST</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_last">LAST</a></strong><br />
+</dt>
 <dd>
-<p>the last data points is used.</p>
+the last data points is used.
 </dd>
-</dl>
+<p></p></dl>
 <p>Note that data aggregation inevitably leads to loss of precision and
 information. The trick is to pick the aggregate function such that the
 <em>interesting</em> properties of your data is kept across the aggregation
@@ -242,31 +249,30 @@ Obviously, this has to be greater than zero.</p>
 <p>
 </p>
 <hr />
-<h1><a name="aberrant_behavior_detection_with_holt_winters_forecasting">Aberrant Behavior Detection with Holt-Winters Forecasting</a></h1>
+<h1><a name="aberrant_behavior_detection_with_holtwinters_forecasting">Aberrant Behavior Detection with Holt-Winters Forecasting</a></h1>
 <p>In addition to the aggregate functions, there are a set of specialized
 functions that enable <strong>RRDtool</strong> to provide data smoothing (via the
 Holt-Winters forecasting algorithm), confidence bands, and the
 flagging aberrant behavior in the data source time series:</p>
 <ul>
-<li>
-<p><strong>RRA:</strong><em>HWPREDICT</em><strong>:</strong><em>rows</em><strong>:</strong><em>alpha</em><strong>:</strong><em>beta</em><strong>:</strong><em>seasonal period</em>[<strong>:</strong><em>rra-num</em>]</p>
-</li>
-<li>
-<p><strong>RRA:</strong><em>MHWPREDICT</em><strong>:</strong><em>rows</em><strong>:</strong><em>alpha</em><strong>:</strong><em>beta</em><strong>:</strong><em>seasonal period</em>[<strong>:</strong><em>rra-num</em>]</p>
-</li>
-<li>
-<p><strong>RRA:</strong><em>SEASONAL</em><strong>:</strong><em>seasonal period</em><strong>:</strong><em>gamma</em><strong>:</strong><em>rra-num</em>[<strong>:smoothing-window=</strong><em>fraction</em>]</p>
-</li>
-<li>
-<p><strong>RRA:</strong><em>DEVSEASONAL</em><strong>:</strong><em>seasonal period</em><strong>:</strong><em>gamma</em><strong>:</strong><em>rra-num</em>[<strong>:smoothing-window=</strong><em>fraction</em>]</p>
-</li>
-<li>
-<p><strong>RRA:</strong><em>DEVPREDICT</em><strong>:</strong><em>rows</em><strong>:</strong><em>rra-num</em></p>
-</li>
-<li>
-<p><strong>RRA:</strong><em>FAILURES</em><strong>:</strong><em>rows</em><strong>:</strong><em>threshold</em><strong>:</strong><em>window length</em><strong>:</strong><em>rra-num</em></p>
-</li>
-</ul>
+<li></li>
+<strong>RRA:</strong><em>HWPREDICT</em><strong>:</strong><em>rows</em><strong>:</strong><em>alpha</em><strong>:</strong><em>beta</em><strong>:</strong><em>seasonal period</em>[<strong>:</strong><em>rra-num</em>]
+<p></p>
+<li></li>
+<strong>RRA:</strong><em>MHWPREDICT</em><strong>:</strong><em>rows</em><strong>:</strong><em>alpha</em><strong>:</strong><em>beta</em><strong>:</strong><em>seasonal period</em>[<strong>:</strong><em>rra-num</em>]
+<p></p>
+<li></li>
+<strong>RRA:</strong><em>SEASONAL</em><strong>:</strong><em>seasonal period</em><strong>:</strong><em>gamma</em><strong>:</strong><em>rra-num</em>[<strong>:smoothing-window=</strong><em>fraction</em>]
+<p></p>
+<li></li>
+<strong>RRA:</strong><em>DEVSEASONAL</em><strong>:</strong><em>seasonal period</em><strong>:</strong><em>gamma</em><strong>:</strong><em>rra-num</em>[<strong>:smoothing-window=</strong><em>fraction</em>]
+<p></p>
+<li></li>
+<strong>RRA:</strong><em>DEVPREDICT</em><strong>:</strong><em>rows</em><strong>:</strong><em>rra-num</em>
+<p></p>
+<li></li>
+<strong>RRA:</strong><em>FAILURES</em><strong>:</strong><em>rows</em><strong>:</strong><em>threshold</em><strong>:</strong><em>window length</em><strong>:</strong><em>rra-num</em>
+<p></p></ul>
 <p>These <strong>RRAs</strong> differ from the true consolidation functions in several ways.
 First, each of the <strong>RRA</strong>s is updated once for every primary data point.
 Second, these <strong>RRAs</strong> are interdependent. To generate real-time confidence
@@ -360,22 +366,21 @@ index in the order of <strong>RRA</strong> creation (that is, the order they app
 in the <em>create</em> command). The dependent <strong>RRA</strong> for each <strong>RRA</strong>
 requiring the <em>rra-num</em> argument is listed here:</p>
 <ul>
-<li>
-<p>HWPREDICT <em>rra-num</em> is the index of the SEASONAL <strong>RRA</strong>.</p>
-</li>
-<li>
-<p>SEASONAL <em>rra-num</em> is the index of the HWPREDICT <strong>RRA</strong>.</p>
-</li>
-<li>
-<p>DEVPREDICT <em>rra-num</em> is the index of the DEVSEASONAL <strong>RRA</strong>.</p>
-</li>
-<li>
-<p>DEVSEASONAL <em>rra-num</em> is the index of the HWPREDICT <strong>RRA</strong>.</p>
-</li>
-<li>
-<p>FAILURES <em>rra-num</em> is the index of the DEVSEASONAL <strong>RRA</strong>.</p>
-</li>
-</ul>
+<li></li>
+HWPREDICT <em>rra-num</em> is the index of the SEASONAL <strong>RRA</strong>.
+<p></p>
+<li></li>
+SEASONAL <em>rra-num</em> is the index of the HWPREDICT <strong>RRA</strong>.
+<p></p>
+<li></li>
+DEVPREDICT <em>rra-num</em> is the index of the DEVSEASONAL <strong>RRA</strong>.
+<p></p>
+<li></li>
+DEVSEASONAL <em>rra-num</em> is the index of the HWPREDICT <strong>RRA</strong>.
+<p></p>
+<li></li>
+FAILURES <em>rra-num</em> is the index of the DEVSEASONAL <strong>RRA</strong>.
+<p></p></ul>
 <p><em>threshold</em> is the minimum number of violations (observed values outside
 the confidence bounds) within a window that constitutes a failure. If the
 FAILURES <strong>RRA</strong> is implicitly created, the default value is 7.</p>
@@ -392,28 +397,28 @@ default value is 9.</p>
 It may help you to sort out why all this *UNKNOWN* data is popping
 up in your databases:</p>
 <p>RRDtool gets fed samples/updates at arbitrary times. From these it builds Primary
-Data Points (PDPs) on every &quot;step&quot; interval. The PDPs are
+Data Points (PDPs) on every ``step'' interval. The PDPs are
 then accumulated into the RRAs.</p>
-<p>The &quot;heartbeat&quot; defines the maximum acceptable interval between
-samples/updates. If the interval between samples is less than &quot;heartbeat&quot;,
+<p>The ``heartbeat'' defines the maximum acceptable interval between
+samples/updates. If the interval between samples is less than ``heartbeat'',
 then an average rate is calculated and applied for that interval. If
-the interval between samples is longer than &quot;heartbeat&quot;, then that
-entire interval is considered &quot;unknown&quot;. Note that there are other
-things that can make a sample interval &quot;unknown&quot;, such as the rate
+the interval between samples is longer than ``heartbeat'', then that
+entire interval is considered ``unknown''. Note that there are other
+things that can make a sample interval ``unknown'', such as the rate
 exceeding limits, or a sample that was explicitly marked as unknown.</p>
-<p>The known rates during a PDP's &quot;step&quot; interval are used to calculate
-an average rate for that PDP. If the total &quot;unknown&quot; time accounts for
-more than <strong>half</strong> the &quot;step&quot;, the entire PDP is marked
-as &quot;unknown&quot;. This means that a mixture of known and &quot;unknown&quot; sample
-times in a single PDP &quot;step&quot; may or may not add up to enough &quot;known&quot;
+<p>The known rates during a PDP's ``step'' interval are used to calculate
+an average rate for that PDP. If the total ``unknown'' time accounts for
+more than <strong>half</strong> the ``step'', the entire PDP is marked
+as ``unknown''. This means that a mixture of known and ``unknown'' sample
+times in a single PDP ``step'' may or may not add up to enough ``known''
 time to warrent for a known PDP.</p>
-<p>The &quot;heartbeat&quot; can be short (unusual) or long (typical) relative to
-the &quot;step&quot; interval between PDPs. A short &quot;heartbeat&quot; means you
+<p>The ``heartbeat'' can be short (unusual) or long (typical) relative to
+the ``step'' interval between PDPs. A short ``heartbeat'' means you
 require multiple samples per PDP, and if you don't get them mark the
-PDP unknown. A long heartbeat can span multiple &quot;steps&quot;, which means
+PDP unknown. A long heartbeat can span multiple ``steps'', which means
 it is acceptable to have multiple PDPs calculated from a single
-sample. An extreme example of this might be a &quot;step&quot; of 5 minutes and a
-&quot;heartbeat&quot; of one day, in which case a single sample every day will
+sample. An extreme example of this might be a ``step'' of 5 minutes and a
+``heartbeat'' of one day, in which case a single sample every day will
 result in all the PDPs for that entire day period being set to the
 same average rate. <em>-- Don Baarda &lt;<a href="mailto:don.baarda@baesystems.com">don.baarda@baesystems.com</a>&gt;</em></p>
 <pre>
@@ -459,19 +464,20 @@ same average rate. <em>-- Don Baarda &lt;<a href="mailto:don.baarda@baesystems.c
 <h1><a name="how_to_measure">HOW TO MEASURE</a></h1>
 <p>Here are a few hints on how to measure:</p>
 <dl>
-<dt><strong><a name="temperature" class="item">Temperature</a></strong></dt>
-
+<dt><strong><a name="item_temperature">Temperature</a></strong><br />
+</dt>
 <dd>
-<p>Usually you have some type of meter you can read to get the temperature.
+Usually you have some type of meter you can read to get the temperature.
 The temperature is not really connected with a time. The only connection is
 that the temperature reading happened at a certain time. You can use the
 <strong>GAUGE</strong> data source type for this. RRDtool will then record your reading
-together with the time.</p>
+together with the time.
 </dd>
-<dt><strong><a name="mail_messages" class="item">Mail Messages</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_mail_messages">Mail Messages</a></strong><br />
+</dt>
 <dd>
-<p>Assume you have a method to count the number of messages transported by
+Assume you have a method to count the number of messages transported by
 your mailserver in a certain amount of time, giving you data like '5
 messages in the last 65 seconds'. If you look at the count of 5 like an
 <strong>ABSOLUTE</strong> data type you can simply update the RRD with the number 5 and the
@@ -480,24 +486,25 @@ messages per second. If at some later stage you want to know the number of
 messages transported in a day, you can get the average messages per second
 from RRDtool for the day in question and multiply this number with the
 number of seconds in a day. Because all math is run with Doubles, the
-precision should be acceptable.</p>
+precision should be acceptable.
 </dd>
-<dt><strong><a name="it_s_always_a_rate" class="item">It's always a Rate</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_it_27s_always_a_rate">It's always a Rate</a></strong><br />
+</dt>
 <dd>
-<p>RRDtool stores rates in amount/second for COUNTER, DERIVE and ABSOLUTE
+RRDtool stores rates in amount/second for COUNTER, DERIVE and ABSOLUTE
 data.  When you plot the data, you will get on the y axis
 amount/second which you might be tempted to convert to an absolute
 amount by multiplying by the delta-time between the points. RRDtool
 plots continuous data, and as such is not appropriate for plotting
-absolute amounts as for example &quot;total bytes&quot; sent and received in a
+absolute amounts as for example ``total bytes'' sent and received in a
 router. What you probably want is plot rates that you can scale to
 bytes/hour, for example, or plot absolute amounts with another tool
 that draws bar-plots, where the delta-time is clear on the plot for
 each point (such that when you read the graph you see for example GB
-on the y axis, days on the x axis and one bar for each day).</p>
+on the y axis, days on the x axis and one bar for each day).
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
@@ -509,7 +516,7 @@ on the y axis, days on the x axis and one bar for each day).</p>
   RRA:MIN:0.5:12:2400 \
   RRA:MAX:0.5:12:2400 \
   RRA:AVERAGE:0.5:12:2400</pre>
-<p>This sets up an <strong>RRD</strong> called <em class="file">temperature.rrd</em> which accepts one
+<p>This sets up an <strong>RRD</strong> called <em>temperature.rrd</em> which accepts one
 temperature value every 300 seconds. If no new data is supplied for
 more than 600 seconds, the temperature becomes <em>*UNKNOWN*</em>.  The
 minimum acceptable value is -273 and the maximum is 5'000.</p>
index 0a82202f8b90692bf854440a7060c4d20af65456..18647ec9b4c7a110b12840e20aff2bd8dbf7a8e7 100644 (file)
@@ -14,25 +14,29 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        (R\bRR\bRD\bD) files.  The file is created at its final, full size and filled
        with _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* data.
 
-   _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+       _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+
        The name of the R\bRR\bRD\bD you want to create. R\bRR\bRD\bD files should end with the
        extension _\b._\br_\br_\bd. However, R\bRR\bRD\bDt\bto\boo\bol\bl will accept any filename.
 
-   -\b--\b-s\bst\bta\bar\brt\bt|\b|-\b-b\bb _\bs_\bt_\ba_\br_\bt _\bt_\bi_\bm_\be (\b(d\bde\bef\bfa\bau\bul\blt\bt:\b: n\bno\bow\bw -\b- 1\b10\b0s\bs)\b)
+       -\b--\b-s\bst\bta\bar\brt\bt|\b|-\b-b\bb _\bs_\bt_\ba_\br_\bt _\bt_\bi_\bm_\be (\b(d\bde\bef\bfa\bau\bul\blt\bt:\b: n\bno\bow\bw -\b- 1\b10\b0s\bs)\b)
+
        Specifies the time in seconds since 1970-01-01 UTC when the first value
        should be added to the R\bRR\bRD\bD. R\bRR\bRD\bDt\bto\boo\bol\bl will not accept any data timed
        before or at the time specified.
 
-       See also AT-STYLE TIME SPECIFICATION section in the _\br_\br_\bd_\bf_\be_\bt_\bc_\bh
-       documentation for other ways to specify time.
+       See also AT-STYLE TIME SPECIFICATION section in the _\br_\br_\bd_\bf_\be_\bt_\bc_\bh documenta-
+       tion for other ways to specify time.
+
+       -\b--\b-s\bst\bte\bep\bp|\b|-\b-s\bs _\bs_\bt_\be_\bp (\b(d\bde\bef\bfa\bau\bul\blt\bt:\b: 3\b30\b00\b0 s\bse\bec\bco\bon\bnd\bds\bs)\b)
 
-   -\b--\b-s\bst\bte\bep\bp|\b|-\b-s\bs _\bs_\bt_\be_\bp (\b(d\bde\bef\bfa\bau\bul\blt\bt:\b: 3\b30\b00\b0 s\bse\bec\bco\bon\bnd\bds\bs)\b)
        Specifies the base interval in seconds with which data will be fed into
        the R\bRR\bRD\bD.
 
-   D\bDS\bS:\b:_\bd_\bs_\b-_\bn_\ba_\bm_\be:\b:_\bD_\bS_\bT:\b:_\bd_\bs_\bt _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
-       A single R\bRR\bRD\bD can accept input from several data sources (D\bDS\bS), for
-       example incoming and outgoing traffic on a specific communication line.
+       D\bDS\bS:\b:_\bd_\bs_\b-_\bn_\ba_\bm_\be:\b:_\bD_\bS_\bT:\b:_\bd_\bs_\bt _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
+
+       A single R\bRR\bRD\bD can accept input from several data sources (D\bDS\bS), for exam-
+       ple incoming and outgoing traffic on a specific communication line.
        With the D\bDS\bS configuration option you must define some basic properties
        of each data source you want to store in the R\bRR\bRD\bD.
 
@@ -50,9 +54,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        D\bDS\bS:\b:_\bd_\bs_\b-_\bn_\ba_\bm_\be:\b:_\bC_\bO_\bM_\bP_\bU_\bT_\bE:\b:_\br_\bp_\bn_\b-_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn
 
-       In order to decide which data source type to use, review the
-       definitions that follow. Also consult the section on "HOW TO MEASURE"
-       for further insight.
+       In order to decide which data source type to use, review the defini-
+       tions that follow. Also consult the section on "HOW TO MEASURE" for
+       further insight.
 
        G\bGA\bAU\bUG\bGE\bE
            is for things like temperatures or number of people in a room or
@@ -87,28 +91,28 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
            as "Unknown", but can mistake some counter resets for a legitimate
            counter wrap.
 
-           For a 5 minute step and 32-bit counter, the probability of
-           mistaking a counter reset for a legitimate wrap is arguably about
-           0.8% per 1Mbps of maximum bandwidth. Note that this equates to 80%
-           for 100Mbps interfaces, so for high bandwidth interfaces and a
-           32bit counter, DERIVE with min=0 is probably preferable. If you are
-           using a 64bit counter, just about any max setting will eliminate
-           the possibility of mistaking a reset for a counter wrap.
+           For a 5 minute step and 32-bit counter, the probability of mistak-
+           ing a counter reset for a legitimate wrap is arguably about 0.8%
+           per 1Mbps of maximum bandwidth. Note that this equates to 80% for
+           100Mbps interfaces, so for high bandwidth interfaces and a 32bit
+           counter, DERIVE with min=0 is probably preferable. If you are using
+           a 64bit counter, just about any max setting will eliminate the pos-
+           sibility of mistaking a reset for a counter wrap.
 
        A\bAB\bBS\bSO\bOL\bLU\bUT\bTE\bE
            is for counters which get reset upon reading. This is used for fast
-           counters which tend to overflow. So instead of reading them
-           normally you reset them after every read to make sure you have a
-           maximum time available before the next overflow. Another usage is
-           for things you count like number of messages since the last update.
+           counters which tend to overflow. So instead of reading them nor-
+           mally you reset them after every read to make sure you have a maxi-
+           mum time available before the next overflow. Another usage is for
+           things you count like number of messages since the last update.
 
        C\bCO\bOM\bMP\bPU\bUT\bTE\bE
            is for storing the result of a formula applied to other data
            sources in the R\bRR\bRD\bD. This data source is not supplied a value on
            update, but rather its Primary Data Points (PDPs) are computed from
            the PDPs of the data sources according to the rpn-expression that
-           defines the formula. Consolidation functions are then applied
-           normally to the PDPs of the COMPUTE data source (that is the rpn-
+           defines the formula. Consolidation functions are then applied nor-
+           mally to the PDPs of the COMPUTE data source (that is the rpn-
            expression is only applied to generate PDPs). In database software,
            such data sets are referred to as "virtual" or "computed" columns.
 
@@ -130,15 +134,16 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        _\br_\bp_\bn_\b-_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn defines the formula used to compute the PDPs of a
        COMPUTE data source from other data sources in the same <RRD>. It is
        similar to defining a C\bCD\bDE\bEF\bF argument for the graph command. Please refer
-       to that manual page for a list and description of RPN operations
-       supported. For COMPUTE data sources, the following RPN operations are
-       not supported: COUNT, PREV, TIME, and LTIME. In addition, in defining
-       the RPN expression, the COMPUTE data source may only refer to the names
-       of data source listed previously in the create command. This is similar
-       to the restriction that C\bCD\bDE\bEF\bFs must refer only to D\bDE\bEF\bFs and C\bCD\bDE\bEF\bFs
-       previously defined in the same graph command.
-
-   R\bRR\bRA\bA:\b:_\bC_\bF:\b:_\bc_\bf _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
+       to that manual page for a list and description of RPN operations sup-
+       ported. For COMPUTE data sources, the following RPN operations are not
+       supported: COUNT, PREV, TIME, and LTIME. In addition, in defining the
+       RPN expression, the COMPUTE data source may only refer to the names of
+       data source listed previously in the create command. This is similar to
+       the restriction that C\bCD\bDE\bEF\bFs must refer only to D\bDE\bEF\bFs and C\bCD\bDE\bEF\bFs previously
+       defined in the same graph command.
+
+       R\bRR\bRA\bA:\b:_\bC_\bF:\b:_\bc_\bf _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
+
        The purpose of an R\bRR\bRD\bD is to store data in the round robin archives
        (R\bRR\bRA\bA). An archive consists of a number of data values or statistics for
        each of the defined data-sources (D\bDS\bS) and is defined with an R\bRR\bRA\bA line.
@@ -163,8 +168,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        Note that data aggregation inevitably leads to loss of precision and
        information. The trick is to pick the aggregate function such that the
-       _\bi_\bn_\bt_\be_\br_\be_\bs_\bt_\bi_\bn_\bg properties of your data is kept across the aggregation
-       process.
+       _\bi_\bn_\bt_\be_\br_\be_\bs_\bt_\bi_\bn_\bg properties of your data is kept across the aggregation pro-
+       cess.
 
        The format of R\bRR\bRA\bA line for these consolidation functions is:
 
@@ -192,11 +197,11 @@ A\bAb\bbe\ber\brr\bra\ban\bnt\bt B\bBe\beh\bha\bav\bvi\bio\bor\br D\bDe\bet\bte\bec\bct\bti\bio\bon\bn w\b
 
        ·   R\bRR\bRA\bA:\b:_\bM_\bH_\bW_\bP_\bR_\bE_\bD_\bI_\bC_\bT:\b:_\br_\bo_\bw_\bs:\b:_\ba_\bl_\bp_\bh_\ba:\b:_\bb_\be_\bt_\ba:\b:_\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd[:\b:_\br_\br_\ba_\b-_\bn_\bu_\bm]
 
-       ·   R\bRR\bRA\bA:\b:_\bS_\bE_\bA_\bS_\bO_\bN_\bA_\bL:\b:_\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd:\b:_\bg_\ba_\bm_\bm_\ba:\b:_\br_\br_\ba_\b-
-           _\bn_\bu_\bm[:\b:s\bsm\bmo\boo\bot\bth\bhi\bin\bng\bg-\b-w\bwi\bin\bnd\bdo\bow\bw=\b=_\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn]
+       ·   R\bRR\bRA\bA:\b:_\bS_\bE_\bA_\bS_\bO_\bN_\bA_\bL:\b:_\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd:\b:_\bg_\ba_\bm_\bm_\ba:\b:_\br_\br_\ba_\b-_\bn_\bu_\bm[:\b:s\bsm\bmo\boo\bot\bth\bhi\bin\bng\bg-\b-w\bwi\bin\bnd\bdo\bow\bw=\b=_\bf_\br_\ba_\bc_\b-
+           _\bt_\bi_\bo_\bn]
 
-       ·   R\bRR\bRA\bA:\b:_\bD_\bE_\bV_\bS_\bE_\bA_\bS_\bO_\bN_\bA_\bL:\b:_\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd:\b:_\bg_\ba_\bm_\bm_\ba:\b:_\br_\br_\ba_\b-
-           _\bn_\bu_\bm[:\b:s\bsm\bmo\boo\bot\bth\bhi\bin\bng\bg-\b-w\bwi\bin\bnd\bdo\bow\bw=\b=_\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn]
+       ·   R\bRR\bRA\bA:\b:_\bD_\bE_\bV_\bS_\bE_\bA_\bS_\bO_\bN_\bA_\bL:\b:_\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd:\b:_\bg_\ba_\bm_\bm_\ba:\b:_\br_\br_\ba_\b-_\bn_\bu_\bm[:\b:s\bsm\bmo\boo\bot\bth\bhi\bin\bng\bg-\b-w\bwi\bin\bn-\b-
+           d\bdo\bow\bw=\b=_\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn]
 
        ·   R\bRR\bRA\bA:\b:_\bD_\bE_\bV_\bP_\bR_\bE_\bD_\bI_\bC_\bT:\b:_\br_\bo_\bw_\bs:\b:_\br_\br_\ba_\b-_\bn_\bu_\bm
 
@@ -206,25 +211,25 @@ A\bAb\bbe\ber\brr\bra\ban\bnt\bt B\bBe\beh\bha\bav\bvi\bio\bor\br D\bDe\bet\bte\bec\bct\bti\bio\bon\bn w\b
        ways.  First, each of the R\bRR\bRA\bAs is updated once for every primary data
        point.  Second, these R\bRR\bRA\bAs\bs are interdependent. To generate real-time
        confidence bounds, a matched set of SEASONAL, DEVSEASONAL, DEVPREDICT,
-       and either HWPREDICT or MHWPREDICT must exist. Generating smoothed
-       values of the primary data points requires a SEASONAL R\bRR\bRA\bA and either an
-       HWPREDICT or MHWPREDICT R\bRR\bRA\bA. Aberrant behavior detection requires
-       FAILURES, DEVSEASONAL, SEASONAL, and either HWPREDICT or MHWPREDICT.
+       and either HWPREDICT or MHWPREDICT must exist. Generating smoothed val-
+       ues of the primary data points requires a SEASONAL R\bRR\bRA\bA and either an
+       HWPREDICT or MHWPREDICT R\bRR\bRA\bA. Aberrant behavior detection requires FAIL-
+       URES, DEVSEASONAL, SEASONAL, and either HWPREDICT or MHWPREDICT.
 
-       The predicted, or smoothed, values are stored in the HWPREDICT or
-       MHWPREDICT R\bRR\bRA\bA. HWPREDICT and MHWPREDICT are actually two variations on
+       The predicted, or smoothed, values are stored in the HWPREDICT or MHW-
+       PREDICT R\bRR\bRA\bA. HWPREDICT and MHWPREDICT are actually two variations on
        the Holt-Winters method. They are interchangeable. Both attempt to
-       decompose data into three components: a baseline, a trend, and a
-       seasonal coefficient.  HWPREDICT adds its seasonal coefficient to the
-       baseline to form a prediction, whereas MHWPREDICT multiplies its
-       seasonal coefficient by the baseline to form a prediction. The
-       difference is noticeable when the baseline changes significantly in the
-       course of a season; HWPREDICT will predict the seasonality to stay
-       constant as the baseline changes, but MHWPREDICT will predict the
-       seasonality to grow or shrink in proportion to the baseline. The proper
-       choice of method depends on the thing being modeled. For simplicity,
-       the rest of this discussion will refer to HWPREDICT, but MHWPREDICT may
-       be substituted in its place.
+       decompose data into three components: a baseline, a trend, and a sea-
+       sonal coefficient.  HWPREDICT adds its seasonal coefficient to the
+       baseline to form a prediction, whereas MHWPREDICT multiplies its sea-
+       sonal coefficient by the baseline to form a prediction. The difference
+       is noticeable when the baseline changes significantly in the course of
+       a season; HWPREDICT will predict the seasonality to stay constant as
+       the baseline changes, but MHWPREDICT will predict the seasonality to
+       grow or shrink in proportion to the baseline. The proper choice of
+       method depends on the thing being modeled. For simplicity, the rest of
+       this discussion will refer to HWPREDICT, but MHWPREDICT may be substi-
+       tuted in its place.
 
        The predicted deviations are stored in DEVPREDICT (think a standard
        deviation which can be scaled to yield a confidence band). The FAILURES
@@ -238,8 +243,8 @@ A\bAb\bbe\ber\brr\bra\ban\bnt\bt B\bBe\beh\bha\bav\bvi\bio\bor\br D\bDe\bet\bte\bec\bct\bti\bio\bon\bn w\b
        the Holt-Winters forecasting algorithm and the seasonal deviations,
        respectively.  There is one entry per observation time point in the
        seasonal cycle. For example, if primary data points are generated every
-       five minutes and the seasonal cycle is 1 day, both SEASONAL and
-       DEVSEASONAL will have 288 rows.
+       five minutes and the seasonal cycle is 1 day, both SEASONAL and DEVSEA-
+       SONAL will have 288 rows.
 
        In order to simplify the creation for the novice user, in addition to
        supporting explicit creation of the HWPREDICT, SEASONAL, DEVPREDICT,
@@ -252,46 +257,46 @@ A\bAb\bbe\ber\brr\bra\ban\bnt\bt B\bBe\beh\bha\bav\bvi\bio\bor\br D\bDe\bet\bte\bec\bct\bti\bio\bon\bn w\b
        and entries in these RRAs. For the HWPREDICT CF, _\br_\bo_\bw_\bs should be larger
        than the _\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd. If the DEVPREDICT R\bRR\bRA\bA is implicitly created,
        the default number of rows is the same as the HWPREDICT _\br_\bo_\bw_\bs argument.
-       If the FAILURES R\bRR\bRA\bA is implicitly created, _\br_\bo_\bw_\bs will be set to the
-       _\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd argument of the HWPREDICT R\bRR\bRA\bA. Of course, the R\bRR\bRD\bDt\bto\boo\bol\bl
+       If the FAILURES R\bRR\bRA\bA is implicitly created, _\br_\bo_\bw_\bs will be set to the _\bs_\be_\ba_\b-
+       _\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd argument of the HWPREDICT R\bRR\bRA\bA. Of course, the R\bRR\bRD\bDt\bto\boo\bol\bl
        _\br_\be_\bs_\bi_\bz_\be command is available if these defaults are not sufficient and
        the creator wishes to avoid explicit creations of the other specialized
        function R\bRR\bRA\bAs\bs.
 
-       _\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd specifies the number of primary data points in a
-       seasonal cycle. If SEASONAL and DEVSEASONAL are implicitly created,
-       this argument for those R\bRR\bRA\bAs\bs is set automatically to the value
-       specified by HWPREDICT. If they are explicitly created, the creator
-       should verify that all three _\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd arguments agree.
-
-       _\ba_\bl_\bp_\bh_\ba is the adaption parameter of the intercept (or baseline)
-       coefficient in the Holt-Winters forecasting algorithm. See rrdtool for
-       a description of this algorithm. _\ba_\bl_\bp_\bh_\ba must lie between 0 and 1. A
-       value closer to 1 means that more recent observations carry greater
-       weight in predicting the baseline component of the forecast. A value
-       closer to 0 means that past history carries greater weight in
-       predicting the baseline component.
-
-       _\bb_\be_\bt_\ba is the adaption parameter of the slope (or linear trend)
-       coefficient in the Holt-Winters forecasting algorithm. _\bb_\be_\bt_\ba must lie
-       between 0 and 1 and plays the same role as _\ba_\bl_\bp_\bh_\ba with respect to the
-       predicted linear trend.
+       _\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd specifies the number of primary data points in a sea-
+       sonal cycle. If SEASONAL and DEVSEASONAL are implicitly created, this
+       argument for those R\bRR\bRA\bAs\bs is set automatically to the value specified by
+       HWPREDICT. If they are explicitly created, the creator should verify
+       that all three _\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl _\bp_\be_\br_\bi_\bo_\bd arguments agree.
+
+       _\ba_\bl_\bp_\bh_\ba is the adaption parameter of the intercept (or baseline) coeffi-
+       cient in the Holt-Winters forecasting algorithm. See rrdtool for a
+       description of this algorithm. _\ba_\bl_\bp_\bh_\ba must lie between 0 and 1. A value
+       closer to 1 means that more recent observations carry greater weight in
+       predicting the baseline component of the forecast. A value closer to 0
+       means that past history carries greater weight in predicting the base-
+       line component.
+
+       _\bb_\be_\bt_\ba is the adaption parameter of the slope (or linear trend) coeffi-
+       cient in the Holt-Winters forecasting algorithm. _\bb_\be_\bt_\ba must lie between
+       0 and 1 and plays the same role as _\ba_\bl_\bp_\bh_\ba with respect to the predicted
+       linear trend.
 
        _\bg_\ba_\bm_\bm_\ba is the adaption parameter of the seasonal coefficients in the
-       Holt-Winters forecasting algorithm (HWPREDICT) or the adaption
-       parameter in the exponential smoothing update of the seasonal
-       deviations. It must lie between 0 and 1. If the SEASONAL and
-       DEVSEASONAL R\bRR\bRA\bAs\bs are created implicitly, they will both have the same
-       value for _\bg_\ba_\bm_\bm_\ba: the value specified for the HWPREDICT _\ba_\bl_\bp_\bh_\ba argument.
-       Note that because there is one seasonal coefficient (or deviation) for
-       each time point during the seasonal cycle, the adaptation rate is much
-       slower than the baseline. Each seasonal coefficient is only updated (or
-       adapts) when the observed value occurs at the offset in the seasonal
-       cycle corresponding to that coefficient.
+       Holt-Winters forecasting algorithm (HWPREDICT) or the adaption parame-
+       ter in the exponential smoothing update of the seasonal deviations. It
+       must lie between 0 and 1. If the SEASONAL and DEVSEASONAL R\bRR\bRA\bAs\bs are cre-
+       ated implicitly, they will both have the same value for _\bg_\ba_\bm_\bm_\ba: the
+       value specified for the HWPREDICT _\ba_\bl_\bp_\bh_\ba argument. Note that because
+       there is one seasonal coefficient (or deviation) for each time point
+       during the seasonal cycle, the adaptation rate is much slower than the
+       baseline. Each seasonal coefficient is only updated (or adapts) when
+       the observed value occurs at the offset in the seasonal cycle corre-
+       sponding to that coefficient.
 
        If SEASONAL and DEVSEASONAL R\bRR\bRA\bAs\bs are created explicitly, _\bg_\ba_\bm_\bm_\ba need not
-       be the same for both. Note that _\bg_\ba_\bm_\bm_\ba can also be changed via the
-       R\bRR\bRD\bDt\bto\boo\bol\bl _\bt_\bu_\bn_\be command.
+       be the same for both. Note that _\bg_\ba_\bm_\bm_\ba can also be changed via the R\bRR\bRD\bD-\b-
+       t\bto\boo\bol\bl _\bt_\bu_\bn_\be command.
 
        _\bs_\bm_\bo_\bo_\bt_\bh_\bi_\bn_\bg_\b-_\bw_\bi_\bn_\bd_\bo_\bw specifies the fraction of a season that should be
        averaged around each point. By default, the value of _\bs_\bm_\bo_\bo_\bt_\bh_\bi_\bn_\bg_\b-_\bw_\bi_\bn_\bd_\bo_\bw
@@ -300,15 +305,14 @@ A\bAb\bbe\ber\brr\bra\ban\bnt\bt B\bBe\beh\bha\bav\bvi\bio\bor\br D\bDe\bet\bte\bec\bct\bti\bio\bon\bn w\b
        nearest neighbors.  Setting _\bs_\bm_\bo_\bo_\bt_\bh_\bi_\bn_\bg_\b-_\bw_\bi_\bn_\bd_\bo_\bw to zero will disable the
        running-average smoother altogether.
 
-       _\br_\br_\ba_\b-_\bn_\bu_\bm provides the links between related R\bRR\bRA\bAs\bs. If HWPREDICT is
-       specified alone and the other R\bRR\bRA\bAs\bs are created implicitly, then there
-       is no need to worry about this argument. If R\bRR\bRA\bAs\bs are created
-       explicitly, then carefully pay attention to this argument. For each R\bRR\bRA\bA
-       which includes this argument, there is a dependency between that R\bRR\bRA\bA
-       and another R\bRR\bRA\bA. The _\br_\br_\ba_\b-_\bn_\bu_\bm argument is the 1-based index in the order
-       of R\bRR\bRA\bA creation (that is, the order they appear in the _\bc_\br_\be_\ba_\bt_\be command).
-       The dependent R\bRR\bRA\bA for each R\bRR\bRA\bA requiring the _\br_\br_\ba_\b-_\bn_\bu_\bm argument is listed
-       here:
+       _\br_\br_\ba_\b-_\bn_\bu_\bm provides the links between related R\bRR\bRA\bAs\bs. If HWPREDICT is speci-
+       fied alone and the other R\bRR\bRA\bAs\bs are created implicitly, then there is no
+       need to worry about this argument. If R\bRR\bRA\bAs\bs are created explicitly, then
+       carefully pay attention to this argument. For each R\bRR\bRA\bA which includes
+       this argument, there is a dependency between that R\bRR\bRA\bA and another R\bRR\bRA\bA.
+       The _\br_\br_\ba_\b-_\bn_\bu_\bm argument is the 1-based index in the order of R\bRR\bRA\bA creation
+       (that is, the order they appear in the _\bc_\br_\be_\ba_\bt_\be command). The dependent
+       R\bRR\bRA\bA for each R\bRR\bRA\bA requiring the _\br_\br_\ba_\b-_\bn_\bu_\bm argument is listed here:
 
        ·   HWPREDICT _\br_\br_\ba_\b-_\bn_\bu_\bm is the index of the SEASONAL R\bRR\bRA\bA.
 
@@ -326,9 +330,9 @@ A\bAb\bbe\ber\brr\bra\ban\bnt\bt B\bBe\beh\bha\bav\bvi\bio\bor\br D\bDe\bet\bte\bec\bct\bti\bio\bon\bn w\b
 
        _\bw_\bi_\bn_\bd_\bo_\bw _\bl_\be_\bn_\bg_\bt_\bh is the number of time points in the window. Specify an
        integer greater than or equal to the threshold and less than or equal
-       to 28.  The time interval this window represents depends on the
-       interval between primary data points. If the FAILURES R\bRR\bRA\bA is implicitly
-       created, the default value is 9.
+       to 28.  The time interval this window represents depends on the inter-
+       val between primary data points. If the FAILURES R\bRR\bRA\bA is implicitly cre-
+       ated, the default value is 9.
 
 T\bTh\bhe\be H\bHE\bEA\bAR\bRT\bTB\bBE\bEA\bAT\bT a\ban\bnd\bd t\bth\bhe\be S\bST\bTE\bEP\bP
        Here is an explanation by Don Baarda on the inner workings of RRDtool.
@@ -339,14 +343,13 @@ T\bTh\bhe\be H\bHE\bEA\bAR\bRT\bTB\bBE\bEA\bAT\bT a\ban\bnd\bd t\bth\bhe\be S\bST\bTE\bEP\bP
        builds Primary Data Points (PDPs) on every "step" interval. The PDPs
        are then accumulated into the RRAs.
 
-       The "heartbeat" defines the maximum acceptable interval between
-       samples/updates. If the interval between samples is less than
-       "heartbeat", then an average rate is calculated and applied for that
-       interval. If the interval between samples is longer than "heartbeat",
-       then that entire interval is considered "unknown". Note that there are
-       other things that can make a sample interval "unknown", such as the
-       rate exceeding limits, or a sample that was explicitly marked as
-       unknown.
+       The "heartbeat" defines the maximum acceptable interval between sam-
+       ples/updates. If the interval between samples is less than "heartbeat",
+       then an average rate is calculated and applied for that interval. If
+       the interval between samples is longer than "heartbeat", then that
+       entire interval is considered "unknown". Note that there are other
+       things that can make a sample interval "unknown", such as the rate
+       exceeding limits, or a sample that was explicitly marked as unknown.
 
        The known rates during a PDP's "step" interval are used to calculate an
        average rate for that PDP. If the total "unknown" time accounts for
@@ -360,10 +363,10 @@ T\bTh\bhe\be H\bHE\bEA\bAR\bRT\bTB\bBE\bEA\bAT\bT a\ban\bnd\bd t\bth\bhe\be S\bST\bTE\bEP\bP
        multiple samples per PDP, and if you don't get them mark the PDP
        unknown. A long heartbeat can span multiple "steps", which means it is
        acceptable to have multiple PDPs calculated from a single sample. An
-       extreme example of this might be a "step" of 5 minutes and a
-       "heartbeat" of one day, in which case a single sample every day will
-       result in all the PDPs for that entire day period being set to the same
-       average rate. _\b-_\b- _\bD_\bo_\bn _\bB_\ba_\ba_\br_\bd_\ba _\b<_\bd_\bo_\bn_\b._\bb_\ba_\ba_\br_\bd_\ba_\b@_\bb_\ba_\be_\bs_\by_\bs_\bt_\be_\bm_\bs_\b._\bc_\bo_\bm_\b>
+       extreme example of this might be a "step" of 5 minutes and a "heart-
+       beat" of one day, in which case a single sample every day will result
+       in all the PDPs for that entire day period being set to the same aver-
+       age rate. _\b-_\b- _\bD_\bo_\bn _\bB_\ba_\ba_\br_\bd_\ba _\b<_\bd_\bo_\bn_\b._\bb_\ba_\ba_\br_\bd_\ba_\b@_\bb_\ba_\be_\bs_\by_\bs_\bt_\be_\bm_\bs_\b._\bc_\bo_\bm_\b>
 
               time|
               axis|
@@ -407,28 +410,28 @@ H\bHO\bOW\bW T\bTO\bO M\bME\bEA\bAS\bSU\bUR\bRE\bE
        Here are a few hints on how to measure:
 
        Temperature
-           Usually you have some type of meter you can read to get the
-           temperature.  The temperature is not really connected with a time.
-           The only connection is that the temperature reading happened at a
-           certain time. You can use the G\bGA\bAU\bUG\bGE\bE data source type for this.
-           RRDtool will then record your reading together with the time.
+           Usually you have some type of meter you can read to get the temper-
+           ature.  The temperature is not really connected with a time. The
+           only connection is that the temperature reading happened at a cer-
+           tain time. You can use the G\bGA\bAU\bUG\bGE\bE data source type for this. RRDtool
+           will then record your reading together with the time.
 
        Mail Messages
-           Assume you have a method to count the number of messages
-           transported by your mailserver in a certain amount of time, giving
-           you data like '5 messages in the last 65 seconds'. If you look at
-           the count of 5 like an A\bAB\bBS\bSO\bOL\bLU\bUT\bTE\bE data type you can simply update the
-           RRD with the number 5 and the end time of your monitoring period.
-           RRDtool will then record the number of messages per second. If at
-           some later stage you want to know the number of messages
-           transported in a day, you can get the average messages per second
-           from RRDtool for the day in question and multiply this number with
-           the number of seconds in a day. Because all math is run with
-           Doubles, the precision should be acceptable.
+           Assume you have a method to count the number of messages trans-
+           ported by your mailserver in a certain amount of time, giving you
+           data like '5 messages in the last 65 seconds'. If you look at the
+           count of 5 like an A\bAB\bBS\bSO\bOL\bLU\bUT\bTE\bE data type you can simply update the RRD
+           with the number 5 and the end time of your monitoring period. RRD-
+           tool will then record the number of messages per second. If at some
+           later stage you want to know the number of messages transported in
+           a day, you can get the average messages per second from RRDtool for
+           the day in question and multiply this number with the number of
+           seconds in a day. Because all math is run with Doubles, the preci-
+           sion should be acceptable.
 
        It's always a Rate
-           RRDtool stores rates in amount/second for COUNTER, DERIVE and
-           ABSOLUTE data.  When you plot the data, you will get on the y axis
+           RRDtool stores rates in amount/second for COUNTER, DERIVE and ABSO-
+           LUTE data.  When you plot the data, you will get on the y axis
            amount/second which you might be tempted to convert to an absolute
            amount by multiplying by the delta-time between the points. RRDtool
            plots continuous data, and as such is not appropriate for plotting
@@ -448,17 +451,17 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bE
          RRA:MAX:0.5:12:2400 \
          RRA:AVERAGE:0.5:12:2400
 
-       This sets up an R\bRR\bRD\bD called _\bt_\be_\bm_\bp_\be_\br_\ba_\bt_\bu_\br_\be_\b._\br_\br_\bd which accepts one
-       temperature value every 300 seconds. If no new data is supplied for
-       more than 600 seconds, the temperature becomes _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*.  The minimum
-       acceptable value is -273 and the maximum is 5'000.
+       This sets up an R\bRR\bRD\bD called _\bt_\be_\bm_\bp_\be_\br_\ba_\bt_\bu_\br_\be_\b._\br_\br_\bd which accepts one tempera-
+       ture value every 300 seconds. If no new data is supplied for more than
+       600 seconds, the temperature becomes _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*.  The minimum acceptable
+       value is -273 and the maximum is 5'000.
 
        A few archive areas are also defined. The first stores the temperatures
        supplied for 100 hours (1'200 * 300 seconds = 100 hours). The second
        RRA stores the minimum temperature recorded over every hour (12 * 300
        seconds = 1 hour), for 100 days (2'400 hours). The third and the fourth
-       RRA's do the same for the maximum and average temperature,
-       respectively.
+       RRA's do the same for the maximum and average temperature, respec-
+       tively.
 
 E\bEX\bXA\bAM\bMP\bPL\bLE\bE 2\b2
         rrdtool create monitor.rrd --step 300        \
@@ -472,18 +475,18 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bE 2\b2
        argument of HWPREDICT is missing, so the other R\bRR\bRA\bAs\bs will implicitly be
        created with default parameter values. In this example, the forecasting
        algorithm baseline adapts quickly; in fact the most recent one hour of
-       observations (each at 5 minute intervals) accounts for 75% of the
-       baseline prediction. The linear trend forecast adapts much more slowly.
+       observations (each at 5 minute intervals) accounts for 75% of the base-
+       line prediction. The linear trend forecast adapts much more slowly.
        Observations made during the last day (at 288 observations per day)
-       account for only 65% of the predicted linear trend. Note: these
-       computations rely on an exponential smoothing formula described in the
-       LISA 2000 paper.
+       account for only 65% of the predicted linear trend. Note: these compu-
+       tations rely on an exponential smoothing formula described in the LISA
+       2000 paper.
 
-       The seasonal cycle is one day (288 data points at 300 second
-       intervals), and the seasonal adaption parameter will be set to 0.1. The
-       RRD file will store 5 days (1'440 data points) of forecasts and
-       deviation predictions before wrap around. The file will store 1 day (a
-       seasonal cycle) of 0-1 indicators in the FAILURES R\bRR\bRA\bA.
+       The seasonal cycle is one day (288 data points at 300 second inter-
+       vals), and the seasonal adaption parameter will be set to 0.1. The RRD
+       file will store 5 days (1'440 data points) of forecasts and deviation
+       predictions before wrap around. The file will store 1 day (a seasonal
+       cycle) of 0-1 indicators in the FAILURES R\bRR\bRA\bA.
 
        The same RRD file and R\bRR\bRA\bAs\bs are created with the following command,
        which explicitly creates all specialized function R\bRR\bRA\bAs\bs.
@@ -497,8 +500,8 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bE 2\b2
           RRA:DEVSEASONAL:288:0.1:2 \
           RRA:FAILURES:288:7:9:5
 
-       Of course, explicit creation need not replicate implicit create, a
-       number of arguments could be changed.
+       Of course, explicit creation need not replicate implicit create, a num-
+       ber of arguments could be changed.
 
 E\bEX\bXA\bAM\bMP\bPL\bLE\bE 3\b3
         rrdtool create proxy.rrd --step 300 \
@@ -517,15 +520,14 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bE 3\b3
 
        In the R\bRR\bRD\bD, the first data source stores the requests per second rate
        during the interval. The second data source stores the total duration
-       of all requests processed during the interval divided by 300. The
-       COMPUTE data source divides each PDP of the AccumDuration by the
-       corresponding PDP of TotalRequests and stores the average request
-       duration. The remainder of the RPN expression handles the divide by
-       zero case.
+       of all requests processed during the interval divided by 300. The COM-
+       PUTE data source divides each PDP of the AccumDuration by the corre-
+       sponding PDP of TotalRequests and stores the average request duration.
+       The remainder of the RPN expression handles the divide by zero case.
 
 A\bAU\bUT\bTH\bHO\bOR\bR
        Tobias Oetiker <tobi@oetiker.ch>
 
 
 
-1.3.8                             2008-06-11                      RRDCREATE(1)
+1.3.99909060808                   2008-06-11                      RRDCREATE(1)
index 8f47694c2f108a0afba2c1e8baa7ca67e9c8d7b7..b1d5fe40757efed5e2bfe6d3dd3281d24044bb02 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDDUMP 1"
-.TH RRDDUMP 1 "2008-05-16" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDDUMP 1 "2008-12-10" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrddump \- dump the contents of an RRD to XML format
 .SH "SYNOPSIS"
 .IX Header "SYNOPSIS"
-\&\fBrrdtool\fR \fBdump\fR [\fB\-\-no\-header\fR|\fB\-n\fR] \fIfilename.rrd\fR > \fIfilename.xml\fR
-.PP
-or
-.PP
-\&\fBrrdtool\fR \fBdump\fR [\fB\-\-no\-header\fR|\fB\-n\fR] \fIfilename.rrd\fR \fIfilename.xml\fR
+\&\fBrrdtool\fR \fBdump\fR \fIfilename.rrd\fR [\fIfilename.xml\fR]
+[\fB\-\-header\fR|\fB\-h\fR\ {none,xsd,dtd}]
+[\fB\-\-no\-header\fR]
+[\fB\-\-daemon\fR\ \fIaddress\fR]
+>\ \fIfilename.xml\fR
 .SH "DESCRIPTION"
 .IX Header "DESCRIPTION"
 The \fBdump\fR function writes the contents of an \fB\s-1RRD\s0\fR in human
@@ -153,12 +154,26 @@ The name of the \fB\s-1RRD\s0\fR you want to dump.
 .IX Item "filename.xml"
 The (optional) filename that you want to write the \s-1XML\s0 output to.
 If not specified, the \s-1XML\s0 will be printed to stdout.
-.IP "[\fB\-\-no\-header\fR|\fB\-n\fR]" 8
-.IX Item "[--no-header|-n]"
-In rrdtool 1.3, the dump function started producing correct xml-headers.
-Unfortunately the rrdtool restore function from the 1.2 series can not
-handle these headers. With this option you can supress the creatinon of
-the xml headers.
+.IP "\fB\-\-header\fR|\fB\-h\fR {none,xsd,dtd}" 8
+.IX Item "--header|-h {none,xsd,dtd}"
+By default rrdtool will add a dtd header to the xml file. Here
+you can customize this to and xsd header or no header at all.
+.IP "\fB\-\-no\-header\fR" 8
+.IX Item "--no-header"
+A shortcut for \-\-header=none.
+.Sp
+If you want to restore the dump with rrdtool 1.2 you should use the
+\&\-\-no\-header option since 1.2 can not deal with xml headers.
+.IP "\fB\-\-daemon\fR \fIaddress\fR" 8
+.IX Item "--daemon address"
+Address of the rrdcached daemon. If specified, a \f(CW\*(C`flush\*(C'\fR command is sent
+to the server before reading the \s-1RRD\s0 files. This allows \fBrrdtool\fR to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
+.Sp
+.Vb 1
+\& rrdtool dump \-\-daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+.Ve
 .SH "EXAMPLES"
 .IX Header "EXAMPLES"
 To transfer an \s-1RRD\s0 between architectures, follow these steps:
@@ -170,6 +185,15 @@ Transfer the \s-1XML\s0 dump to the target system.
 .IP "3." 4
 Run \fBrrdtool\fR \fBrestore\fR to create a new \s-1RRD\s0 from the \s-1XML\s0 dump. See
 \&\fBrrdrestore\fR for details.
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ dump\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 Tobias Oetiker <tobi@oetiker.ch>
index ba6e9619078a498a4528160300f00f7ebf74dcea..10818075b466d5f47445f846abfce5d83989d4ab 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrddump</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#synopsis">SYNOPSIS</a></li>
        <li><a href="#description">DESCRIPTION</a></li>
        <li><a href="#examples">EXAMPLES</a></li>
+       <li><a href="#environment_variables">ENVIRONMENT VARIABLES</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
 </p>
 <hr />
 <h1><a name="synopsis">SYNOPSIS</a></h1>
-<p><strong>rrdtool</strong> <strong>dump</strong> [<strong>--no-header</strong>|<strong>-n</strong>] <em>filename.rrd</em> &gt; <em>filename.xml</em></p>
-<p>or</p>
-<p><strong>rrdtool</strong> <strong>dump</strong> [<strong>--no-header</strong>|<strong>-n</strong>] <em>filename.rrd</em> <em>filename.xml</em></p>
+<p><strong>rrdtool</strong> <strong>dump</strong> <em>filename.rrd</em> [<em>filename.xml</em>]
+[<strong>--header</strong>|<strong>-h</strong>&nbsp;{none,xsd,dtd}]
+[<strong>--no-header</strong>]
+[<strong>--daemon</strong>&nbsp;<em>address</em>]
+&gt;&nbsp;<em>filename.xml</em></p>
 <p>
 </p>
 <hr />
@@ -52,44 +47,81 @@ files from one computer architecture to another as well to
 manipulate the contents of an <strong>RRD</strong> file in a somewhat more
 convenient manner.</p>
 <dl>
-<dt><strong><a name="filename_rrd" class="item"><em>filename.rrd</em></a></strong></dt>
-
+<dt><strong><a name="item_filename_2errd"><em>filename.rrd</em></a></strong><br />
+</dt>
 <dd>
-<p>The name of the <strong>RRD</strong> you want to dump.</p>
+The name of the <strong>RRD</strong> you want to dump.
 </dd>
-<dt><strong><a name="filename_xml" class="item"><em>filename.xml</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_filename_2exml"><em>filename.xml</em></a></strong><br />
+</dt>
 <dd>
-<p>The (optional) filename that you want to write the XML output to.
-If not specified, the XML will be printed to stdout.</p>
+The (optional) filename that you want to write the XML output to.
+If not specified, the XML will be printed to stdout.
 </dd>
-<dt><strong><a name="no_header_n" class="item">[<strong>--no-header</strong>|<strong>-n</strong>]</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dheader_7c_2dh__7bnone_2cxsd_2cdtd_7d"><strong>--header</strong>|<strong>-h</strong> {none,xsd,dtd}</a></strong><br />
+</dt>
 <dd>
-<p>In rrdtool 1.3, the dump function started producing correct xml-headers.
-Unfortunately the rrdtool restore function from the 1.2 series can not
-handle these headers. With this option you can supress the creatinon of
-the xml headers.</p>
+By default rrdtool will add a dtd header to the xml file. Here
+you can customize this to and xsd header or no header at all.
 </dd>
-</dl>
+<p></p>
+<dt><strong><a name="item__2d_2dno_2dheader"><strong>--no-header</strong></a></strong><br />
+</dt>
+<dd>
+A shortcut for --header=none.
+</dd>
+<dd>
+<p>If you want to restore the dump with rrdtool 1.2 you should use the
+--no-header option since 1.2 can not deal with xml headers.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item__2d_2ddaemon_address"><strong>--daemon</strong> <em>address</em></a></strong><br />
+</dt>
+<dd>
+Address of the <a href="././rrdcached.html">the rrdcached manpage</a> daemon. If specified, a <code>flush</code> command is sent
+to the server before reading the RRD files. This allows <strong>rrdtool</strong> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the <strong>-l</strong> option in the <a href="././rrdcached.html">the rrdcached manpage</a> manual.
+</dd>
+<dd>
+<pre>
+ rrdtool dump --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd</pre>
+</dd>
+<p></p></dl>
 <p>
 </p>
 <hr />
 <h1><a name="examples">EXAMPLES</a></h1>
 <p>To transfer an RRD between architectures, follow these steps:</p>
 <ol>
-<li>
-<p>On the same system where the RRD was created, use <strong>rrdtool</strong> <strong>dump</strong>
-to export the data to XML format.</p>
-</li>
-<li>
-<p>Transfer the XML dump to the target system.</p>
-</li>
-<li>
-<p>Run <strong>rrdtool</strong> <strong>restore</strong> to create a new RRD from the XML dump. See
-<strong>rrdrestore</strong> for details.</p>
-</li>
-</ol>
+<li></li>
+On the same system where the RRD was created, use <strong>rrdtool</strong> <strong>dump</strong>
+to export the data to XML format.
+<p></p>
+<li></li>
+Transfer the XML dump to the target system.
+<p></p>
+<li></li>
+Run <strong>rrdtool</strong> <strong>restore</strong> to create a new RRD from the XML dump. See
+<strong>rrdrestore</strong> for details.
+<p></p></ol>
+<p>
+</p>
+<hr />
+<h1><a name="environment_variables">ENVIRONMENT VARIABLES</a></h1>
+<p>The following environment variables may be used to change the behavior of
+<code>rrdtooldump</code>:</p>
+<dl>
+<dt><strong><a name="item_rrdcached_address"><strong>RRDCACHED_ADDRESS</strong></a></strong><br />
+</dt>
+<dd>
+If this environment variable is set it will have the same effect as specifying
+the <code>--daemon</code> option on the command line. If both are present, the command
+line argument takes precedence.
+</dd>
+<p></p></dl>
 <p>
 </p>
 <hr />
index a698d841eaa5387580fa9000e0c43020eab8de84..f822e8e5efb81c5368b44ce36cfbf2006eaef09f 100644 (file)
@@ -4,11 +4,11 @@ rrddump - dump the contents of an RRD to XML format
 
 =head1 SYNOPSIS
 
-B<rrdtool> B<dump> S<[B<--no-header>|B<-n>]> I<filename.rrd> E<gt> I<filename.xml>
-
-or 
-
-B<rrdtool> B<dump> S<[B<--no-header>|B<-n>]> I<filename.rrd> I<filename.xml>
+B<rrdtool> B<dump> I<filename.rrd> [I<filename.xml>]
+S<[B<--header>|B<-h> {none,xsd,dtd}]>
+S<[B<--no-header>]>
+S<[B<--daemon> I<address>]>
+S<E<gt> I<filename.xml>>
 
 =head1 DESCRIPTION
 
@@ -19,7 +19,6 @@ files from one computer architecture to another as well to
 manipulate the contents of an B<RRD> file in a somewhat more
 convenient manner.
 
-
 =over 8
 
 =item I<filename.rrd>
@@ -31,12 +30,27 @@ The name of the B<RRD> you want to dump.
 The (optional) filename that you want to write the XML output to.
 If not specified, the XML will be printed to stdout.
 
-=item S<[B<--no-header>|B<-n>]>
+=item B<--header>|B<-h> {none,xsd,dtd}
+
+By default rrdtool will add a dtd header to the xml file. Here
+you can customize this to and xsd header or no header at all.
+
+
+=item B<--no-header>
+
+A shortcut for S<--header=none>.
+
+If you want to restore the dump with rrdtool 1.2 you should use the
+S<--no-header> option since 1.2 can not deal with xml headers.
+
+=item B<--daemon> I<address>
 
-In rrdtool 1.3, the dump function started producing correct xml-headers.
-Unfortunately the rrdtool restore function from the 1.2 series can not
-handle these headers. With this option you can supress the creatinon of
-the xml headers.
+Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
+to the server before reading the RRD files. This allows B<rrdtool> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
+
+ rrdtool dump --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
 
 =back
 
@@ -62,6 +76,21 @@ B<rrdrestore> for details.
 
 =back
 
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>dump>:
+
+=over 4
+
+=item B<RRDCACHED_ADDRESS>
+
+If this environment variable is set it will have the same effect as specifying
+the C<--daemon> option on the command line. If both are present, the command
+line argument takes precedence.
+
+=back
+
 =head1 AUTHOR
 
 Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
index 02987e3f1529c77bac26dba9b23dc07bcced3e07..1fe1735c06b10449af09c551e05fd6e83e9057c9 100644 (file)
@@ -6,11 +6,8 @@ N\bNA\bAM\bME\bE
        rrddump - dump the contents of an RRD to XML format
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
-       r\brr\brd\bdt\bto\boo\bol\bl d\bdu\bum\bmp\bp [-\b--\b-n\bno\bo-\b-h\bhe\bea\bad\bde\ber\br|-\b-n\bn] _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\br_\br_\bd > _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\bx_\bm_\bl
-
-       or
-
-       r\brr\brd\bdt\bto\boo\bol\bl d\bdu\bum\bmp\bp [-\b--\b-n\bno\bo-\b-h\bhe\bea\bad\bde\ber\br|-\b-n\bn] _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\br_\br_\bd _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\bx_\bm_\bl
+       r\brr\brd\bdt\bto\boo\bol\bl d\bdu\bum\bmp\bp _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\br_\br_\bd [_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\bx_\bm_\bl] [-\b--\b-h\bhe\bea\bad\bde\ber\br|-\b-h\bh {none,xsd,dtd}]
+       [-\b--\b-n\bno\bo-\b-h\bhe\bea\bad\bde\ber\br] [-\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs] > _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\bx_\bm_\bl
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        The d\bdu\bum\bmp\bp function writes the contents of an R\bRR\bRD\bD in human readable (?)
@@ -26,11 +23,24 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                The (optional) filename that you want to write the XML output
                to.  If not specified, the XML will be printed to stdout.
 
-       [-\b--\b-n\bno\bo-\b-h\bhe\bea\bad\bde\ber\br|-\b-n\bn]
-               In rrdtool 1.3, the dump function started producing correct
-               xml-headers.  Unfortunately the rrdtool restore function from
-               the 1.2 series can not handle these headers. With this option
-               you can supress the creatinon of the xml headers.
+       -\b--\b-h\bhe\bea\bad\bde\ber\br|-\b-h\bh {none,xsd,dtd}
+               By default rrdtool will add a dtd header to the xml file. Here
+               you can customize this to and xsd header or no header at all.
+
+       -\b--\b-n\bno\bo-\b-h\bhe\bea\bad\bde\ber\br
+               A shortcut for --header=none.
+
+               If you want to restore the dump with rrdtool 1.2 you should use
+               the --no-header option since 1.2 can not deal with xml headers.
+
+       -\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs
+               Address of the rrdcached daemon. If specified, a "flush" com-
+               mand is sent to the server before reading the RRD files. This
+               allows r\brr\brd\bdt\bto\boo\bol\bl to return fresh data even if the daemon is con-
+               figured to cache values for a long time.  For a list of
+               accepted formats, see the -\b-l\bl option in the rrdcached manual.
+
+                rrdtool dump --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
 
 E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
        To transfer an RRD between architectures, follow these steps:
@@ -43,9 +53,18 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
        3.  Run r\brr\brd\bdt\bto\boo\bol\bl r\bre\bes\bst\bto\bor\bre\be to create a new RRD from the XML dump. See
            r\brr\brd\bdr\bre\bes\bst\bto\bor\bre\be for details.
 
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+       The following environment variables may be used to change the behavior
+       of "rrdtool dump":
+
+       R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
+           If this environment variable is set it will have the same effect as
+           specifying the "--daemon" option on the command line. If both are
+           present, the command line argument takes precedence.
+
 A\bAU\bUT\bTH\bHO\bOR\bR
        Tobias Oetiker <tobi@oetiker.ch>
 
 
 
-1.3.8                             2008-05-16                        RRDDUMP(1)
+1.3.99909060808                   2008-12-10                        RRDDUMP(1)
index dca9c9350d7a395d41ddb496c13ba1c24529be1e..96e21af5dae018dc863372c9aa37310142e6ec33 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDFETCH 1"
-.TH RRDFETCH 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDFETCH 1 "2008-09-25" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdfetch \- Fetch data from an RRD.
 .SH "SYNOPSIS"
@@ -137,6 +138,7 @@ rrdfetch \- Fetch data from an RRD.
 [\fB\-\-resolution\fR|\fB\-r\fR\ \fIresolution\fR]
 [\fB\-\-start\fR|\fB\-s\fR\ \fIstart\fR]
 [\fB\-\-end\fR|\fB\-e\fR\ \fIend\fR]
+[\fB\-\-daemon\fR\ \fIaddress\fR]
 .SH "DESCRIPTION"
 .IX Header "DESCRIPTION"
 The \fBfetch\fR function is normally used internally by the graph
@@ -168,7 +170,17 @@ section for a detailed explanation on  ways to specify the start time.
 the end of the time series in seconds since epoch. See also AT-STYLE
 \&\s-1TIME\s0 \s-1SPECIFICATION\s0 section for a detailed explanation of how to
 specify the end time.
-.SS "\s-1RESOLUTION\s0 \s-1INTERVAL\s0"
+.IP "\fB\-\-daemon\fR \fIaddress\fR" 8
+.IX Item "--daemon address"
+Address of the rrdcached daemon. If specified, a \f(CW\*(C`flush\*(C'\fR command is sent
+to the server before reading the \s-1RRD\s0 files. This allows \fBrrdtool\fR to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
+.Sp
+.Vb 1
+\& rrdtool fetch \-\-daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd AVERAGE
+.Ve
+.Sh "\s-1RESOLUTION\s0 \s-1INTERVAL\s0"
 .IX Subsection "RESOLUTION INTERVAL"
 In order to get RRDtool to fetch anything other than the finest resolution \s-1RRA\s0
 \&\fBboth\fR the start and end time must be specified on boundaries that are
@@ -226,19 +238,19 @@ Using the bash shell, this could look be:
 Or in Perl:
 .PP
 .Vb 3
-\& perl \-e \*(Aq$ctime = time; $rrdres = 900; \e
+\& perl \-e '$ctime = time; $rrdres = 900; \e
 \&          system "rrdtool fetch subdata.rrd AVERAGE \e
-\&                  \-r $rrdres \-e @{[int($ctime/$rrdres)*$rrdres]} \-s e\-1h"\*(Aq
+\&                  \-r $rrdres \-e @{[int($ctime/$rrdres)*$rrdres]} \-s e\-1h"'
 .Ve
-.SS "AT-STYLE \s-1TIME\s0 \s-1SPECIFICATION\s0"
+.Sh "AT-STYLE \s-1TIME\s0 \s-1SPECIFICATION\s0"
 .IX Subsection "AT-STYLE TIME SPECIFICATION"
 Apart from the traditional \fISeconds since epoch\fR, RRDtool does also
 understand at-style time specification. The specification is called
-\&\*(L"at-style\*(R" after the Unix command \fIat\fR\|(1) that has moderately complex
+\&\*(L"at\-style\*(R" after the Unix command \fIat\fR\|(1) that has moderately complex
 ways to specify time to run your job at a certain date and time. The
 at-style specification consists of two parts: the \fB\s-1TIME\s0 \s-1REFERENCE\s0\fR
 specification and the \fB\s-1TIME\s0 \s-1OFFSET\s0\fR specification.
-.SS "\s-1TIME\s0 \s-1REFERENCE\s0 \s-1SPECIFICATION\s0"
+.Sh "\s-1TIME\s0 \s-1REFERENCE\s0 \s-1SPECIFICATION\s0"
 .IX Subsection "TIME REFERENCE SPECIFICATION"
 The time reference specification is used, well, to establish a reference
 moment in time (to which the time offset is then applied to). When present,
@@ -274,7 +286,7 @@ categories (\fBrrdfetch\fR, rrdgraph).
 Month and day of the week names can be used in their naturally
 abbreviated form (e.g., Dec for December, Sun for Sunday, etc.). The
 words \fBnow\fR, \fBstart\fR, \fBend\fR can be abbreviated as \fBn\fR, \fBs\fR, \fBe\fR.
-.SS "\s-1TIME\s0 \s-1OFFSET\s0 \s-1SPECIFICATION\s0"
+.Sh "\s-1TIME\s0 \s-1OFFSET\s0 \s-1SPECIFICATION\s0"
 .IX Subsection "TIME OFFSET SPECIFICATION"
 The time offset specification is used to add/subtract certain time
 intervals to/from the time reference moment. It consists of a \fIsign\fR
@@ -314,27 +326,29 @@ equals 47 hours; on the other hand, '8:00\ Mar\ 27\ 1999\ +48\ hours' =
 \&\fI\s-1NOTE4\s0\fR: The single-letter abbreviation for both \fBmonths\fR and \fBminutes\fR
 is \fBm\fR. To disambiguate them, the parser tries to read your mind\ :)
 by applying the following two heuristics:
-.IP "1." 3
+.IP "1" 3
+.IX Item "1"
 If \fBm\fR is used in context of (i.e. right after the) years,
 months, weeks, or days it is assumed to mean \fBmonths\fR, while
 in the context of hours, minutes, and seconds it means minutes.
 (e.g., in \-1y6m or +3w1m \fBm\fR is interpreted as \fBmonths\fR, while in
 \&\-3h20m or +5s2m \fBm\fR the parser decides for \fBminutes\fR).
-.IP "2." 3
+.IP "2" 3
+.IX Item "2"
 Out of context (i.e. right after the \fB+\fR or \fB\-\fR sign) the
 meaning of \fBm\fR is guessed from the number it directly follows.
 Currently, if the number's absolute value is below 25 it is assumed
 that \fBm\fR means \fBmonths\fR, otherwise it is treated as \fBminutes\fR.
 (e.g., \-25m == \-25 minutes, while +24m == +24 months)
 .PP
-\&\fIFinal \s-1NOTES\s0\fR: Time specification is case-insensitive.
+\&\fIFinal \s-1NOTES\s0\fR: Time specification is case\-insensitive.
 Whitespace can be inserted freely or omitted altogether.
 There are, however, cases when whitespace is required
 (e.g., 'midnight\ Thu'). In this case you should either quote the
 whole phrase to prevent it from being taken apart by your shell or use
 \&'_' (underscore) or ',' (comma) which also count as whitespace
 (e.g., midnight_Thu or midnight,Thu).
-.SS "\s-1TIME\s0 \s-1SPECIFICATION\s0 \s-1EXAMPLES\s0"
+.Sh "\s-1TIME\s0 \s-1SPECIFICATION\s0 \s-1EXAMPLES\s0"
 .IX Subsection "TIME SPECIFICATION EXAMPLES"
 \&\fIOct 12\fR \*(-- October 12 this year
 .PP
@@ -361,6 +375,15 @@ as \fI9am\-1day\fR.
 .PP
 \&\fI19970703 12:45\fR \*(-- 12:45  July 3th, 1997
 (my favorite, and its even got an \s-1ISO\s0 number (8601)).
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ fetch\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 Tobias Oetiker <tobi@oetiker.ch>
index afb8317fa064ed3349a31879030a53a81de4e817..c8b21d3e661156e51eed130ceb4cd08d89b3d810 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdfetch</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <ul>
 
                <li><a href="#resolution_interval">RESOLUTION INTERVAL</a></li>
-               <li><a href="#at_style_time_specification">AT-STYLE TIME SPECIFICATION</a></li>
+               <li><a href="#atstyle_time_specification">AT-STYLE TIME SPECIFICATION</a></li>
                <li><a href="#time_reference_specification">TIME REFERENCE SPECIFICATION</a></li>
                <li><a href="#time_offset_specification">TIME OFFSET SPECIFICATION</a></li>
                <li><a href="#time_specification_examples">TIME SPECIFICATION EXAMPLES</a></li>
        </ul>
 
+       <li><a href="#environment_variables">ENVIRONMENT VARIABLES</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -49,7 +42,8 @@
 <p><strong>rrdtool</strong> <strong>fetch</strong> <em>filename</em> <em>CF</em>
 [<strong>--resolution</strong>|<strong>-r</strong>&nbsp;<em>resolution</em>]
 [<strong>--start</strong>|<strong>-s</strong>&nbsp;<em>start</em>]
-[<strong>--end</strong>|<strong>-e</strong>&nbsp;<em>end</em>]</p>
+[<strong>--end</strong>|<strong>-e</strong>&nbsp;<em>end</em>]
+[<strong>--daemon</strong>&nbsp;<em>address</em>]</p>
 <p>
 </p>
 <hr />
 function to get data from <strong>RRD</strong>s. <strong>fetch</strong> will analyze the <strong>RRD</strong>
 and try to retrieve the data in the resolution requested.
 The data fetched is printed to stdout. <em>*UNKNOWN*</em> data is often
-represented by the string &quot;NaN&quot; depending on your OS's printf
+represented by the string ``NaN'' depending on your OS's printf
 function.</p>
 <dl>
-<dt><strong><a name="filename" class="item"><em>filename</em></a></strong></dt>
-
+<dt><strong><a name="item_filename"><em>filename</em></a></strong><br />
+</dt>
 <dd>
-<p>the name of the <strong>RRD</strong> you want to fetch the data from.</p>
+the name of the <strong>RRD</strong> you want to fetch the data from.
 </dd>
-<dt><strong><a name="cf" class="item"><em>CF</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_cf"><em>CF</em></a></strong><br />
+</dt>
 <dd>
-<p>the consolidation function that is applied to the data you
-want to fetch (AVERAGE,MIN,MAX,LAST)</p>
+the consolidation function that is applied to the data you
+want to fetch (AVERAGE,MIN,MAX,LAST)
 </dd>
-<dt><strong><a name="resolution" class="item"><strong>--resolution</strong>|<strong>-r</strong> <em>resolution</em> (default is the highest resolution)</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_resolution"><strong>--resolution</strong>|<strong>-r</strong> <em>resolution</em> (default is the highest resolution)</a></strong><br />
+</dt>
 <dd>
-<p>the interval you want the values to have (seconds per
+the interval you want the values to have (seconds per
 value). <strong>rrdfetch</strong> will try to match your request, but it will return
-data even if no absolute match is possible. <strong>NB.</strong> See note below.</p>
+data even if no absolute match is possible. <strong>NB.</strong> See note below.
 </dd>
-<dt><strong><a name="start" class="item"><strong>--start</strong>|<strong>-s</strong> <em>start</em> (default end-1day)</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_start"><strong>--start</strong>|<strong>-s</strong> <em>start</em> (default end-1day)</a></strong><br />
+</dt>
 <dd>
-<p>start of the time series. A time in seconds since epoch (1970-01-01)
+start of the time series. A time in seconds since epoch (1970-01-01)
 is required. Negative numbers are relative to the current time. By default,
 one day worth of data will be fetched. See also AT-STYLE TIME SPECIFICATION
-section for a detailed explanation on  ways to specify the start time.</p>
+section for a detailed explanation on  ways to specify the start time.
 </dd>
-<dt><strong><a name="end" class="item"><strong>--end</strong>|<strong>-e</strong> <em>end</em> (default now)</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_end"><strong>--end</strong>|<strong>-e</strong> <em>end</em> (default now)</a></strong><br />
+</dt>
 <dd>
-<p>the end of the time series in seconds since epoch. See also AT-STYLE
+the end of the time series in seconds since epoch. See also AT-STYLE
 TIME SPECIFICATION section for a detailed explanation of how to
-specify the end time.</p>
+specify the end time.
 </dd>
-</dl>
+<p></p>
+<dt><strong><a name="item__2d_2ddaemon_address"><strong>--daemon</strong> <em>address</em></a></strong><br />
+</dt>
+<dd>
+Address of the <a href="././rrdcached.html">the rrdcached manpage</a> daemon. If specified, a <code>flush</code> command is sent
+to the server before reading the RRD files. This allows <strong>rrdtool</strong> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the <strong>-l</strong> option in the <a href="././rrdcached.html">the rrdcached manpage</a> manual.
+</dd>
+<dd>
+<pre>
+ rrdtool fetch --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd AVERAGE</pre>
+</dd>
+<p></p></dl>
 <p>
 </p>
 <h2><a name="resolution_interval">RESOLUTION INTERVAL</a></h2>
@@ -122,14 +133,13 @@ i.e. 5 minute averages, will be chosen which in this case is not
 what you want.</p>
 <p>Hence, make sure that</p>
 <ol>
-<li>
-<p>both start and end time are a multiple of 900</p>
-</li>
-<li>
-<p>both start and end time are within the desired RRA</p>
-</li>
-</ol>
-<p>So, if time now is called &quot;t&quot;, do</p>
+<li></li>
+both start and end time are a multiple of 900
+<p></p>
+<li></li>
+both start and end time are within the desired RRA
+<p></p></ol>
+<p>So, if time now is called ``t'', do</p>
 <pre>
  end time == int(t/900)*900,
  start time == end time - 1hour,
@@ -147,10 +157,10 @@ what you want.</p>
                   -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h&quot;'</pre>
 <p>
 </p>
-<h2><a name="at_style_time_specification">AT-STYLE TIME SPECIFICATION</a></h2>
+<h2><a name="atstyle_time_specification">AT-STYLE TIME SPECIFICATION</a></h2>
 <p>Apart from the traditional <em>Seconds since epoch</em>, RRDtool does also
 understand at-style time specification. The specification is called
-&quot;at-style&quot; after the Unix command <code>at(1)</code> that has moderately complex
+``at-style'' after the Unix command <code>at(1)</code> that has moderately complex
 ways to specify time to run your job at a certain date and time. The
 at-style specification consists of two parts: the <strong>TIME REFERENCE</strong>
 specification and the <strong>TIME OFFSET</strong> specification.</p>
@@ -225,21 +235,20 @@ equals 47 hours; on the other hand, '8:00&nbsp;Mar&nbsp;27&nbsp;1999&nbsp;+48&nb
 is <strong>m</strong>. To disambiguate them, the parser tries to read your mind&nbsp;:)
 by applying the following two heuristics:</p>
 <ol>
-<li>
-<p>If <strong>m</strong> is used in context of (i.e. right after the) years,
+<li></li>
+If <strong>m</strong> is used in context of (i.e. right after the) years,
 months, weeks, or days it is assumed to mean <strong>months</strong>, while
 in the context of hours, minutes, and seconds it means minutes.
 (e.g., in -1y6m or +3w1m <strong>m</strong> is interpreted as <strong>months</strong>, while in
--3h20m or +5s2m <strong>m</strong> the parser decides for <strong>minutes</strong>).</p>
-</li>
-<li>
-<p>Out of context (i.e. right after the <strong>+</strong> or <strong>-</strong> sign) the
+-3h20m or +5s2m <strong>m</strong> the parser decides for <strong>minutes</strong>).
+<p></p>
+<li></li>
+Out of context (i.e. right after the <strong>+</strong> or <strong>-</strong> sign) the
 meaning of <strong>m</strong> is guessed from the number it directly follows.
 Currently, if the number's absolute value is below 25 it is assumed
 that <strong>m</strong> means <strong>months</strong>, otherwise it is treated as <strong>minutes</strong>.
-(e.g., -25m == -25 minutes, while +24m == +24 months)</p>
-</li>
-</ol>
+(e.g., -25m == -25 minutes, while +24m == +24 months)
+<p></p></ol>
 <p><em>Final NOTES</em>: Time specification is case-insensitive.
 Whitespace can be inserted freely or omitted altogether.
 There are, however, cases when whitespace is required
@@ -269,6 +278,21 @@ as <em>9am-1day</em>.</p>
 <p>
 </p>
 <hr />
+<h1><a name="environment_variables">ENVIRONMENT VARIABLES</a></h1>
+<p>The following environment variables may be used to change the behavior of
+<code>rrdtoolfetch</code>:</p>
+<dl>
+<dt><strong><a name="item_rrdcached_address"><strong>RRDCACHED_ADDRESS</strong></a></strong><br />
+</dt>
+<dd>
+If this environment variable is set it will have the same effect as specifying
+the <code>--daemon</code> option on the command line. If both are present, the command
+line argument takes precedence.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
 <h1><a name="author">AUTHOR</a></h1>
 <p>Tobias Oetiker &lt;<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>&gt;</p>
 
index 51b5ccd99c8441f8f7f12021836ba22a902ccc56..0052aa6513b1a82b351d5e705cc5fd185f78d090 100644 (file)
@@ -8,6 +8,7 @@ B<rrdtool> B<fetch> I<filename> I<CF>
 S<[B<--resolution>|B<-r> I<resolution>]>
 S<[B<--start>|B<-s> I<start>]>
 S<[B<--end>|B<-e> I<end>]>
+S<[B<--daemon> I<address>]>
 
 =head1 DESCRIPTION
 
@@ -48,6 +49,15 @@ the end of the time series in seconds since epoch. See also AT-STYLE
 TIME SPECIFICATION section for a detailed explanation of how to
 specify the end time.
 
+=item B<--daemon> I<address>
+
+Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
+to the server before reading the RRD files. This allows B<rrdtool> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
+
+ rrdtool fetch --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd AVERAGE
+
 =back
 
 =head2 RESOLUTION INTERVAL
@@ -257,6 +267,22 @@ I<931225537> -- 18:45  July 5th, 1999
 I<19970703 12:45> -- 12:45  July 3th, 1997
 (my favorite, and its even got an ISO number (8601)).
 
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>fetch>:
+
+=over 4
+
+=item B<RRDCACHED_ADDRESS>
+
+If this environment variable is set it will have the same effect as specifying
+the C<--daemon> option on the command line. If both are present, the command
+line argument takes precedence.
+
+=back
+
 =head1 AUTHOR
 
-Tobias Oetiker <tobi@oetiker.ch>
+Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
+
index 9e00cbc4d18f721f4b94d8b15cb11d53b79c50cc..8717403342736e385d4dd2cdc07eb111cd91fa2d 100644 (file)
@@ -7,14 +7,14 @@ N\bNA\bAM\bME\bE
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
        r\brr\brd\bdt\bto\boo\bol\bl f\bfe\bet\btc\bch\bh _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be _\bC_\bF [-\b--\b-r\bre\bes\bso\bol\blu\but\bti\bio\bon\bn|-\b-r\br _\br_\be_\bs_\bo_\bl_\bu_\bt_\bi_\bo_\bn]
-       [-\b--\b-s\bst\bta\bar\brt\bt|-\b-s\bs _\bs_\bt_\ba_\br_\bt] [-\b--\b-e\ben\bnd\bd|-\b-e\be _\be_\bn_\bd]
+       [-\b--\b-s\bst\bta\bar\brt\bt|-\b-s\bs _\bs_\bt_\ba_\br_\bt] [-\b--\b-e\ben\bnd\bd|-\b-e\be _\be_\bn_\bd] [-\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs]
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        The f\bfe\bet\btc\bch\bh function is normally used internally by the graph function to
        get data from R\bRR\bRD\bDs. f\bfe\bet\btc\bch\bh will analyze the R\bRR\bRD\bD and try to retrieve the
-       data in the resolution requested.  The data fetched is printed to
-       stdout. _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* data is often represented by the string "NaN"
-       depending on your OS's printf function.
+       data in the resolution requested.  The data fetched is printed to std-
+       out. _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* data is often represented by the string "NaN" depending
+       on your OS's printf function.
 
        _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
                the name of the R\bRR\bRD\bD you want to fetch the data from.
@@ -39,11 +39,21 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                STYLE TIME SPECIFICATION section for a detailed explanation of
                how to specify the end time.
 
-   R\bRE\bES\bSO\bOL\bLU\bUT\bTI\bIO\bON\bN I\bIN\bNT\bTE\bER\bRV\bVA\bAL\bL
-       In order to get RRDtool to fetch anything other than the finest
-       resolution RRA b\bbo\bot\bth\bh the start and end time must be specified on
-       boundaries that are multiples of the desired resolution. Consider the
-       following example:
+       -\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs
+               Address of the rrdcached daemon. If specified, a "flush" com-
+               mand is sent to the server before reading the RRD files. This
+               allows r\brr\brd\bdt\bto\boo\bol\bl to return fresh data even if the daemon is con-
+               figured to cache values for a long time.  For a list of
+               accepted formats, see the -\b-l\bl option in the rrdcached manual.
+
+                rrdtool fetch --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd AVERAGE
+
+       R\bRE\bES\bSO\bOL\bLU\bUT\bTI\bIO\bON\bN I\bIN\bNT\bTE\bER\bRV\bVA\bAL\bL
+
+       In order to get RRDtool to fetch anything other than the finest resolu-
+       tion RRA b\bbo\bot\bth\bh the start and end time must be specified on boundaries
+       that are multiples of the desired resolution. Consider the following
+       example:
 
         rrdtool create subdata.rrd -s 10 DS:ds0:GAUGE:300:0:U \
          RRA:AVERAGE:0.5:30:3600 \
@@ -91,20 +101,22 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                  system "rrdtool fetch subdata.rrd AVERAGE \
                          -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-1h"'
 
-   A\bAT\bT-\b-S\bST\bTY\bYL\bLE\bE T\bTI\bIM\bME\bE S\bSP\bPE\bEC\bCI\bIF\bFI\bIC\bCA\bAT\bTI\bIO\bON\bN
+       A\bAT\bT-\b-S\bST\bTY\bYL\bLE\bE T\bTI\bIM\bME\bE S\bSP\bPE\bEC\bCI\bIF\bFI\bIC\bCA\bAT\bTI\bIO\bON\bN
+
        Apart from the traditional _\bS_\be_\bc_\bo_\bn_\bd_\bs _\bs_\bi_\bn_\bc_\be _\be_\bp_\bo_\bc_\bh, RRDtool does also
        understand at-style time specification. The specification is called
        "at-style" after the Unix command _\ba_\bt(1) that has moderately complex
        ways to specify time to run your job at a certain date and time. The
-       at-style specification consists of two parts: the T\bTI\bIM\bME\bE R\bRE\bEF\bFE\bER\bRE\bEN\bNC\bCE\bE
-       specification and the T\bTI\bIM\bME\bE O\bOF\bFF\bFS\bSE\bET\bT specification.
+       at-style specification consists of two parts: the T\bTI\bIM\bME\bE R\bRE\bEF\bFE\bER\bRE\bEN\bNC\bCE\bE speci-
+       fication and the T\bTI\bIM\bME\bE O\bOF\bFF\bFS\bSE\bET\bT specification.
+
+       T\bTI\bIM\bME\bE R\bRE\bEF\bFE\bER\bRE\bEN\bNC\bCE\bE S\bSP\bPE\bEC\bCI\bIF\bFI\bIC\bCA\bAT\bTI\bIO\bON\bN
 
-   T\bTI\bIM\bME\bE R\bRE\bEF\bFE\bER\bRE\bEN\bNC\bCE\bE S\bSP\bPE\bEC\bCI\bIF\bFI\bIC\bCA\bAT\bTI\bIO\bON\bN
-       The time reference specification is used, well, to establish a
-       reference moment in time (to which the time offset is then applied to).
-       When present, it should come first, when omitted, it defaults to n\bno\bow\bw.
-       On its own part, time reference consists of a _\bt_\bi_\bm_\be_\b-_\bo_\bf_\b-_\bd_\ba_\by reference
-       (which should come first, if present) and a _\bd_\ba_\by reference.
+       The time reference specification is used, well, to establish a refer-
+       ence moment in time (to which the time offset is then applied to). When
+       present, it should come first, when omitted, it defaults to n\bno\bow\bw. On its
+       own part, time reference consists of a _\bt_\bi_\bm_\be_\b-_\bo_\bf_\b-_\bd_\ba_\by reference (which
+       should come first, if present) and a _\bd_\ba_\by reference.
 
        The _\bt_\bi_\bm_\be_\b-_\bo_\bf_\b-_\bd_\ba_\by can be specified as H\bHH\bH:\b:M\bMM\bM, H\bHH\bH.\b.M\bMM\bM, or just H\bHH\bH. You can
        suffix it with a\bam\bm or p\bpm\bm or use 24-hours clock. Some special times of
@@ -123,17 +135,18 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        _\bN_\bO_\bT_\bE_\b2: if you specify the _\bd_\ba_\by in this way, the _\bt_\bi_\bm_\be_\b-_\bo_\bf_\b-_\bd_\ba_\by is REQUIRED
        as well.
 
-       Finally, you can use the words n\bno\bow\bw, s\bst\bta\bar\brt\bt, or e\ben\bnd\bd as your time
-       reference. N\bNo\bow\bw refers to the current moment (and is also the default
-       time reference). S\bSt\bta\bar\brt\bt (e\ben\bnd\bd) can be used to specify a time relative to
-       the start (end) time for those tools that use these categories
-       (r\brr\brd\bdf\bfe\bet\btc\bch\bh, rrdgraph).
+       Finally, you can use the words n\bno\bow\bw, s\bst\bta\bar\brt\bt, or e\ben\bnd\bd as your time refer-
+       ence. N\bNo\bow\bw refers to the current moment (and is also the default time
+       reference). S\bSt\bta\bar\brt\bt (e\ben\bnd\bd) can be used to specify a time relative to the
+       start (end) time for those tools that use these categories (r\brr\brd\bdf\bfe\bet\btc\bch\bh,
+       rrdgraph).
 
-       Month and day of the week names can be used in their naturally
-       abbreviated form (e.g., Dec for December, Sun for Sunday, etc.). The
-       words n\bno\bow\bw, s\bst\bta\bar\brt\bt, e\ben\bnd\bd can be abbreviated as n\bn, s\bs, e\be.
+       Month and day of the week names can be used in their naturally abbrevi-
+       ated form (e.g., Dec for December, Sun for Sunday, etc.). The words
+       n\bno\bow\bw, s\bst\bta\bar\brt\bt, e\ben\bnd\bd can be abbreviated as n\bn, s\bs, e\be.
+
+       T\bTI\bIM\bME\bE O\bOF\bFF\bFS\bSE\bET\bT S\bSP\bPE\bEC\bCI\bIF\bFI\bIC\bCA\bAT\bTI\bIO\bON\bN
 
-   T\bTI\bIM\bME\bE O\bOF\bFF\bFS\bSE\bET\bT S\bSP\bPE\bEC\bCI\bIF\bFI\bIC\bCA\bAT\bTI\bIO\bON\bN
        The time offset specification is used to add/subtract certain time
        intervals to/from the time reference moment. It consists of a _\bs_\bi_\bg_\bn
        (+\b+ or -\b-) and an _\ba_\bm_\bo_\bu_\bn_\bt. The following time units can be used to specify
@@ -144,10 +157,10 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        = -5h-45min = -6h+15min = -7h+1h30m-15min, etc.)
 
        _\bN_\bO_\bT_\bE_\b3: If you specify time offset in days, weeks, months, or years, you
-       will end with the time offset that may vary depending on your time
-       reference, because all those time units have no single well defined
-       time interval value (1 year contains either 365 or 366 days, 1 month is
-       28 to 31 days long, and even 1 day may be not equal to 24 hours twice a
+       will end with the time offset that may vary depending on your time ref-
+       erence, because all those time units have no single well defined time
+       interval value (1 year contains either 365 or 366 days, 1 month is 28
+       to 31 days long, and even 1 day may be not equal to 24 hours twice a
        year, when DST-related clock adjustments take place).  To cope with
        this, when you use days, weeks, months, or years as your time offset
        units your time reference date is adjusted accordingly without too much
@@ -159,30 +172,30 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        invalid time/date combination (because of 3am -> 4am DST forward clock
        adjustment, see the below example).
 
-       In contrast, hours, minutes, and seconds are well defined time
-       intervals, and these are guaranteed to always produce time offsets
-       exactly as specified (e.g. for EET timezone, '8:00 Mar 27 1999 +2 days'
-       = '8:00 Mar 29 1999', but since there is 1-hour DST forward clock
-       adjustment that occurs around 3:00 Mar 28 1999, the actual time
-       interval between 8:00 Mar 27 1999 and 8:00 Mar 29 1999 equals 47 hours;
-       on the other hand, '8:00 Mar 27 1999 +48 hours' = '9:00 Mar 29 1999',
-       as expected)
+       In contrast, hours, minutes, and seconds are well defined time inter-
+       vals, and these are guaranteed to always produce time offsets exactly
+       as specified (e.g. for EET timezone, '8:00 Mar 27 1999 +2 days' =
+       '8:00 Mar 29 1999', but since there is 1-hour DST forward clock adjust-
+       ment that occurs around 3:00 Mar 28 1999, the actual time interval
+       between 8:00 Mar 27 1999 and 8:00 Mar 29 1999 equals 47 hours; on the
+       other hand, '8:00 Mar 27 1999 +48 hours' = '9:00 Mar 29 1999', as
+       expected)
 
        _\bN_\bO_\bT_\bE_\b4: The single-letter abbreviation for both m\bmo\bon\bnt\bth\bhs\bs and m\bmi\bin\bnu\but\bte\bes\bs is m\bm.
        To disambiguate them, the parser tries to read your mind :) by applying
        the following two heuristics:
 
-       1. If m\bm is used in context of (i.e. right after the) years, months,
+       1  If m\bm is used in context of (i.e. right after the) years, months,
           weeks, or days it is assumed to mean m\bmo\bon\bnt\bth\bhs\bs, while in the context of
           hours, minutes, and seconds it means minutes.  (e.g., in -1y6m or
           +3w1m m\bm is interpreted as m\bmo\bon\bnt\bth\bhs\bs, while in -3h20m or +5s2m m\bm the
           parser decides for m\bmi\bin\bnu\but\bte\bes\bs).
 
-       2. Out of context (i.e. right after the +\b+ or -\b- sign) the meaning of m\bm
+       2  Out of context (i.e. right after the +\b+ or -\b- sign) the meaning of m\bm
           is guessed from the number it directly follows.  Currently, if the
           number's absolute value is below 25 it is assumed that m\bm means
-          m\bmo\bon\bnt\bth\bhs\bs, otherwise it is treated as m\bmi\bin\bnu\but\bte\bes\bs.  (e.g., -25m == -25
-          minutes, while +24m == +24 months)
+          m\bmo\bon\bnt\bth\bhs\bs, otherwise it is treated as m\bmi\bin\bnu\but\bte\bes\bs.  (e.g., -25m == -25 min-
+          utes, while +24m == +24 months)
 
        _\bF_\bi_\bn_\ba_\bl _\bN_\bO_\bT_\bE_\bS: Time specification is case-insensitive.  Whitespace can be
        inserted freely or omitted altogether.  There are, however, cases when
@@ -191,7 +204,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        your shell or use '_' (underscore) or ',' (comma) which also count as
        whitespace (e.g., midnight_Thu or midnight,Thu).
 
-   T\bTI\bIM\bME\bE S\bSP\bPE\bEC\bCI\bIF\bFI\bIC\bCA\bAT\bTI\bIO\bON\bN E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
+       T\bTI\bIM\bME\bE S\bSP\bPE\bEC\bCI\bIF\bFI\bIC\bCA\bAT\bTI\bIO\bON\bN E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
+
        _\bO_\bc_\bt _\b1_\b2 -- October 12 this year
 
        _\b-_\b1_\bm_\bo_\bn_\bt_\bh or _\b-_\b1_\bm -- current time of day, only a month before (may yield
@@ -218,9 +232,18 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        _\b1_\b9_\b9_\b7_\b0_\b7_\b0_\b3 _\b1_\b2_\b:_\b4_\b5 -- 12:45  July 3th, 1997 (my favorite, and its even got
        an ISO number (8601)).
 
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+       The following environment variables may be used to change the behavior
+       of "rrdtool fetch":
+
+       R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
+           If this environment variable is set it will have the same effect as
+           specifying the "--daemon" option on the command line. If both are
+           present, the command line argument takes precedence.
+
 A\bAU\bUT\bTH\bHO\bOR\bR
        Tobias Oetiker <tobi@oetiker.ch>
 
 
 
-1.3.8                             2008-03-15                       RRDFETCH(1)
+1.3.99909060808                   2008-09-25                       RRDFETCH(1)
index 963e998ce7f3e8c99831aa2160b29a5f9e81a058..3d3cb9d289bbfc12bbd3480b1a20ecf4a59ee48f 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDFIRST 1"
-.TH RRDFIRST 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDFIRST 1 "2008-03-15" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdfirst \- Return the date of the first data sample in an RRA within an RRD
 .SH "SYNOPSIS"
index ea7f43d76566cfdda55c9117c9ea0339a969f3b6..94a68d4d2f1bdf777dc4b3cf547e2d28cdbe6e3a 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdfirst</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#description">DESCRIPTION</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
 <p>The <strong>first</strong> function returns the UNIX timestamp of the first data
 sample entered into the specified RRA of the RRD file.</p>
 <dl>
-<dt><strong><a name="filename" class="item"><em>filename</em></a></strong></dt>
-
+<dt><strong><a name="item_filename"><em>filename</em></a></strong><br />
+</dt>
 <dd>
-<p>The name of the <strong>RRD</strong> that contains the data.</p>
+The name of the <strong>RRD</strong> that contains the data.
 </dd>
-<dt><strong><a name="rraindex_number" class="item"><em>--rraindex number</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2drraindex_number"><em>--rraindex number</em></a></strong><br />
+</dt>
 <dd>
-<p>The index number of the <strong>RRA</strong> that is to be examined. If not specified, the
+The index number of the <strong>RRA</strong> that is to be examined. If not specified, the
 index defaults to zero. <strong>RRA</strong> index numbers can be determined through
-<strong>rrdtool info</strong>.</p>
+<strong>rrdtool info</strong>.
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index ecad6bde9576e054b13e504361d34703626d1a10..7d669015a69250a8fa311ce4b0492c8b7f040ec6 100644 (file)
@@ -26,4 +26,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2008-03-15                       RRDFIRST(1)
+1.3.99909060808                   2008-03-15                       RRDFIRST(1)
diff --git a/doc/rrdflushcached.1 b/doc/rrdflushcached.1
new file mode 100644 (file)
index 0000000..8a066de
--- /dev/null
@@ -0,0 +1,171 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "RRDFLUSHCACHED 1"
+.TH RRDFLUSHCACHED 1 "2009-05-26" "1.3.99909060808" "rrdtool"
+.SH "NAME"
+rrdflush \- Flush the values for a spcific RRD file from memory.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBrrdtool\fR \fBflushcached\fR
+[\fB\-\-daemon\fR\ \fIaddress\fR]
+\&\fIfilename\fR [\fIfilename\fR ...]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+The \fBflushcached\fR function connects to rrdcached, the \s-1RRD\s0 caching daemon,
+and issues a \*(L"flush\*(R" command for the given files. The daemon will put the
+files to the head of the update queue so they are written \*(L"soon\*(R". The
+status will be returned only after the files' pending updates have been
+written to disk.
+.IP "\fIfilename\fR" 8
+.IX Item "filename"
+The name(s) of the \fB\s-1RRD\s0\fR file(s) that are to be written to disk.
+.IP "\fB\-\-daemon\fR \fIaddress\fR" 8
+.IX Item "--daemon address"
+Address of the rrdcached daemon. If not specified, the
+\&\s-1RRDCACHED_ADDRESS\s0 environment variable must be set (see below).  For a
+list of accepted formats, see the \fB\-l\fR option in the rrdcached
+manual.
+.Sp
+.Vb 1
+\& rrdtool flush \-\-daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+.Ve
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ flushcached\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Florian Forster <octo\ at\ verplant.org>
diff --git a/doc/rrdflushcached.html b/doc/rrdflushcached.html
new file mode 100644 (file)
index 0000000..ba633d8
--- /dev/null
@@ -0,0 +1,88 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>rrdflushcached</title>
+<link rev="made" href="mailto:root@localhost" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+<!--
+
+<ul>
+
+       <li><a href="#name">NAME</a></li>
+       <li><a href="#synopsis">SYNOPSIS</a></li>
+       <li><a href="#description">DESCRIPTION</a></li>
+       <li><a href="#environment_variables">ENVIRONMENT VARIABLES</a></li>
+       <li><a href="#author">AUTHOR</a></li>
+</ul>
+-->
+<!-- INDEX END -->
+
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>rrdflush - Flush the values for a spcific RRD file from memory.</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<p><strong>rrdtool</strong> <strong>flushcached</strong>
+[<strong>--daemon</strong>&nbsp;<em>address</em>]
+<em>filename</em> [<em>filename</em> ...]</p>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>The <strong>flushcached</strong> function connects to <a href="././rrdcached.html">the rrdcached manpage</a>, the RRD caching daemon,
+and issues a ``flush'' command for the given files. The daemon will put the
+files to the head of the update queue so they are written ``soon''. The
+status will be returned only after the files' pending updates have been
+written to disk.</p>
+<dl>
+<dt><strong><a name="item_filename"><em>filename</em></a></strong><br />
+</dt>
+<dd>
+The <code>name(s)</code> of the <strong>RRD</strong> <code>file(s)</code> that are to be written to disk.
+</dd>
+<p></p>
+<dt><strong><a name="item__2d_2ddaemon_address"><strong>--daemon</strong> <em>address</em></a></strong><br />
+</dt>
+<dd>
+Address of the <a href="././rrdcached.html">the rrdcached manpage</a> daemon. If not specified, the
+RRDCACHED_ADDRESS environment variable must be set (see below).  For a
+list of accepted formats, see the <strong>-l</strong> option in the <a href="././rrdcached.html">the rrdcached manpage</a>
+manual.
+</dd>
+<dd>
+<pre>
+ rrdtool flush --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd</pre>
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="environment_variables">ENVIRONMENT VARIABLES</a></h1>
+<p>The following environment variables may be used to change the behavior of
+<code>rrdtoolflushcached</code>:</p>
+<dl>
+<dt><strong><a name="item_rrdcached_address"><strong>RRDCACHED_ADDRESS</strong></a></strong><br />
+</dt>
+<dd>
+If this environment variable is set it will have the same effect as specifying
+the <code>--daemon</code> option on the command line. If both are present, the command
+line argument takes precedence.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="author">AUTHOR</a></h1>
+<p>Florian Forster &lt;octo&nbsp;at&nbsp;verplant.org&gt;</p>
+
+</body>
+
+</html>
diff --git a/doc/rrdflushcached.pod b/doc/rrdflushcached.pod
new file mode 100644 (file)
index 0000000..3c14201
--- /dev/null
@@ -0,0 +1,53 @@
+=head1 NAME
+
+rrdflush - Flush the values for a spcific RRD file from memory.
+
+=head1 SYNOPSIS
+
+B<rrdtool> B<flushcached>
+S<[B<--daemon> I<address>]>
+I<filename> [I<filename> ...]
+
+=head1 DESCRIPTION
+
+The B<flushcached> function connects to L<rrdcached>, the RRD caching daemon,
+and issues a "flush" command for the given files. The daemon will put the
+files to the head of the update queue so they are written "soon". The
+status will be returned only after the files' pending updates have been
+written to disk.
+
+=over 8
+
+=item I<filename>
+
+The name(s) of the B<RRD> file(s) that are to be written to disk.
+
+=item B<--daemon> I<address>
+
+Address of the L<rrdcached> daemon. If not specified, the
+RRDCACHED_ADDRESS environment variable must be set (see below).  For a
+list of accepted formats, see the B<-l> option in the L<rrdcached>
+manual.
+
+ rrdtool flush --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+
+=back
+
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>flushcached>:
+
+=over 4
+
+=item B<RRDCACHED_ADDRESS>
+
+If this environment variable is set it will have the same effect as specifying
+the C<--daemon> option on the command line. If both are present, the command
+line argument takes precedence.
+
+=back
+
+=head1 AUTHOR
+
+Florian Forster E<lt>octoE<nbsp>atE<nbsp>verplant.orgE<gt>
diff --git a/doc/rrdflushcached.txt b/doc/rrdflushcached.txt
new file mode 100644 (file)
index 0000000..ef7be78
--- /dev/null
@@ -0,0 +1,43 @@
+RRDFLUSHCACHED(1)                   rrdtool                  RRDFLUSHCACHED(1)
+
+
+
+N\bNA\bAM\bME\bE
+       rrdflush - Flush the values for a spcific RRD file from memory.
+
+S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
+       r\brr\brd\bdt\bto\boo\bol\bl f\bfl\blu\bus\bsh\bhc\bca\bac\bch\bhe\bed\bd [-\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs] _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be ...]
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+       The f\bfl\blu\bus\bsh\bhc\bca\bac\bch\bhe\bed\bd function connects to rrdcached, the RRD caching daemon,
+       and issues a "flush" command for the given files. The daemon will put
+       the files to the head of the update queue so they are written "soon".
+       The status will be returned only after the files' pending updates have
+       been written to disk.
+
+       _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+               The name(s) of the R\bRR\bRD\bD file(s) that are to be written to disk.
+
+       -\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs
+               Address of the rrdcached daemon. If not specified, the RRD-
+               CACHED_ADDRESS environment variable must be set (see below).
+               For a list of accepted formats, see the -\b-l\bl option in the rrd-
+               cached manual.
+
+                rrdtool flush --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+       The following environment variables may be used to change the behavior
+       of "rrdtool flushcached":
+
+       R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
+           If this environment variable is set it will have the same effect as
+           specifying the "--daemon" option on the command line. If both are
+           present, the command line argument takes precedence.
+
+A\bAU\bUT\bTH\bHO\bOR\bR
+       Florian Forster <octo at verplant.org>
+
+
+
+1.3.99909060808                   2009-05-26                 RRDFLUSHCACHED(1)
index d6459468617a28f5d75a0e72ab8b387edee62d82..e3f81d4c1e995824edf8848eeaece047dac7dd24 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDGRAPH 1"
-.TH RRDGRAPH 1 "2009-04-07" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDGRAPH 1 "2009-05-21" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdgraph \- Round Robin Database tool grapher functions
 .SH "SYNOPSIS"
@@ -167,29 +168,26 @@ well become unknown!
 .PP
 Sometimes data is not exactly in the format you would like to display
 it. For instance, you might be collecting \fBbytes\fR per second, but
-want to display \fBbits\fR per second. This is what the \fBdata
-calculation\fR command is designed for. After
+want to display \fBbits\fR per second. This is what the \fBdata calculation\fR command is designed for. After
 \&\fBconsolidating\fR the data, a copy is made and this copy is modified
 using a rather powerful \fB\s-1RPN\s0\fR command set.
 .PP
 When you are done fetching and processing the data, it is time to
 graph it (or print it).  This ends the \fBrrdtool graph\fR sequence.
+.PP
+Use \fBgraphv\fR instead of \fBgraph\fR to get detailed information about the
+graph geometry and data once it is drawn. See the bottom of the document for
+more information.
 .SH "OPTIONS"
 .IX Header "OPTIONS"
-.SS "\fBgraphv\fP"
-.IX Subsection "graphv"
-This alternate version of \fBgraph\fR takes the same arguments and performs the
-same function. The \fIv\fR stands for \fIverbose\fR, which describes the output
-returned. \fBgraphv\fR will return a lot of information about the graph using
-the same format as rrdtool info (key = value). See the bottom of the document for more information.
-.SS "\fIfilename\fP"
+.Sh "\fIfilename\fP"
 .IX Subsection "filename"
 The name and path of the graph to generate. It is recommended to
 end this in \f(CW\*(C`.png\*(C'\fR, \f(CW\*(C`.svg\*(C'\fR or \f(CW\*(C`.eps\*(C'\fR, but \fBRRDtool\fR does not enforce this.
 .PP
 \&\fIfilename\fR can be '\f(CW\*(C`\-\*(C'\fR' to send the image to \f(CW\*(C`stdout\*(C'\fR. In
 this case, no other output is generated.
-.SS "Time range"
+.Sh "Time range"
 .IX Subsection "Time range"
 [\fB\-s\fR|\fB\-\-start\fR \fItime\fR]
 [\fB\-e\fR|\fB\-\-end\fR \fItime\fR]
@@ -206,28 +204,14 @@ resolution.  With the \fBstep\fR option you can alter this behaviour.
 If you want \fBrrdtool graph\fR to get data at a one-hour resolution
 from the \fB\s-1RRD\s0\fR, set \fBstep\fR to 3'600. Note: a step smaller than
 one pixel will silently be ignored.
-.SS "Labels"
+.Sh "Labels"
 .IX Subsection "Labels"
 [\fB\-t\fR|\fB\-\-title\fR \fIstring\fR]
 [\fB\-v\fR|\fB\-\-vertical\-label\fR \fIstring\fR]
 .PP
 A horizontal string at the top of the graph and/or a vertically
 placed string at the left hand side of the graph.
-.SS "Right Axis"
-.IX Subsection "Right Axis"
-[\fB\-\-right\-axis\fR \fIscale\fR\fB:\fR\fIshift\fR]
-[\fB\-\-right\-axis\-label\fR \fIlabel\fR]
-.PP
-A second axis will be drawn to the right of the graph. It is tied to the
-left axis via the scale and shift parameters. You can also define a label
-for the right axis.
-.PP
-[\fB\-\-right\-axis\-format\fR \fIformat-string\fR]
-.PP
-By default the format of the axis lables gets determined automatically. If
-you want todo this your self, use this option with the same \f(CW%lf\fR arguments
-you know from the \s-1PRING\s0 and \s-1GPRINT\s0 commands.
-.SS "Size"
+.Sh "Size"
 .IX Subsection "Size"
 [\fB\-w\fR|\fB\-\-width\fR \fIpixels\fR]
 [\fB\-h\fR|\fB\-\-height\fR \fIpixels\fR]
@@ -245,7 +229,7 @@ If you specify the \fB\-\-only\-graph\fR option and set the height < 32
 pixels you will get a tiny graph image (thumbnail) to use as an icon
 for use in an overview, for example. All labeling will be stripped off
 the graph.
-.SS "Limits"
+.Sh "Limits"
 .IX Subsection "Limits"
 [\fB\-u\fR|\fB\-\-upper\-limit\fR \fIvalue\fR]
 [\fB\-l\fR|\fB\-\-lower\-limit\fR \fIvalue\fR]
@@ -292,19 +276,17 @@ appearance. If this is not to your liking, you can use this switch
 to turn this behaviour off.
 .PP
 Gridfitting is turned off for \s-1PDF\s0, \s-1EPS\s0, \s-1SVG\s0 output by default.
-.SS "Grid"
-.IX Subsection "Grid"
-.IP "X\-Axis" 4
-.IX Item "X-Axis"
+.Sh "X\-Axis"
+.IX Subsection "X-Axis"
 [\fB\-x\fR|\fB\-\-x\-grid\fR \fI\s-1GTM\s0\fR\fB:\fR\fI\s-1GST\s0\fR\fB:\fR\fI\s-1MTM\s0\fR\fB:\fR\fI\s-1MST\s0\fR\fB:\fR\fI\s-1LTM\s0\fR\fB:\fR\fI\s-1LST\s0\fR\fB:\fR\fI\s-1LPR\s0\fR\fB:\fR\fI\s-1LFM\s0\fR]
-.Sp
+.PP
 [\fB\-x\fR|\fB\-\-x\-grid\fR \fBnone\fR]
-.Sp
+.PP
 The x\-axis label is quite complex to configure. If you don't have
 very special needs it is probably best to rely on the autoconfiguration
 to get this right. You can specify the string \f(CW\*(C`none\*(C'\fR to suppress the grid
 and labels altogether.
-.Sp
+.PP
 The grid is defined by specifying a certain amount of time in the \fI?TM\fR
 positions. You can choose from \f(CW\*(C`SECOND\*(C'\fR, \f(CW\*(C`MINUTE\*(C'\fR, \f(CW\*(C`HOUR\*(C'\fR, \f(CW\*(C`DAY\*(C'\fR,
 \&\f(CW\*(C`WEEK\*(C'\fR, \f(CW\*(C`MONTH\*(C'\fR or \f(CW\*(C`YEAR\*(C'\fR. Then you define how many of these should
@@ -316,52 +298,52 @@ where each label will be placed. If it is zero, the label will be
 placed right under the corresponding line (useful for hours, dates
 etcetera).  If you specify a number of seconds here the label is
 centered on this interval (useful for Monday, January etcetera).
-.Sp
+.PP
 .Vb 1
 \& \-\-x\-grid MINUTE:10:HOUR:1:HOUR:4:0:%X
 .Ve
-.Sp
+.PP
 This places grid lines every 10 minutes, major grid lines every hour,
 and labels every 4 hours. The labels are placed under the major grid
 lines as they specify exactly that time.
-.Sp
+.PP
 .Vb 1
 \& \-\-x\-grid HOUR:8:DAY:1:DAY:1:86400:%A
 .Ve
-.Sp
+.PP
 This places grid lines every 8 hours, major grid lines and labels
 each day. The labels are placed exactly between two major grid lines
 as they specify the complete day and not just midnight.
-.IP "Y\-Axis" 4
-.IX Item "Y-Axis"
+.Sh "Y\-Axis"
+.IX Subsection "Y-Axis"
 [\fB\-y\fR|\fB\-\-y\-grid\fR \fIgrid step\fR\fB:\fR\fIlabel factor\fR]
-.Sp
+.PP
 [\fB\-y\fR|\fB\-\-y\-grid\fR \fBnone\fR]
-.Sp
+.PP
 Y\-axis grid lines appear at each \fIgrid step\fR interval.  Labels are
 placed every \fIlabel factor\fR lines.  You can specify \f(CW\*(C`\-y none\*(C'\fR to
 suppress the grid and labels altogether.  The default for this option is
 to automatically select sensible values.
-.Sp
+.PP
 If you have set \-\-y\-grid to 'none' not only the labels get suppressed, also
 the space reserved for the labels is removed. You can still add space
 manually if you use the \-\-units\-length command to explicitly reserve space.
-.Sp
+.PP
 [\fB\-Y\fR|\fB\-\-alt\-y\-grid\fR]
-.Sp
+.PP
 Place the Y grid dynamically based on the graph's Y range. The algorithm
 ensures that you always have a grid, that there are enough but not too many
 grid lines, and that the grid is metric. That is the grid lines are placed
 every 1, 2, 5 or 10 units. This parameter will also ensure that you get
 enough decimals displayed even if your graph goes from 69.998 to 70.001. 
 (contributed by Sasha Mikheev).
-.Sp
+.PP
 [\fB\-o\fR|\fB\-\-logarithmic\fR]
-.Sp
+.PP
 Logarithmic y\-axis scaling.
-.Sp
+.PP
 [\fB\-X\fR|\fB\-\-units\-exponent\fR \fIvalue\fR]
-.Sp
+.PP
 This sets the 10**exponent scaling of the y\-axis values. Normally,
 values will be scaled to the appropriate units (k, M, etc.).  However,
 you may wish to display units always in k (Kilo, 10e3) even if the data
@@ -371,24 +353,60 @@ the exponent on the units you wish to use. For example, use 3 to
 display the y\-axis values in k (Kilo, 10e3, thousands), use \-6 to
 display the y\-axis values in u (Micro, 10e\-6, millionths).  Use a value
 of 0 to prevent any scaling of the y\-axis values.
-.Sp
+.PP
 This option is very effective at confusing the heck out of the default
 rrdtool autoscaler and grid painter. If rrdtool detects that it is not
 successful in labeling the graph under the given circumstances, it will switch
 to the more robust \fB\-\-alt\-y\-grid\fR mode.
-.Sp
+.PP
 [\fB\-L\fR|\fB\-\-units\-length\fR \fIvalue\fR]
-.Sp
+.PP
 How many digits should rrdtool assume the y\-axis labels to be? You
 may have to use this option to make enough space once you start
-fideling with the y\-axis labeling.
-.Sp
+fiddling with the y\-axis labeling.
+.PP
 [\fB\-\-units=si\fR]
-.Sp
+.PP
 With this option y\-axis values on logarithmic graphs will be scaled to 
 the appropriate units (k, M, etc.) instead of using exponential notation.
 Note that for linear graphs, \s-1SI\s0 notation is used by default.
-.SS "Miscellaneous"
+.Sh "Right Y Axis"
+.IX Subsection "Right Y Axis"
+[\fB\-\-right\-axis\fR \fIscale\fR\fB:\fR\fIshift\fR]
+[\fB\-\-right\-axis\-label\fR \fIlabel\fR]
+.PP
+A second axis will be drawn to the right of the graph. It is tied to the
+left axis via the scale and shift parameters. You can also define a label
+for the right axis.
+.PP
+[\fB\-\-right\-axis\-format\fR \fIformat-string\fR]
+.PP
+By default the format of the axis lables gets determined automatically. If
+you want todo this your self, use this option with the same \f(CW%lf\fR arguments
+you know from the \s-1PRING\s0 and \s-1GPRINT\s0 commands.
+.Sh "Legend"
+.IX Subsection "Legend"
+[\fB\-g\fR|\fB\-\-no\-legend\fR]
+.PP
+Suppress generation of the legend; only render the graph.
+.PP
+[\fB\-F\fR|\fB\-\-force\-rules\-legend\fR]
+.PP
+Force the generation of \s-1HRULE\s0 and \s-1VRULE\s0 legends even if those \s-1HRULE\s0 or
+\&\s-1VRULE\s0 will not be drawn because out of graph boundaries (mimics
+behaviour of pre 1.0.42 versions).
+.PP
+[\fB\-\-legend\-position\fR=(north|south|west|east)]
+.PP
+Place the legend at the given side of the graph. The default is south.
+In west or east position it is necessary to add line breaks manually.
+.PP
+[\fB\-\-legend\-direction\fR=(topdown|bottomup)]
+.PP
+Place the legend items in the given vertical order. The default is topdown.
+Using bottomup the legend items appear in the same vertical order as a
+stack of lines or areas.
+.Sh "Miscellaneous"
 .IX Subsection "Miscellaneous"
 [\fB\-z\fR|\fB\-\-lazy\fR]
 .PP
@@ -398,7 +416,18 @@ Note, that all the calculations will happen regardless so that the output of
 lazy in this regard has seen several changes over time. The only thing you
 can realy rely on before rrdtool 1.3.7 is that lazy will not generate the
 graph when it is already there and up to date, and also that it will output
-the size of the graph.
+the size of the graph. 
+.PP
+[\fB\-\-daemon\fR \fIaddress\fR]
+.PP
+Address of the rrdcached daemon. If specified, a \f(CW\*(C`flush\*(C'\fR command is sent
+to the server before reading the \s-1RRD\s0 files. This allows the graph to contain
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
+.PP
+.Vb 1
+\& rrdtool graph [...] \-\-daemon unix:/var/run/rrdcached.sock [...]
+.Ve
 .PP
 [\fB\-f\fR|\fB\-\-imginfo\fR \fIprintfstr\fR]
 .PP
@@ -410,7 +439,7 @@ suitable for including the graph into a web page, the command line
 would look like this:
 .PP
 .Vb 1
-\& \-\-imginfo \*(Aq<IMG SRC="/img/%s" WIDTH="%lu" HEIGHT="%lu" ALT="Demo">\*(Aq
+\& \-\-imginfo '<IMG SRC="/img/%s" WIDTH="%lu" HEIGHT="%lu" ALT="Demo">'
 .Ve
 .PP
 [\fB\-c\fR|\fB\-\-color\fR \fI\s-1COLORTAG\s0\fR#\fIrrggbb\fR[\fIaa\fR]]
@@ -486,7 +515,7 @@ no text is rendered bitmapped.
 .PP
 All text in rrdtool is rendered using Pango. With the \fB\-\-pango\-markup\fR option, all
 text will be processed by pango markup. This allows to embed some simple html
-like markup tags using
+like markup tags using 
 .PP
 .Vb 1
 \& <span key="value">text</span>
@@ -525,10 +554,10 @@ for their graphs even though it is not all that true.
 [\fB\-a\fR|\fB\-\-imgformat\fR \fB\s-1PNG\s0\fR|\fB\s-1SVG\s0\fR|\fB\s-1EPS\s0\fR|\fB\s-1PDF\s0\fR]
 .PP
 Image format for the generated graph. For the vector formats you can
-choose among the standard Postscript fonts Courier-Bold,
-Courier-BoldOblique, Courier-Oblique, Courier, Helvetica-Bold,
-Helvetica-BoldOblique, Helvetica-Oblique, Helvetica, Symbol,
-Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.
+choose among the standard Postscript fonts Courier\-Bold,
+Courier\-BoldOblique, Courier\-Oblique, Courier, Helvetica\-Bold,
+Helvetica\-BoldOblique, Helvetica\-Oblique, Helvetica, Symbol,
+Times\-Bold, Times\-BoldItalic, Times\-Italic, Times\-Roman, and ZapfDingbats.
 .PP
 [\fB\-i\fR|\fB\-\-interlaced\fR]
 .PP
@@ -536,16 +565,6 @@ Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.
 .PP
 If images are interlaced they become visible on browsers more quickly.
 .PP
-[\fB\-g\fR|\fB\-\-no\-legend\fR]
-.PP
-Suppress generation of the legend; only render the graph.
-.PP
-[\fB\-F\fR|\fB\-\-force\-rules\-legend\fR]
-.PP
-Force the generation of \s-1HRULE\s0 and \s-1VRULE\s0 legends even if those \s-1HRULE\s0 or
-\&\s-1VRULE\s0 will not be drawn because out of graph boundaries (mimics
-behaviour of pre 1.0.42 versions).
-.PP
 [\fB\-T\fR|\fB\-\-tabwidth\fR \fIvalue\fR]
 .PP
 By default the tab-width is 40 pixels, use this option to change it.
@@ -560,7 +579,7 @@ measurement, 1 kb/s is 1000 b/s.
 .PP
 Adds the given string as a watermark, horizontally centered, at the bottom 
 of the graph.
-.SS "Data and variables"
+.Sh "Data and variables"
 .IX Subsection "Data and variables"
 \&\fB\s-1DEF:\s0\fR\fIvname\fR\fB=\fR\fIrrdfile\fR\fB:\fR\fIds-name\fR\fB:\fR\fI\s-1CF\s0\fR[\fB:step=\fR\fIstep\fR][\fB:start=\fR\fItime\fR][\fB:end=\fR\fItime\fR]
 .PP
@@ -577,7 +596,7 @@ See rrdgraph_data and rrdgraph_rpn for the exact format.
 You need at least one graph element to generate an image and/or
 at least one print statement to generate a report.
 See rrdgraph_graph for the exact format.
-.SS "graphv"
+.Sh "graphv"
 .IX Subsection "graphv"
 Calling rrdtool with the graphv option will return information in the
 rrdtool info format. On the command line this means that all output will be
@@ -588,7 +607,7 @@ When the filename '\-' is given, the contents of the graph itself will also
 be returned through this interface (hash key 'image'). On the command line
 the output will look like this:
 .PP
-.Vb 10
+.Vb 14
 \& print[0] = "0.020833"
 \& print[1] = "0.0440833"
 \& graph_left = 51
@@ -608,6 +627,15 @@ the output will look like this:
 There is more information returned than in the standard interface.
 Especially the 'graph_*' keys are new. They help applications that want to
 know what is where on the graph.
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ graph\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 rrdgraph gives an overview of how \fBrrdtool graph\fR works.
index dbf4e1351e40829e5b3a53598c1575fc64c6122e..b3063d8d6afd14b98c917ad3a917338d61117780 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdgraph</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#options">OPTIONS</a></li>
        <ul>
 
-               <li><a href="#graphv"><strong>graphv</strong></a></li>
                <li><a href="#filename"><em>filename</em></a></li>
                <li><a href="#time_range">Time range</a></li>
                <li><a href="#labels">Labels</a></li>
-               <li><a href="#right_axis">Right Axis</a></li>
                <li><a href="#size">Size</a></li>
                <li><a href="#limits">Limits</a></li>
-               <li><a href="#grid">Grid</a></li>
+               <li><a href="#xaxis">X-Axis</a></li>
+               <li><a href="#yaxis">Y-Axis</a></li>
+               <li><a href="#right_y_axis">Right Y Axis</a></li>
+               <li><a href="#legend">Legend</a></li>
                <li><a href="#miscellaneous">Miscellaneous</a></li>
                <li><a href="#data_and_variables">Data and variables</a></li>
                <li><a href="#graphv">graphv</a></li>
        </ul>
 
+       <li><a href="#environment_variables">ENVIRONMENT VARIABLES</a></li>
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -95,19 +89,15 @@ want to display <strong>bits</strong> per second. This is what the <strong><a hr
 using a rather powerful <strong><a href="././rrdgraph_rpn.html">RPN</a></strong> command set.</p>
 <p>When you are done fetching and processing the data, it is time to
 graph it (or print it).  This ends the <strong>rrdtool graph</strong> sequence.</p>
+<p>Use <strong>graphv</strong> instead of <strong>graph</strong> to get detailed information about the
+graph geometry and data once it is drawn. See the bottom of the document for
+more information.</p>
 <p>
 </p>
 <hr />
 <h1><a name="options">OPTIONS</a></h1>
 <p>
 </p>
-<h2><a name="graphv"><strong>graphv</strong></a></h2>
-<p>This alternate version of <strong>graph</strong> takes the same arguments and performs the
-same function. The <em>v</em> stands for <em>verbose</em>, which describes the output
-returned. <strong>graphv</strong> will return a lot of information about the graph using
-the same format as rrdtool info (key = value). See the bottom of the document for more information.</p>
-<p>
-</p>
 <h2><a name="filename"><em>filename</em></a></h2>
 <p>The name and path of the graph to generate. It is recommended to
 end this in <code>.png</code>, <code>.svg</code> or <code>.eps</code>, but <strong>RRDtool</strong> does not enforce this.</p>
@@ -139,18 +129,6 @@ one pixel will silently be ignored.</p>
 placed string at the left hand side of the graph.</p>
 <p>
 </p>
-<h2><a name="right_axis">Right Axis</a></h2>
-<p>[<strong>--right-axis</strong> <em>scale</em><strong>:</strong><em>shift</em>]
-[<strong>--right-axis-label</strong> <em>label</em>]</p>
-<p>A second axis will be drawn to the right of the graph. It is tied to the
-left axis via the scale and shift parameters. You can also define a label
-for the right axis.</p>
-<p>[<strong>--right-axis-format</strong> <em>format-string</em>]</p>
-<p>By default the format of the axis lables gets determined automatically. If
-you want todo this your self, use this option with the same %lf arguments
-you know from the PRING and GPRINT commands.</p>
-<p>
-</p>
 <h2><a name="size">Size</a></h2>
 <p>[<strong>-w</strong>|<strong>--width</strong> <em>pixels</em>]
 [<strong>-h</strong>|<strong>--height</strong> <em>pixels</em>]
@@ -205,11 +183,7 @@ to turn this behaviour off.</p>
 <p>Gridfitting is turned off for PDF, EPS, SVG output by default.</p>
 <p>
 </p>
-<h2><a name="grid">Grid</a></h2>
-<dl>
-<dt><strong><a name="x_axis" class="item">X-Axis</a></strong></dt>
-
-<dd>
+<h2><a name="xaxis">X-Axis</a></h2>
 <p>[<strong>-x</strong>|<strong>--x-grid</strong> <em>GTM</em><strong>:</strong><em>GST</em><strong>:</strong><em>MTM</em><strong>:</strong><em>MST</em><strong>:</strong><em>LTM</em><strong>:</strong><em>LST</em><strong>:</strong><em>LPR</em><strong>:</strong><em>LFM</em>]</p>
 <p>[<strong>-x</strong>|<strong>--x-grid</strong> <strong>none</strong>]</p>
 <p>The x-axis label is quite complex to configure. If you don't have
@@ -237,10 +211,9 @@ lines as they specify exactly that time.</p>
 <p>This places grid lines every 8 hours, major grid lines and labels
 each day. The labels are placed exactly between two major grid lines
 as they specify the complete day and not just midnight.</p>
-</dd>
-<dt><strong><a name="y_axis" class="item">Y-Axis</a></strong></dt>
-
-<dd>
+<p>
+</p>
+<h2><a name="yaxis">Y-Axis</a></h2>
 <p>[<strong>-y</strong>|<strong>--y-grid</strong> <em>grid step</em><strong>:</strong><em>label factor</em>]</p>
 <p>[<strong>-y</strong>|<strong>--y-grid</strong> <strong>none</strong>]</p>
 <p>Y-axis grid lines appear at each <em>grid step</em> interval.  Labels are
@@ -276,13 +249,39 @@ to the more robust <strong>--alt-y-grid</strong> mode.</p>
 <p>[<strong>-L</strong>|<strong>--units-length</strong> <em>value</em>]</p>
 <p>How many digits should rrdtool assume the y-axis labels to be? You
 may have to use this option to make enough space once you start
-fideling with the y-axis labeling.</p>
+fiddling with the y-axis labeling.</p>
 <p>[<strong>--units=si</strong>]</p>
 <p>With this option y-axis values on logarithmic graphs will be scaled to 
 the appropriate units (k, M, etc.) instead of using exponential notation.
 Note that for linear graphs, SI notation is used by default.</p>
-</dd>
-</dl>
+<p>
+</p>
+<h2><a name="right_y_axis">Right Y Axis</a></h2>
+<p>[<strong>--right-axis</strong> <em>scale</em><strong>:</strong><em>shift</em>]
+[<strong>--right-axis-label</strong> <em>label</em>]</p>
+<p>A second axis will be drawn to the right of the graph. It is tied to the
+left axis via the scale and shift parameters. You can also define a label
+for the right axis.</p>
+<p>[<strong>--right-axis-format</strong> <em>format-string</em>]</p>
+<p>By default the format of the axis lables gets determined automatically. If
+you want todo this your self, use this option with the same %lf arguments
+you know from the PRING and GPRINT commands.</p>
+<p>
+</p>
+<h2><a name="legend">Legend</a></h2>
+<p>[<strong>-g</strong>|<strong>--no-legend</strong>]</p>
+<p>Suppress generation of the legend; only render the graph.</p>
+<p>[<strong>-F</strong>|<strong>--force-rules-legend</strong>]</p>
+<p>Force the generation of HRULE and VRULE legends even if those HRULE or
+VRULE will not be drawn because out of graph boundaries (mimics
+behaviour of pre 1.0.42 versions).</p>
+<p>[<strong>--legend-position</strong>=(north|south|west|east)]</p>
+<p>Place the legend at the given side of the graph. The default is south.
+In west or east position it is necessary to add line breaks manually.</p>
+<p>[<strong>--legend-direction</strong>=(topdown|bottomup)]</p>
+<p>Place the legend items in the given vertical order. The default is topdown.
+Using bottomup the legend items appear in the same vertical order as a
+stack of lines or areas.</p>
 <p>
 </p>
 <h2><a name="miscellaneous">Miscellaneous</a></h2>
@@ -294,6 +293,13 @@ lazy in this regard has seen several changes over time. The only thing you
 can realy rely on before rrdtool 1.3.7 is that lazy will not generate the
 graph when it is already there and up to date, and also that it will output
 the size of the graph.</p>
+<p>[<strong>--daemon</strong> <em>address</em>]</p>
+<p>Address of the <a href="././rrdcached.html">the rrdcached manpage</a> daemon. If specified, a <code>flush</code> command is sent
+to the server before reading the RRD files. This allows the graph to contain
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the <strong>-l</strong> option in the <a href="././rrdcached.html">the rrdcached manpage</a> manual.</p>
+<pre>
+ rrdtool graph [...] --daemon unix:/var/run/rrdcached.sock [...]</pre>
 <p>[<strong>-f</strong>|<strong>--imginfo</strong> <em>printfstr</em>]</p>
 <p>After the image has been created, the graph function uses printf
 together with this format string to create output similar to the PRINT
@@ -334,12 +340,12 @@ resetting the default fontsizes: <code>--font DEFAULT:0:Courier</code>.</p>
 variable <code>RRD_DEFAULT_FONT</code> if you want to change this.</p>
 <p>RRDtool uses Pango for its font handling. This means you can to use
 the full Pango syntax when selecting your font:</p>
-<p>The font name has the form &quot;[<em>FAMILY-LIST</em>] [<em>STYLE-OPTIONS</em>] [<em>SIZE</em>]&quot;,
+<p>The font name has the form ``[<em>FAMILY-LIST</em>] [<em>STYLE-OPTIONS</em>] [<em>SIZE</em>]'',
 where <em>FAMILY-LIST</em> is a comma separated list of families optionally
 terminated by a comma, <em>STYLE_OPTIONS</em> is a whitespace separated list of
 words where each WORD describes one of style, variant, weight, stretch, or
 gravity, and <em>SIZE</em> is a decimal number (size in points) or optionally
-followed by the unit modifier &quot;px&quot; for absolute size. Any one of the options
+followed by the unit modifier ``px'' for absolute size. Any one of the options
 may be absent.</p>
 <p>[<strong>-R</strong>|<strong>--font-render-mode</strong> {<strong>normal</strong>,<strong>light</strong>,<strong>mono</strong>}]</p>
 <p>There are 3 font render modes:</p>
@@ -386,12 +392,6 @@ Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.</p>
 <p>[<strong>-i</strong>|<strong>--interlaced</strong>]</p>
 <p>(this gets ignored in 1.3 for now!)</p>
 <p>If images are interlaced they become visible on browsers more quickly.</p>
-<p>[<strong>-g</strong>|<strong>--no-legend</strong>]</p>
-<p>Suppress generation of the legend; only render the graph.</p>
-<p>[<strong>-F</strong>|<strong>--force-rules-legend</strong>]</p>
-<p>Force the generation of HRULE and VRULE legends even if those HRULE or
-VRULE will not be drawn because out of graph boundaries (mimics
-behaviour of pre 1.0.42 versions).</p>
 <p>[<strong>-T</strong>|<strong>--tabwidth</strong> <em>value</em>]</p>
 <p>By default the tab-width is 40 pixels, use this option to change it.</p>
 <p>[<strong>-b</strong>|<strong>--base</strong> <em>value</em>]</p>
@@ -445,6 +445,21 @@ know what is where on the graph.</p>
 <p>
 </p>
 <hr />
+<h1><a name="environment_variables">ENVIRONMENT VARIABLES</a></h1>
+<p>The following environment variables may be used to change the behavior of
+<code>rrdtoolgraph</code>:</p>
+<dl>
+<dt><strong><a name="item_rrdcached_address"><strong>RRDCACHED_ADDRESS</strong></a></strong><br />
+</dt>
+<dd>
+If this environment variable is set it will have the same effect as specifying
+the <code>--daemon</code> option on the command line. If both are present, the command
+line argument takes precedence.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
 <h1><a name="see_also">SEE ALSO</a></h1>
 <p><a href="././rrdgraph.html">the rrdgraph manpage</a> gives an overview of how <strong>rrdtool graph</strong> works.
 <a href="././rrdgraph_data.html">the rrdgraph_data manpage</a> describes <strong>DEF</strong>,<strong>CDEF</strong> and <strong>VDEF</strong> in detail.
index 06bf6793e3b81e028a2f8a61e20c5d4c14742711..091940341409fb0b38a451a5bdfd0b465f911946 100644 (file)
@@ -48,15 +48,12 @@ using a rather powerful B<L<RPN|rrdgraph_rpn>> command set.
 When you are done fetching and processing the data, it is time to
 graph it (or print it).  This ends the B<rrdtool graph> sequence.
 
-=head1 OPTIONS
-
+Use B<graphv> instead of B<graph> to get detailed information about the
+graph geometry and data once it is drawn. See the bottom of the document for
+more information.
 
-=head2 B<graphv>
+=head1 OPTIONS
 
-This alternate version of B<graph> takes the same arguments and performs the
-same function. The I<v> stands for I<verbose>, which describes the output
-returned. B<graphv> will return a lot of information about the graph using
-the same format as rrdtool info (key = value). See the bottom of the document for more information.
 
 
 =head2 I<filename>
@@ -93,20 +90,6 @@ one pixel will silently be ignored.
 A horizontal string at the top of the graph and/or a vertically
 placed string at the left hand side of the graph.
 
-=head2 Right Axis
-
-[B<--right-axis> I<scale>B<:>I<shift>]
-[B<--right-axis-label> I<label>]
-
-A second axis will be drawn to the right of the graph. It is tied to the
-left axis via the scale and shift parameters. You can also define a label
-for the right axis.
-
-[B<--right-axis-format> I<format-string>]
-
-By default the format of the axis lables gets determined automatically. If
-you want todo this your self, use this option with the same %lf arguments
-you know from the PRING and GPRINT commands.
 
 =head2 Size
 
@@ -175,11 +158,7 @@ to turn this behaviour off.
 
 Gridfitting is turned off for PDF, EPS, SVG output by default.
 
-=head2 Grid
-
-=over
-
-=item X-Axis
+=head2 X-Axis
 
 [B<-x>|B<--x-grid> I<GTM>B<:>I<GST>B<:>I<MTM>B<:>I<MST>B<:>I<LTM>B<:>I<LST>B<:>I<LPR>B<:>I<LFM>]
 
@@ -214,7 +193,7 @@ This places grid lines every 8 hours, major grid lines and labels
 each day. The labels are placed exactly between two major grid lines
 as they specify the complete day and not just midnight.
 
-=item Y-Axis
+=head2 Y-Axis
 
 [B<-y>|B<--y-grid> I<grid step>B<:>I<label factor>]
 
@@ -263,7 +242,7 @@ to the more robust B<--alt-y-grid> mode.
 
 How many digits should rrdtool assume the y-axis labels to be? You
 may have to use this option to make enough space once you start
-fideling with the y-axis labeling.
+fiddling with the y-axis labeling.
 
 [B<--units=si>]
 
@@ -271,7 +250,43 @@ With this option y-axis values on logarithmic graphs will be scaled to
 the appropriate units (k, M, etc.) instead of using exponential notation.
 Note that for linear graphs, SI notation is used by default.
 
-=back
+=head2 Right Y Axis
+
+[B<--right-axis> I<scale>B<:>I<shift>]
+[B<--right-axis-label> I<label>]
+
+A second axis will be drawn to the right of the graph. It is tied to the
+left axis via the scale and shift parameters. You can also define a label
+for the right axis.
+
+[B<--right-axis-format> I<format-string>]
+
+By default the format of the axis lables gets determined automatically. If
+you want todo this your self, use this option with the same %lf arguments
+you know from the PRING and GPRINT commands.
+
+=head2 Legend
+
+[B<-g>|B<--no-legend>]
+
+Suppress generation of the legend; only render the graph.
+
+[B<-F>|B<--force-rules-legend>]
+
+Force the generation of HRULE and VRULE legends even if those HRULE or
+VRULE will not be drawn because out of graph boundaries (mimics
+behaviour of pre 1.0.42 versions).
+
+[B<--legend-position>=(north|south|west|east)]
+
+Place the legend at the given side of the graph. The default is south.
+In west or east position it is necessary to add line breaks manually.
+
+[B<--legend-direction>=(topdown|bottomup)]
+
+Place the legend items in the given vertical order. The default is topdown.
+Using bottomup the legend items appear in the same vertical order as a
+stack of lines or areas.
 
 =head2 Miscellaneous
 
@@ -283,8 +298,16 @@ PRINT and graphv will be complete regardless. Note that the behaviour of
 lazy in this regard has seen several changes over time. The only thing you
 can realy rely on before rrdtool 1.3.7 is that lazy will not generate the
 graph when it is already there and up to date, and also that it will output
-the size of the graph.
+the size of the graph. 
+
+[B<--daemon> I<address>]
 
+Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
+to the server before reading the RRD files. This allows the graph to contain
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
+
+ rrdtool graph [...] --daemon unix:/var/run/rrdcached.sock [...]
 
 [B<-f>|B<--imginfo> I<printfstr>]
 
@@ -417,16 +440,6 @@ Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.
 
 If images are interlaced they become visible on browsers more quickly.
 
-[B<-g>|B<--no-legend>]
-
-Suppress generation of the legend; only render the graph.
-
-[B<-F>|B<--force-rules-legend>]
-
-Force the generation of HRULE and VRULE legends even if those HRULE or
-VRULE will not be drawn because out of graph boundaries (mimics
-behaviour of pre 1.0.42 versions).
-
 [B<-T>|B<--tabwidth> I<value>]
 
 By default the tab-width is 40 pixels, use this option to change it.
@@ -490,6 +503,21 @@ There is more information returned than in the standard interface.
 Especially the 'graph_*' keys are new. They help applications that want to
 know what is where on the graph.
 
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>graph>:
+
+=over 4
+
+=item B<RRDCACHED_ADDRESS>
+
+If this environment variable is set it will have the same effect as specifying
+the C<--daemon> option on the command line. If both are present, the command
+line argument takes precedence.
+
+=back
+
 =head1 SEE ALSO
 
 L<rrdgraph> gives an overview of how B<rrdtool graph> works.
index dcecb50f3cc5fa2d07f8b449c7800fd2d1335889..6bb25bc92343feb5e3251312887bd6c0fa1ef545 100644 (file)
@@ -12,8 +12,8 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        The g\bgr\bra\bap\bph\bh function of R\bRR\bRD\bDt\bto\boo\bol\bl is used to present the data from an R\bRR\bRD\bD
-       to a human viewer.  Its main purpose is to create a nice graphical
-       representation, but it can also generate a numerical report.
+       to a human viewer.  Its main purpose is to create a nice graphical rep-
+       resentation, but it can also generate a numerical report.
 
 O\bOV\bVE\bER\bRV\bVI\bIE\bEW\bW
        r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh needs data to work with, so you must use one or more d\bda\bat\bta\ba
@@ -22,9 +22,9 @@ O\bOV\bVE\bER\bRV\bVI\bIE\bEW\bW
        databases (one per statement, though).
 
        If you want to display averages, maxima, percentiles, etcetera it is
-       best to collect them now using the v\bva\bar\bri\bia\bab\bbl\ble\be d\bde\bef\bfi\bin\bni\bit\bti\bio\bon\bn statement.
-       Currently this makes no difference, but in a future version of rrdtool
-       you may want to collect these values before consolidation.
+       best to collect them now using the v\bva\bar\bri\bia\bab\bbl\ble\be d\bde\bef\bfi\bin\bni\bit\bti\bio\bon\bn statement.  Cur-
+       rently this makes no difference, but in a future version of rrdtool you
+       may want to collect these values before consolidation.
 
        The data fetched from the R\bRR\bRA\bA is then c\bco\bon\bns\bso\bol\bli\bid\bda\bat\bte\bed\bd so that there is
        exactly one datapoint per pixel in the graph. If you do not take care
@@ -40,71 +40,59 @@ O\bOV\bVE\bER\bRV\bVI\bIE\bEW\bW
        When you are done fetching and processing the data, it is time to graph
        it (or print it).  This ends the r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh sequence.
 
+       Use g\bgr\bra\bap\bph\bhv\bv instead of g\bgr\bra\bap\bph\bh to get detailed information about the graph
+       geometry and data once it is drawn. See the bottom of the document for
+       more information.
+
 O\bOP\bPT\bTI\bIO\bON\bNS\bS
-   g\bgr\bra\bap\bph\bhv\bv
-       This alternate version of g\bgr\bra\bap\bph\bh takes the same arguments and performs
-       the same function. The _\bv stands for _\bv_\be_\br_\bb_\bo_\bs_\be, which describes the output
-       returned. g\bgr\bra\bap\bph\bhv\bv will return a lot of information about the graph using
-       the same format as rrdtool info (key = value). See the bottom of the
-       document for more information.
-
-   _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+       _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+
        The name and path of the graph to generate. It is recommended to end
        this in ".png", ".svg" or ".eps", but R\bRR\bRD\bDt\bto\boo\bol\bl does not enforce this.
 
        _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be can be '"-"' to send the image to "stdout". In this case, no
        other output is generated.
 
-   T\bTi\bim\bme\be r\bra\ban\bng\bge\be
+       T\bTi\bim\bme\be r\bra\ban\bng\bge\be
+
        [-\b-s\bs|-\b--\b-s\bst\bta\bar\brt\bt _\bt_\bi_\bm_\be] [-\b-e\be|-\b--\b-e\ben\bnd\bd _\bt_\bi_\bm_\be] [-\b-S\bS|-\b--\b-s\bst\bte\bep\bp _\bs_\be_\bc_\bo_\bn_\bd_\bs]
 
        The start and end of the time series you would like to display, and
        which R\bRR\bRA\bA the data should come from.  Defaults are: 1 day ago until
        now, with the best possible resolution. S\bSt\bta\bar\brt\bt and e\ben\bnd\bd can be specified
-       in several formats, see AT-STYLE TIME SPECIFICATION and
-       rrdgraph_examples.  By default, r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh calculates the width of
-       one pixel in the time domain and tries to get data from an R\bRR\bRA\bA with
-       that resolution.  With the s\bst\bte\bep\bp option you can alter this behaviour.
-       If you want r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh to get data at a one-hour resolution from the
-       R\bRR\bRD\bD, set s\bst\bte\bep\bp to 3'600. Note: a step smaller than one pixel will
-       silently be ignored.
-
-   L\bLa\bab\bbe\bel\bls\bs
+       in several formats, see AT-STYLE TIME SPECIFICATION and rrdgraph_exam-
+       ples.  By default, r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh calculates the width of one pixel in
+       the time domain and tries to get data from an R\bRR\bRA\bA with that resolution.
+       With the s\bst\bte\bep\bp option you can alter this behaviour.  If you want r\brr\brd\bdt\bto\boo\bol\bl
+       g\bgr\bra\bap\bph\bh to get data at a one-hour resolution from the R\bRR\bRD\bD, set s\bst\bte\bep\bp to
+       3'600. Note: a step smaller than one pixel will silently be ignored.
+
+       L\bLa\bab\bbe\bel\bls\bs
+
        [-\b-t\bt|-\b--\b-t\bti\bit\btl\ble\be _\bs_\bt_\br_\bi_\bn_\bg] [-\b-v\bv|-\b--\b-v\bve\ber\brt\bti\bic\bca\bal\bl-\b-l\bla\bab\bbe\bel\bl _\bs_\bt_\br_\bi_\bn_\bg]
 
        A horizontal string at the top of the graph and/or a vertically placed
        string at the left hand side of the graph.
 
-   R\bRi\big\bgh\bht\bt A\bAx\bxi\bis\bs
-       [-\b--\b-r\bri\big\bgh\bht\bt-\b-a\bax\bxi\bis\bs _\bs_\bc_\ba_\bl_\be:\b:_\bs_\bh_\bi_\bf_\bt] [-\b--\b-r\bri\big\bgh\bht\bt-\b-a\bax\bxi\bis\bs-\b-l\bla\bab\bbe\bel\bl _\bl_\ba_\bb_\be_\bl]
+       S\bSi\biz\bze\be
 
-       A second axis will be drawn to the right of the graph. It is tied to
-       the left axis via the scale and shift parameters. You can also define a
-       label for the right axis.
-
-       [-\b--\b-r\bri\big\bgh\bht\bt-\b-a\bax\bxi\bis\bs-\b-f\bfo\bor\brm\bma\bat\bt _\bf_\bo_\br_\bm_\ba_\bt_\b-_\bs_\bt_\br_\bi_\bn_\bg]
-
-       By default the format of the axis lables gets determined automatically.
-       If you want todo this your self, use this option with the same %lf
-       arguments you know from the PRING and GPRINT commands.
-
-   S\bSi\biz\bze\be
        [-\b-w\bw|-\b--\b-w\bwi\bid\bdt\bth\bh _\bp_\bi_\bx_\be_\bl_\bs] [-\b-h\bh|-\b--\b-h\bhe\bei\big\bgh\bht\bt _\bp_\bi_\bx_\be_\bl_\bs] [-\b-j\bj|-\b--\b-o\bon\bnl\bly\by-\b-g\bgr\bra\bap\bph\bh]
        [-\b-D\bD|-\b--\b-f\bfu\bul\bll\bl-\b-s\bsi\biz\bze\be-\b-m\bmo\bod\bde\be]
 
        By default, the width and height of the c\bca\ban\bnv\bva\bas\bs (the part with the
        actual data and such). This defaults to 400 pixels by 100 pixels.
 
-       If you specify the -\b--\b-f\bfu\bul\bll\bl-\b-s\bsi\biz\bze\be-\b-m\bmo\bod\bde\be option, the width and height
-       specify the final dimensions of the output image and the canvas is
-       automatically resized to fit.
+       If you specify the -\b--\b-f\bfu\bul\bll\bl-\b-s\bsi\biz\bze\be-\b-m\bmo\bod\bde\be option, the width and height spec-
+       ify the final dimensions of the output image and the canvas is automat-
+       ically resized to fit.
 
        If you specify the -\b--\b-o\bon\bnl\bly\by-\b-g\bgr\bra\bap\bph\bh option and set the height < 32 pixels
        you will get a tiny graph image (thumbnail) to use as an icon for use
        in an overview, for example. All labeling will be stripped off the
        graph.
 
-   L\bLi\bim\bmi\bit\bts\bs
+       L\bLi\bim\bmi\bit\bts\bs
+
        [-\b-u\bu|-\b--\b-u\bup\bpp\bpe\ber\br-\b-l\bli\bim\bmi\bit\bt _\bv_\ba_\bl_\bu_\be] [-\b-l\bl|-\b--\b-l\blo\bow\bwe\ber\br-\b-l\bli\bim\bmi\bit\bt _\bv_\ba_\bl_\bu_\be] [-\b-r\br|-\b--\b-r\bri\big\bgi\bid\bd]
 
        By default the graph will be autoscaling so that it will adjust the
@@ -125,21 +113,19 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
 
        [-\b-J\bJ|-\b--\b-a\bal\blt\bt-\b-a\bau\but\bto\bos\bsc\bca\bal\ble\be-\b-m\bmi\bin\bn]
 
-       Where "--alt-autoscale" will modify both the absolute maximum AND
-       minimum values, this option will only affect the minimum value. The
-       maximum value, if not defined on the command line, will be 0. This
-       option can be useful when graphing router traffic when the WAN line
-       uses compression, and thus the throughput may be higher than the WAN
-       line speed.
+       Where "--alt-autoscale" will modify both the absolute maximum AND mini-
+       mum values, this option will only affect the minimum value. The maximum
+       value, if not defined on the command line, will be 0. This option can
+       be useful when graphing router traffic when the WAN line uses compres-
+       sion, and thus the throughput may be higher than the WAN line speed.
 
        [-\b-M\bM|-\b--\b-a\bal\blt\bt-\b-a\bau\but\bto\bos\bsc\bca\bal\ble\be-\b-m\bma\bax\bx]
 
-       Where "--alt-autoscale" will modify both the absolute maximum AND
-       minimum values, this option will only affect the maximum value. The
-       minimum value, if not defined on the command line, will be 0. This
-       option can be useful when graphing router traffic when the WAN line
-       uses compression, and thus the throughput may be higher than the WAN
-       line speed.
+       Where "--alt-autoscale" will modify both the absolute maximum AND mini-
+       mum values, this option will only affect the maximum value. The minimum
+       value, if not defined on the command line, will be 0. This option can
+       be useful when graphing router traffic when the WAN line uses compres-
+       sion, and thus the throughput may be higher than the WAN line speed.
 
        [-\b-N\bN|-\b--\b-n\bno\bo-\b-g\bgr\bri\bid\bdf\bfi\bit\bt]
 
@@ -150,102 +136,138 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
 
        Gridfitting is turned off for PDF, EPS, SVG output by default.
 
-   G\bGr\bri\bid\bd
-       X-Axis
-           [-\b-x\bx|-\b--\b-x\bx-\b-g\bgr\bri\bid\bd _\bG_\bT_\bM:\b:_\bG_\bS_\bT:\b:_\bM_\bT_\bM:\b:_\bM_\bS_\bT:\b:_\bL_\bT_\bM:\b:_\bL_\bS_\bT:\b:_\bL_\bP_\bR:\b:_\bL_\bF_\bM]
+       X\bX-\b-A\bAx\bxi\bis\bs
 
-           [-\b-x\bx|-\b--\b-x\bx-\b-g\bgr\bri\bid\bd n\bno\bon\bne\be]
+       [-\b-x\bx|-\b--\b-x\bx-\b-g\bgr\bri\bid\bd _\bG_\bT_\bM:\b:_\bG_\bS_\bT:\b:_\bM_\bT_\bM:\b:_\bM_\bS_\bT:\b:_\bL_\bT_\bM:\b:_\bL_\bS_\bT:\b:_\bL_\bP_\bR:\b:_\bL_\bF_\bM]
 
-           The x-axis label is quite complex to configure. If you don't have
-           very special needs it is probably best to rely on the
-           autoconfiguration to get this right. You can specify the string
-           "none" to suppress the grid and labels altogether.
+       [-\b-x\bx|-\b--\b-x\bx-\b-g\bgr\bri\bid\bd n\bno\bon\bne\be]
 
-           The grid is defined by specifying a certain amount of time in the
-           _\b?_\bT_\bM positions. You can choose from "SECOND", "MINUTE", "HOUR",
-           "DAY", "WEEK", "MONTH" or "YEAR". Then you define how many of these
-           should pass between each line or label.  This pair (_\b?_\bT_\bM_\b:_\b?_\bS_\bT) needs
-           to be specified for the base grid (_\bG_\b?_\b?), the major grid (_\bM_\b?_\b?) and
-           the labels (_\bL_\b?_\b?). For the labels you also must define a precision
-           in _\bL_\bP_\bR and a _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be format string in _\bL_\bF_\bM.  _\bL_\bP_\bR defines where each
-           label will be placed. If it is zero, the label will be placed right
-           under the corresponding line (useful for hours, dates etcetera).
-           If you specify a number of seconds here the label is centered on
-           this interval (useful for Monday, January etcetera).
+       The x-axis label is quite complex to configure. If you don't have very
+       special needs it is probably best to rely on the autoconfiguration to
+       get this right. You can specify the string "none" to suppress the grid
+       and labels altogether.
 
-            --x-grid MINUTE:10:HOUR:1:HOUR:4:0:%X
+       The grid is defined by specifying a certain amount of time in the _\b?_\bT_\bM
+       positions. You can choose from "SECOND", "MINUTE", "HOUR", "DAY",
+       "WEEK", "MONTH" or "YEAR". Then you define how many of these should
+       pass between each line or label.  This pair (_\b?_\bT_\bM_\b:_\b?_\bS_\bT) needs to be spec-
+       ified for the base grid (_\bG_\b?_\b?), the major grid (_\bM_\b?_\b?) and the labels
+       (_\bL_\b?_\b?). For the labels you also must define a precision in _\bL_\bP_\bR and a
+       _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be format string in _\bL_\bF_\bM.  _\bL_\bP_\bR defines where each label will be
+       placed. If it is zero, the label will be placed right under the corre-
+       sponding line (useful for hours, dates etcetera).  If you specify a
+       number of seconds here the label is centered on this interval (useful
+       for Monday, January etcetera).
 
-           This places grid lines every 10 minutes, major grid lines every
-           hour, and labels every 4 hours. The labels are placed under the
-           major grid lines as they specify exactly that time.
+        --x-grid MINUTE:10:HOUR:1:HOUR:4:0:%X
 
-            --x-grid HOUR:8:DAY:1:DAY:1:86400:%A
+       This places grid lines every 10 minutes, major grid lines every hour,
+       and labels every 4 hours. The labels are placed under the major grid
+       lines as they specify exactly that time.
 
-           This places grid lines every 8 hours, major grid lines and labels
-           each day. The labels are placed exactly between two major grid
-           lines as they specify the complete day and not just midnight.
+        --x-grid HOUR:8:DAY:1:DAY:1:86400:%A
 
-       Y-Axis
-           [-\b-y\by|-\b--\b-y\by-\b-g\bgr\bri\bid\bd _\bg_\br_\bi_\bd _\bs_\bt_\be_\bp:\b:_\bl_\ba_\bb_\be_\bl _\bf_\ba_\bc_\bt_\bo_\br]
+       This places grid lines every 8 hours, major grid lines and labels each
+       day. The labels are placed exactly between two major grid lines as they
+       specify the complete day and not just midnight.
 
-           [-\b-y\by|-\b--\b-y\by-\b-g\bgr\bri\bid\bd n\bno\bon\bne\be]
+       Y\bY-\b-A\bAx\bxi\bis\bs
 
-           Y-axis grid lines appear at each _\bg_\br_\bi_\bd _\bs_\bt_\be_\bp interval.  Labels are
-           placed every _\bl_\ba_\bb_\be_\bl _\bf_\ba_\bc_\bt_\bo_\br lines.  You can specify "-y none" to
-           suppress the grid and labels altogether.  The default for this
-           option is to automatically select sensible values.
+       [-\b-y\by|-\b--\b-y\by-\b-g\bgr\bri\bid\bd _\bg_\br_\bi_\bd _\bs_\bt_\be_\bp:\b:_\bl_\ba_\bb_\be_\bl _\bf_\ba_\bc_\bt_\bo_\br]
 
-           If you have set --y-grid to 'none' not only the labels get
-           suppressed, also the space reserved for the labels is removed. You
-           can still add space manually if you use the --units-length command
-           to explicitly reserve space.
+       [-\b-y\by|-\b--\b-y\by-\b-g\bgr\bri\bid\bd n\bno\bon\bne\be]
 
-           [-\b-Y\bY|-\b--\b-a\bal\blt\bt-\b-y\by-\b-g\bgr\bri\bid\bd]
+       Y-axis grid lines appear at each _\bg_\br_\bi_\bd _\bs_\bt_\be_\bp interval.  Labels are placed
+       every _\bl_\ba_\bb_\be_\bl _\bf_\ba_\bc_\bt_\bo_\br lines.  You can specify "-y none" to suppress the
+       grid and labels altogether.  The default for this option is to automat-
+       ically select sensible values.
 
-           Place the Y grid dynamically based on the graph's Y range. The
-           algorithm ensures that you always have a grid, that there are
-           enough but not too many grid lines, and that the grid is metric.
-           That is the grid lines are placed every 1, 2, 5 or 10 units. This
-           parameter will also ensure that you get enough decimals displayed
-           even if your graph goes from 69.998 to 70.001.  (contributed by
-           Sasha Mikheev).
+       If you have set --y-grid to 'none' not only the labels get suppressed,
+       also the space reserved for the labels is removed. You can still add
+       space manually if you use the --units-length command to explicitly
+       reserve space.
 
-           [-\b-o\bo|-\b--\b-l\blo\bog\bga\bar\bri\bit\bth\bhm\bmi\bic\bc]
+       [-\b-Y\bY|-\b--\b-a\bal\blt\bt-\b-y\by-\b-g\bgr\bri\bid\bd]
 
-           Logarithmic y-axis scaling.
+       Place the Y grid dynamically based on the graph's Y range. The algo-
+       rithm ensures that you always have a grid, that there are enough but
+       not too many grid lines, and that the grid is metric. That is the grid
+       lines are placed every 1, 2, 5 or 10 units. This parameter will also
+       ensure that you get enough decimals displayed even if your graph goes
+       from 69.998 to 70.001.  (contributed by Sasha Mikheev).
 
-           [-\b-X\bX|-\b--\b-u\bun\bni\bit\bts\bs-\b-e\bex\bxp\bpo\bon\bne\ben\bnt\bt _\bv_\ba_\bl_\bu_\be]
+       [-\b-o\bo|-\b--\b-l\blo\bog\bga\bar\bri\bit\bth\bhm\bmi\bic\bc]
 
-           This sets the 10**exponent scaling of the y-axis values. Normally,
-           values will be scaled to the appropriate units (k, M, etc.).
-           However, you may wish to display units always in k (Kilo, 10e3)
-           even if the data is in the M (Mega, 10e6) range, for instance.
-           Value should be an integer which is a multiple of 3 between -18 and
-           18 inclusively.  It is the exponent on the units you wish to use.
-           For example, use 3 to display the y-axis values in k (Kilo, 10e3,
-           thousands), use -6 to display the y-axis values in u (Micro, 10e-6,
-           millionths).  Use a value of 0 to prevent any scaling of the y-axis
-           values.
+       Logarithmic y-axis scaling.
 
-           This option is very effective at confusing the heck out of the
-           default rrdtool autoscaler and grid painter. If rrdtool detects
-           that it is not successful in labeling the graph under the given
-           circumstances, it will switch to the more robust -\b--\b-a\bal\blt\bt-\b-y\by-\b-g\bgr\bri\bid\bd mode.
+       [-\b-X\bX|-\b--\b-u\bun\bni\bit\bts\bs-\b-e\bex\bxp\bpo\bon\bne\ben\bnt\bt _\bv_\ba_\bl_\bu_\be]
 
-           [-\b-L\bL|-\b--\b-u\bun\bni\bit\bts\bs-\b-l\ble\ben\bng\bgt\bth\bh _\bv_\ba_\bl_\bu_\be]
+       This sets the 10**exponent scaling of the y-axis values. Normally, val-
+       ues will be scaled to the appropriate units (k, M, etc.).  However, you
+       may wish to display units always in k (Kilo, 10e3) even if the data is
+       in the M (Mega, 10e6) range, for instance. Value should be an integer
+       which is a multiple of 3 between -18 and 18 inclusively.  It is the
+       exponent on the units you wish to use. For example, use 3 to display
+       the y-axis values in k (Kilo, 10e3, thousands), use -6 to display the
+       y-axis values in u (Micro, 10e-6, millionths).  Use a value of 0 to
+       prevent any scaling of the y-axis values.
 
-           How many digits should rrdtool assume the y-axis labels to be? You
-           may have to use this option to make enough space once you start
-           fideling with the y-axis labeling.
+       This option is very effective at confusing the heck out of the default
+       rrdtool autoscaler and grid painter. If rrdtool detects that it is not
+       successful in labeling the graph under the given circumstances, it will
+       switch to the more robust -\b--\b-a\bal\blt\bt-\b-y\by-\b-g\bgr\bri\bid\bd mode.
 
-           [-\b--\b-u\bun\bni\bit\bts\bs=\b=s\bsi\bi]
+       [-\b-L\bL|-\b--\b-u\bun\bni\bit\bts\bs-\b-l\ble\ben\bng\bgt\bth\bh _\bv_\ba_\bl_\bu_\be]
+
+       How many digits should rrdtool assume the y-axis labels to be? You may
+       have to use this option to make enough space once you start fiddling
+       with the y-axis labeling.
+
+       [-\b--\b-u\bun\bni\bit\bts\bs=\b=s\bsi\bi]
+
+       With this option y-axis values on logarithmic graphs will be scaled to
+       the appropriate units (k, M, etc.) instead of using exponential nota-
+       tion.  Note that for linear graphs, SI notation is used by default.
+
+       R\bRi\big\bgh\bht\bt Y\bY A\bAx\bxi\bis\bs
+
+       [-\b--\b-r\bri\big\bgh\bht\bt-\b-a\bax\bxi\bis\bs _\bs_\bc_\ba_\bl_\be:\b:_\bs_\bh_\bi_\bf_\bt] [-\b--\b-r\bri\big\bgh\bht\bt-\b-a\bax\bxi\bis\bs-\b-l\bla\bab\bbe\bel\bl _\bl_\ba_\bb_\be_\bl]
+
+       A second axis will be drawn to the right of the graph. It is tied to
+       the left axis via the scale and shift parameters. You can also define a
+       label for the right axis.
+
+       [-\b--\b-r\bri\big\bgh\bht\bt-\b-a\bax\bxi\bis\bs-\b-f\bfo\bor\brm\bma\bat\bt _\bf_\bo_\br_\bm_\ba_\bt_\b-_\bs_\bt_\br_\bi_\bn_\bg]
+
+       By default the format of the axis lables gets determined automatically.
+       If you want todo this your self, use this option with the same %lf
+       arguments you know from the PRING and GPRINT commands.
 
-           With this option y-axis values on logarithmic graphs will be scaled
-           to the appropriate units (k, M, etc.) instead of using exponential
-           notation.  Note that for linear graphs, SI notation is used by
-           default.
+       L\bLe\beg\bge\ben\bnd\bd
+
+       [-\b-g\bg|-\b--\b-n\bno\bo-\b-l\ble\beg\bge\ben\bnd\bd]
+
+       Suppress generation of the legend; only render the graph.
+
+       [-\b-F\bF|-\b--\b-f\bfo\bor\brc\bce\be-\b-r\bru\bul\ble\bes\bs-\b-l\ble\beg\bge\ben\bnd\bd]
+
+       Force the generation of HRULE and VRULE legends even if those HRULE or
+       VRULE will not be drawn because out of graph boundaries (mimics
+       behaviour of pre 1.0.42 versions).
+
+       [-\b--\b-l\ble\beg\bge\ben\bnd\bd-\b-p\bpo\bos\bsi\bit\bti\bio\bon\bn=(north|south|west|east)]
+
+       Place the legend at the given side of the graph. The default is south.
+       In west or east position it is necessary to add line breaks manually.
+
+       [-\b--\b-l\ble\beg\bge\ben\bnd\bd-\b-d\bdi\bir\bre\bec\bct\bti\bio\bon\bn=(topdown|bottomup)]
+
+       Place the legend items in the given vertical order. The default is top-
+       down.  Using bottomup the legend items appear in the same vertical
+       order as a stack of lines or areas.
+
+       M\bMi\bis\bsc\bce\bel\bll\bla\ban\bne\beo\bou\bus\bs
 
-   M\bMi\bis\bsc\bce\bel\bll\bla\ban\bne\beo\bou\bus\bs
        [-\b-z\bz|-\b--\b-l\bla\baz\bzy\by]
 
        Only generate the graph if the current graph is out of date or not
@@ -256,6 +278,16 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
        lazy will not generate the graph when it is already there and up to
        date, and also that it will output the size of the graph.
 
+       [-\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs]
+
+       Address of the rrdcached daemon. If specified, a "flush" command is
+       sent to the server before reading the RRD files. This allows the graph
+       to contain fresh data even if the daemon is configured to cache values
+       for a long time.  For a list of accepted formats, see the -\b-l\bl option in
+       the rrdcached manual.
+
+        rrdtool graph [...] --daemon unix:/var/run/rrdcached.sock [...]
+
        [-\b-f\bf|-\b--\b-i\bim\bmg\bgi\bin\bnf\bfo\bo _\bp_\br_\bi_\bn_\bt_\bf_\bs_\bt_\br]
 
        After the image has been created, the graph function uses printf
@@ -275,11 +307,11 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
        the right and bottom border, "GRID", "MGRID" for the major grid, "FONT"
        for the color of the font, "AXIS" for the axis of the graph, "FRAME"
        for the line around the color spots, and finally "ARROW" for the arrow
-       head pointing up and forward. Each color is composed out of three
-       hexadecimal numbers specifying its rgb color component (00 is off, FF
-       is maximum) of red, green and blue. Optionally you may add another
-       hexadecimal number specifying the transparency (FF is solid). You may
-       set this option several times to alter multiple defaults.
+       head pointing up and forward. Each color is composed out of three hex-
+       adecimal numbers specifying its rgb color component (00 is off, FF is
+       maximum) of red, green and blue. Optionally you may add another hex-
+       adecimal number specifying the transparency (FF is solid). You may set
+       this option several times to alter multiple defaults.
 
        A green arrow is made by: "--color ARROW#00FF00"
 
@@ -291,8 +323,8 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
 
        This lets you customize which font to use for the various text elements
        on the RRD graphs. "DEFAULT" sets the default value for all elements,
-       "TITLE" for the title, "AXIS" for the axis labels, "UNIT" for the
-       vertical unit label, "LEGEND" for the graph legend, "WATERMARK" for the
+       "TITLE" for the title, "AXIS" for the axis labels, "UNIT" for the ver-
+       tical unit label, "LEGEND" for the graph legend, "WATERMARK" for the
        watermark on the edge of the graph.
 
        Use Times for the title: "--font TITLE:13:Times"
@@ -312,8 +344,8 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
        full Pango syntax when selecting your font:
 
        The font name has the form "[_\bF_\bA_\bM_\bI_\bL_\bY_\b-_\bL_\bI_\bS_\bT] [_\bS_\bT_\bY_\bL_\bE_\b-_\bO_\bP_\bT_\bI_\bO_\bN_\bS] [_\bS_\bI_\bZ_\bE]",
-       where _\bF_\bA_\bM_\bI_\bL_\bY_\b-_\bL_\bI_\bS_\bT is a comma separated list of families optionally
-       terminated by a comma, _\bS_\bT_\bY_\bL_\bE_\b__\bO_\bP_\bT_\bI_\bO_\bN_\bS is a whitespace separated list of
+       where _\bF_\bA_\bM_\bI_\bL_\bY_\b-_\bL_\bI_\bS_\bT is a comma separated list of families optionally ter-
+       minated by a comma, _\bS_\bT_\bY_\bL_\bE_\b__\bO_\bP_\bT_\bI_\bO_\bN_\bS is a whitespace separated list of
        words where each WORD describes one of style, variant, weight, stretch,
        or gravity, and _\bS_\bI_\bZ_\bE is a decimal number (size in points) or optionally
        followed by the unit modifier "px" for absolute size. Any one of the
@@ -358,8 +390,8 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
         tt    Monospace font
         u     Underline
 
-       More details on
-       <http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html>.
+       More details on <http://developer.gnome.org/doc/API/2.0/pango/Pango-
+       MarkupFormat.html>.
 
        [-\b-G\bG|-\b--\b-g\bgr\bra\bap\bph\bh-\b-r\bre\ben\bnd\bde\ber\br-\b-m\bmo\bod\bde\be {n\bno\bor\brm\bma\bal\bl,m\bmo\bon\bno\bo}]
 
@@ -378,10 +410,10 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
        [-\b-a\ba|-\b--\b-i\bim\bmg\bgf\bfo\bor\brm\bma\bat\bt P\bPN\bNG\bG|S\bSV\bVG\bG|E\bEP\bPS\bS|P\bPD\bDF\bF]
 
        Image format for the generated graph. For the vector formats you can
-       choose among the standard Postscript fonts Courier-Bold, Courier-
-       BoldOblique, Courier-Oblique, Courier, Helvetica-Bold, Helvetica-
-       BoldOblique, Helvetica-Oblique, Helvetica, Symbol, Times-Bold, Times-
-       BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.
+       choose among the standard Postscript fonts Courier-Bold,
+       Courier-BoldOblique, Courier-Oblique, Courier, Helvetica-Bold, Hel-
+       vetica-BoldOblique, Helvetica-Oblique, Helvetica, Symbol, Times-Bold,
+       Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.
 
        [-\b-i\bi|-\b--\b-i\bin\bnt\bte\ber\brl\bla\bac\bce\bed\bd]
 
@@ -389,16 +421,6 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
 
        If images are interlaced they become visible on browsers more quickly.
 
-       [-\b-g\bg|-\b--\b-n\bno\bo-\b-l\ble\beg\bge\ben\bnd\bd]
-
-       Suppress generation of the legend; only render the graph.
-
-       [-\b-F\bF|-\b--\b-f\bfo\bor\brc\bce\be-\b-r\bru\bul\ble\bes\bs-\b-l\ble\beg\bge\ben\bnd\bd]
-
-       Force the generation of HRULE and VRULE legends even if those HRULE or
-       VRULE will not be drawn because out of graph boundaries (mimics
-       behaviour of pre 1.0.42 versions).
-
        [-\b-T\bT|-\b--\b-t\bta\bab\bbw\bwi\bid\bdt\bth\bh _\bv_\ba_\bl_\bu_\be]
 
        By default the tab-width is 40 pixels, use this option to change it.
@@ -414,7 +436,8 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
        Adds the given string as a watermark, horizontally centered, at the
        bottom of the graph.
 
-   D\bDa\bat\bta\ba a\ban\bnd\bd v\bva\bar\bri\bia\bab\bbl\ble\bes\bs
+       D\bDa\bat\bta\ba a\ban\bnd\bd v\bva\bar\bri\bia\bab\bbl\ble\bes\bs
+
        D\bDE\bEF\bF:\b:_\bv_\bn_\ba_\bm_\be=\b=_\br_\br_\bd_\bf_\bi_\bl_\be:\b:_\bd_\bs_\b-_\bn_\ba_\bm_\be:\b:_\bC_\bF[:\b:s\bst\bte\bep\bp=\b=_\bs_\bt_\be_\bp][:\b:s\bst\bta\bar\brt\bt=\b=_\bt_\bi_\bm_\be][:\b:e\ben\bnd\bd=\b=_\bt_\bi_\bm_\be]
 
        C\bCD\bDE\bEF\bF:\b:_\bv_\bn_\ba_\bm_\be=\b=_\bR_\bP_\bN _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn
@@ -431,15 +454,16 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
        least one print statement to generate a report.  See rrdgraph_graph for
        the exact format.
 
-   g\bgr\bra\bap\bph\bhv\bv
+       g\bgr\bra\bap\bph\bhv\bv
+
        Calling rrdtool with the graphv option will return information in the
        rrdtool info format. On the command line this means that all output
        will be in key=value format. When used from the Perl and Ruby bindings
        a hash pointer will be returned from the call.
 
        When the filename '-' is given, the contents of the graph itself will
-       also be returned through this interface (hash key 'image'). On the
-       command line the output will look like this:
+       also be returned through this interface (hash key 'image'). On the com-
+       mand line the output will look like this:
 
         print[0] = "0.020833"
         print[1] = "0.0440833"
@@ -460,6 +484,15 @@ O\bOP\bPT\bTI\bIO\bON\bNS\bS
        Especially the 'graph_*' keys are new. They help applications that want
        to know what is where on the graph.
 
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+       The following environment variables may be used to change the behavior
+       of "rrdtool graph":
+
+       R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
+           If this environment variable is set it will have the same effect as
+           specifying the "--daemon" option on the command line. If both are
+           present, the command line argument takes precedence.
+
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
        rrdgraph gives an overview of how r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh works.  rrdgraph_data
        describes D\bDE\bEF\bF,C\bCD\bDE\bEF\bF and V\bVD\bDE\bEF\bF in detail.  rrdgraph_rpn describes the R\bRP\bPN\bN
@@ -476,4 +509,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2009-04-07                       RRDGRAPH(1)
+1.3.99909060808                   2009-05-21                       RRDGRAPH(1)
index bf7511c6c08aaf239ba1f8bc3119dac55afc2058..7c9538c3a739a24c1ae1ec94379edd830329d823 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDGRAPH_DATA 1"
-.TH RRDGRAPH_DATA 1 "2009-04-29" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDGRAPH_DATA 1 "2009-04-29" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdgraph_data \- preparing data for graphing in rrdtool graph
 .SH "SYNOPSIS"
 .IX Header "SYNOPSIS"
-\&\fB\s-1DEF:\s0\fR\fI<vname>\fR=\fI<rrdfile>\fR:\fI<ds\-name>\fR:\fI<\s-1CF\s0>\fR[:step=\fI<step>\fR][:start=\fI<time>\fR][:end=\fI<time>\fR][:reduce=\fI<\f(BI\s-1CF\s0\fI>\fR]
+\&\fB\s-1DEF:\s0\fR\fI<vname>\fR=\fI<rrdfile>\fR:\fI<ds-name>\fR:\fI<\s-1CF\s0>\fR[:step=\fI<step>\fR][:start=\fI<time>\fR][:end=\fI<time>\fR][:reduce=\fI<\f(BI\s-1CF\s0\fI>\fR]
 .PP
 \&\fB\s-1VDEF\s0\fR:\fIvname\fR=\fI\s-1RPN\s0 expression\fR
 .PP
@@ -155,7 +156,7 @@ already taken by an \s-1RPN\s0 operator. A safe bet it to use lowercase or
 mixedcase names for variables since operators will always be in uppercase.
 .SH "DEF"
 .IX Header "DEF"
-\&\fB\s-1DEF:\s0\fR\fI<vname>\fR=\fI<rrdfile>\fR:\fI<ds\-name>\fR:\fI<\s-1CF\s0>\fR[:step=\fI<step>\fR][:start=\fI<time>\fR][:end=\fI<time>\fR][:reduce=\fI<\f(BI\s-1CF\s0\fI>\fR]
+\&\fB\s-1DEF:\s0\fR\fI<vname>\fR=\fI<rrdfile>\fR:\fI<ds-name>\fR:\fI<\s-1CF\s0>\fR[:step=\fI<step>\fR][:start=\fI<time>\fR][:end=\fI<time>\fR][:reduce=\fI<\f(BI\s-1CF\s0\fI>\fR]
 .PP
 This command fetches data from an \fB\s-1RRD\s0\fR file.  The virtual name
 \&\fIvname\fR can then be used throughout the rest of the script. By
@@ -178,7 +179,7 @@ start and end times, such as \f(CW\*(C`\-\-start end\-8days8hours\*(C'\fR).
 .PP
 If consolidation needs to be done, the \fB\s-1CF\s0\fR of the \fB\s-1RRA\s0\fR specified in the
 \&\fB\s-1DEF\s0\fR itself will be used to reduce the data density. This behaviour can
-be changed using \f(CW\*(C`:reduce=\f(CI<\f(CBCF\f(CI>\f(CW\*(C'\fR.  This optional parameter
+be changed using \f(CW\*(C`:reduce=\f(CI<\f(CB\s-1CF\s0\f(CI>\f(CW\*(C'\fR.  This optional parameter
 specifies the \fB\s-1CF\s0\fR to use during the data reduction phase.
 .PP
 Example:
@@ -229,7 +230,7 @@ new values.
 \&\fB\s-1VDEF\s0\fR also works on such an array but in a different way.  For
 example, \fIVDEF:max=ds0,MAXIMUM\fR would scan each of the array members
 and store the maximum value.
-.SS "When do you use \fB\s-1VDEF\s0\fP versus \fB\s-1CDEF\s0\fP?"
+.Sh "When do you use \fB\s-1VDEF\s0\fP versus \fB\s-1CDEF\s0\fP?"
 .IX Subsection "When do you use VDEF versus CDEF?"
 Use \fB\s-1CDEF\s0\fR to transform your data prior to graphing.  In the above
 example, we'd use a \fB\s-1CDEF\s0\fR to transform bytes to bits before
index 7348df4c2cd5c2629929d74f6061731fa3d019de..dfed5f1d7cbd69b844a1486d9eb4fc14e508b489 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdgraph_data</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
index 012386841a2de32a7c2acb2965badbcabaf3abd2..338b264d71437403d3ea7e7583e109d8ebc596d6 100644 (file)
@@ -6,7 +6,8 @@ N\bNA\bAM\bME\bE
        rrdgraph_data - preparing data for graphing in rrdtool graph
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
-       D\bDE\bEF\bF:\b:_\b<_\bv_\bn_\ba_\bm_\be_\b>=_\b<_\br_\br_\bd_\bf_\bi_\bl_\be_\b>:_\b<_\bd_\bs_\b-_\bn_\ba_\bm_\be_\b>:_\b<_\bC_\bF_\b>[:step=_\b<_\bs_\bt_\be_\bp_\b>][:start=_\b<_\bt_\bi_\bm_\be_\b>][:end=_\b<_\bt_\bi_\bm_\be_\b>][:reduce=_\b<_\bC\bC_\bF\bF_\b>]
+       D\bDE\bEF\bF:\b:_\b<_\bv_\bn_\ba_\bm_\be_\b>=_\b<_\br_\br_\bd_\bf_\bi_\bl_\be_\b>:_\b<_\bd_\bs_\b-
+       _\bn_\ba_\bm_\be_\b>:_\b<_\bC_\bF_\b>[:step=_\b<_\bs_\bt_\be_\bp_\b>][:start=_\b<_\bt_\bi_\bm_\be_\b>][:end=_\b<_\bt_\bi_\bm_\be_\b>][:reduce=_\b<_\bC\bC_\bF\bF_\b>]
 
        V\bVD\bDE\bEF\bF:_\bv_\bn_\ba_\bm_\be=_\bR_\bP_\bN _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn
 
@@ -14,31 +15,32 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        These three instructions extract data values out of the R\bRR\bRD\bD files,
-       optionally altering them (think, for example, of a bytes to bits
-       conversion). If so desired, you can also define variables containing
-       useful information such as maximum, minimum etcetera. Two of the
-       instructions use a language called R\bRP\bPN\bN which is described in its own
-       manual page.
+       optionally altering them (think, for example, of a bytes to bits con-
+       version). If so desired, you can also define variables containing use-
+       ful information such as maximum, minimum etcetera. Two of the instruc-
+       tions use a language called R\bRP\bPN\bN which is described in its own manual
+       page.
 
-       Variable names (_\bv_\bn_\ba_\bm_\be) must be made up strings of the following
-       characters "A-Z, a-z, 0-9, -,_" and a maximum length of 255 characters.
+       Variable names (_\bv_\bn_\ba_\bm_\be) must be made up strings of the following charac-
+       ters "A-Z, a-z, 0-9, -,_" and a maximum length of 255 characters.
 
        When picking variable names, make sure you do not choose a name that is
        already taken by an RPN operator. A safe bet it to use lowercase or
-       mixedcase names for variables since operators will always be in
-       uppercase.
+       mixedcase names for variables since operators will always be in upper-
+       case.
 
 D\bDE\bEF\bF
-       D\bDE\bEF\bF:\b:_\b<_\bv_\bn_\ba_\bm_\be_\b>=_\b<_\br_\br_\bd_\bf_\bi_\bl_\be_\b>:_\b<_\bd_\bs_\b-_\bn_\ba_\bm_\be_\b>:_\b<_\bC_\bF_\b>[:step=_\b<_\bs_\bt_\be_\bp_\b>][:start=_\b<_\bt_\bi_\bm_\be_\b>][:end=_\b<_\bt_\bi_\bm_\be_\b>][:reduce=_\b<_\bC\bC_\bF\bF_\b>]
+       D\bDE\bEF\bF:\b:_\b<_\bv_\bn_\ba_\bm_\be_\b>=_\b<_\br_\br_\bd_\bf_\bi_\bl_\be_\b>:_\b<_\bd_\bs_\b-
+       _\bn_\ba_\bm_\be_\b>:_\b<_\bC_\bF_\b>[:step=_\b<_\bs_\bt_\be_\bp_\b>][:start=_\b<_\bt_\bi_\bm_\be_\b>][:end=_\b<_\bt_\bi_\bm_\be_\b>][:reduce=_\b<_\bC\bC_\bF\bF_\b>]
 
        This command fetches data from an R\bRR\bRD\bD file.  The virtual name _\bv_\bn_\ba_\bm_\be can
        then be used throughout the rest of the script. By default, an R\bRR\bRA\bA
-       which contains the correct consolidated data at an appropriate
-       resolution will be chosen.  The resolution can be overridden with the
-       --step option.  The resolution can again be overridden by specifying
-       the s\bst\bte\bep\bp s\bsi\biz\bze\be.  The time span of this data is the same as for the graph
-       by default, you can override this by specifying s\bst\bta\bar\brt\bt a\ban\bnd\bd e\ben\bnd\bd.
-       Remember to escape colons in the time specification!
+       which contains the correct consolidated data at an appropriate resolu-
+       tion will be chosen.  The resolution can be overridden with the --step
+       option.  The resolution can again be overridden by specifying the s\bst\bte\bep\bp
+       s\bsi\biz\bze\be.  The time span of this data is the same as for the graph by
+       default, you can override this by specifying s\bst\bta\bar\brt\bt a\ban\bnd\bd e\ben\bnd\bd.  Remember
+       to escape colons in the time specification!
 
        If the resolution of the data is higher than the resolution of the
        graph, the data will be further consolidated. This may result in a
@@ -51,7 +53,7 @@ D\bDE\bEF\bF
 
        If consolidation needs to be done, the C\bCF\bF of the R\bRR\bRA\bA specified in the
        D\bDE\bEF\bF itself will be used to reduce the data density. This behaviour can
-       be changed using ":reduce=_\b<C\bCF\bF_\b>_\b".  This optional parameter specifies the
+       be changed using ":reduce=<CF>".  This optional parameter specifies the
        C\bCF\bF to use during the data reduction phase.
 
        Example:
@@ -64,26 +66,26 @@ D\bDE\bEF\bF
 V\bVD\bDE\bEF\bF
        V\bVD\bDE\bEF\bF:_\bv_\bn_\ba_\bm_\be=_\bR_\bP_\bN _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn
 
-       This command returns a value and/or a time according to the R\bRP\bPN\bN
-       statements used. The resulting _\bv_\bn_\ba_\bm_\be will, depending on the functions
-       used, have a value and a time component.  When you use this _\bv_\bn_\ba_\bm_\be in
-       another R\bRP\bPN\bN expression, you are effectively inserting its value just as
-       if you had put a number at that place.  The variable can also be used
-       in the various graph and print elements.
+       This command returns a value and/or a time according to the R\bRP\bPN\bN state-
+       ments used. The resulting _\bv_\bn_\ba_\bm_\be will, depending on the functions used,
+       have a value and a time component.  When you use this _\bv_\bn_\ba_\bm_\be in another
+       R\bRP\bPN\bN expression, you are effectively inserting its value just as if you
+       had put a number at that place.  The variable can also be used in the
+       various graph and print elements.
 
        Example: "VDEF:avg=mydata,AVERAGE"
 
-       Note that currently only aggregation functions work in VDEF rpn
-       expressions.  Patches to change this are welcome.
+       Note that currently only aggregation functions work in VDEF rpn expres-
+       sions.  Patches to change this are welcome.
 
 C\bCD\bDE\bEF\bF
        C\bCD\bDE\bEF\bF:_\bv_\bn_\ba_\bm_\be=_\bR_\bP_\bN _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn
 
        This command creates a new set of data points (in memory only, not in
-       the R\bRR\bRD\bD file) out of one or more other data series. The R\bRP\bPN\bN
-       instructions are used to evaluate a mathematical function on each data
-       point. The resulting _\bv_\bn_\ba_\bm_\be can then be used further on in the script,
-       just as if it were generated by a D\bDE\bEF\bF instruction.
+       the R\bRR\bRD\bD file) out of one or more other data series. The R\bRP\bPN\bN instruc-
+       tions are used to evaluate a mathematical function on each data point.
+       The resulting _\bv_\bn_\ba_\bm_\be can then be used further on in the script, just as
+       if it were generated by a D\bDE\bEF\bF instruction.
 
        Example: "CDEF:mydatabits=mydata,8,*"
 
@@ -91,17 +93,18 @@ A\bAb\bbo\bou\but\bt C\bCD\bDE\bEF\bF v\bve\ber\brs\bsu\bus\bs V\bVD\bDE\bEF\bF
        At some point in processing, R\bRR\bRD\bDt\bto\boo\bol\bl has gathered an array of rates
        ready to display.
 
-       C\bCD\bDE\bEF\bF works on such an array.  For example, _\bC_\bD_\bE_\bF_\b:_\bn_\be_\bw_\b=_\bd_\bs_\b0_\b,_\b8_\b,_\b* would
-       multiply each of the array members by eight (probably transforming
-       bytes into bits). The result is an array containing the new values.
+       C\bCD\bDE\bEF\bF works on such an array.  For example, _\bC_\bD_\bE_\bF_\b:_\bn_\be_\bw_\b=_\bd_\bs_\b0_\b,_\b8_\b,_\b* would mul-
+       tiply each of the array members by eight (probably transforming bytes
+       into bits). The result is an array containing the new values.
 
        V\bVD\bDE\bEF\bF also works on such an array but in a different way.  For example,
        _\bV_\bD_\bE_\bF_\b:_\bm_\ba_\bx_\b=_\bd_\bs_\b0_\b,_\bM_\bA_\bX_\bI_\bM_\bU_\bM would scan each of the array members and store the
        maximum value.
 
-   W\bWh\bhe\ben\bn d\bdo\bo y\byo\bou\bu u\bus\bse\be V\bVD\bDE\bEF\bF v\bve\ber\brs\bsu\bus\bs C\bCD\bDE\bEF\bF?\b?
-       Use C\bCD\bDE\bEF\bF to transform your data prior to graphing.  In the above
-       example, we'd use a C\bCD\bDE\bEF\bF to transform bytes to bits before graphing the
+       W\bWh\bhe\ben\bn d\bdo\bo y\byo\bou\bu u\bus\bse\be V\bVD\bDE\bEF\bF v\bve\ber\brs\bsu\bus\bs C\bCD\bDE\bEF\bF?\b?
+
+       Use C\bCD\bDE\bEF\bF to transform your data prior to graphing.  In the above exam-
+       ple, we'd use a C\bCD\bDE\bEF\bF to transform bytes to bits before graphing the
        bits.
 
        You use a V\bVD\bDE\bEF\bF if you want _\bm_\ba_\bx_\b(_\b1_\b,_\b5_\b,_\b3_\b,_\b2_\b,_\b4_\b) to return five which would be
@@ -128,4 +131,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2009-04-29                  RRDGRAPH_DATA(1)
+1.3.99909060808                   2009-04-29                  RRDGRAPH_DATA(1)
index 482f0a06195a522873cbb179b0a90e740d07cc50..6dc2871f98496ce7e9719eb1cfd4a7cf177a458b 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDGRAPH_EXAMPLES 1"
-.TH RRDGRAPH_EXAMPLES 1 "2009-02-21" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDGRAPH_EXAMPLES 1 "2009-02-21" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdgraph_examples \- Examples for rrdtool graph
 .SH "SYNOPSIS"
@@ -143,7 +144,7 @@ by using detailed examples. They are not always cut-and-paste
 ready because comments are intermixed with the examples.
 .SH "EXAMPLES"
 .IX Header "EXAMPLES"
-.SS "Data with multiple resolutions"
+.Sh "Data with multiple resolutions"
 .IX Subsection "Data with multiple resolutions"
 .Vb 7
 \&    \-\-end now \-\-start end\-120000s \-\-width 400
@@ -154,7 +155,7 @@ ready because comments are intermixed with the examples.
 \&    LINE1:ds0b#00CCFF:"resolution 1800 seconds per interval\el"
 \&    LINE1:ds0c#FF00FF:"resolution 7200 seconds per interval\el"
 .Ve
-.SS "Nicely formatted legend section"
+.Sh "Nicely formatted legend section"
 .IX Subsection "Nicely formatted legend section"
 .Vb 10
 \&    DEF:ds0=/home/rrdtool/data/router1.rrd:ds0:AVERAGE
@@ -188,7 +189,9 @@ Note: the column titles have to be as wide as the columns
 \&    COMMENT:"Maximum    "
 \&    COMMENT:"Average    "
 \&    COMMENT:"Minimum    "
-\&
+.Ve
+.PP
+.Vb 11
 \&    COMMENT:"95th percentile\el"
 \&    AREA:ds0bits#00C000:"Inbound "
 \&    GPRINT:ds0max:"%6.2lf %Sbps"
@@ -201,7 +204,7 @@ Note: the column titles have to be as wide as the columns
 \&    GPRINT:ds1min:"%6.2lf %Sbps"
 \&    GPRINT:ds1pct:"%6.2lf %Sbps\el"
 .Ve
-.SS "Offsetting a line on the y\-axis"
+.Sh "Offsetting a line on the y\-axis"
 .IX Subsection "Offsetting a line on the y-axis"
 Depending on your needs you can do this in two ways:
 .IP "\(bu" 4
@@ -235,7 +238,7 @@ Note: the second line gets stacked on top of the first one
 .Vb 1
 \&    LINE1:data#FF0000:"Data with offset":STACK
 .Ve
-.SS "Drawing dashed lines"
+.Sh "Drawing dashed lines"
 .IX Subsection "Drawing dashed lines"
 Also works for \s-1HRULE\s0 and \s-1VRULE\s0
 .IP "\(bu" 4
@@ -244,7 +247,7 @@ default style: \- \- \- \- \-
 .IP "\(bu" 4
 more fancy style with offset: \- \-  \-\-\- \-  \-\-\- \-
     LINE1:data#FF0000:\*(L"another dashed line\*(R":dashes=15,5,5,10:dash\-offset=10
-.SS "Time ranges"
+.Sh "Time ranges"
 .IX Subsection "Time ranges"
 .Vb 6
 \&    Last four weeks: \-\-start end\-4w \-\-end 00:00
@@ -254,7 +257,7 @@ more fancy style with offset: \- \-  \-\-\- \-  \-\-\- \-
 \&    Last 24 hours:   <nothing at all>
 \&    Yesterday:       \-\-end 00:00
 .Ve
-.SS "Viewing the current and previous week together"
+.Sh "Viewing the current and previous week together"
 .IX Subsection "Viewing the current and previous week together"
 .Vb 3
 \&    \-\-end now \-\-start end\-1w
@@ -270,13 +273,13 @@ Shift the data forward by one week (604800 seconds)
 \&    AREA:lastweek#0000FF:Last\e week
 \&    LINE1:thisweek#FF0000:This\e week
 .Ve
-.SS "Aberrant Behaviour Detection"
+.Sh "Aberrant Behaviour Detection"
 .IX Subsection "Aberrant Behaviour Detection"
 If the specialized function \fBRRAs\fR exist for aberrant behavior detection, they
 can be used to generate the graph of a time series with confidence bands and
 failures.
 .PP
-.Vb 10
+.Vb 14
 \&   rrdtool graph example.png \e
 \&          DEF:obs=monitor.rrd:ifOutOctets:AVERAGE \e
 \&          DEF:pred=monitor.rrd:ifOutOctets:HWPREDICT \e
index 5dbf576693c410424051d5c6d0a8d81a188f2ee8..b7f44134f1d0094bdbac7a5508d8fd6455bdd062 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdgraph_examples</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
@@ -25,7 +21,7 @@
 
                <li><a href="#data_with_multiple_resolutions">Data with multiple resolutions</a></li>
                <li><a href="#nicely_formatted_legend_section">Nicely formatted legend section</a></li>
-               <li><a href="#offsetting_a_line_on_the_y_axis">Offsetting a line on the y-axis</a></li>
+               <li><a href="#offsetting_a_line_on_the_yaxis">Offsetting a line on the y-axis</a></li>
                <li><a href="#drawing_dashed_lines">Drawing dashed lines</a></li>
                <li><a href="#time_ranges">Time ranges</a></li>
                <li><a href="#viewing_the_current_and_previous_week_together">Viewing the current and previous week together</a></li>
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -119,20 +111,20 @@ ready because comments are intermixed with the examples.</p>
     GPRINT:ds1pct:&quot;%6.2lf %Sbps\l&quot;</pre>
 <p>
 </p>
-<h2><a name="offsetting_a_line_on_the_y_axis">Offsetting a line on the y-axis</a></h2>
+<h2><a name="offsetting_a_line_on_the_yaxis">Offsetting a line on the y-axis</a></h2>
 <p>Depending on your needs you can do this in two ways:</p>
 <ul>
-<li>
-<p>Offset the data, then graph this</p>
+<li></li>
+Offset the data, then graph this
 <pre>
     DEF:mydata=my.rrd:ds:AVERAGE</pre>
-<p>Note: this will also influence any other command that uses &quot;data&quot;</p>
+<p>Note: this will also influence any other command that uses ``data''</p>
 <pre>
     CDEF:data=mydata,100,+
     LINE1:data#FF0000:&quot;Data with offset&quot;</pre>
-</li>
-<li>
-<p>Graph the original data, with an offset</p>
+<p></p>
+<li></li>
+Graph the original data, with an offset
 <pre>
     DEF:mydata=my.rrd:ds:AVERAGE</pre>
 <p>Note: no color in the first line so it is not visible</p>
@@ -141,22 +133,20 @@ ready because comments are intermixed with the examples.</p>
 <p>Note: the second line gets stacked on top of the first one</p>
 <pre>
     LINE1:data#FF0000:&quot;Data with offset&quot;:STACK</pre>
-</li>
-</ul>
+<p></p></ul>
 <p>
 </p>
 <h2><a name="drawing_dashed_lines">Drawing dashed lines</a></h2>
 <p>Also works for HRULE and VRULE</p>
 <ul>
-<li>
-<p>default style: - - - - -
-    LINE1:data#FF0000:&quot;dashed line&quot;:dashes</p>
-</li>
-<li>
-<p>more fancy style with offset: - -  --- -  --- -
-    LINE1:data#FF0000:&quot;another dashed line&quot;:dashes=15,5,5,10:dash-offset=10</p>
-</li>
-</ul>
+<li></li>
+default style: - - - - -
+    LINE1:data#FF0000:``dashed line'':dashes
+<p></p>
+<li></li>
+more fancy style with offset: - -  --- -  --- -
+    LINE1:data#FF0000:``another dashed line'':dashes=15,5,5,10:dash-offset=10
+<p></p></ul>
 <p>
 </p>
 <h2><a name="time_ranges">Time ranges</a></h2>
index 8d982fa7027db249278f2c8f3a36f60abb78e5d6..ff3567dc4eedc6c0f06467a65c41b6588d1073c5 100644 (file)
@@ -12,11 +12,12 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        For your convenience some of the commands are explained here by using
-       detailed examples. They are not always cut-and-paste ready because
-       comments are intermixed with the examples.
+       detailed examples. They are not always cut-and-paste ready because com-
+       ments are intermixed with the examples.
 
 E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
-   D\bDa\bat\bta\ba w\bwi\bit\bth\bh m\bmu\bul\blt\bti\bip\bpl\ble\be r\bre\bes\bso\bol\blu\but\bti\bio\bon\bns\bs
+       D\bDa\bat\bta\ba w\bwi\bit\bth\bh m\bmu\bul\blt\bti\bip\bpl\ble\be r\bre\bes\bso\bol\blu\but\bti\bio\bon\bns\bs
+
            --end now --start end-120000s --width 400
            DEF:ds0a=/home/rrdtool/data/router1.rrd:ds0:AVERAGE
            DEF:ds0b=/home/rrdtool/data/router1.rrd:ds0:AVERAGE:step=1800
@@ -25,7 +26,8 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
            LINE1:ds0b#00CCFF:"resolution 1800 seconds per interval\l"
            LINE1:ds0c#FF00FF:"resolution 7200 seconds per interval\l"
 
-   N\bNi\bic\bce\bel\bly\by f\bfo\bor\brm\bma\bat\btt\bte\bed\bd l\ble\beg\bge\ben\bnd\bd s\bse\bec\bct\bti\bio\bon\bn
+       N\bNi\bic\bce\bel\bly\by f\bfo\bor\brm\bma\bat\btt\bte\bed\bd l\ble\beg\bge\ben\bnd\bd s\bse\bec\bct\bti\bio\bon\bn
+
            DEF:ds0=/home/rrdtool/data/router1.rrd:ds0:AVERAGE
            DEF:ds1=/home/rrdtool/data/router1.rrd:ds1:AVERAGE
            VDEF:ds0max=ds0,MAXIMUM
@@ -64,7 +66,8 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
            GPRINT:ds1min:"%6.2lf %Sbps"
            GPRINT:ds1pct:"%6.2lf %Sbps\l"
 
-   O\bOf\bff\bfs\bse\bet\btt\bti\bin\bng\bg a\ba l\bli\bin\bne\be o\bon\bn t\bth\bhe\be y\by-\b-a\bax\bxi\bis\bs
+       O\bOf\bff\bfs\bse\bet\btt\bti\bin\bng\bg a\ba l\bli\bin\bne\be o\bon\bn t\bth\bhe\be y\by-\b-a\bax\bxi\bis\bs
+
        Depending on your needs you can do this in two ways:
 
        ·   Offset the data, then graph this
@@ -88,7 +91,8 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
 
                LINE1:data#FF0000:"Data with offset":STACK
 
-   D\bDr\bra\baw\bwi\bin\bng\bg d\bda\bas\bsh\bhe\bed\bd l\bli\bin\bne\bes\bs
+       D\bDr\bra\baw\bwi\bin\bng\bg d\bda\bas\bsh\bhe\bed\bd l\bli\bin\bne\bes\bs
+
        Also works for HRULE and VRULE
 
        ·   default style: - - - - -
@@ -98,7 +102,8 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
                LINE1:data#FF0000:"another dashed
            line":dashes=15,5,5,10:dash-offset=10
 
-   T\bTi\bim\bme\be r\bra\ban\bng\bge\bes\bs
+       T\bTi\bim\bme\be r\bra\ban\bng\bge\bes\bs
+
            Last four weeks: --start end-4w --end 00:00
            January 2001:    --start 20010101 --end start+31d
            January 2001:    --start 20010101 --end 20010201
@@ -106,7 +111,8 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
            Last 24 hours:   <nothing at all>
            Yesterday:       --end 00:00
 
-   V\bVi\bie\bew\bwi\bin\bng\bg t\bth\bhe\be c\bcu\bur\brr\bre\ben\bnt\bt a\ban\bnd\bd p\bpr\bre\bev\bvi\bio\bou\bus\bs w\bwe\bee\bek\bk t\bto\bog\bge\bet\bth\bhe\ber\br
+       V\bVi\bie\bew\bwi\bin\bng\bg t\bth\bhe\be c\bcu\bur\brr\bre\ben\bnt\bt a\ban\bnd\bd p\bpr\bre\bev\bvi\bio\bou\bus\bs w\bwe\bee\bek\bk t\bto\bog\bge\bet\bth\bhe\ber\br
+
            --end now --start end-1w
            DEF:thisweek=router.rrd:ds0:AVERAGE
            DEF:lastweek=router.rrd:ds0:AVERAGE:end=now-1w:start=end-1w
@@ -118,7 +124,8 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
            AREA:lastweek#0000FF:Last\ week
            LINE1:thisweek#FF0000:This\ week
 
-   A\bAb\bbe\ber\brr\bra\ban\bnt\bt B\bBe\beh\bha\bav\bvi\bio\bou\bur\br D\bDe\bet\bte\bec\bct\bti\bio\bon\bn
+       A\bAb\bbe\ber\brr\bra\ban\bnt\bt B\bBe\beh\bha\bav\bvi\bio\bou\bur\br D\bDe\bet\bte\bec\bct\bti\bio\bon\bn
+
        If the specialized function R\bRR\bRA\bAs\bs exist for aberrant behavior detection,
        they can be used to generate the graph of a time series with confidence
        bands and failures.
@@ -139,17 +146,17 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
                  LINE1:scaledlower#ff0000:"Lower Confidence Bound: Average bits out"
 
        This example generates a graph of the data series in blue (LINE2 with
-       the scaledobs virtual data source), confidence bounds in red
-       (scaledupper and scaledlower virtual data sources), and potential
-       failures (i.e. potential aberrant aberrant behavior) marked by vertical
-       yellow lines (the fail data source).
+       the scaledobs virtual data source), confidence bounds in red (scaledup-
+       per and scaledlower virtual data sources), and potential failures (i.e.
+       potential aberrant aberrant behavior) marked by vertical yellow lines
+       (the fail data source).
 
        The raw data comes from an AVERAGE R\bRR\bRA\bA, the finest resolution of the
        observed time series (one consolidated data point per primary data
        point). The predicted (or smoothed) values are stored in the HWPREDICT
        R\bRR\bRA\bA. The predicted deviations (think standard deviation) values are
-       stored in the DEVPREDICT R\bRR\bRA\bA. Finally, the FAILURES R\bRR\bRA\bA contains
-       indicators, with 1 denoting a potential failure.
+       stored in the DEVPREDICT R\bRR\bRA\bA. Finally, the FAILURES R\bRR\bRA\bA contains indi-
+       cators, with 1 denoting a potential failure.
 
        All of the data is rescaled to bits (instead of Octets) by multiplying
        by 8.  The confidence bounds are computed by an offset of 2 deviations
@@ -165,15 +172,14 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
 
        _\bA _\bn_\bo_\bt_\be _\bo_\bn _\bd_\ba_\bt_\ba _\br_\be_\bd_\bu_\bc_\bt_\bi_\bo_\bn_\b:
 
-       The r\brr\brd\bdt\bto\boo\bol\bl _\bg_\br_\ba_\bp_\bh command is designed to plot data at a specified
-       temporal resolution, regardless of the actually resolution of the data
-       in the RRD file.  This can present a problem for the specialized
-       consolidation functions which maintain a one-to-one mapping between
-       primary data points and consolidated data points. If a graph insists on
-       viewing the contents of these R\bRR\bRA\bAs\bs on a coarser temporal scale, the
-       _\bg_\br_\ba_\bp_\bh command tries to do something intelligent, but the confidence
-       bands and failures no longer have the same meaning and may be
-       misleading.
+       The r\brr\brd\bdt\bto\boo\bol\bl _\bg_\br_\ba_\bp_\bh command is designed to plot data at a specified tem-
+       poral resolution, regardless of the actually resolution of the data in
+       the RRD file.  This can present a problem for the specialized consoli-
+       dation functions which maintain a one-to-one mapping between primary
+       data points and consolidated data points. If a graph insists on viewing
+       the contents of these R\bRR\bRA\bAs\bs on a coarser temporal scale, the _\bg_\br_\ba_\bp_\bh com-
+       mand tries to do something intelligent, but the confidence bands and
+       failures no longer have the same meaning and may be misleading.
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
        rrdgraph gives an overview of how r\brr\brd\bdt\bto\boo\bol\bl g\bgr\bra\bap\bph\bh works.  rrdgraph_data
@@ -189,4 +195,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2009-02-21              RRDGRAPH_EXAMPLES(1)
+1.3.99909060808                   2009-02-21              RRDGRAPH_EXAMPLES(1)
index 9507bbe4dd6800a4bf1bb78f078ee4b90a43f4ce..6222d6c826f19aa6095004f0c98bcd32f0a12bc7 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDGRAPH_GRAPH 1"
-.TH RRDGRAPH_GRAPH 1 "2009-02-21" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDGRAPH_GRAPH 1 "2009-02-21" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdgraph_graph \- rrdtool graph command reference
 .SH "SYNOPSIS"
@@ -163,7 +164,7 @@ rrdgraph_graph \- rrdtool graph command reference
 These instructions allow you to generate your image or report.
 If you don't use any graph elements, no graph is generated.
 Similarly, no report is generated if you don't use print options.
-.SS "\s-1PRINT\s0"
+.Sh "\s-1PRINT\s0"
 .IX Subsection "PRINT"
 \fI\f(BI\s-1PRINT:\s0\fI\fIvname\fI\f(BI:\fI\fIformat\fI[\f(BI:strftime\fI]\fR
 .IX Subsection "PRINT:vname:format[:strftime]"
@@ -188,122 +189,97 @@ width and decimal precision.
 .IX Item "%#.#lf"
 prints numbers like 12345.6789, with optional field width
 and precision.
-.ie n .IP "\fB\fB%s\fB\fR" 4
-.el .IP "\fB\f(CB%s\fB\fR" 4
+.IP "\fB%s\fR" 4
 .IX Item "%s"
-place this after \fB\f(CB%le\fB\fR, \fB\f(CB%lf\fB\fR or \fB\f(CB%lg\fB\fR. This will be replaced by the
+place this after \fB%le\fR, \fB%lf\fR or \fB%lg\fR. This will be replaced by the
 appropriate \s-1SI\s0 magnitude unit and the value will be scaled
 accordingly (123456 \-> 123.456 k).
-.ie n .IP "\fB\fB%S\fB\fR" 4
-.el .IP "\fB\f(CB%S\fB\fR" 4
+.IP "\fB%S\fR" 4
 .IX Item "%S"
-is similar to \fB\f(CB%s\fB\fR. It does, however, use a previously defined
+is similar to \fB%s\fR. It does, however, use a previously defined
 magnitude unit. If there is no such unit yet, it tries to define
-one (just like \fB\f(CB%s\fB\fR) unless the value is zero, in which case the magnitude
-unit stays undefined. Thus, formatter strings using \fB\f(CB%S\fB\fR and no \fB\f(CB%s\fB\fR
+one (just like \fB%s\fR) unless the value is zero, in which case the magnitude
+unit stays undefined. Thus, formatter strings using \fB%S\fR and no \fB%s\fR
 will all use the same magnitude unit except for zero values.
 .PP
 If you \s-1PRINT\s0 a \s-1VDEF\s0 value, you can also print the time associated with it by appending the string
 \&\fB:strftime\fR to the format. Note that rrdtool uses the strftime function of your OSs C library. This means that
 the conversion specifier may vary. Check the manual page if you are uncertain. The following is a list of
-conversion specifiers usually supported across the board.
-.ie n .IP "\fB\fB%a\fB\fR" 4
-.el .IP "\fB\f(CB%a\fB\fR" 4
+conversion specifiers usually supported across the board. 
+.IP "\fB%a\fR" 4
 .IX Item "%a"
 The abbreviated weekday name according to the current locale.
-.ie n .IP "\fB\fB%A\fB\fR" 4
-.el .IP "\fB\f(CB%A\fB\fR" 4
+.IP "\fB%A\fR" 4
 .IX Item "%A"
 The full weekday name according to the current locale.
-.ie n .IP "\fB\fB%b\fB\fR" 4
-.el .IP "\fB\f(CB%b\fB\fR" 4
+.IP "\fB%b\fR" 4
 .IX Item "%b"
 The abbreviated month name according to the current locale.
-.ie n .IP "\fB\fB%B\fB\fR" 4
-.el .IP "\fB\f(CB%B\fB\fR" 4
+.IP "\fB%B\fR" 4
 .IX Item "%B"
 The full month name according to the current locale.
-.ie n .IP "\fB\fB%c\fB\fR" 4
-.el .IP "\fB\f(CB%c\fB\fR" 4
+.IP "\fB%c\fR" 4
 .IX Item "%c"
 The preferred date and time representation for the current locale.
-.ie n .IP "\fB\fB%d\fB\fR" 4
-.el .IP "\fB\f(CB%d\fB\fR" 4
+.IP "\fB%d\fR" 4
 .IX Item "%d"
 The day of the month as a decimal number (range 01 to 31).
-.ie n .IP "\fB\fB%H\fB\fR" 4
-.el .IP "\fB\f(CB%H\fB\fR" 4
+.IP "\fB%H\fR" 4
 .IX Item "%H"
 The hour as a decimal number using a 24\-hour clock (range 00 to 23).
-.ie n .IP "\fB\fB%I\fB\fR" 4
-.el .IP "\fB\f(CB%I\fB\fR" 4
+.IP "\fB%I\fR" 4
 .IX Item "%I"
 The hour as a decimal number using a 12\-hour clock (range 01 to 12).
-.ie n .IP "\fB\fB%j\fB\fR" 4
-.el .IP "\fB\f(CB%j\fB\fR" 4
+.IP "\fB%j\fR" 4
 .IX Item "%j"
 The day of the year as a decimal number (range 001 to 366).
-.ie n .IP "\fB\fB%m\fB\fR" 4
-.el .IP "\fB\f(CB%m\fB\fR" 4
+.IP "\fB%m\fR" 4
 .IX Item "%m"
 The month as a decimal number (range 01 to 12).
-.ie n .IP "\fB\fB%M\fB\fR" 4
-.el .IP "\fB\f(CB%M\fB\fR" 4
+.IP "\fB%M\fR" 4
 .IX Item "%M"
 The minute as a decimal number (range 00 to 59).
-.ie n .IP "\fB\fB%p\fB\fR" 4
-.el .IP "\fB\f(CB%p\fB\fR" 4
+.IP "\fB%p\fR" 4
 .IX Item "%p"
 Either `\s-1AM\s0' or `\s-1PM\s0' according to the given time value, or the corresponding
 strings for the current locale.  Noon is treated as `pm' and midnight as
 `am'.  Note that in many locales and `pm' notation is unsupported and in
 such cases \f(CW%p\fR will return an empty string.
-.ie n .IP "\fB\fB%s\fB\fR" 4
-.el .IP "\fB\f(CB%s\fB\fR" 4
+.IP "\fB%s\fR" 4
 .IX Item "%s"
 The second as a decimal number (range 00 to 61).
-.ie n .IP "\fB\fB%S\fB\fR" 4
-.el .IP "\fB\f(CB%S\fB\fR" 4
+.IP "\fB%S\fR" 4
 .IX Item "%S"
 The seconds since the epoch (1.1.1970) (libc dependant non standard!)
-.ie n .IP "\fB\fB%U\fB\fR" 4
-.el .IP "\fB\f(CB%U\fB\fR" 4
+.IP "\fB%U\fR" 4
 .IX Item "%U"
 The  week  number  of  the current year as a decimal number, range 00 to 53, starting with the
 first Sunday as the first day of week 01. See also \f(CW%V\fR and \f(CW%W\fR.
-.ie n .IP "\fB\fB%V\fB\fR" 4
-.el .IP "\fB\f(CB%V\fB\fR" 4
+.IP "\fB%V\fR" 4
 .IX Item "%V"
 The \s-1ISO\s0 8601:1988 week number of the current year as a decimal number, range 01 to  53,  where
 week  1 is the first week that has at least 4 days in the current year, and with Monday as the
 first day of the week. See also \f(CW%U\fR and \f(CW%W\fR.
-.ie n .IP "\fB\fB%w\fB\fR" 4
-.el .IP "\fB\f(CB%w\fB\fR" 4
+.IP "\fB%w\fR" 4
 .IX Item "%w"
 The day of the week as a decimal, range 0 to 6, Sunday being 0.  See also \f(CW%u\fR.
-.ie n .IP "\fB\fB%W\fB\fR" 4
-.el .IP "\fB\f(CB%W\fB\fR" 4
+.IP "\fB%W\fR" 4
 .IX Item "%W"
 The week number of the current year as a decimal number, range 00 to  53,  starting  with  the
 first Monday as the first day of week 01.
-.ie n .IP "\fB\fB%x\fB\fR" 4
-.el .IP "\fB\f(CB%x\fB\fR" 4
+.IP "\fB%x\fR" 4
 .IX Item "%x"
 The preferred date representation for the current locale without the time.
-.ie n .IP "\fB\fB%X\fB\fR" 4
-.el .IP "\fB\f(CB%X\fB\fR" 4
+.IP "\fB%X\fR" 4
 .IX Item "%X"
 The preferred time representation for the current locale without the date.
-.ie n .IP "\fB\fB%y\fB\fR" 4
-.el .IP "\fB\f(CB%y\fB\fR" 4
+.IP "\fB%y\fR" 4
 .IX Item "%y"
 The year as a decimal number without a century (range 00 to 99).
-.ie n .IP "\fB\fB%Y\fB\fR" 4
-.el .IP "\fB\f(CB%Y\fB\fR" 4
+.IP "\fB%Y\fR" 4
 .IX Item "%Y"
 The year as a decimal number including the century.
-.ie n .IP "\fB\fB%Z\fB\fR" 4
-.el .IP "\fB\f(CB%Z\fB\fR" 4
+.IP "\fB%Z\fR" 4
 .IX Item "%Z"
 The time zone or name or abbreviation.
 .IP "\fB%%\fR" 4
@@ -315,7 +291,7 @@ A literal `%' character.
 .PP
 \&\fIDeprecated. Use the new form of this command in new scripts.\fR
 The first form of this command is to be used with \fB\s-1CDEF\s0\fR \fIvname\fRs.
-.SS "\s-1GRAPH\s0"
+.Sh "\s-1GRAPH\s0"
 .IX Subsection "GRAPH"
 \fI\f(BI\s-1GPRINT\s0\fI\f(BI:\fI\fIvname\fI\f(BI:\fI\fIformat\fI\fR
 .IX Subsection "GPRINT:vname:format"
@@ -433,14 +409,14 @@ make sure never to stack upon the unknown value.  Use a \s-1CDEF\s0 instruction
 with \fB\s-1IF\s0\fR and \fB\s-1UN\s0\fR to do so.
 .SH "NOTES on legend arguments"
 .IX Header "NOTES on legend arguments"
-.SS "Escaping the colon"
+.Sh "Escaping the colon"
 .IX Subsection "Escaping the colon"
 A colon ':' in a \fIlegend\fR argument will mark the end of the
 legend. To enter a ':' as part of a legend, the colon must be escaped
 with a backslash '\e:'.  Beware that many environments process
 backslashes themselves, so it may be necessary to write two
 backslashes in order to one being passed onto rrd_graph.
-.SS "String Formatting"
+.Sh "String Formatting"
 .IX Subsection "String Formatting"
 The text printed below the actual graph can be formatted by appending special
 escape characters at the end of a text. When ever such a character occurs,
@@ -458,7 +434,7 @@ Normally there are two space characters inserted between every two items
 printed into the graph. The space following a string can be suppressed by
 putting a \fB\eg\fR at the end of the string. The \fB\eg\fR also ignores any space
 inside the string if it is at the very end of the string. This can be used
-in connection with \fB\f(CB%s\fB\fR to suppress empty unit strings.
+in connection with \fB%s\fR to suppress empty unit strings.
 .PP
 .Vb 1
 \& GPRINT:a:MAX:%lf%s\eg
@@ -475,7 +451,7 @@ element!
 Since RRDtool 1.3 is using Pango for rending text, you can use Pango markup.
 Pango uses the xml \fBspan\fR tags for inline formatting instructions.:
 .PP
-A simple example of a marked-up string might be:
+A simple example of a marked-up string might be: 
 .PP
 .Vb 1
 \& <span foreground="blue" size="x\-large">Blue text</span> is <i>cool</i>!
@@ -570,7 +546,7 @@ Makes font relatively smaller, equivalent to <span size=\*(L"smaller\*(R">
 Monospace font
 .IP "\fBu\fR" 4
 .IX Item "u"
-Underline
+Underline 
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 rrdgraph gives an overview of how \fBrrdtool graph\fR works.
index b0d7bef1f752772de00536c07ae7d1b605efc7c5..7b13e24239401f5281328011208044e662c66c5b 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdgraph_graph</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
@@ -35,9 +31,9 @@
                        <li><a href="#gprint_vname_format"><strong>GPRINT</strong><strong>:</strong><em>vname</em><strong>:</strong><em>format</em></a></li>
                        <li><a href="#gprint_vname_cf_format"><strong>GPRINT</strong><strong>:</strong><em>vname</em><strong>:</strong><em>CF</em><strong>:</strong><em>format</em></a></li>
                        <li><a href="#comment_text"><strong>COMMENT</strong><strong>:</strong><em>text</em></a></li>
-                       <li><a href="#vrule_time_color__legend___dashes__on_s__off_s__on_s_off_s________dash_offset_offset__"><strong>VRULE</strong><strong>:</strong><em>time</em><strong>#</strong><em>color</em>[<strong>:</strong><em>legend</em>][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></li>
-                       <li><a href="#hrule_value_color__legend___dashes__on_s__off_s__on_s_off_s________dash_offset_offset__"><strong>HRULE</strong><strong>:</strong><em>value</em><strong>#</strong><em>color</em>[<strong>:</strong><em>legend</em>][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></li>
-                       <li><a href="#line_width__value__color____legend___stack____dashes__on_s__off_s__on_s_off_s________dash_offset_offset__"><strong>LINE</strong>[<em>width</em>]<strong>:</strong><em>value</em>[<strong>#</strong><em>color</em>][<strong>:</strong>[<em>legend</em>][<strong>:STACK</strong>]][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></li>
+                       <li><a href="#vrule_time_color__legend___dashes__on_s__off_s__on_s_off_s________dashoffset_offset__"><strong>VRULE</strong><strong>:</strong><em>time</em><strong>#</strong><em>color</em>[<strong>:</strong><em>legend</em>][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></li>
+                       <li><a href="#hrule_value_color__legend___dashes__on_s__off_s__on_s_off_s________dashoffset_offset__"><strong>HRULE</strong><strong>:</strong><em>value</em><strong>#</strong><em>color</em>[<strong>:</strong><em>legend</em>][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></li>
+                       <li><a href="#line_width__value__color____legend___stack____dashes__on_s__off_s__on_s_off_s________dashoffset_offset__"><strong>LINE</strong>[<em>width</em>]<strong>:</strong><em>value</em>[<strong>#</strong><em>color</em>][<strong>:</strong>[<em>legend</em>][<strong>:STACK</strong>]][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></li>
                        <li><a href="#area_value__color____legend___stack__"><strong>AREA</strong><strong>:</strong><em>value</em>[<strong>#</strong><em>color</em>][<strong>:</strong>[<em>legend</em>][<strong>:STACK</strong>]]</a></li>
                        <li><a href="#tick_vname_rrggbb_aa___fraction__legend__"><strong>TICK</strong><strong>:</strong><em>vname</em><strong>#</strong><em>rrggbb</em>[<em>aa</em>][<strong>:</strong><em>fraction</em>[<strong>:</strong><em>legend</em>]]</a></li>
                        <li><a href="#shift_vname_offset"><strong>SHIFT</strong><strong>:</strong><em>vname</em><strong>:</strong><em>offset</em></a></li>
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -107,173 +99,200 @@ The percent character introduces a formatter string. This string
 can be:</p>
 <p>For printing values:</p>
 <dl>
-<dt><strong><a name="__" class="item"><strong>%%</strong></a></strong></dt>
-
+<dt><strong><a name="item___"><strong>%%</strong></a></strong><br />
+</dt>
 <dd>
-<p>just prints a literal '%' character</p>
+just prints a literal '%' character
 </dd>
-<dt><strong><a name="____le" class="item"><strong>%#.#le</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_____le"><strong>%#.#le</strong></a></strong><br />
+</dt>
 <dd>
-<p>prints numbers like 1.2346e+04. The optional integers # denote field
-width and decimal precision.</p>
+prints numbers like 1.2346e+04. The optional integers # denote field
+width and decimal precision.
 </dd>
-<dt><strong><a name="____lf" class="item"><strong>%#.#lf</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_____lf"><strong>%#.#lf</strong></a></strong><br />
+</dt>
 <dd>
-<p>prints numbers like 12345.6789, with optional field width
-and precision.</p>
+prints numbers like 12345.6789, with optional field width
+and precision.
 </dd>
-<dt><strong><a name="_s" class="item"><strong>%s</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__s"><strong>%s</strong></a></strong><br />
+</dt>
 <dd>
-<p>place this after <strong>%le</strong>, <strong>%lf</strong> or <strong>%lg</strong>. This will be replaced by the
+place this after <strong>%le</strong>, <strong>%lf</strong> or <strong>%lg</strong>. This will be replaced by the
 appropriate SI magnitude unit and the value will be scaled
-accordingly (123456 -&gt; 123.456 k).</p>
+accordingly (123456 -&gt; 123.456 k).
 </dd>
-<dt><strong><a name="_s" class="item"><strong>%S</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__s"><strong>%S</strong></a></strong><br />
+</dt>
 <dd>
-<p>is similar to <strong>%s</strong>. It does, however, use a previously defined
+is similar to <strong>%s</strong>. It does, however, use a previously defined
 magnitude unit. If there is no such unit yet, it tries to define
 one (just like <strong>%s</strong>) unless the value is zero, in which case the magnitude
 unit stays undefined. Thus, formatter strings using <strong>%S</strong> and no <strong>%s</strong>
-will all use the same magnitude unit except for zero values.</p>
+will all use the same magnitude unit except for zero values.
 </dd>
-</dl>
+<p></p></dl>
 <p>If you PRINT a VDEF value, you can also print the time associated with it by appending the string
 <strong>:strftime</strong> to the format. Note that rrdtool uses the strftime function of your OSs C library. This means that
 the conversion specifier may vary. Check the manual page if you are uncertain. The following is a list of
 conversion specifiers usually supported across the board.</p>
 <dl>
-<dt><strong><a name="_a" class="item"><strong>%a</strong></a></strong></dt>
-
+<dt><strong><a name="item__a"><strong>%a</strong></a></strong><br />
+</dt>
 <dd>
-<p>The abbreviated weekday name according to the current locale.</p>
+The abbreviated weekday name according to the current locale.
 </dd>
-<dt><strong><a name="_a" class="item"><strong>%A</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__a"><strong>%A</strong></a></strong><br />
+</dt>
 <dd>
-<p>The full weekday name according to the current locale.</p>
+The full weekday name according to the current locale.
 </dd>
-<dt><strong><a name="_b" class="item"><strong>%b</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__b"><strong>%b</strong></a></strong><br />
+</dt>
 <dd>
-<p>The abbreviated month name according to the current locale.</p>
+The abbreviated month name according to the current locale.
 </dd>
-<dt><strong><a name="_b" class="item"><strong>%B</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__b"><strong>%B</strong></a></strong><br />
+</dt>
 <dd>
-<p>The full month name according to the current locale.</p>
+The full month name according to the current locale.
 </dd>
-<dt><strong><a name="_c" class="item"><strong>%c</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__c"><strong>%c</strong></a></strong><br />
+</dt>
 <dd>
-<p>The preferred date and time representation for the current locale.</p>
+The preferred date and time representation for the current locale.
 </dd>
-<dt><strong><a name="_d" class="item"><strong>%d</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__d"><strong>%d</strong></a></strong><br />
+</dt>
 <dd>
-<p>The day of the month as a decimal number (range 01 to 31).</p>
+The day of the month as a decimal number (range 01 to 31).
 </dd>
-<dt><strong><a name="_h" class="item"><strong>%H</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__h"><strong>%H</strong></a></strong><br />
+</dt>
 <dd>
-<p>The hour as a decimal number using a 24-hour clock (range 00 to 23).</p>
+The hour as a decimal number using a 24-hour clock (range 00 to 23).
 </dd>
-<dt><strong><a name="_i" class="item"><strong>%I</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__i"><strong>%I</strong></a></strong><br />
+</dt>
 <dd>
-<p>The hour as a decimal number using a 12-hour clock (range 01 to 12).</p>
+The hour as a decimal number using a 12-hour clock (range 01 to 12).
 </dd>
-<dt><strong><a name="_j" class="item"><strong>%j</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__j"><strong>%j</strong></a></strong><br />
+</dt>
 <dd>
-<p>The day of the year as a decimal number (range 001 to 366).</p>
+The day of the year as a decimal number (range 001 to 366).
 </dd>
-<dt><strong><a name="_m" class="item"><strong>%m</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__m"><strong>%m</strong></a></strong><br />
+</dt>
 <dd>
-<p>The month as a decimal number (range 01 to 12).</p>
+The month as a decimal number (range 01 to 12).
 </dd>
-<dt><strong><a name="_m" class="item"><strong>%M</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__m"><strong>%M</strong></a></strong><br />
+</dt>
 <dd>
-<p>The minute as a decimal number (range 00 to 59).</p>
+The minute as a decimal number (range 00 to 59).
 </dd>
-<dt><strong><a name="_p" class="item"><strong>%p</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__p"><strong>%p</strong></a></strong><br />
+</dt>
 <dd>
-<p>Either `AM' or `PM' according to the given time value, or the corresponding
+Either `AM' or `PM' according to the given time value, or the corresponding
 strings for the current locale.  Noon is treated as `pm' and midnight as
 `am'.  Note that in many locales and `pm' notation is unsupported and in
-such cases %p will return an empty string.</p>
+such cases %p will return an empty string.
 </dd>
-<dt><strong><strong>%s</strong></strong></dt>
-
+<p></p>
+<dt><strong><strong>%s</strong></strong><br />
+</dt>
 <dd>
-<p>The second as a decimal number (range 00 to 61).</p>
+The second as a decimal number (range 00 to 61).
 </dd>
-<dt><strong><strong>%S</strong></strong></dt>
-
+<p></p>
+<dt><strong><strong>%S</strong></strong><br />
+</dt>
 <dd>
-<p>The seconds since the epoch (1.1.1970) (libc dependant non standard!)</p>
+The seconds since the epoch (1.1.1970) (libc dependant non standard!)
 </dd>
-<dt><strong><a name="_u" class="item"><strong>%U</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__u"><strong>%U</strong></a></strong><br />
+</dt>
 <dd>
-<p>The  week  number  of  the current year as a decimal number, range 00 to 53, starting with the
-first Sunday as the first day of week 01. See also %V and %W.</p>
+The  week  number  of  the current year as a decimal number, range 00 to 53, starting with the
+first Sunday as the first day of week 01. See also %V and %W.
 </dd>
-<dt><strong><a name="_v" class="item"><strong>%V</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__v"><strong>%V</strong></a></strong><br />
+</dt>
 <dd>
-<p>The ISO 8601:1988 week number of the current year as a decimal number, range 01 to  53,  where
+The ISO 8601:1988 week number of the current year as a decimal number, range 01 to  53,  where
 week  1 is the first week that has at least 4 days in the current year, and with Monday as the
-first day of the week. See also %U and %W.</p>
+first day of the week. See also %U and %W.
 </dd>
-<dt><strong><a name="_w" class="item"><strong>%w</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__w"><strong>%w</strong></a></strong><br />
+</dt>
 <dd>
-<p>The day of the week as a decimal, range 0 to 6, Sunday being 0.  See also %u.</p>
+The day of the week as a decimal, range 0 to 6, Sunday being 0.  See also %u.
 </dd>
-<dt><strong><a name="_w" class="item"><strong>%W</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__w"><strong>%W</strong></a></strong><br />
+</dt>
 <dd>
-<p>The week number of the current year as a decimal number, range 00 to  53,  starting  with  the
-first Monday as the first day of week 01.</p>
+The week number of the current year as a decimal number, range 00 to  53,  starting  with  the
+first Monday as the first day of week 01.
 </dd>
-<dt><strong><a name="_x" class="item"><strong>%x</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__x"><strong>%x</strong></a></strong><br />
+</dt>
 <dd>
-<p>The preferred date representation for the current locale without the time.</p>
+The preferred date representation for the current locale without the time.
 </dd>
-<dt><strong><a name="_x" class="item"><strong>%X</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__x"><strong>%X</strong></a></strong><br />
+</dt>
 <dd>
-<p>The preferred time representation for the current locale without the date.</p>
+The preferred time representation for the current locale without the date.
 </dd>
-<dt><strong><a name="_y" class="item"><strong>%y</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__y"><strong>%y</strong></a></strong><br />
+</dt>
 <dd>
-<p>The year as a decimal number without a century (range 00 to 99).</p>
+The year as a decimal number without a century (range 00 to 99).
 </dd>
-<dt><strong><a name="_y" class="item"><strong>%Y</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__y"><strong>%Y</strong></a></strong><br />
+</dt>
 <dd>
-<p>The year as a decimal number including the century.</p>
+The year as a decimal number including the century.
 </dd>
-<dt><strong><a name="_z" class="item"><strong>%Z</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__z"><strong>%Z</strong></a></strong><br />
+</dt>
 <dd>
-<p>The time zone or name or abbreviation.</p>
+The time zone or name or abbreviation.
 </dd>
-<dt><strong><strong>%%</strong></strong></dt>
-
+<p></p>
+<dt><strong><strong>%%</strong></strong><br />
+</dt>
 <dd>
-<p>A literal `%' character.</p>
+A literal `%' character.
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <h3><a name="print_vname_cf_format"><strong>PRINT:</strong><em>vname</em><strong>:</strong><em>CF</em><strong>:</strong><em>format</em></a></h3>
@@ -299,7 +318,7 @@ RRDtool 1.2 you have to escape colons in COMMENT text in the same way you
 have to escape them in <strong>*PRINT</strong> commands by writing <strong>'\:'</strong>.</p>
 <p>
 </p>
-<h3><a name="vrule_time_color__legend___dashes__on_s__off_s__on_s_off_s________dash_offset_offset__"><strong>VRULE</strong><strong>:</strong><em>time</em><strong>#</strong><em>color</em>[<strong>:</strong><em>legend</em>][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></h3>
+<h3><a name="vrule_time_color__legend___dashes__on_s__off_s__on_s_off_s________dashoffset_offset__"><strong>VRULE</strong><strong>:</strong><em>time</em><strong>#</strong><em>color</em>[<strong>:</strong><em>legend</em>][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></h3>
 <p>Draw a vertical line at <em>time</em>.  Its color is composed from three
 hexadecimal numbers specifying the rgb color components (00 is off, FF is
 maximum) red, green and blue followed by an optional alpha. Optionally, a legend box and string is
@@ -309,13 +328,13 @@ Dashed lines can be drawn using the <strong>dashes</strong> modifier. See <stron
 details.</p>
 <p>
 </p>
-<h3><a name="hrule_value_color__legend___dashes__on_s__off_s__on_s_off_s________dash_offset_offset__"><strong>HRULE</strong><strong>:</strong><em>value</em><strong>#</strong><em>color</em>[<strong>:</strong><em>legend</em>][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></h3>
+<h3><a name="hrule_value_color__legend___dashes__on_s__off_s__on_s_off_s________dashoffset_offset__"><strong>HRULE</strong><strong>:</strong><em>value</em><strong>#</strong><em>color</em>[<strong>:</strong><em>legend</em>][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></h3>
 <p>Draw a horizontal line at <em>value</em>.  HRULE acts much like LINE except that
 will have no effect on the scale of the graph. If a HRULE is outside the
 graphing area it will just not be visible.</p>
 <p>
 </p>
-<h3><a name="line_width__value__color____legend___stack____dashes__on_s__off_s__on_s_off_s________dash_offset_offset__"><strong>LINE</strong>[<em>width</em>]<strong>:</strong><em>value</em>[<strong>#</strong><em>color</em>][<strong>:</strong>[<em>legend</em>][<strong>:STACK</strong>]][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></h3>
+<h3><a name="line_width__value__color____legend___stack____dashes__on_s__off_s__on_s_off_s________dashoffset_offset__"><strong>LINE</strong>[<em>width</em>]<strong>:</strong><em>value</em>[<strong>#</strong><em>color</em>][<strong>:</strong>[<em>legend</em>][<strong>:STACK</strong>]][<strong>:dashes</strong>[<strong>=</strong><em>on_s</em>[,<em>off_s</em>[,<em>on_s</em>,<em>off_s</em>]...]][<strong>:dash-offset=</strong><em>offset</em>]]</a></h3>
 <p>Draw a line of the specified width onto the graph. <em>width</em> can be a
 floating point number. If the color is not specified, the drawing is done
 'invisibly'. This is useful when stacking something else on top of this
@@ -332,7 +351,7 @@ provides the length of alternate <em>on_s</em> and <em>off_s</em> portions of th
 stroke. The <strong>dash-offset</strong> parameter specifies an <em>offset</em> into the pattern
 at which the stroke begins.</p>
 <p>When you do not specify a color, you cannot specify a legend.  Should
-you want to use STACK, use the &quot;LINEx:&lt;value&gt;::STACK&quot; form.</p>
+you want to use STACK, use the ``LINEx:&lt;value&gt;::STACK'' form.</p>
 <p>
 </p>
 <h3><a name="area_value__color____legend___stack__"><strong>AREA</strong><strong>:</strong><em>value</em>[<strong>#</strong><em>color</em>][<strong>:</strong>[<em>legend</em>][<strong>:STACK</strong>]]</a></h3>
@@ -352,7 +371,7 @@ at the upper border of the graphing area.</p>
 <h3><a name="shift_vname_offset"><strong>SHIFT</strong><strong>:</strong><em>vname</em><strong>:</strong><em>offset</em></a></h3>
 <p>Using this command <strong>RRDtool</strong> will graph the following elements
 with the specified offset.  For instance, you can specify an
-offset of (&nbsp;7*24*60*60&nbsp;=&nbsp;)&nbsp;604'800&nbsp;seconds to &quot;look back&quot; one
+offset of (&nbsp;7*24*60*60&nbsp;=&nbsp;)&nbsp;604'800&nbsp;seconds to ``look back'' one
 week. Make sure to tell the viewer of your graph you did this ...
 As with the other graphing elements, you can specify a number or
 a variable here.</p>
@@ -423,155 +442,182 @@ Pango uses the xml <strong>span</strong> tags for inline formatting instructions
  &lt;span foreground=&quot;blue&quot; size=&quot;x-large&quot;&gt;Blue text&lt;/span&gt; is &lt;i&gt;cool&lt;/i&gt;!</pre>
 <p>The complete list of attributes for the span tag (taken from the pango documentation):</p>
 <dl>
-<dt><strong><a name="font_desc" class="item"><strong>font_desc</strong></a></strong></dt>
-
+<dt><strong><a name="item_font_desc"><strong>font_desc</strong></a></strong><br />
+</dt>
 <dd>
-<p>A font description string, such as &quot;Sans Italic 12&quot;; note that any other span attributes will override this description. So if you have &quot;Sans Italic&quot; and also a style=&quot;normal&quot; attribute, you will get Sans normal, not italic.</p>
+A font description string, such as ``Sans Italic 12''; note that any other span attributes will override this description. So if you have ``Sans Italic'' and also a style=``normal'' attribute, you will get Sans normal, not italic.
 </dd>
-<dt><strong><a name="font_family" class="item"><strong>font_family</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_font_family"><strong>font_family</strong></a></strong><br />
+</dt>
 <dd>
-<p>A font family name</p>
+A font family name
 </dd>
-<dt><strong><a name="face" class="item"><strong>face</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_face"><strong>face</strong></a></strong><br />
+</dt>
 <dd>
-<p>Synonym for font_family</p>
+Synonym for font_family
 </dd>
-<dt><strong><a name="size" class="item"><strong>size</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_size"><strong>size</strong></a></strong><br />
+</dt>
 <dd>
-<p>Font size in 1024ths of a point, or one of the absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the relative sizes 'smaller' or 'larger'. If you want to specify a absolute size, it's usually easier to take advantage of the ability to specify a partial font description using 'font_desc'; you can use font_desc='12.5' rather than size='12800'.</p>
+Font size in 1024ths of a point, or one of the absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the relative sizes 'smaller' or 'larger'. If you want to specify a absolute size, it's usually easier to take advantage of the ability to specify a partial font description using 'font_desc'; you can use font_desc='12.5' rather than size='12800'.
 </dd>
-<dt><strong><a name="style" class="item"><strong>style</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_style"><strong>style</strong></a></strong><br />
+</dt>
 <dd>
-<p>One of 'normal', 'oblique', 'italic'</p>
+One of 'normal', 'oblique', 'italic'
 </dd>
-<dt><strong><a name="weight" class="item"><strong>weight</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_weight"><strong>weight</strong></a></strong><br />
+</dt>
 <dd>
-<p>One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight</p>
+One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight
 </dd>
-<dt><strong><a name="variant" class="item"><strong>variant</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_variant"><strong>variant</strong></a></strong><br />
+</dt>
 <dd>
-<p>'normal' or 'smallcaps'</p>
+'normal' or 'smallcaps'
 </dd>
-<dt><strong><a name="stretch" class="item"><strong>stretch</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_stretch"><strong>stretch</strong></a></strong><br />
+</dt>
 <dd>
-<p>One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'</p>
+One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'
 </dd>
-<dt><strong><a name="foreground" class="item"><strong>foreground</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_foreground"><strong>foreground</strong></a></strong><br />
+</dt>
 <dd>
-<p>An RGB color specification such as '#00FF00' or a color name such as 'red'</p>
+An RGB color specification such as '#00FF00' or a color name such as 'red'
 </dd>
-<dt><strong><a name="background" class="item"><strong>background</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_background"><strong>background</strong></a></strong><br />
+</dt>
 <dd>
-<p>An RGB color specification such as '#00FF00' or a color name such as 'red'</p>
+An RGB color specification such as '#00FF00' or a color name such as 'red'
 </dd>
-<dt><strong><a name="underline" class="item"><strong>underline</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_underline"><strong>underline</strong></a></strong><br />
+</dt>
 <dd>
-<p>One of 'none', 'single', 'double', 'low', 'error'</p>
+One of 'none', 'single', 'double', 'low', 'error'
 </dd>
-<dt><strong><a name="underline_color" class="item"><strong>underline_color</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_underline_color"><strong>underline_color</strong></a></strong><br />
+</dt>
 <dd>
-<p>The color of underlines; an RGB color specification such as '#00FF00' or a color name such as 'red'</p>
+The color of underlines; an RGB color specification such as '#00FF00' or a color name such as 'red'
 </dd>
-<dt><strong><a name="rise" class="item"><strong>rise</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rise"><strong>rise</strong></a></strong><br />
+</dt>
 <dd>
-<p>Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.</p>
+Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.
 </dd>
-<dt><strong><a name="strikethrough" class="item"><strong>strikethrough</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_strikethrough"><strong>strikethrough</strong></a></strong><br />
+</dt>
 <dd>
-<p>'true' or 'false' whether to strike through the text</p>
+'true' or 'false' whether to strike through the text
 </dd>
-<dt><strong><a name="strikethrough_color" class="item"><strong>strikethrough_color</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_strikethrough_color"><strong>strikethrough_color</strong></a></strong><br />
+</dt>
 <dd>
-<p>The color of strikethrough lines; an RGB color specification such as '#00FF00' or a color name such as 'red'</p>
+The color of strikethrough lines; an RGB color specification such as '#00FF00' or a color name such as 'red'
 </dd>
-<dt><strong><a name="fallback" class="item"><strong>fallback</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_fallback"><strong>fallback</strong></a></strong><br />
+</dt>
 <dd>
-<p>'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.</p>
+'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.
 </dd>
-<dt><strong><a name="lang" class="item"><strong>lang</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_lang"><strong>lang</strong></a></strong><br />
+</dt>
 <dd>
-<p>A language code, indicating the text language</p>
+A language code, indicating the text language
 </dd>
-<dt><strong><a name="letter_spacing" class="item"><strong>letter_spacing</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_letter_spacing"><strong>letter_spacing</strong></a></strong><br />
+</dt>
 <dd>
-<p>Inter-letter spacing in 1024ths of a point.</p>
+Inter-letter spacing in 1024ths of a point.
 </dd>
-<dt><strong><a name="gravity" class="item"><strong>gravity</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_gravity"><strong>gravity</strong></a></strong><br />
+</dt>
 <dd>
-<p>One of 'south', 'east', 'north', 'west', 'auto'.</p>
+One of 'south', 'east', 'north', 'west', 'auto'.
 </dd>
-<dt><strong><a name="gravity_hint" class="item"><strong>gravity_hint</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_gravity_hint"><strong>gravity_hint</strong></a></strong><br />
+</dt>
 <dd>
-<p>One of 'natural', 'strong', 'line'.</p>
+One of 'natural', 'strong', 'line'.
 </dd>
-</dl>
+<p></p></dl>
 <p>To save you some typing, there are also some shortcuts:</p>
 <dl>
-<dt><strong><a name="b" class="item"><strong>b</strong></a></strong></dt>
-
+<dt><strong><a name="item_b"><strong>b</strong></a></strong><br />
+</dt>
 <dd>
-<p>Bold</p>
+Bold
 </dd>
-<dt><strong><a name="big" class="item"><strong>big</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_big"><strong>big</strong></a></strong><br />
+</dt>
 <dd>
-<p>Makes font relatively larger, equivalent to &lt;span size=&quot;larger&quot;&gt;</p>
+Makes font relatively larger, equivalent to &lt;span size=``larger''&gt;
 </dd>
-<dt><strong><a name="i" class="item"><strong>i</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_i"><strong>i</strong></a></strong><br />
+</dt>
 <dd>
-<p>Italic</p>
+Italic
 </dd>
-<dt><strong><a name="s" class="item"><strong>s</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_s"><strong>s</strong></a></strong><br />
+</dt>
 <dd>
-<p>Strikethrough</p>
+Strikethrough
 </dd>
-<dt><strong><a name="sub" class="item"><strong>sub</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_sub"><strong>sub</strong></a></strong><br />
+</dt>
 <dd>
-<p>Subscript</p>
+Subscript
 </dd>
-<dt><strong><a name="sup" class="item"><strong>sup</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_sup"><strong>sup</strong></a></strong><br />
+</dt>
 <dd>
-<p>Superscript</p>
+Superscript
 </dd>
-<dt><strong><a name="small" class="item"><strong>small</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_small"><strong>small</strong></a></strong><br />
+</dt>
 <dd>
-<p>Makes font relatively smaller, equivalent to &lt;span size=&quot;smaller&quot;&gt;</p>
+Makes font relatively smaller, equivalent to &lt;span size=``smaller''&gt;
 </dd>
-<dt><strong><a name="tt" class="item"><strong>tt</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_tt"><strong>tt</strong></a></strong><br />
+</dt>
 <dd>
-<p>Monospace font</p>
+Monospace font
 </dd>
-<dt><strong><a name="u" class="item"><strong>u</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_u"><strong>u</strong></a></strong><br />
+</dt>
 <dd>
-<p>Underline</p>
+Underline
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index 1ec716906c5d929e12665cd6144f991881c8770e..993771be64f94471d00dd95d8cf906bbf71abb7c 100644 (file)
@@ -12,11 +12,15 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
 
        C\bCO\bOM\bMM\bME\bEN\bNT\bT:\b:_\bt_\be_\bx_\bt
 
-       V\bVR\bRU\bUL\bLE\bE:\b:_\bt_\bi_\bm_\be#\b#_\bc_\bo_\bl_\bo_\br[:\b:_\bl_\be_\bg_\be_\bn_\bd][:\b:d\bda\bas\bsh\bhe\bes\bs[=\b=_\bo_\bn_\b__\bs[,_\bo_\bf_\bf_\b__\bs[,_\bo_\bn_\b__\bs,_\bo_\bf_\bf_\b__\bs]...]][:\b:d\bda\bas\bsh\bh-\b-o\bof\bff\bfs\bse\bet\bt=\b=_\bo_\bf_\bf_\bs_\be_\bt]]
+       V\bVR\bRU\bUL\bLE\bE:\b:_\bt_\bi_\bm_\be#\b#_\bc_\bo_\bl_\bo_\br[:\b:_\bl_\be_\bg_\b-
+       _\be_\bn_\bd][:\b:d\bda\bas\bsh\bhe\bes\bs[=\b=_\bo_\bn_\b__\bs[,_\bo_\bf_\bf_\b__\bs[,_\bo_\bn_\b__\bs,_\bo_\bf_\bf_\b__\bs]...]][:\b:d\bda\bas\bsh\bh-\b-o\bof\bff\bfs\bse\bet\bt=\b=_\bo_\bf_\bf_\bs_\be_\bt]]
 
-       H\bHR\bRU\bUL\bLE\bE:\b:_\bv_\ba_\bl_\bu_\be#\b#_\bc_\bo_\bl_\bo_\br[:\b:_\bl_\be_\bg_\be_\bn_\bd][:\b:d\bda\bas\bsh\bhe\bes\bs[=\b=_\bo_\bn_\b__\bs[,_\bo_\bf_\bf_\b__\bs[,_\bo_\bn_\b__\bs,_\bo_\bf_\bf_\b__\bs]...]][:\b:d\bda\bas\bsh\bh-\b-o\bof\bff\bfs\bse\bet\bt=\b=_\bo_\bf_\bf_\bs_\be_\bt]]
+       H\bHR\bRU\bUL\bLE\bE:\b:_\bv_\ba_\bl_\bu_\be#\b#_\bc_\bo_\bl_\bo_\br[:\b:_\bl_\be_\bg_\b-
+       _\be_\bn_\bd][:\b:d\bda\bas\bsh\bhe\bes\bs[=\b=_\bo_\bn_\b__\bs[,_\bo_\bf_\bf_\b__\bs[,_\bo_\bn_\b__\bs,_\bo_\bf_\bf_\b__\bs]...]][:\b:d\bda\bas\bsh\bh-\b-o\bof\bff\bfs\bse\bet\bt=\b=_\bo_\bf_\bf_\bs_\be_\bt]]
 
-       L\bLI\bIN\bNE\bE[_\bw_\bi_\bd_\bt_\bh]:\b:_\bv_\ba_\bl_\bu_\be[#\b#_\bc_\bo_\bl_\bo_\br][:\b:[_\bl_\be_\bg_\be_\bn_\bd][:\b:S\bST\bTA\bAC\bCK\bK]][:\b:d\bda\bas\bsh\bhe\bes\bs[=\b=_\bo_\bn_\b__\bs[,_\bo_\bf_\bf_\b__\bs[,_\bo_\bn_\b__\bs,_\bo_\bf_\bf_\b__\bs]...]][:\b:d\bda\bas\bsh\bh-\b-o\bof\bff\bfs\bse\bet\bt=\b=_\bo_\bf_\bf_\bs_\be_\bt]]
+       L\bLI\bIN\bNE\bE[_\bw_\bi_\bd_\bt_\bh]:\b:_\bv_\ba_\bl_\bu_\be[#\b#_\bc_\bo_\bl_\bo_\br][:\b:[_\bl_\be_\bg_\b-
+       _\be_\bn_\bd][:\b:S\bST\bTA\bAC\bCK\bK]][:\b:d\bda\bas\bsh\bhe\bes\bs[=\b=_\bo_\bn_\b__\bs[,_\bo_\bf_\bf_\b__\bs[,_\bo_\bn_\b__\bs,_\bo_\bf_\bf_\b__\bs]...]][:\b:d\bda\bas\bsh\bh-\b-o\bof\bff\bfs\bse\bet\bt=\b=_\bo_\bf_\bf_\b-
+       _\bs_\be_\bt]]
 
        A\bAR\bRE\bEA\bA:\b:_\bv_\ba_\bl_\bu_\be[#\b#_\bc_\bo_\bl_\bo_\br][:\b:[_\bl_\be_\bg_\be_\bn_\bd][:\b:S\bST\bTA\bAC\bCK\bK]]
 
@@ -37,12 +41,13 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        don't use any graph elements, no graph is generated.  Similarly, no
        report is generated if you don't use print options.
 
-   P\bPR\bRI\bIN\bNT\bT
+       P\bPR\bRI\bIN\bNT\bT
+
        _\bP\bP_\bR\bR_\bI\bI_\bN\bN_\bT\bT_\b:\b:_\bv_\bn_\ba_\bm_\be_\b:\b:_\bf_\bo_\br_\bm_\ba_\bt_\b[_\b:\b:_\bs\bs_\bt\bt_\br\br_\bf\bf_\bt\bt_\bi\bi_\bm\bm_\be\be_\b]
 
-       Depending on the context, either the value component or the time
-       component of a V\bVD\bDE\bEF\bF is printed using _\bf_\bo_\br_\bm_\ba_\bt. It is an error to specify
-       _\bv_\bn_\ba_\bm_\be generated by a D\bDE\bEF\bF or C\bCD\bDE\bEF\bF.
+       Depending on the context, either the value component or the time compo-
+       nent of a V\bVD\bDE\bEF\bF is printed using _\bf_\bo_\br_\bm_\ba_\bt. It is an error to specify a
+       _\bv_\bn_\ba_\bm_\be generated by a D\bDE\bEF\bF or C\bCD\bDE\bEF\bF.
 
        Any text in _\bf_\bo_\br_\bm_\ba_\bt is printed literally with one exception: The percent
        character introduces a formatter string. This string can be:
@@ -56,26 +61,25 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
            field width and decimal precision.
 
        %\b%#\b#.\b.#\b#l\blf\bf
-           prints numbers like 12345.6789, with optional field width and
-           precision.
+           prints numbers like 12345.6789, with optional field width and pre-
+           cision.
 
        %\b%s\bs  place this after %\b%l\ble\be, %\b%l\blf\bf or %\b%l\blg\bg. This will be replaced by the
-           appropriate SI magnitude unit and the value will be scaled
-           accordingly (123456 -> 123.456 k).
+           appropriate SI magnitude unit and the value will be scaled accord-
+           ingly (123456 -> 123.456 k).
 
-       %\b%S\bS  is similar to %\b%s\bs. It does, however, use a previously defined
-           magnitude unit. If there is no such unit yet, it tries to define
-           one (just like %\b%s\bs) unless the value is zero, in which case the
-           magnitude unit stays undefined. Thus, formatter strings using %\b%S\bS
-           and no %\b%s\bs will all use the same magnitude unit except for zero
-           values.
+       %\b%S\bS  is similar to %\b%s\bs. It does, however, use a previously defined magni-
+           tude unit. If there is no such unit yet, it tries to define one
+           (just like %\b%s\bs) unless the value is zero, in which case the magni-
+           tude unit stays undefined. Thus, formatter strings using %\b%S\bS and no
+           %\b%s\bs will all use the same magnitude unit except for zero values.
 
        If you PRINT a VDEF value, you can also print the time associated with
        it by appending the string :\b:s\bst\btr\brf\bft\bti\bim\bme\be to the format. Note that rrdtool
        uses the strftime function of your OSs C library. This means that the
-       conversion specifier may vary. Check the manual page if you are
-       uncertain. The following is a list of conversion specifiers usually
-       supported across the board.
+       conversion specifier may vary. Check the manual page if you are uncer-
+       tain. The following is a list of conversion specifiers usually sup-
+       ported across the board.
 
        %\b%a\ba  The abbreviated weekday name according to the current locale.
 
@@ -101,25 +105,24 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        %\b%M\bM  The minute as a decimal number (range 00 to 59).
 
-       %\b%p\bp  Either `AM' or `PM' according to the given time value, or the
-           corresponding strings for the current locale.  Noon is treated as
-           `pm' and midnight as `am'.  Note that in many locales and `pm'
-           notation is unsupported and in such cases %p will return an empty
-           string.
+       %\b%p\bp  Either `AM' or `PM' according to the given time value, or the cor-
+           responding strings for the current locale.  Noon is treated as `pm'
+           and midnight as `am'.  Note that in many locales and `pm' notation
+           is unsupported and in such cases %p will return an empty string.
 
        %\b%s\bs  The second as a decimal number (range 00 to 61).
 
-       %\b%S\bS  The seconds since the epoch (1.1.1970) (libc dependant non
-           standard!)
+       %\b%S\bS  The seconds since the epoch (1.1.1970) (libc dependant non stan-
+           dard!)
 
        %\b%U\bU  The  week  number  of  the current year as a decimal number, range
            00 to 53, starting with the first Sunday as the first day of week
            01. See also %V and %W.
 
-       %\b%V\bV  The ISO 8601:1988 week number of the current year as a decimal
-           number, range 01 to  53,  where week  1 is the first week that has
-           at least 4 days in the current year, and with Monday as the first
-           day of the week. See also %U and %W.
+       %\b%V\bV  The ISO 8601:1988 week number of the current year as a decimal num-
+           ber, range 01 to  53,  where week  1 is the first week that has at
+           least 4 days in the current year, and with Monday as the first day
+           of the week. See also %U and %W.
 
        %\b%w\bw  The day of the week as a decimal, range 0 to 6, Sunday being 0.
            See also %u.
@@ -147,7 +150,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        _\bD_\be_\bp_\br_\be_\bc_\ba_\bt_\be_\bd_\b. _\bU_\bs_\be _\bt_\bh_\be _\bn_\be_\bw _\bf_\bo_\br_\bm _\bo_\bf _\bt_\bh_\bi_\bs _\bc_\bo_\bm_\bm_\ba_\bn_\bd _\bi_\bn _\bn_\be_\bw _\bs_\bc_\br_\bi_\bp_\bt_\bs_\b.  The first
        form of this command is to be used with C\bCD\bDE\bEF\bF _\bv_\bn_\ba_\bm_\bes.
 
-   G\bGR\bRA\bAP\bPH\bH
+       G\bGR\bRA\bAP\bPH\bH
+
        _\bG\bG_\bP\bP_\bR\bR_\bI\bI_\bN\bN_\bT\bT_\b:\b:_\bv_\bn_\ba_\bm_\be_\b:\b:_\bf_\bo_\br_\bm_\ba_\bt
 
        This is the same as "PRINT", but printed inside the graph.
@@ -163,23 +167,27 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        in RRDtool 1.2 you have to escape colons in COMMENT text in the same
        way you have to escape them in *\b*P\bPR\bRI\bIN\bNT\bT commands by writing '\b'\\b\:\b:'\b'.
 
-       _\bV\bV_\bR\bR_\bU\bU_\bL\bL_\bE\bE_\b:\b:_\bt_\bi_\bm_\be_\b#\b#_\bc_\bo_\bl_\bo_\br_\b[_\b:\b:_\bl_\be_\bg_\be_\bn_\bd_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\be\be_\bs\bs_\b[_\b=\b=_\bo_\bn_\b__\bs_\b[_\b,_\bo_\bf_\bf_\b__\bs_\b[_\b,_\bo_\bn_\b__\bs_\b,_\bo_\bf_\bf_\b__\bs_\b]_\b._\b._\b._\b]_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\b-\b-_\bo\bo_\bf\bf_\bf\bf_\bs\bs_\be\be_\bt\bt_\b=\b=_\bo_\bf_\bf_\bs_\be_\bt_\b]_\b]
+       _\bV\bV_\bR\bR_\bU\bU_\bL\bL_\bE\bE_\b:\b:_\bt_\bi_\bm_\be_\b#\b#_\bc_\bo_\bl_\bo_\br_\b[_\b:\b:_\bl_\be_\bg_\b-
+       _\be_\bn_\bd_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\be\be_\bs\bs_\b[_\b=\b=_\bo_\bn_\b__\bs_\b[_\b,_\bo_\bf_\bf_\b__\bs_\b[_\b,_\bo_\bn_\b__\bs_\b,_\bo_\bf_\bf_\b__\bs_\b]_\b._\b._\b._\b]_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\b-\b-_\bo\bo_\bf\bf_\bf\bf_\bs\bs_\be\be_\bt\bt_\b=\b=_\bo_\bf_\bf_\bs_\be_\bt_\b]_\b]
 
-       Draw a vertical line at _\bt_\bi_\bm_\be.  Its color is composed from three
-       hexadecimal numbers specifying the rgb color components (00 is off, FF
-       is maximum) red, green and blue followed by an optional alpha.
-       Optionally, a legend box and string is printed in the legend section.
-       _\bt_\bi_\bm_\be may be a number or a variable from a V\bVD\bDE\bEF\bF. It is an error to use
-       _\bv_\bn_\ba_\bm_\bes from D\bDE\bEF\bF or C\bCD\bDE\bEF\bF here.  Dashed lines can be drawn using the
-       d\bda\bas\bsh\bhe\bes\bs modifier. See L\bLI\bIN\bNE\bE for more details.
+       Draw a vertical line at _\bt_\bi_\bm_\be.  Its color is composed from three hex-
+       adecimal numbers specifying the rgb color components (00 is off, FF is
+       maximum) red, green and blue followed by an optional alpha. Optionally,
+       a legend box and string is printed in the legend section. _\bt_\bi_\bm_\be may be a
+       number or a variable from a V\bVD\bDE\bEF\bF. It is an error to use _\bv_\bn_\ba_\bm_\bes from D\bDE\bEF\bF
+       or C\bCD\bDE\bEF\bF here.  Dashed lines can be drawn using the d\bda\bas\bsh\bhe\bes\bs modifier. See
+       L\bLI\bIN\bNE\bE for more details.
 
-       _\bH\bH_\bR\bR_\bU\bU_\bL\bL_\bE\bE_\b:\b:_\bv_\ba_\bl_\bu_\be_\b#\b#_\bc_\bo_\bl_\bo_\br_\b[_\b:\b:_\bl_\be_\bg_\be_\bn_\bd_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\be\be_\bs\bs_\b[_\b=\b=_\bo_\bn_\b__\bs_\b[_\b,_\bo_\bf_\bf_\b__\bs_\b[_\b,_\bo_\bn_\b__\bs_\b,_\bo_\bf_\bf_\b__\bs_\b]_\b._\b._\b._\b]_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\b-\b-_\bo\bo_\bf\bf_\bf\bf_\bs\bs_\be\be_\bt\bt_\b=\b=_\bo_\bf_\bf_\bs_\be_\bt_\b]_\b]
+       _\bH\bH_\bR\bR_\bU\bU_\bL\bL_\bE\bE_\b:\b:_\bv_\ba_\bl_\bu_\be_\b#\b#_\bc_\bo_\bl_\bo_\br_\b[_\b:\b:_\bl_\be_\bg_\b-
+       _\be_\bn_\bd_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\be\be_\bs\bs_\b[_\b=\b=_\bo_\bn_\b__\bs_\b[_\b,_\bo_\bf_\bf_\b__\bs_\b[_\b,_\bo_\bn_\b__\bs_\b,_\bo_\bf_\bf_\b__\bs_\b]_\b._\b._\b._\b]_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\b-\b-_\bo\bo_\bf\bf_\bf\bf_\bs\bs_\be\be_\bt\bt_\b=\b=_\bo_\bf_\bf_\bs_\be_\bt_\b]_\b]
 
        Draw a horizontal line at _\bv_\ba_\bl_\bu_\be.  HRULE acts much like LINE except that
        will have no effect on the scale of the graph. If a HRULE is outside
        the graphing area it will just not be visible.
 
-       _\bL\bL_\bI\bI_\bN\bN_\bE\bE_\b[_\bw_\bi_\bd_\bt_\bh_\b]_\b:\b:_\bv_\ba_\bl_\bu_\be_\b[_\b#\b#_\bc_\bo_\bl_\bo_\br_\b]_\b[_\b:\b:_\b[_\bl_\be_\bg_\be_\bn_\bd_\b]_\b[_\b:\b:_\bS\bS_\bT\bT_\bA\bA_\bC\bC_\bK\bK_\b]_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\be\be_\bs\bs_\b[_\b=\b=_\bo_\bn_\b__\bs_\b[_\b,_\bo_\bf_\bf_\b__\bs_\b[_\b,_\bo_\bn_\b__\bs_\b,_\bo_\bf_\bf_\b__\bs_\b]_\b._\b._\b._\b]_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\b-\b-_\bo\bo_\bf\bf_\bf\bf_\bs\bs_\be\be_\bt\bt_\b=\b=_\bo_\bf_\bf_\bs_\be_\bt_\b]_\b]
+       _\bL\bL_\bI\bI_\bN\bN_\bE\bE_\b[_\bw_\bi_\bd_\bt_\bh_\b]_\b:\b:_\bv_\ba_\bl_\bu_\be_\b[_\b#\b#_\bc_\bo_\bl_\bo_\br_\b]_\b[_\b:\b:_\b[_\bl_\be_\bg_\b-
+       _\be_\bn_\bd_\b]_\b[_\b:\b:_\bS\bS_\bT\bT_\bA\bA_\bC\bC_\bK\bK_\b]_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\be\be_\bs\bs_\b[_\b=\b=_\bo_\bn_\b__\bs_\b[_\b,_\bo_\bf_\bf_\b__\bs_\b[_\b,_\bo_\bn_\b__\bs_\b,_\bo_\bf_\bf_\b__\bs_\b]_\b._\b._\b._\b]_\b]_\b[_\b:\b:_\bd\bd_\ba\ba_\bs\bs_\bh\bh_\b-\b-_\bo\bo_\bf\bf_\bf\bf_\bs\bs_\be\be_\bt\bt_\b=\b=_\bo_\bf_\bf_\b-
+       _\bs_\be_\bt_\b]_\b]
 
        Draw a line of the specified width onto the graph. _\bw_\bi_\bd_\bt_\bh can be a
        floating point number. If the color is not specified, the drawing is
@@ -248,22 +256,24 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        know where to end.
 
        If you want to make sure you will be displaying a certain variable,
-       make sure never to stack upon the unknown value.  Use a CDEF
-       instruction with I\bIF\bF and U\bUN\bN to do so.
+       make sure never to stack upon the unknown value.  Use a CDEF instruc-
+       tion with I\bIF\bF and U\bUN\bN to do so.
 
 N\bNO\bOT\bTE\bES\bS o\bon\bn l\ble\beg\bge\ben\bnd\bd a\bar\brg\bgu\bum\bme\ben\bnt\bts\bs
-   E\bEs\bsc\bca\bap\bpi\bin\bng\bg t\bth\bhe\be c\bco\bol\blo\bon\bn
+       E\bEs\bsc\bca\bap\bpi\bin\bng\bg t\bth\bhe\be c\bco\bol\blo\bon\bn
+
        A colon ':' in a _\bl_\be_\bg_\be_\bn_\bd argument will mark the end of the legend. To
-       enter a ':' as part of a legend, the colon must be escaped with a
-       backslash '\:'.  Beware that many environments process backslashes
-       themselves, so it may be necessary to write two backslashes in order to
-       one being passed onto rrd_graph.
+       enter a ':' as part of a legend, the colon must be escaped with a back-
+       slash '\:'.  Beware that many environments process backslashes them-
+       selves, so it may be necessary to write two backslashes in order to one
+       being passed onto rrd_graph.
+
+       S\bSt\btr\bri\bin\bng\bg F\bFo\bor\brm\bma\bat\btt\bti\bin\bng\bg
 
-   S\bSt\btr\bri\bin\bng\bg F\bFo\bor\brm\bma\bat\btt\bti\bin\bng\bg
        The text printed below the actual graph can be formatted by appending
-       special escape characters at the end of a text. When ever such a
-       character occurs, all pending text is pushed onto the graph according
-       to the character specified.
+       special escape characters at the end of a text. When ever such a char-
+       acter occurs, all pending text is pushed onto the graph according to
+       the character specified.
 
        Valid markers are: \\b\j\bj for justified, \\b\l\bl for left aligned, \\b\r\br for right
        aligned, and \\b\c\bc for centered. In the next section there is an example
@@ -274,11 +284,10 @@ N\bNO\bOT\bTE\bES\bS o\bon\bn l\ble\beg\bge\ben\bnd\bd a\bar\brg\bgu\bum\bme\ben\bnt\bts\bs
        it.
 
        Normally there are two space characters inserted between every two
-       items printed into the graph. The space following a string can be
-       suppressed by putting a \\b\g\bg at the end of the string. The \\b\g\bg also
-       ignores any space inside the string if it is at the very end of the
-       string. This can be used in connection with %\b%s\bs to suppress empty unit
-       strings.
+       items printed into the graph. The space following a string can be sup-
+       pressed by putting a \\b\g\bg at the end of the string. The \\b\g\bg also ignores
+       any space inside the string if it is at the very end of the string.
+       This can be used in connection with %\b%s\bs to suppress empty unit strings.
 
         GPRINT:a:MAX:%lf%s\g
 
@@ -290,8 +299,8 @@ N\bNO\bOT\bTE\bES\bS o\bon\bn l\ble\beg\bge\ben\bnd\bd a\bar\brg\bgu\bum\bme\ben\bnt\bts\bs
        tabs inserted are relative to the start of the current legend element!
 
        Since RRDtool 1.3 is using Pango for rending text, you can use Pango
-       markup.  Pango uses the xml s\bsp\bpa\ban\bn tags for inline formatting
-       instructions.:
+       markup.  Pango uses the xml s\bsp\bpa\ban\bn tags for inline formatting instruc-
+       tions.:
 
        A simple example of a marked-up string might be:
 
@@ -332,9 +341,9 @@ N\bNO\bOT\bTE\bES\bS o\bon\bn l\ble\beg\bge\ben\bnd\bd a\bar\brg\bgu\bum\bme\ben\bnt\bts\bs
            'normal' or 'smallcaps'
 
        s\bst\btr\bre\bet\btc\bch\bh
-           One of 'ultracondensed', 'extracondensed', 'condensed',
-           'semicondensed', 'normal', 'semiexpanded', 'expanded',
-           'extraexpanded', 'ultraexpanded'
+           One of 'ultracondensed', 'extracondensed', 'condensed', 'semicon-
+           densed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded',
+           'ultraexpanded'
 
        f\bfo\bor\bre\beg\bgr\bro\bou\bun\bnd\bd
            An RGB color specification such as '#00FF00' or a color name such
@@ -418,4 +427,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2009-02-21                 RRDGRAPH_GRAPH(1)
+1.3.99909060808                   2009-02-21                 RRDGRAPH_GRAPH(1)
diff --git a/doc/rrdgraph_libdbi.pod b/doc/rrdgraph_libdbi.pod
new file mode 100644 (file)
index 0000000..a6b48cc
--- /dev/null
@@ -0,0 +1,158 @@
+=head1 NAME
+
+rrdgraph_libdbi - fetching data for graphing in rrdtool graph via libdbi
+
+=head1 SYNOPSIS
+
+E<lt>rrdfileE<gt> = B<sql//E<lt>libdbi driverE<gt>/E<lt>driver-option-nameE<gt>=E<lt>driver-option-valueE<gt>/...[/rrdminstepsize=E<lt>stepsizeE<gt>][/rrdfillmissing=E<lt>fill missing n samplesE<gt>]//E<lt>tableE<gt>/E<lt>unixtimestamp columnE<gt>/E<lt>data value columnE<gt>[/derive]/E<lt>where clause 1E<gt>/.../E<lt>where clause nE<gt>>
+
+=head1 DESCRIPTION
+
+This pseudo-rrd-filename defines a sql datasource:
+
+=over 8
+
+=item B<sql//>
+
+  magic cookie-prefix for a libdbi type datasource
+
+=item B<E<lt>libdbi driverE<gt>>
+
+  which libdbi driver to use (e.g: mysql)
+
+=item B<E<lt>driver-option-nameE<gt>>=B<E<lt>driver-option-valueE<gt>>
+
+  defines the parameters that are required to connect to the database with the given libdbi driver
+  (These drivers are libdbi dependent - for details please look at the driver documentation of libdbi!)
+
+=item B</rrdminstepsize>=B<E<lt>minimum step sizeE<gt>>
+
+  defines the minimum number of the step-length used for graphing (default: 300 seconds)
+
+=item B</rrdfillmissing>=B<E<lt>fill missing stepsE<gt>>
+
+  defines the number of steps to fill with the last value to avoid NaN boxes due to data-insertation jitter (default: 0 steps)
+
+=item B<E<lt>tableE<gt>>
+
+  defines the table from which to fetch the resultset.
+
+  If there is a need to fetch data from several tables, these tables can be defined by separating the tablenames with a "+"
+
+  hex-type-encoding via %xx are translated to the actual value, use %% to use %
+
+=item B<E<lt>[*]unixtimestamp columnE<gt>>
+
+  defines the column of E<lt>tableE<gt> which contains the unix-timestamp 
+  - if this is a DATETIME field in the database, then prefix with leading '*'
+
+  hex-type-encoding via %xx are translated to the actual value, use %% to use %
+
+=item B<E<lt>data value columnE<gt>>
+
+  defines the column of E<lt>tableE<gt> which contains the value column, which should be graphed
+
+  hex-type-encoding via %xx are translated to the actual value, use %% to use %
+
+=item B</derive>
+
+  defines that the data value used should be the delta of the 2 consecutive values (to simulate COUNTER or DERIVE type datasources)
+
+=item B</E<lt>where clause(s)E<gt>>
+
+  defines one (ore more) where clauses that are joined with AND to filter the entries in the <lt>table<gt>
+
+  hex-type-encoding via %xx are translated to the actual value, use %% to use %
+
+=back
+
+the returned value column-names, which can be used as ds-names, are:
+
+=over 8
+
+=item B<min>, B<avg>, B<max>, B<count> and B<sigma>
+
+  are returned to be used as ds-names in your DS definition.
+  The reason for using this is that if the consolidation function is used for min/avg and max, then the engine is used several times.
+  And this results in the same SQL Statements used several times
+
+=back
+
+=head1 EXAMPLES
+
+Here an example of a table in a MySQL database:
+
+  DB connect information
+    dbhost=127.0.0.1
+    user=rrd
+    password=secret
+    database=rrd
+
+  here the table:
+    CREATE TABLE RRDValue (
+      RRDKeyID      bigint(20) NOT NULL,
+      UnixTimeStamp int(11) NOT NULL,
+      value         double default NOT NULL,
+      PRIMARY KEY  (RRDKeyID,UnixTimeStamp)
+    );
+
+and the RRDKeyID we want to graph for is: 1141942900757789274
+
+The pseudo rrd-filename to access this is:
+"sql//mysql/host=127.0.0.1/dbname=rrd/username=rrd/password=secret//RRDValue/UnixTimeStamp/value/RRDKeyID=1141464142203608274"
+
+To illustrate this here a command to create a graph that contains the actual values.
+
+  DS_BASE="sql//mysql/host=127.0.0.1/dbname=rrd/username=rrd/password=passwd//RRDValue/UnixTimeStamp/value/RRDKeyID=1141942900757789274"
+  rrdtool graph test.png --imgformat=PNG --start=-1day --end=+3hours --width=1000 --height=600 \
+    "DEF:min=$DS_BASE:min:AVERAGE" \
+    "LINE1:min#FF0000:value" \
+    "DEF:avg=$DS_BASE:avg:AVERAGE" \
+    "LINE1:avg#00FF00:average" \
+    "DEF:max=$DS_BASE:max:AVERAGE" \
+    "LINE1:max#FF0000:max" \
+    "DEF:sigma=$DS_BASE:sigma:AVERAGE" \
+    "CDEF:upper=avg,4,sigma,*,+" \
+    "LINE1:upper#0000FF:+4 sigma" \
+    "CDEF:lower=avg,4,sigma,*,-" \
+    "LINE1:lower#0000FF:-4 sigma"
+
+=head1 NOTES
+
+* Naturally you can also use any other kind of driver that libdbi supports - e.g postgres, ...
+
+* From the way the datasource is joined, it should also be possible to do joins over different tables 
+  (separate tables with "," in table and add in the WHERE Clauses the table equal joins. 
+  This has not been tested!!!)
+
+* It should also be relatively simple to add to the database using the same datasource string.
+  This has not been implemented...
+
+* The aggregation functions are ignored and several data columns are used instead 
+  to avoid querying the same SQL several times when minimum, average and maximum are needed for graphing...
+
+* for DB efficiency you should think of having 2 tables, one containing historic values and the other containing the latest data.
+  This second table should be kept small to allow for the least ammount of blocking SQL statements.
+  Whith mysql you can even use myisam table-type for the first and InnoDB for the second. 
+  This is especially interresting as with tables with +100M rows myisam is much smaller then InnoDB.
+
+* To debug the SQL statements set the environment variable RRDDEBUGSQL and the actual SQL statements and the timing is printed to stderr.
+
+=head1 BUGS
+
+* at least on Linux please make sure that the libdbi driver is explicitly linked against libdbi.so.0 
+  check via ldd /usr/lib/dbd/libmysql.so, that there is a line with libdbi.so.0. 
+  otherwise at least the perl module RRDs will fail because the dynamic linker can not find some symbols from libdbi.so.
+  (this only happens when the libdbi driver is actually used the first time!)
+  This is KNOWN to be the case with RHEL4 and FC4 and FC5! (But actually this is a bug with libdbi make files!)
+
+* at least version 0.8.1 of libdbiexhibits a bug with BINARY fields
+  (shorttext,text,mediumtext,longtext and possibly also BINARY and BLOB fields), 
+  that can result in coredumps of rrdtool. 
+  The tool will tell you on stderr if this occures, so that you know what may be the reason.
+  If you are not experiencing these coredumps, then set the environment variable RRD_NO_LIBDBI_BUG_WARNING, 
+  and then the message will not get shown.
+
+=head1 AUTHOR
+
+Martin Sperl <rrdtool@martin.sperl.org>
index 8869c4f6b0e95048cd5c9c31813279967ffe95bd..c765dddb3c774c57396ac6dd4fb9cd6d3c76b783 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDGRAPH_RPN 1"
-.TH RRDGRAPH_RPN 1 "2009-02-21" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDGRAPH_RPN 1 "2009-02-21" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdgraph_rpn \- About RPN Math in rrdtool graph
 .SH "SYNOPSIS"
@@ -192,7 +193,7 @@ mean that any value other than 0 is considered to be true.
 .Sp
 Example: \f(CW\*(C`A,B,C,IF\*(C'\fR should be read as \f(CW\*(C`if (A) then (B) else (C)\*(C'\fR
 .Sp
-
+\&\&
 .IP "Comparing values" 4
 .IX Item "Comparing values"
 \&\fB\s-1MIN\s0, \s-1MAX\s0\fR
@@ -216,7 +217,7 @@ will always return an \fIunknown\fR
 Example: \f(CW\*(C`CDEF:a=alpha,0,100,LIMIT\*(C'\fR will return \fIunknown\fR if
 alpha is lower than 0 or if it is higher than 100.
 .Sp
-
+\&\&
 .IP "Arithmetics" 4
 .IX Item "Arithmetics"
 \&\fB+, \-, *, /, %\fR
@@ -297,17 +298,94 @@ average is essentially computed as shown here:
 \&                     <\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->
 \&                              delay      t2
 \&                         <\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->
-\&
-\&
+.Ve
+.Sp
+.Vb 3
 \&     Value at sample (t0) will be the average between (t0\-delay) and (t0)
 \&     Value at sample (t1) will be the average between (t1\-delay) and (t1)
 \&     Value at sample (t2) will be the average between (t2\-delay) and (t2)
 .Ve
 .Sp
-\&\s-1TRENDNAN\s0 is \- in contrast to \s-1TREND\s0 \- NAN-safe. If you use \s-1TREND\s0 and one 
+\&\s-1TRENDNAN\s0 is \- in contrast to \s-1TREND\s0 \- NAN\-safe. If you use \s-1TREND\s0 and one 
 source value is \s-1NAN\s0 the complete sliding window is affected. The \s-1TRENDNAN\s0 
 operation ignores all NAN-values in a sliding window and computes the 
 average of the remaining values.
+.Sp
+\&\fB\s-1PREDICT\s0, \s-1PREDICTSIGMA\s0\fR
+.Sp
+Create a \*(L"sliding window\*(R" average/sigma of another data series, that also
+shifts the data series by given amounts of of time as well
+.Sp
+Usage \- explicit stating shifts:
+CDEF:predict=<shift n>,...,<shift 1>,n,<window>,x,PREDICT
+CDEF:sigma=<shift n>,...,<shift 1>,n,<window>,x,PREDICTSIGMA
+.Sp
+Usage \- shifts defined as a base shift and a number of time this is applied
+CDEF:predict=<shift multiplier>,\-n,<window>,x,PREDICT
+CDEF:sigma=<shift multiplier>,\-n,<window>,x,PREDICTSIGMA
+.Sp
+Example:
+CDEF:predict=172800,86400,2,1800,x,PREDICT
+.Sp
+This will create a half-hour (1800 second) sliding window average/sigma of x, that
+average is essentially computed as shown here:
+.Sp
+.Vb 18
+\& +\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\-!\-\-\->
+\&                                                                     now
+\&                                                  shift 1        t0
+\&                                         <\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->
+\&                               window
+\&                         <\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->
+\&                                       shift 2
+\&                 <\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->
+\&       window
+\& <\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->
+\&                                                      shift 1        t1
+\&                                             <\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->
+\&                                   window
+\&                             <\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->
+\&                                            shift 2
+\&                     <\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->
+\&           window
+\&     <\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->
+.Ve
+.Sp
+.Vb 4
+\& Value at sample (t0) will be the average between (t0\-shift1\-window) and (t0\-shift1)
+\&                                      and between (t0\-shift2\-window) and (t0\-shift2)
+\& Value at sample (t1) will be the average between (t1\-shift1\-window) and (t1\-shift1)
+\&                                      and between (t1\-shift2\-window) and (t1\-shift2)
+.Ve
+.Sp
+The function is by design NAN\-safe. 
+This also allows for extrapolation into the future (say a few days)
+\&\- you may need to define the data series whit the optional start= parameter, so that 
+the source data series has enough data to provide prediction also at the beginning of a graph...
+.Sp
+Here an example, that will create a 10 day graph that also shows the 
+prediction 3 days into the future with its uncertainty value (as defined by avg+\-4*sigma)
+This also shows if the prediction is exceeded at a certain point.
+.Sp
+rrdtool graph image.png \-\-imgformat=PNG \e
+ \-\-start=\-7days \-\-end=+3days \-\-width=1000 \-\-height=200 \-\-alt\-autoscale\-max \e
+ DEF:value=value.rrd:value:AVERAGE:start=\-14days \e
+ LINE1:value#ff0000:value \e
+ CDEF:predict=86400,\-7,1800,value,PREDICT \e
+ CDEF:sigma=86400,\-7,1800,value,PREDICTSIGMA \e
+ CDEF:upper=predict,sigma,3,*,+ \e
+ CDEF:lower=predict,sigma,3,*,\- \e
+ LINE1:predict#00ff00:prediction \e
+ LINE1:upper#0000ff:upper\e certainty\e limit \e
+ LINE1:lower#0000ff:lower\e certainty\e limit \e
+ CDEF:exceeds=value,UN,0,value,lower,upper,LIMIT,UN,IF \e
+ TICK:exceeds#aa000080:1
+.Sp
+Note: Experience has shown that a factor between 3 and 5 to scale sigma is a good 
+discriminator to detect abnormal behaviour. This obviously depends also on the type 
+of data and how \*(L"noisy\*(R" the data series is.
+.Sp
+This prediction can only be used for short term extrapolations \- say a few days into the future\-
 .IP "Special values" 4
 .IX Item "Special values"
 \&\fB\s-1UNKN\s0\fR
@@ -343,7 +421,7 @@ the data set. This function cannot be used in \fB\s-1VDEF\s0\fR instructions.
 .IP "Time" 4
 .IX Item "Time"
 Time inside RRDtool is measured in seconds since the epoch. The
-epoch is defined to be \f(CW\*(C`Thu\ Jan\ 1\ 00:00:00\ UTC\ 1970\*(C'\fR.
+epoch is defined to be \f(CW\*(C`Thu\ Jan\ 1\ 00:00:00\ UTC\ 1970\*(C'\fR.
 .Sp
 \&\fB\s-1NOW\s0\fR
 .Sp
@@ -366,7 +444,7 @@ in the examples section below on how to use this.
 Duplicate the top element, remove the top element, exchange the two
 top elements.
 .Sp
-
+\&\&
 .SH "VARIABLES"
 .IX Header "VARIABLES"
 These operators work only on \fB\s-1VDEF\s0\fR statements. Note that currently \s-1ONLY\s0 these work for \fB\s-1VDEF\s0\fR.
@@ -396,12 +474,13 @@ when you have logged bytes per second. The time component returns
 the number of seconds.
 .Sp
 Example: \f(CW\*(C`VDEF:total=mydata,TOTAL\*(C'\fR
-.IP "\s-1PERCENT\s0" 4
-.IX Item "PERCENT"
+.IP "\s-1PERCENT\s0, \s-1PERCENTNAN\s0" 4
+.IX Item "PERCENT, PERCENTNAN"
 This should follow a \fB\s-1DEF\s0\fR or \fB\s-1CDEF\s0\fR \fIvname\fR. The \fIvname\fR is popped,
 another number is popped which is a certain percentage (0..100). The
 data set is then sorted and the value returned is chosen such that
 \&\fIpercentage\fR percent of the values is lower or equal than the result.
+For \s-1PERCENTNAN\s0 \fIUnknown\fR values are ignored, but for \s-1PERCENT\s0
 \&\fIUnknown\fR values are considered lower than any finite number for this
 purpose so if this operator returns an \fIunknown\fR you have quite a lot
 of them in your data.  \fBInf\fRinite numbers are lesser, or more, than the
@@ -409,6 +488,7 @@ finite numbers and are always more than the \fIUnknown\fR numbers.
 (NaN < \-INF < finite values < \s-1INF\s0)
 .Sp
 Example: \f(CW\*(C`VDEF:perc95=mydata,95,PERCENT\*(C'\fR
+         \f(CW\*(C`VDEF:percnan95=mydata,95,PERCENTNAN\*(C'\fR
 .IP "\s-1LSLSLOPE\s0, \s-1LSLINT\s0, \s-1LSLCORREL\s0" 4
 .IX Item "LSLSLOPE, LSLINT, LSLCORREL"
 Return the parameters for a \fBL\fReast \fBS\fRquares \fBL\fRine \fI(y = mx +b)\fR 
@@ -417,7 +497,7 @@ the line related to the \s-1COUNT\s0 position of the data.  \s-1LSLINT\s0 is the
 y\-intercept \fI(b)\fR, which happens also to be the first data point on the 
 graph. \s-1LSLCORREL\s0 is the Correlation Coefficient (also know as Pearson's 
 Product Moment Correlation Coefficient).  It will range from 0 to +/\-1 
-and represents the quality of fit for the approximation.
+and represents the quality of fit for the approximation.   
 .Sp
 Example: \f(CW\*(C`VDEF:slope=mydata,LSLSLOPE\*(C'\fR
 .SH "SEE ALSO"
index bed66325f395102095325ac47665002bb4ccf7c1..0da9f789808b768d3cee9dbe259ed1a961c633d0 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdgraph_rpn</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -59,7 +51,7 @@ data point on the graph. <strong>VDEF</strong> instructions work on an entire da
 one run. Note, that currently <strong>VDEF</strong> instructions only support a limited
 list of functions.</p>
 <p>Example: <code>VDEF:maximum=mydata,MAXIMUM</code></p>
-<p>This will set variable &quot;maximum&quot; which you now can use in the rest
+<p>This will set variable ``maximum'' which you now can use in the rest
 of your RRD script.</p>
 <p>Example: <code>CDEF:mydatabits=mydata,8,*</code></p>
 <p>This means:  push variable <em>mydata</em>, push the number 8, execute
@@ -77,92 +69,173 @@ would do <code>a = b, 3, +, 5, *</code> without the need for parentheses.</p>
 <hr />
 <h1><a name="operators">OPERATORS</a></h1>
 <dl>
-<dt><strong><a name="boolean_operators" class="item">Boolean operators</a></strong></dt>
-
+<dt><strong><a name="item_boolean_operators">Boolean operators</a></strong><br />
+</dt>
+<dd>
+<strong>LT, LE, GT, GE, EQ, NE</strong>
+</dd>
 <dd>
-<p><strong>LT, LE, GT, GE, EQ, NE</strong></p>
 <p>Pop two elements from the stack, compare them for the selected condition
 and return 1 for true or 0 for false. Comparing an <em>unknown</em> or an
 <em>infinite</em> value will always result in 0 (false).</p>
+</dd>
+<dd>
 <p><strong>UN, ISINF</strong></p>
+</dd>
+<dd>
 <p>Pop one element from the stack, compare this to <em>unknown</em> respectively
 to <em>positive or negative infinity</em>. Returns 1 for true or 0 for false.</p>
+</dd>
+<dd>
 <p><strong>IF</strong></p>
+</dd>
+<dd>
 <p>Pops three elements from the stack.  If the element popped last is 0
 (false), the value popped first is pushed back onto the stack,
 otherwise the value popped second is pushed back. This does, indeed,
 mean that any value other than 0 is considered to be true.</p>
+</dd>
+<dd>
 <p>Example: <code>A,B,C,IF</code> should be read as <code>if (A) then (B) else (C)</code></p>
+</dd>
+<dd>
 <p></p>
 </dd>
-<dt><strong><a name="comparing_values" class="item">Comparing values</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_comparing_values">Comparing values</a></strong><br />
+</dt>
+<dd>
+<strong>MIN, MAX</strong>
+</dd>
 <dd>
-<p><strong>MIN, MAX</strong></p>
 <p>Pops two elements from the stack and returns the smaller or larger,
 respectively.  Note that <em>infinite</em> is larger than anything else.
 If one of the input numbers is <em>unknown</em> then the result of the operation will be
 <em>unknown</em> too.</p>
+</dd>
+<dd>
 <p><strong>LIMIT</strong></p>
+</dd>
+<dd>
 <p>Pops two elements from the stack and uses them to define a range.
 Then it pops another element and if it falls inside the range, it
 is pushed back. If not, an <em>unknown</em> is pushed.</p>
+</dd>
+<dd>
 <p>The range defined includes the two boundaries (so: a number equal
 to one of the boundaries will be pushed back). If any of the three
 numbers involved is either <em>unknown</em> or <em>infinite</em> this function
 will always return an <em>unknown</em></p>
+</dd>
+<dd>
 <p>Example: <code>CDEF:a=alpha,0,100,LIMIT</code> will return <em>unknown</em> if
 alpha is lower than 0 or if it is higher than 100.</p>
+</dd>
+<dd>
 <p></p>
 </dd>
-<dt><strong><a name="arithmetics" class="item">Arithmetics</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_arithmetics">Arithmetics</a></strong><br />
+</dt>
+<dd>
+<strong>+, -, *, /, %</strong>
+</dd>
 <dd>
-<p><strong>+, -, *, /, %</strong></p>
 <p>Add, subtract, multiply, divide, modulo</p>
+</dd>
+<dd>
 <p><strong>ADDNAN</strong></p>
+</dd>
+<dd>
 <p>NAN-safe addition. If one parameter is NAN/UNKNOWN it'll be treated as
 zero. If both parameters are NAN/UNKNOWN, NAN/UNKNOWN will be returned.</p>
+</dd>
+<dd>
 <p><strong>SIN, COS, LOG, EXP, SQRT</strong></p>
+</dd>
+<dd>
 <p>Sine and cosine (input in radians), log and exp (natural logarithm),
 square root.</p>
+</dd>
+<dd>
 <p><strong>ATAN</strong></p>
+</dd>
+<dd>
 <p>Arctangent (output in radians).</p>
+</dd>
+<dd>
 <p><strong>ATAN2</strong></p>
+</dd>
+<dd>
 <p>Arctangent of y,x components (output in radians).
 This pops one element from the stack, the x (cosine) component, and then
 a second, which is the y (sine) component.
 It then pushes the arctangent of their ratio, resolving the ambiguity between
 quadrants.</p>
+</dd>
+<dd>
 <p>Example: <code>CDEF:angle=Y,X,ATAN2,RAD2DEG</code> will convert <code>X,Y</code>
 components into an angle in degrees.</p>
+</dd>
+<dd>
 <p><strong>FLOOR, CEIL</strong></p>
+</dd>
+<dd>
 <p>Round down or up to the nearest integer.</p>
+</dd>
+<dd>
 <p><strong>DEG2RAD, RAD2DEG</strong></p>
+</dd>
+<dd>
 <p>Convert angle in degrees to radians, or radians to degrees.</p>
+</dd>
+<dd>
 <p><strong>ABS</strong></p>
+</dd>
+<dd>
 <p>Take the absolute value.</p>
 </dd>
-<dt><strong><a name="set_operations" class="item">Set Operations</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_set_operations">Set Operations</a></strong><br />
+</dt>
+<dd>
+<strong>SORT, REV</strong>
+</dd>
 <dd>
-<p><strong>SORT, REV</strong></p>
 <p>Pop one element from the stack.  This is the <em>count</em> of items to be sorted
 (or reversed).  The top <em>count</em> of the remaining elements are then sorted
 (or reversed) in place on the stack.</p>
+</dd>
+<dd>
 <p>Example: <code>CDEF:x=v1,v2,v3,v4,v5,v6,6,SORT,POP,5,REV,POP,+,+,+,4,/</code> will
 compute the average of the values v1 to v6 after removing the smallest and
 largest.</p>
+</dd>
+<dd>
 <p><strong>AVG</strong></p>
+</dd>
+<dd>
 <p>Pop one element (<em>count</em>) from the stack. Now pop <em>count</em> elements and build the
 average, ignoring all UNKNOWN values in the process.</p>
+</dd>
+<dd>
 <p>Example: <code>CDEF:x=a,b,c,d,4,AVG</code></p>
+</dd>
+<dd>
 <p><strong>TREND, TRENDNAN</strong></p>
-<p>Create a &quot;sliding window&quot; average of another data series.</p>
+</dd>
+<dd>
+<p>Create a ``sliding window'' average of another data series.</p>
+</dd>
+<dd>
 <p>Usage:
 CDEF:smoothed=x,1800,TREND</p>
+</dd>
+<dd>
 <p>This will create a half-hour (1800 second) sliding window average of x.  The
 average is essentially computed as shown here:</p>
+</dd>
+<dd>
 <pre>
                  +---!---!---!---!---!---!---!---!---&gt;
                                                      now
@@ -172,127 +245,274 @@ average is essentially computed as shown here:</p>
                      &lt;---------------&gt;
                               delay      t2
                          &lt;---------------&gt;</pre>
+</dd>
+<dd>
 <pre>
      Value at sample (t0) will be the average between (t0-delay) and (t0)
      Value at sample (t1) will be the average between (t1-delay) and (t1)
      Value at sample (t2) will be the average between (t2-delay) and (t2)</pre>
+</dd>
+<dd>
 <p>TRENDNAN is - in contrast to TREND - NAN-safe. If you use TREND and one 
 source value is NAN the complete sliding window is affected. The TRENDNAN 
 operation ignores all NAN-values in a sliding window and computes the 
 average of the remaining values.</p>
 </dd>
-<dt><strong><a name="special_values" class="item">Special values</a></strong></dt>
-
 <dd>
-<p><strong>UNKN</strong></p>
+<p><strong>PREDICT, PREDICTSIGMA</strong></p>
+</dd>
+<dd>
+<p>Create a ``sliding window'' average/sigma of another data series, that also
+shifts the data series by given amounts of of time as well</p>
+</dd>
+<dd>
+<p>Usage - explicit stating shifts:
+CDEF:predict=&lt;shift n&gt;,...,&lt;shift 1&gt;,n,&lt;window&gt;,x,PREDICT
+CDEF:sigma=&lt;shift n&gt;,...,&lt;shift 1&gt;,n,&lt;window&gt;,x,PREDICTSIGMA</p>
+</dd>
+<dd>
+<p>Usage - shifts defined as a base shift and a number of time this is applied
+CDEF:predict=&lt;shift multiplier&gt;,-n,&lt;window&gt;,x,PREDICT
+CDEF:sigma=&lt;shift multiplier&gt;,-n,&lt;window&gt;,x,PREDICTSIGMA</p>
+</dd>
+<dd>
+<p>Example:
+CDEF:predict=172800,86400,2,1800,x,PREDICT</p>
+</dd>
+<dd>
+<p>This will create a half-hour (1800 second) sliding window average/sigma of x, that
+average is essentially computed as shown here:</p>
+</dd>
+<dd>
+<pre>
+ +---!---!---!---!---!---!---!---!---!---!---!---!---!---!---!---!---!---&gt;
+                                                                     now
+                                                  shift 1        t0
+                                         &lt;-----------------------&gt;
+                               window
+                         &lt;---------------&gt;
+                                       shift 2
+                 &lt;-----------------------------------------------&gt;
+       window
+ &lt;---------------&gt;
+                                                      shift 1        t1
+                                             &lt;-----------------------&gt;
+                                   window
+                             &lt;---------------&gt;
+                                            shift 2
+                     &lt;-----------------------------------------------&gt;
+           window
+     &lt;---------------&gt;</pre>
+</dd>
+<dd>
+<pre>
+ Value at sample (t0) will be the average between (t0-shift1-window) and (t0-shift1)
+                                      and between (t0-shift2-window) and (t0-shift2)
+ Value at sample (t1) will be the average between (t1-shift1-window) and (t1-shift1)
+                                      and between (t1-shift2-window) and (t1-shift2)</pre>
+</dd>
+<dd>
+<p>The function is by design NAN-safe. 
+This also allows for extrapolation into the future (say a few days)
+- you may need to define the data series whit the optional start= parameter, so that 
+the source data series has enough data to provide prediction also at the beginning of a graph...</p>
+</dd>
+<dd>
+<p>Here an example, that will create a 10 day graph that also shows the 
+prediction 3 days into the future with its uncertainty value (as defined by avg+-4*sigma)
+This also shows if the prediction is exceeded at a certain point.</p>
+</dd>
+<dd>
+<p>rrdtool graph image.png --imgformat=PNG \
+ --start=-7days --end=+3days --width=1000 --height=200 --alt-autoscale-max \
+ DEF:value=value.rrd:value:AVERAGE:start=-14days \
+ LINE1:value#ff0000:value \
+ CDEF:predict=86400,-7,1800,value,PREDICT \
+ CDEF:sigma=86400,-7,1800,value,PREDICTSIGMA \
+ CDEF:upper=predict,sigma,3,*,+ \
+ CDEF:lower=predict,sigma,3,*,- \
+ LINE1:predict#00ff00:prediction \
+ LINE1:upper#0000ff:upper\ certainty\ limit \
+ LINE1:lower#0000ff:lower\ certainty\ limit \
+ CDEF:exceeds=value,UN,0,value,lower,upper,LIMIT,UN,IF \
+ TICK:exceeds#aa000080:1</p>
+</dd>
+<dd>
+<p>Note: Experience has shown that a factor between 3 and 5 to scale sigma is a good 
+discriminator to detect abnormal behaviour. This obviously depends also on the type 
+of data and how ``noisy'' the data series is.</p>
+</dd>
+<dd>
+<p>This prediction can only be used for short term extrapolations - say a few days into the future-</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_special_values">Special values</a></strong><br />
+</dt>
+<dd>
+<strong>UNKN</strong>
+</dd>
+<dd>
 <p>Pushes an unknown value on the stack</p>
+</dd>
+<dd>
 <p><strong>INF, NEGINF</strong></p>
+</dd>
+<dd>
 <p>Pushes a positive or negative infinite value on the stack. When
 such a value is graphed, it appears at the top or bottom of the
 graph, no matter what the actual value on the y-axis is.</p>
+</dd>
+<dd>
 <p><strong>PREV</strong></p>
+</dd>
+<dd>
 <p>Pushes an <em>unknown</em> value if this is the first value of a data
 set or otherwise the result of this <strong>CDEF</strong> at the previous time
 step. This allows you to do calculations across the data.  This
 function cannot be used in <strong>VDEF</strong> instructions.</p>
+</dd>
+<dd>
 <p><strong>PREV(vname)</strong></p>
+</dd>
+<dd>
 <p>Pushes an <em>unknown</em> value if this is the first value of a data
 set or otherwise the result of the vname variable at the previous time
 step. This allows you to do calculations across the data. This
 function cannot be used in <strong>VDEF</strong> instructions.</p>
+</dd>
+<dd>
 <p><strong>COUNT</strong></p>
+</dd>
+<dd>
 <p>Pushes the number 1 if this is the first value of the data set, the
 number 2 if it is the second, and so on. This special value allows
 you to make calculations based on the position of the value within
 the data set. This function cannot be used in <strong>VDEF</strong> instructions.</p>
 </dd>
-<dt><strong><a name="time" class="item">Time</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_time">Time</a></strong><br />
+</dt>
+<dd>
+Time inside RRDtool is measured in seconds since the epoch. The
+epoch is defined to be <code>Thu&nbsp;Jan&nbsp;&nbsp;1&nbsp;00:00:00&nbsp;UTC&nbsp;1970</code>.
+</dd>
 <dd>
-<p>Time inside RRDtool is measured in seconds since the epoch. The
-epoch is defined to be <code>Thu&nbsp;Jan&nbsp;&nbsp;1&nbsp;00:00:00&nbsp;UTC&nbsp;1970</code>.</p>
 <p><strong>NOW</strong></p>
+</dd>
+<dd>
 <p>Pushes the current time on the stack.</p>
+</dd>
+<dd>
 <p><strong>TIME</strong></p>
+</dd>
+<dd>
 <p>Pushes the time the currently processed value was taken at onto the stack.</p>
+</dd>
+<dd>
 <p><strong>LTIME</strong></p>
+</dd>
+<dd>
 <p>Takes the time as defined by <strong>TIME</strong>, applies the time zone offset
 valid at that time including daylight saving time if your OS supports
 it, and pushes the result on the stack.  There is an elaborate example
 in the examples section below on how to use this.</p>
 </dd>
-<dt><strong><a name="processing_the_stack_directly" class="item">Processing the stack directly</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_processing_the_stack_directly">Processing the stack directly</a></strong><br />
+</dt>
+<dd>
+<strong>DUP, POP, EXC</strong>
+</dd>
 <dd>
-<p><strong>DUP, POP, EXC</strong></p>
 <p>Duplicate the top element, remove the top element, exchange the two
 top elements.</p>
+</dd>
+<dd>
 <p></p>
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
 <h1><a name="variables">VARIABLES</a></h1>
 <p>These operators work only on <strong>VDEF</strong> statements. Note that currently ONLY these work for <strong>VDEF</strong>.</p>
 <dl>
-<dt><strong><a name="maximum_minimum_average" class="item">MAXIMUM, MINIMUM, AVERAGE</a></strong></dt>
-
+<dt><strong><a name="item_maximum_2c_minimum_2c_average">MAXIMUM, MINIMUM, AVERAGE</a></strong><br />
+</dt>
+<dd>
+Return the corresponding value, MAXIMUM and MINIMUM also return
+the first occurrence of that value in the time component.
+</dd>
 <dd>
-<p>Return the corresponding value, MAXIMUM and MINIMUM also return
-the first occurrence of that value in the time component.</p>
 <p>Example: <code>VDEF:avg=mydata,AVERAGE</code></p>
 </dd>
-<dt><strong><a name="stdev" class="item">STDEV</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_stdev">STDEV</a></strong><br />
+</dt>
+<dd>
+Returns the standard deviation of the values.
+</dd>
 <dd>
-<p>Returns the standard deviation of the values.</p>
 <p>Example: <code>VDEF:stdev=mydata,STDEV</code></p>
 </dd>
-<dt><strong><a name="last_first" class="item">LAST, FIRST</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_last_2c_first">LAST, FIRST</a></strong><br />
+</dt>
 <dd>
-<p>Return the last/first value including its time.  The time for
+Return the last/first value including its time.  The time for
 FIRST is actually the start of the corresponding interval, whereas
-LAST returns the end of the corresponding interval.</p>
+LAST returns the end of the corresponding interval.
+</dd>
+<dd>
 <p>Example: <code>VDEF:first=mydata,FIRST</code></p>
 </dd>
-<dt><strong><a name="total" class="item">TOTAL</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_total">TOTAL</a></strong><br />
+</dt>
 <dd>
-<p>Returns the rate from each defined time slot multiplied with the
+Returns the rate from each defined time slot multiplied with the
 step size.  This can, for instance, return total bytes transfered
 when you have logged bytes per second. The time component returns
-the number of seconds.</p>
+the number of seconds.
+</dd>
+<dd>
 <p>Example: <code>VDEF:total=mydata,TOTAL</code></p>
 </dd>
-<dt><strong><a name="percent" class="item">PERCENT</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_percent_2c_percentnan">PERCENT, PERCENTNAN</a></strong><br />
+</dt>
 <dd>
-<p>This should follow a <strong>DEF</strong> or <strong>CDEF</strong> <em>vname</em>. The <em>vname</em> is popped,
+This should follow a <strong>DEF</strong> or <strong>CDEF</strong> <em>vname</em>. The <em>vname</em> is popped,
 another number is popped which is a certain percentage (0..100). The
 data set is then sorted and the value returned is chosen such that
 <em>percentage</em> percent of the values is lower or equal than the result.
+For PERCENTNAN <em>Unknown</em> values are ignored, but for PERCENT
 <em>Unknown</em> values are considered lower than any finite number for this
 purpose so if this operator returns an <em>unknown</em> you have quite a lot
 of them in your data.  <strong>Inf</strong>inite numbers are lesser, or more, than the
 finite numbers and are always more than the <em>Unknown</em> numbers.
-(NaN &lt; -INF &lt; finite values &lt; INF)</p>
-<p>Example: <code>VDEF:perc95=mydata,95,PERCENT</code></p>
+(NaN &lt; -INF &lt; finite values &lt; INF)
 </dd>
-<dt><strong><a name="lslslope_lslint_lslcorrel" class="item">LSLSLOPE, LSLINT, LSLCORREL</a></strong></dt>
-
 <dd>
-<p>Return the parameters for a <strong>L</strong>east <strong>S</strong>quares <strong>L</strong>ine <em>(y = mx +b)</em> 
+<p>Example: <code>VDEF:perc95=mydata,95,PERCENT</code>
+         <code>VDEF:percnan95=mydata,95,PERCENTNAN</code></p>
+</dd>
+<p></p>
+<dt><strong><a name="item_lslslope_2c_lslint_2c_lslcorrel">LSLSLOPE, LSLINT, LSLCORREL</a></strong><br />
+</dt>
+<dd>
+Return the parameters for a <strong>L</strong>east <strong>S</strong>quares <strong>L</strong>ine <em>(y = mx +b)</em> 
 which approximate the provided dataset.  LSLSLOPE is the slope <em>(m)</em> of
 the line related to the COUNT position of the data.  LSLINT is the 
 y-intercept <em>(b)</em>, which happens also to be the first data point on the 
 graph. LSLCORREL is the Correlation Coefficient (also know as Pearson's 
 Product Moment Correlation Coefficient).  It will range from 0 to +/-1 
-and represents the quality of fit for the approximation.</p>
+and represents the quality of fit for the approximation.
+</dd>
+<dd>
 <p>Example: <code>VDEF:slope=mydata,LSLSLOPE</code></p>
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index 5826c802905f04ead7cc9ca146b053335674c5e5..2e29112ee785be2deea4c29041d920a170e26a99 100644 (file)
@@ -185,6 +185,78 @@ source value is NAN the complete sliding window is affected. The TRENDNAN
 operation ignores all NAN-values in a sliding window and computes the 
 average of the remaining values.
 
+B<PREDICT, PREDICTSIGMA>
+
+Create a "sliding window" average/sigma of another data series, that also
+shifts the data series by given amounts of of time as well
+
+Usage - explicit stating shifts:
+CDEF:predict=<shift n>,...,<shift 1>,n,<window>,x,PREDICT
+CDEF:sigma=<shift n>,...,<shift 1>,n,<window>,x,PREDICTSIGMA
+
+Usage - shifts defined as a base shift and a number of time this is applied
+CDEF:predict=<shift multiplier>,-n,<window>,x,PREDICT
+CDEF:sigma=<shift multiplier>,-n,<window>,x,PREDICTSIGMA
+
+Example:
+CDEF:predict=172800,86400,2,1800,x,PREDICT
+
+This will create a half-hour (1800 second) sliding window average/sigma of x, that
+average is essentially computed as shown here:
+
+ +---!---!---!---!---!---!---!---!---!---!---!---!---!---!---!---!---!--->
+                                                                     now
+                                                  shift 1        t0
+                                         <----------------------->
+                               window
+                         <--------------->
+                                       shift 2
+                 <----------------------------------------------->
+       window
+ <--------------->
+                                                      shift 1        t1
+                                             <----------------------->
+                                   window
+                             <--------------->
+                                            shift 2
+                     <----------------------------------------------->
+           window
+     <--------------->
+
+ Value at sample (t0) will be the average between (t0-shift1-window) and (t0-shift1)
+                                      and between (t0-shift2-window) and (t0-shift2)
+ Value at sample (t1) will be the average between (t1-shift1-window) and (t1-shift1)
+                                      and between (t1-shift2-window) and (t1-shift2)
+
+
+The function is by design NAN-safe. 
+This also allows for extrapolation into the future (say a few days)
+- you may need to define the data series whit the optional start= parameter, so that 
+the source data series has enough data to provide prediction also at the beginning of a graph...
+
+Here an example, that will create a 10 day graph that also shows the 
+prediction 3 days into the future with its uncertainty value (as defined by avg+-4*sigma)
+This also shows if the prediction is exceeded at a certain point.
+
+rrdtool graph image.png --imgformat=PNG \
+ --start=-7days --end=+3days --width=1000 --height=200 --alt-autoscale-max \
+ DEF:value=value.rrd:value:AVERAGE:start=-14days \
+ LINE1:value#ff0000:value \
+ CDEF:predict=86400,-7,1800,value,PREDICT \
+ CDEF:sigma=86400,-7,1800,value,PREDICTSIGMA \
+ CDEF:upper=predict,sigma,3,*,+ \
+ CDEF:lower=predict,sigma,3,*,- \
+ LINE1:predict#00ff00:prediction \
+ LINE1:upper#0000ff:upper\ certainty\ limit \
+ LINE1:lower#0000ff:lower\ certainty\ limit \
+ CDEF:exceeds=value,UN,0,value,lower,upper,LIMIT,UN,IF \
+ TICK:exceeds#aa000080:1
+
+Note: Experience has shown that a factor between 3 and 5 to scale sigma is a good 
+discriminator to detect abnormal behaviour. This obviously depends also on the type 
+of data and how "noisy" the data series is.
+
+This prediction can only be used for short term extrapolations - say a few days into the future-
 
 =item Special values
 
@@ -286,12 +358,13 @@ the number of seconds.
 
 Example: C<VDEF:total=mydata,TOTAL>
 
-=item PERCENT
+=item PERCENT, PERCENTNAN
 
 This should follow a B<DEF> or B<CDEF> I<vname>. The I<vname> is popped,
 another number is popped which is a certain percentage (0..100). The
 data set is then sorted and the value returned is chosen such that
 I<percentage> percent of the values is lower or equal than the result.
+For PERCENTNAN I<Unknown> values are ignored, but for PERCENT
 I<Unknown> values are considered lower than any finite number for this
 purpose so if this operator returns an I<unknown> you have quite a lot
 of them in your data.  B<Inf>inite numbers are lesser, or more, than the
@@ -299,6 +372,7 @@ finite numbers and are always more than the I<Unknown> numbers.
 (NaN E<lt> -INF E<lt> finite values E<lt> INF)
 
 Example: C<VDEF:perc95=mydata,95,PERCENT>
+         C<VDEF:percnan95=mydata,95,PERCENTNAN>
 
 =item LSLSLOPE, LSLINT, LSLCORREL
 
index 3c55e87a2a6e3228f7daa885a1964b8dd0d3d708..327dc0d6629813faf8ab0f71d0e026160f6f20a6 100644 (file)
@@ -11,17 +11,17 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        If you have ever used a traditional HP calculator you already know R\bRP\bPN\bN
        (Reverse Polish Notation).  The idea behind R\bRP\bPN\bN is that you have a
-       stack and push your data onto this stack. Whenever you execute an
-       operation, it takes as many elements from the stack as needed. Pushing
-       is done implicitly, so whenever you specify a number or a variable, it
+       stack and push your data onto this stack. Whenever you execute an oper-
+       ation, it takes as many elements from the stack as needed. Pushing is
+       done implicitly, so whenever you specify a number or a variable, it
        gets pushed onto the stack automatically.
 
        At the end of the calculation there should be one and only one value
        left on the stack.  This is the outcome of the function and this is
-       what is put into the _\bv_\bn_\ba_\bm_\be.  For C\bCD\bDE\bEF\bF instructions, the stack is
-       processed for each data point on the graph. V\bVD\bDE\bEF\bF instructions work on
-       an entire data set in one run. Note, that currently V\bVD\bDE\bEF\bF instructions
-       only support a limited list of functions.
+       what is put into the _\bv_\bn_\ba_\bm_\be.  For C\bCD\bDE\bEF\bF instructions, the stack is pro-
+       cessed for each data point on the graph. V\bVD\bDE\bEF\bF instructions work on an
+       entire data set in one run. Note, that currently V\bVD\bDE\bEF\bF instructions only
+       support a limited list of functions.
 
        Example: "VDEF:maximum=mydata,MAXIMUM"
 
@@ -30,9 +30,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        Example: "CDEF:mydatabits=mydata,8,*"
 
-       This means:  push variable _\bm_\by_\bd_\ba_\bt_\ba, push the number 8, execute the
-       operator _\b*. The operator needs two elements and uses those to return
-       one value.  This value is then stored in _\bm_\by_\bd_\ba_\bt_\ba_\bb_\bi_\bt_\bs.  As you may have
+       This means:  push variable _\bm_\by_\bd_\ba_\bt_\ba, push the number 8, execute the oper-
+       ator _\b*. The operator needs two elements and uses those to return one
+       value.  This value is then stored in _\bm_\by_\bd_\ba_\bt_\ba_\bb_\bi_\bt_\bs.  As you may have
        guessed, this instruction means nothing more than _\bm_\by_\bd_\ba_\bt_\ba_\bb_\bi_\bt_\bs _\b= _\bm_\by_\bd_\ba_\bt_\ba _\b*
        _\b8.  The real power of R\bRP\bPN\bN lies in the fact that it is always clear in
        which order to process the input.  For expressions like "a = b + 3 * 5"
@@ -44,15 +44,15 @@ O\bOP\bPE\bER\bRA\bAT\bTO\bOR\bRS\bS
        Boolean operators
            L\bLT\bT,\b, L\bLE\bE,\b, G\bGT\bT,\b, G\bGE\bE,\b, E\bEQ\bQ,\b, N\bNE\bE
 
-           Pop two elements from the stack, compare them for the selected
-           condition and return 1 for true or 0 for false. Comparing an
-           _\bu_\bn_\bk_\bn_\bo_\bw_\bor an _\bi_\bn_\bf_\bi_\bn_\bi_\bt_\be value will always result in 0 (false).
+           Pop two elements from the stack, compare them for the selected con-
+           dition and return 1 for true or 0 for false. Comparing an _\bu_\bn_\bk_\bn_\bo_\bw_\bn
+           or an _\bi_\bn_\bf_\bi_\bn_\bi_\bt_\be value will always result in 0 (false).
 
            U\bUN\bN,\b, I\bIS\bSI\bIN\bNF\bF
 
-           Pop one element from the stack, compare this to _\bu_\bn_\bk_\bn_\bo_\bw_\bn
-           respectively to _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be _\bo_\br _\bn_\be_\bg_\ba_\bt_\bi_\bv_\be _\bi_\bn_\bf_\bi_\bn_\bi_\bt_\by. Returns 1 for true
-           or 0 for false.
+           Pop one element from the stack, compare this to _\bu_\bn_\bk_\bn_\bo_\bw_\bn respec-
+           tively to _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be _\bo_\br _\bn_\be_\bg_\ba_\bt_\bi_\bv_\be _\bi_\bn_\bf_\bi_\bn_\bi_\bt_\by. Returns 1 for true or 0
+           for false.
 
            I\bIF\bF
 
@@ -70,8 +70,8 @@ O\bOP\bPE\bER\bRA\bAT\bTO\bOR\bRS\bS
 
            Pops two elements from the stack and returns the smaller or larger,
            respectively.  Note that _\bi_\bn_\bf_\bi_\bn_\bi_\bt_\be is larger than anything else.  If
-           one of the input numbers is _\bu_\bn_\bk_\bn_\bo_\bw_\bn then the result of the
-           operation will be _\bu_\bn_\bk_\bn_\bo_\bw_\bn too.
+           one of the input numbers is _\bu_\bn_\bk_\bn_\bo_\bw_\bn then the result of the opera-
+           tion will be _\bu_\bn_\bk_\bn_\bo_\bw_\bn too.
 
            L\bLI\bIM\bMI\bIT\bT
 
@@ -102,8 +102,8 @@ O\bOP\bPE\bER\bRA\bAT\bTO\bOR\bRS\bS
 
            S\bSI\bIN\bN,\b, C\bCO\bOS\bS,\b, L\bLO\bOG\bG,\b, E\bEX\bXP\bP,\b, S\bSQ\bQR\bRT\bT
 
-           Sine and cosine (input in radians), log and exp (natural
-           logarithm), square root.
+           Sine and cosine (input in radians), log and exp (natural loga-
+           rithm), square root.
 
            A\bAT\bTA\bAN\bN
 
@@ -112,13 +112,12 @@ O\bOP\bPE\bER\bRA\bAT\bTO\bOR\bRS\bS
            A\bAT\bTA\bAN\bN2\b2
 
            Arctangent of y,x components (output in radians).  This pops one
-           element from the stack, the x (cosine) component, and then a
-           second, which is the y (sine) component.  It then pushes the
-           arctangent of their ratio, resolving the ambiguity between
-           quadrants.
+           element from the stack, the x (cosine) component, and then a sec-
+           ond, which is the y (sine) component.  It then pushes the arctan-
+           gent of their ratio, resolving the ambiguity between quadrants.
 
-           Example: "CDEF:angle=Y,X,ATAN2,RAD2DEG" will convert "X,Y"
-           components into an angle in degrees.
+           Example: "CDEF:angle=Y,X,ATAN2,RAD2DEG" will convert "X,Y" compo-
+           nents into an angle in degrees.
 
            F\bFL\bLO\bOO\bOR\bR,\b, C\bCE\bEI\bIL\bL
 
@@ -168,7 +167,6 @@ O\bOP\bPE\bER\bRA\bAT\bTO\bOR\bRS\bS
                                          delay      t2
                                     <--------------->
 
-
                 Value at sample (t0) will be the average between (t0-delay) and (t0)
                 Value at sample (t1) will be the average between (t1-delay) and (t1)
                 Value at sample (t2) will be the average between (t2-delay) and (t2)
@@ -178,6 +176,83 @@ O\bOP\bPE\bER\bRA\bAT\bTO\bOR\bRS\bS
            The TRENDNAN operation ignores all NAN-values in a sliding window
            and computes the average of the remaining values.
 
+           P\bPR\bRE\bED\bDI\bIC\bCT\bT,\b, P\bPR\bRE\bED\bDI\bIC\bCT\bTS\bSI\bIG\bGM\bMA\bA
+
+           Create a "sliding window" average/sigma of another data series,
+           that also shifts the data series by given amounts of of time as
+           well
+
+           Usage - explicit stating shifts: CDEF:predict=<shift n>,...,<shift
+           1>,n,<window>,x,PREDICT CDEF:sigma=<shift n>,...,<shift 1>,n,<win-
+           dow>,x,PREDICTSIGMA
+
+           Usage - shifts defined as a base shift and a number of time this is
+           applied CDEF:predict=<shift multiplier>,-n,<window>,x,PREDICT
+           CDEF:sigma=<shift multiplier>,-n,<window>,x,PREDICTSIGMA
+
+           Example: CDEF:predict=172800,86400,2,1800,x,PREDICT
+
+           This will create a half-hour (1800 second) sliding window aver-
+           age/sigma of x, that average is essentially computed as shown here:
+
+            +---!---!---!---!---!---!---!---!---!---!---!---!---!---!---!---!---!--->
+                                                                                now
+                                                             shift 1        t0
+                                                    <----------------------->
+                                          window
+                                    <--------------->
+                                                  shift 2
+                            <----------------------------------------------->
+                  window
+            <--------------->
+                                                                 shift 1        t1
+                                                        <----------------------->
+                                              window
+                                        <--------------->
+                                                       shift 2
+                                <----------------------------------------------->
+                      window
+                <--------------->
+
+            Value at sample (t0) will be the average between (t0-shift1-window) and (t0-shift1)
+                                                 and between (t0-shift2-window) and (t0-shift2)
+            Value at sample (t1) will be the average between (t1-shift1-window) and (t1-shift1)
+                                                 and between (t1-shift2-window) and (t1-shift2)
+
+           The function is by design NAN-safe.  This also allows for extrapo-
+           lation into the future (say a few days) - you may need to define
+           the data series whit the optional start= parameter, so that the
+           source data series has enough data to provide prediction also at
+           the beginning of a graph...
+
+           Here an example, that will create a 10 day graph that also shows
+           the prediction 3 days into the future with its uncertainty value
+           (as defined by avg+-4*sigma) This also shows if the prediction is
+           exceeded at a certain point.
+
+           rrdtool graph image.png --imgformat=PNG \
+            --start=-7days --end=+3days --width=1000 --height=200
+           --alt-autoscale-max \
+            DEF:value=value.rrd:value:AVERAGE:start=-14days \
+            LINE1:value#ff0000:value \
+            CDEF:predict=86400,-7,1800,value,PREDICT \
+            CDEF:sigma=86400,-7,1800,value,PREDICTSIGMA \
+            CDEF:upper=predict,sigma,3,*,+ \
+            CDEF:lower=predict,sigma,3,*,- \
+            LINE1:predict#00ff00:prediction \
+            LINE1:upper#0000ff:upper\ certainty\ limit \
+            LINE1:lower#0000ff:lower\ certainty\ limit \
+            CDEF:exceeds=value,UN,0,value,lower,upper,LIMIT,UN,IF \
+            TICK:exceeds#aa000080:1
+
+           Note: Experience has shown that a factor between 3 and 5 to scale
+           sigma is a good discriminator to detect abnormal behaviour. This
+           obviously depends also on the type of data and how "noisy" the data
+           series is.
+
+           This prediction can only be used for short term extrapolations -
+           say a few days into the future-
+
        Special values
            U\bUN\bNK\bKN\bN
 
@@ -193,8 +268,8 @@ O\bOP\bPE\bER\bRA\bAT\bTO\bOR\bRS\bS
 
            Pushes an _\bu_\bn_\bk_\bn_\bo_\bw_\bn value if this is the first value of a data set or
            otherwise the result of this C\bCD\bDE\bEF\bF at the previous time step. This
-           allows you to do calculations across the data.  This function
-           cannot be used in V\bVD\bDE\bEF\bF instructions.
+           allows you to do calculations across the data.  This function can-
+           not be used in V\bVD\bDE\bEF\bF instructions.
 
            P\bPR\bRE\bEV\bV(\b(v\bvn\bna\bam\bme\be)\b)
 
@@ -212,7 +287,7 @@ O\bOP\bPE\bER\bRA\bAT\bTO\bOR\bRS\bS
 
        Time
            Time inside RRDtool is measured in seconds since the epoch. The
-           epoch is defined to be "Thu Jan  1 00:00:00 UTC 1970".
+           epoch is defined to be "Thu Jan 1 00:00:00 UTC 1970".
 
            N\bNO\bOW\bW
 
@@ -226,9 +301,9 @@ O\bOP\bPE\bER\bRA\bAT\bTO\bOR\bRS\bS
            L\bLT\bTI\bIM\bME\bE
 
            Takes the time as defined by T\bTI\bIM\bME\bE, applies the time zone offset
-           valid at that time including daylight saving time if your OS
-           supports it, and pushes the result on the stack.  There is an
-           elaborate example in the examples section below on how to use this.
+           valid at that time including daylight saving time if your OS sup-
+           ports it, and pushes the result on the stack.  There is an elabo-
+           rate example in the examples section below on how to use this.
 
        Processing the stack directly
            D\bDU\bUP\bP,\b, P\bPO\bOP\bP,\b, E\bEX\bXC\bC
@@ -268,18 +343,20 @@ V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
 
            Example: "VDEF:total=mydata,TOTAL"
 
-       PERCENT
+       PERCENT, PERCENTNAN
            This should follow a D\bDE\bEF\bF or C\bCD\bDE\bEF\bF _\bv_\bn_\ba_\bm_\be. The _\bv_\bn_\ba_\bm_\be is popped,
            another number is popped which is a certain percentage (0..100).
            The data set is then sorted and the value returned is chosen such
            that _\bp_\be_\br_\bc_\be_\bn_\bt_\ba_\bg_\be percent of the values is lower or equal than the
-           result.  _\bU_\bn_\bk_\bn_\bo_\bw_\bn values are considered lower than any finite number
-           for this purpose so if this operator returns an _\bu_\bn_\bk_\bn_\bo_\bw_\bn you have
-           quite a lot of them in your data.  I\bIn\bnf\bfinite numbers are lesser, or
-           more, than the finite numbers and are always more than the _\bU_\bn_\bk_\bn_\bo_\bw_\bn
-           numbers.  (NaN < -INF < finite values < INF)
+           result.  For PERCENTNAN _\bU_\bn_\bk_\bn_\bo_\bw_\bn values are ignored, but for PERCENT
+           _\bU_\bn_\bk_\bn_\bo_\bw_\bn values are considered lower than any finite number for this
+           purpose so if this operator returns an _\bu_\bn_\bk_\bn_\bo_\bw_\bn you have quite a lot
+           of them in your data.  I\bIn\bnf\bfinite numbers are lesser, or more, than
+           the finite numbers and are always more than the _\bU_\bn_\bk_\bn_\bo_\bw_\bn numbers.
+           (NaN < -INF < finite values < INF)
 
            Example: "VDEF:perc95=mydata,95,PERCENT"
+                    "VDEF:percnan95=mydata,95,PERCENTNAN"
 
        LSLSLOPE, LSLINT, LSLCORREL
            Return the parameters for a L\bLeast S\bSquares L\bLine _\b(_\by _\b= _\bm_\bx _\b+_\bb_\b) which
@@ -288,8 +365,8 @@ V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
            y-intercept _\b(_\bb_\b), which happens also to be the first data point on
            the graph. LSLCORREL is the Correlation Coefficient (also know as
            Pearson's Product Moment Correlation Coefficient).  It will range
-           from 0 to +/-1 and represents the quality of fit for the
-           approximation.
+           from 0 to +/-1 and represents the quality of fit for the approxima-
+           tion.
 
            Example: "VDEF:slope=mydata,LSLSLOPE"
 
@@ -309,4 +386,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2009-02-21                   RRDGRAPH_RPN(1)
+1.3.99909060808                   2009-02-21                   RRDGRAPH_RPN(1)
index 50165e1abb631c5c7946c48ec34e3a034f73f47b..51f096651ccbe5093005c1747b0c2b965c2f7edb 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDINFO 1"
-.TH RRDINFO 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDINFO 1 "2009-04-20" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdinfo \- extract header information from an RRD
 .SH "SYNOPSIS"
 .IX Header "SYNOPSIS"
-\&\fBrrdtool\fR \fBinfo\fR \fIfilename.rrd\fR
+\&\fBrrdtool\fR \fBinfo\fR \fIfilename\fR
+[\fB\-\-daemon\fR\ \fIaddress\fR]
 .SH "DESCRIPTION"
 .IX Header "DESCRIPTION"
 The \fBinfo\fR function prints the header information from an \s-1RRD\s0 in
@@ -141,6 +143,19 @@ a parsing friendly format.
 .PP
 Check rrdcreate if you are uncertain about the meaning of the
 individual keys.
+.IP "\fIfilename\fR" 8
+.IX Item "filename"
+The name of the \fB\s-1RRD\s0\fR you want to examine.
+.IP "\fB\-\-daemon\fR \fIaddress\fR" 8
+.IX Item "--daemon address"
+Address of the rrdcached daemon. If specified, a \f(CW\*(C`flush\*(C'\fR command is sent
+to the server before reading the \s-1RRD\s0 files. This allows \fBrrdtool\fR to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
+.Sp
+.Vb 1
+\& rrdtool info \-\-daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+.Ve
 .SH "EXAMPLE"
 .IX Header "EXAMPLE"
 This is the output generated by running \fBinfo\fR on a simple \s-1RRD\s0 which
@@ -150,11 +165,12 @@ stands for \fI*UNKNOWN*\fR data. In the example it means that this \s-1RRD\s0
 has neither minimum nor maximum values defined for either of its
 data sources.
 .PP
-.Vb 10
+.Vb 25
 \& filename = "random.rrd"
 \& rrd_version = "0001"
 \& step = 300
 \& last_update = 955892996
+\& header_size = 2872
 \& ds[a].type = "GAUGE"
 \& ds[a].minimal_heartbeat = 600
 \& ds[a].min = NaN
@@ -176,9 +192,15 @@ data sources.
 \& rra[0].cdp_prep[1].value = nan
 \& rra[0].cdp_prep[1].unknown_datapoints = 0
 .Ve
-.IP "\fIfilename.rrd\fR" 8
-.IX Item "filename.rrd"
-The name of the \fB\s-1RRD\s0\fR you want to examine.
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ info\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 Tobias Oetiker <tobi@oetiker.ch>
index 3c2e933a008a9f740e308baf32416938904c0dbb..1b973e87785ba33357eb5ea46c020bc47d0f1e4a 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdinfo</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#synopsis">SYNOPSIS</a></li>
        <li><a href="#description">DESCRIPTION</a></li>
        <li><a href="#example">EXAMPLE</a></li>
+       <li><a href="#environment_variables">ENVIRONMENT VARIABLES</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -38,7 +31,8 @@
 </p>
 <hr />
 <h1><a name="synopsis">SYNOPSIS</a></h1>
-<p><strong>rrdtool</strong> <strong>info</strong> <em>filename.rrd</em></p>
+<p><strong>rrdtool</strong> <strong>info</strong> <em>filename</em>
+[<strong>--daemon</strong>&nbsp;<em>address</em>]</p>
 <p>
 </p>
 <hr />
 a parsing friendly format.</p>
 <p>Check <a href="././rrdcreate.html">the rrdcreate manpage</a> if you are uncertain about the meaning of the
 individual keys.</p>
+<dl>
+<dt><strong><a name="item_filename"><em>filename</em></a></strong><br />
+</dt>
+<dd>
+The name of the <strong>RRD</strong> you want to examine.
+</dd>
+<p></p>
+<dt><strong><a name="item__2d_2ddaemon_address"><strong>--daemon</strong> <em>address</em></a></strong><br />
+</dt>
+<dd>
+Address of the <a href="././rrdcached.html">the rrdcached manpage</a> daemon. If specified, a <code>flush</code> command is sent
+to the server before reading the RRD files. This allows <strong>rrdtool</strong> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the <strong>-l</strong> option in the <a href="././rrdcached.html">the rrdcached manpage</a> manual.
+</dd>
+<dd>
+<pre>
+ rrdtool info --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd</pre>
+</dd>
+<p></p></dl>
 <p>
 </p>
 <hr />
@@ -62,6 +76,7 @@ data sources.</p>
  rrd_version = &quot;0001&quot;
  step = 300
  last_update = 955892996
+ header_size = 2872
  ds[a].type = &quot;GAUGE&quot;
  ds[a].minimal_heartbeat = 600
  ds[a].min = NaN
@@ -82,13 +97,21 @@ data sources.</p>
  rra[0].cdp_prep[0].unknown_datapoints = 0
  rra[0].cdp_prep[1].value = nan
  rra[0].cdp_prep[1].unknown_datapoints = 0</pre>
+<p>
+</p>
+<hr />
+<h1><a name="environment_variables">ENVIRONMENT VARIABLES</a></h1>
+<p>The following environment variables may be used to change the behavior of
+<code>rrdtoolinfo</code>:</p>
 <dl>
-<dt><strong><a name="filename_rrd" class="item"><em>filename.rrd</em></a></strong></dt>
-
+<dt><strong><a name="item_rrdcached_address"><strong>RRDCACHED_ADDRESS</strong></a></strong><br />
+</dt>
 <dd>
-<p>The name of the <strong>RRD</strong> you want to examine.</p>
+If this environment variable is set it will have the same effect as specifying
+the <code>--daemon</code> option on the command line. If both are present, the command
+line argument takes precedence.
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index e83d8d6138279af4e4fbd9eb4b38b494357a3e9e..d147756c90be9e873c81983cd835b063f14dfa26 100644 (file)
@@ -4,7 +4,8 @@ rrdinfo - extract header information from an RRD
 
 =head1 SYNOPSIS
 
-B<rrdtool> B<info> I<filename.rrd>
+B<rrdtool> B<info> I<filename>
+S<[B<--daemon> I<address>]>
 
 =head1 DESCRIPTION
 
@@ -14,6 +15,23 @@ a parsing friendly format.
 Check L<rrdcreate> if you are uncertain about the meaning of the
 individual keys.
 
+=over 8
+
+=item I<filename>
+
+The name of the B<RRD> you want to examine.
+
+=item B<--daemon> I<address>
+
+Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
+to the server before reading the RRD files. This allows B<rrdtool> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
+
+ rrdtool info --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+
+=back
+
 =head1 EXAMPLE
 
 This is the output generated by running B<info> on a simple RRD which
@@ -27,6 +45,7 @@ data sources.
  rrd_version = "0001"
  step = 300
  last_update = 955892996
+ header_size = 2872
  ds[a].type = "GAUGE"
  ds[a].minimal_heartbeat = 600
  ds[a].min = NaN
@@ -48,11 +67,18 @@ data sources.
  rra[0].cdp_prep[1].value = nan
  rra[0].cdp_prep[1].unknown_datapoints = 0
 
-=over 8
+=head1 ENVIRONMENT VARIABLES
 
-=item I<filename.rrd>
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>info>:
 
-The name of the B<RRD> you want to examine.
+=over 4
+
+=item B<RRDCACHED_ADDRESS>
+
+If this environment variable is set it will have the same effect as specifying
+the C<--daemon> option on the command line. If both are present, the command
+line argument takes precedence.
 
 =back
 
index ddea07f00365f7b83b3150cbd592247f12aef833..62314d38044ab988ede42ee5683906bf6d251bed 100644 (file)
@@ -6,26 +6,39 @@ N\bNA\bAM\bME\bE
        rrdinfo - extract header information from an RRD
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
-       r\brr\brd\bdt\bto\boo\bol\bl i\bin\bnf\bfo\bo _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\br_\br_\bd
+       r\brr\brd\bdt\bto\boo\bol\bl i\bin\bnf\bfo\bo _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [-\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs]
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-       The i\bin\bnf\bfo\bo function prints the header information from an RRD in a
-       parsing friendly format.
+       The i\bin\bnf\bfo\bo function prints the header information from an RRD in a pars-
+       ing friendly format.
 
-       Check rrdcreate if you are uncertain about the meaning of the
-       individual keys.
+       Check rrdcreate if you are uncertain about the meaning of the individ-
+       ual keys.
+
+       _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+               The name of the R\bRR\bRD\bD you want to examine.
+
+       -\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs
+               Address of the rrdcached daemon. If specified, a "flush" com-
+               mand is sent to the server before reading the RRD files. This
+               allows r\brr\brd\bdt\bto\boo\bol\bl to return fresh data even if the daemon is con-
+               figured to cache values for a long time.  For a list of
+               accepted formats, see the -\b-l\bl option in the rrdcached manual.
+
+                rrdtool info --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
 
 E\bEX\bXA\bAM\bMP\bPL\bLE\bE
-       This is the output generated by running i\bin\bnf\bfo\bo on a simple RRD which
-       contains two data sources and one RRA. Note that the number after the
+       This is the output generated by running i\bin\bnf\bfo\bo on a simple RRD which con-
+       tains two data sources and one RRA. Note that the number after the
        _\bl_\ba_\bs_\bt_\b__\bu_\bp_\bd_\ba_\bt_\be keyword is in seconds since 1970. The string N\bNa\baN\bN stands for
-       _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* data. In the example it means that this RRD has neither
-       minimum nor maximum values defined for either of its data sources.
+       _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* data. In the example it means that this RRD has neither mini-
+       mum nor maximum values defined for either of its data sources.
 
         filename = "random.rrd"
         rrd_version = "0001"
         step = 300
         last_update = 955892996
+        header_size = 2872
         ds[a].type = "GAUGE"
         ds[a].minimal_heartbeat = 600
         ds[a].min = NaN
@@ -47,12 +60,18 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bE
         rra[0].cdp_prep[1].value = nan
         rra[0].cdp_prep[1].unknown_datapoints = 0
 
-       _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\br_\br_\bd
-               The name of the R\bRR\bRD\bD you want to examine.
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+       The following environment variables may be used to change the behavior
+       of "rrdtool info":
+
+       R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
+           If this environment variable is set it will have the same effect as
+           specifying the "--daemon" option on the command line. If both are
+           present, the command line argument takes precedence.
 
 A\bAU\bUT\bTH\bHO\bOR\bR
        Tobias Oetiker <tobi@oetiker.ch>
 
 
 
-1.3.8                             2008-03-15                        RRDINFO(1)
+1.3.99909060808                   2009-04-20                        RRDINFO(1)
index 799b4b7f426e38e756a98f62e13060ca53b2b2fb..7f4fc97ccaeae9091164002e6e56da8b29498bec 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDLAST 1"
-.TH RRDLAST 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDLAST 1 "2008-09-25" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdlast \- Return the date of the last data sample in an RRD
 .SH "SYNOPSIS"
 .IX Header "SYNOPSIS"
 \&\fBrrdtool\fR \fBlast\fR \fIfilename\fR
+[\fB\-\-daemon\fR\ \fIaddress\fR]
 .SH "DESCRIPTION"
 .IX Header "DESCRIPTION"
 The \fBlast\fR function returns the \s-1UNIX\s0 timestamp of the most recent
@@ -141,6 +143,25 @@ update of the \s-1RRD\s0.
 .IP "\fIfilename\fR" 8
 .IX Item "filename"
 The name of the \fB\s-1RRD\s0\fR that contains the data.
+.IP "\fB\-\-daemon\fR \fIaddress\fR" 8
+.IX Item "--daemon address"
+Address of the rrdcached daemon. If specified, a \f(CW\*(C`flush\*(C'\fR command is sent
+to the server before reading the \s-1RRD\s0 files. This allows \fBrrdtool\fR to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
+.Sp
+.Vb 1
+\& rrdtool last \-\-daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+.Ve
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ last\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 Russ Wright <rwwright@home.com>
index 2e7e5724ad639c84e1b68d4aeb22e4003bd42ae6..c804d5b5b4851a13a1af6f680073348aeba7aec6 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdlast</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#name">NAME</a></li>
        <li><a href="#synopsis">SYNOPSIS</a></li>
        <li><a href="#description">DESCRIPTION</a></li>
+       <li><a href="#environment_variables">ENVIRONMENT VARIABLES</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -37,7 +30,8 @@
 </p>
 <hr />
 <h1><a name="synopsis">SYNOPSIS</a></h1>
-<p><strong>rrdtool</strong> <strong>last</strong> <em>filename</em></p>
+<p><strong>rrdtool</strong> <strong>last</strong> <em>filename</em>
+[<strong>--daemon</strong>&nbsp;<em>address</em>]</p>
 <p>
 </p>
 <hr />
 <p>The <strong>last</strong> function returns the UNIX timestamp of the most recent
 update of the RRD.</p>
 <dl>
-<dt><strong><a name="filename" class="item"><em>filename</em></a></strong></dt>
-
+<dt><strong><a name="item_filename"><em>filename</em></a></strong><br />
+</dt>
+<dd>
+The name of the <strong>RRD</strong> that contains the data.
+</dd>
+<p></p>
+<dt><strong><a name="item__2d_2ddaemon_address"><strong>--daemon</strong> <em>address</em></a></strong><br />
+</dt>
+<dd>
+Address of the <a href="././rrdcached.html">the rrdcached manpage</a> daemon. If specified, a <code>flush</code> command is sent
+to the server before reading the RRD files. This allows <strong>rrdtool</strong> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the <strong>-l</strong> option in the <a href="././rrdcached.html">the rrdcached manpage</a> manual.
+</dd>
+<dd>
+<pre>
+ rrdtool last --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd</pre>
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="environment_variables">ENVIRONMENT VARIABLES</a></h1>
+<p>The following environment variables may be used to change the behavior of
+<code>rrdtoollast</code>:</p>
+<dl>
+<dt><strong><a name="item_rrdcached_address"><strong>RRDCACHED_ADDRESS</strong></a></strong><br />
+</dt>
 <dd>
-<p>The name of the <strong>RRD</strong> that contains the data.</p>
+If this environment variable is set it will have the same effect as specifying
+the <code>--daemon</code> option on the command line. If both are present, the command
+line argument takes precedence.
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index a3eb7feedf10289cafa5ee7dfb579200de94dd94..a8bf7574bb461cc922551341aaf40699818e60da 100644 (file)
@@ -5,6 +5,7 @@ rrdlast - Return the date of the last data sample in an RRD
 =head1 SYNOPSIS
 
 B<rrdtool> B<last> I<filename>
+S<[B<--daemon> I<address>]>
 
 =head1 DESCRIPTION
 
@@ -17,6 +18,30 @@ update of the RRD.
 
 The name of the B<RRD> that contains the data.
 
+=item B<--daemon> I<address>
+
+Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
+to the server before reading the RRD files. This allows B<rrdtool> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
+
+ rrdtool last --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+
+=back
+
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>last>:
+
+=over 4
+
+=item B<RRDCACHED_ADDRESS>
+
+If this environment variable is set it will have the same effect as specifying
+the C<--daemon> option on the command line. If both are present, the command
+line argument takes precedence.
+
 =back
 
 =head1 AUTHOR
index 50255549f5c2d45ed8668ecbf34da0cfba209903..c80862bb9c11a7ac93bae0754f8b9eeecfe410ea 100644 (file)
@@ -6,7 +6,7 @@ N\bNA\bAM\bME\bE
        rrdlast - Return the date of the last data sample in an RRD
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
-       r\brr\brd\bdt\bto\boo\bol\bl l\bla\bas\bst\bt _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+       r\brr\brd\bdt\bto\boo\bol\bl l\bla\bas\bst\bt _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [-\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs]
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        The l\bla\bas\bst\bt function returns the UNIX timestamp of the most recent update
@@ -15,9 +15,27 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
                The name of the R\bRR\bRD\bD that contains the data.
 
+       -\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs
+               Address of the rrdcached daemon. If specified, a "flush" com-
+               mand is sent to the server before reading the RRD files. This
+               allows r\brr\brd\bdt\bto\boo\bol\bl to return fresh data even if the daemon is con-
+               figured to cache values for a long time.  For a list of
+               accepted formats, see the -\b-l\bl option in the rrdcached manual.
+
+                rrdtool last --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+       The following environment variables may be used to change the behavior
+       of "rrdtool last":
+
+       R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
+           If this environment variable is set it will have the same effect as
+           specifying the "--daemon" option on the command line. If both are
+           present, the command line argument takes precedence.
+
 A\bAU\bUT\bTH\bHO\bOR\bR
        Russ Wright <rwwright@home.com>
 
 
 
-1.3.8                             2008-03-15                        RRDLAST(1)
+1.3.99909060808                   2008-09-25                        RRDLAST(1)
index dc8f59c5ab7cb7624d937567021180442f44701e..63756b335e63d4e7e05b6a76aa5e1c9ff8865e2f 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDLASTUPDATE 1"
-.TH RRDLASTUPDATE 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDLASTUPDATE 1 "2008-09-25" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdlastupdate \- Return the most recent update to an RRD
 .SH "SYNOPSIS"
 .IX Header "SYNOPSIS"
 \&\fBrrdtool\fR \fBlastupdate\fR \fIfilename\fR
+[\fB\-\-daemon\fR\ \fIaddress\fR]
 .SH "DESCRIPTION"
 .IX Header "DESCRIPTION"
 The \fBlastupdate\fR function returns the \s-1UNIX\s0 timestamp and the 
@@ -141,6 +143,25 @@ value stored for each datum in the most recent update of an \s-1RRD\s0.
 .IP "\fIfilename\fR" 8
 .IX Item "filename"
 The name of the \fB\s-1RRD\s0\fR that contains the data.
+.IP "\fB\-\-daemon\fR \fIaddress\fR" 8
+.IX Item "--daemon address"
+Address of the rrdcached daemon. If specified, a \f(CW\*(C`flush\*(C'\fR command is sent
+to the server before reading the \s-1RRD\s0 files. This allows \fBrrdtool\fR to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
+.Sp
+.Vb 1
+\& rrdtool lastupdate \-\-daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+.Ve
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ lastupdate\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 Andy Riebs <andy.riebs@hp.com>
index b68c19a2b2c0ab43da43131f510d2f76c9d0525e..112420979afc80b3c7227c5a1c4d769d7ebcc7ad 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdlastupdate</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#name">NAME</a></li>
        <li><a href="#synopsis">SYNOPSIS</a></li>
        <li><a href="#description">DESCRIPTION</a></li>
+       <li><a href="#environment_variables">ENVIRONMENT VARIABLES</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -37,7 +30,8 @@
 </p>
 <hr />
 <h1><a name="synopsis">SYNOPSIS</a></h1>
-<p><strong>rrdtool</strong> <strong>lastupdate</strong> <em>filename</em></p>
+<p><strong>rrdtool</strong> <strong>lastupdate</strong> <em>filename</em>
+[<strong>--daemon</strong>&nbsp;<em>address</em>]</p>
 <p>
 </p>
 <hr />
 <p>The <strong>lastupdate</strong> function returns the UNIX timestamp and the 
 value stored for each datum in the most recent update of an RRD.</p>
 <dl>
-<dt><strong><a name="filename" class="item"><em>filename</em></a></strong></dt>
-
+<dt><strong><a name="item_filename"><em>filename</em></a></strong><br />
+</dt>
+<dd>
+The name of the <strong>RRD</strong> that contains the data.
+</dd>
+<p></p>
+<dt><strong><a name="item__2d_2ddaemon_address"><strong>--daemon</strong> <em>address</em></a></strong><br />
+</dt>
+<dd>
+Address of the <a href="././rrdcached.html">the rrdcached manpage</a> daemon. If specified, a <code>flush</code> command is sent
+to the server before reading the RRD files. This allows <strong>rrdtool</strong> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the <strong>-l</strong> option in the <a href="././rrdcached.html">the rrdcached manpage</a> manual.
+</dd>
+<dd>
+<pre>
+ rrdtool lastupdate --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd</pre>
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="environment_variables">ENVIRONMENT VARIABLES</a></h1>
+<p>The following environment variables may be used to change the behavior of
+<code>rrdtoollastupdate</code>:</p>
+<dl>
+<dt><strong><a name="item_rrdcached_address"><strong>RRDCACHED_ADDRESS</strong></a></strong><br />
+</dt>
 <dd>
-<p>The name of the <strong>RRD</strong> that contains the data.</p>
+If this environment variable is set it will have the same effect as specifying
+the <code>--daemon</code> option on the command line. If both are present, the command
+line argument takes precedence.
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index 37013cf7ef21617473cc1e9efabbbd6f71f36eec..ecdff8da9ade95d5ff7bbcfec55301215a6a350b 100644 (file)
@@ -5,6 +5,7 @@ rrdlastupdate - Return the most recent update to an RRD
 =head1 SYNOPSIS
 
 B<rrdtool> B<lastupdate> I<filename>
+S<[B<--daemon> I<address>]>
 
 =head1 DESCRIPTION
 
@@ -17,11 +18,35 @@ value stored for each datum in the most recent update of an RRD.
 
 The name of the B<RRD> that contains the data.
 
+=item B<--daemon> I<address>
+
+Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
+to the server before reading the RRD files. This allows B<rrdtool> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
+
+ rrdtool lastupdate --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+
+=back
+
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>lastupdate>:
+
+=over 4
+
+=item B<RRDCACHED_ADDRESS>
+
+If this environment variable is set it will have the same effect as specifying
+the C<--daemon> option on the command line. If both are present, the command
+line argument takes precedence.
+
 =back
 
 =head1 AUTHOR
 
-Andy Riebs <andy.riebs@hp.com>
+Andy Riebs E<lt>andy.riebs@hp.comE<gt>
 
 
 
index d1f2387a82a0e051696610edc23aa44b4f007b2d..1e0c9448b5d60e054ed51eda74e1243564fd0e0b 100644 (file)
@@ -6,7 +6,7 @@ N\bNA\bAM\bME\bE
        rrdlastupdate - Return the most recent update to an RRD
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
-       r\brr\brd\bdt\bto\boo\bol\bl l\bla\bas\bst\btu\bup\bpd\bda\bat\bte\be _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+       r\brr\brd\bdt\bto\boo\bol\bl l\bla\bas\bst\btu\bup\bpd\bda\bat\bte\be _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [-\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs]
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        The l\bla\bas\bst\btu\bup\bpd\bda\bat\bte\be function returns the UNIX timestamp and the value stored
@@ -15,9 +15,27 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
                The name of the R\bRR\bRD\bD that contains the data.
 
+       -\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs
+               Address of the rrdcached daemon. If specified, a "flush" com-
+               mand is sent to the server before reading the RRD files. This
+               allows r\brr\brd\bdt\bto\boo\bol\bl to return fresh data even if the daemon is con-
+               figured to cache values for a long time.  For a list of
+               accepted formats, see the -\b-l\bl option in the rrdcached manual.
+
+                rrdtool lastupdate --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
+
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+       The following environment variables may be used to change the behavior
+       of "rrdtool lastupdate":
+
+       R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
+           If this environment variable is set it will have the same effect as
+           specifying the "--daemon" option on the command line. If both are
+           present, the command line argument takes precedence.
+
 A\bAU\bUT\bTH\bHO\bOR\bR
        Andy Riebs <andy.riebs@hp.com>
 
 
 
-1.3.8                             2008-03-15                  RRDLASTUPDATE(1)
+1.3.99909060808                   2008-09-25                  RRDLASTUPDATE(1)
diff --git a/doc/rrdlua.pod b/doc/rrdlua.pod
new file mode 100644 (file)
index 0000000..7d234fe
--- /dev/null
@@ -0,0 +1,204 @@
+=head1 NAME
+
+RRDLua -  Lua binding for RRDTool
+
+=head1 SYNOPSIS
+
+  require 'rrd'
+  rrd.create(...)
+  rrd.dump(...)
+  rrd.fetch(...)
+  rrd.first(...)
+  rrd.graph(...)
+  rrd.graphv(...)
+  rrd.info(...)
+  rrd.last(...)
+  rrd.resize(...)
+  rrd.restore(...)
+  rrd.tune(...)
+  rrd.update(...)
+  rrd.updatev(...)
+
+=head1 DESCRIPTION
+
+=head2 Calling Sequence
+
+This module accesses RRDtool functionality directly from within Lua.
+The arguments to the functions listed in the SYNOPSIS are explained in
+the regular RRDtool documentation. The command-line call
+
+    rrdtool update mydemo.rrd --template in:out N:12:13
+
+gets turned into
+
+    rrd.update ("mydemo.rrd", "--template", "in:out", "N:12:13")
+
+Note that --template=in:out is also valid.
+
+=head2 Using with Lua 5.1
+
+Start your programs with:
+
+    ---------------------------------------------------------------
+    package.cpath = '/usr/local/rrdtool-1.3.2/lib/lua/5.1/?.so;' ..
+                    package.cpath
+    require 'rrd'
+    ---------------------------------------------------------------
+   
+OBS: If you configured with --enable-lua-site-install, you don't need
+to set package.cpath like above.
+
+=head2 Using with Lua 5.0
+
+The Lua binding for RRDtool needs the Lua module compat-5.1 to work with
+Lua 5.0. Some Linux distros, like Ubuntu gutsy and hardy, have it already
+integrated in Lua 5.0 -dev packages, so you just have to require it:
+
+    require 'compat-5.1'
+
+For other platforms, the compat-5.1 module that comes with this binding
+will be installed for you in the same dir where RRDtool was installed,
+under the subdir .../lib/lua/5.0. In this case, you must tell your Lua
+programs where to find it by changing the Lua var LUA_PATH:
+
+    -- compat-5.1.lua is only necessary for Lua 5.0 ----------------
+    -- try only compat-5.1 installed with RRDtool package
+    local original_LUA_PATH = LUA_PATH
+    LUA_PATH = '/usr/local/rrdtool-1.3.2/lib/lua/5.0/?.lua'
+    require 'compat-5.1'
+    LUA_PATH = original_LUA_PATH
+    original_LUA_PATH = nil
+    --- end of code to require compat-5.1 ---------------------------
+    
+    Now we can require the rrd module in the same way we did for 5.1 above:
+    
+    ---------------------------------------------------------------
+    package.cpath = '/usr/local/rrdtool-1.3.2/lib/lua/5.0/?.so;' ..
+                    package.cpath
+    require 'rrd'
+    ---------------------------------------------------------------
+
+=head2 Error Handling
+
+The Lua RRDTool module functions will abort your program with a stack
+traceback when they can not make sense out of the arguments you fed them.
+However, you can capture and handle the errors yourself, instead of just
+letting the program abort, by calling the module functions through Lua
+protected calls - 'pcall' or 'xpcall'.
+
+     Ex: program t.lua
+      
+     --- compat-5.1.lua is only necessary for Lua 5.0 ----------------
+     -- uncomment below if your distro has not compat-5.1
+     -- original_LUA_PATH = LUA_PATH
+     -- try only compat-5.1.lua installed with RRDtool package
+     -- LUA_PATH = '/usr/local/rrdtool-1.3.2/lib/lua/5.0/?.lua'
+      
+     -- here we use a protected call to require compat-5.1
+     local r = pcall(require, 'compat-5.1')
+     if not r then
+       print('** could not load compat-5.1.lua')
+       os.exit(1)
+     end
+     
+     -- uncomment below if your distro has not compat-5.1
+     -- LUA_PATH = original_LUA_PATH
+     -- original_LUA_PATH = nil
+     --- end of code to require compat-5.1 ---------------------------
+     
+     -- If the Lua RRDTool module was installed together with RRDTool,
+     -- in /usr/local/rrdtool-1.3.2/lib/lua/5.0, package.cpath must be
+     -- set accordingly so that 'require' can find the module:
+    
+     package.cpath = '/usr/local/rrdtool-1.3.2/lib/lua/5.0/?.so;' ..
+                     package.cpath
+      
+     local rrd = require 'rrd'
+     rrd.update ("mydemo.rrd","N:12:13")
+     
+If we execute the program above we'll get:
+
+     $ lua t.lua
+      
+     lua: t.lua:27: opening 'mydemo.rrd': No such file or directory
+     stack traceback:
+           [C]: in function `update'
+           t.lua:27: in main chunk
+           [C]: ?
+
+=head2 Return Values
+
+The functions rrd.first, rrd.last, rrd.graph, rrd.info and rrd.fetch
+return their findings.
+
+B<rrd.first> returns a single INTEGER representing the timestamp of the
+first data sample in an RRA within an RRD file. Example returning the
+first timestamp of the third RRA (index 2):
+
+     local firstdate = rrd.first('example.rrd', '--rraindex', 2)
+
+B<rrd.last> returns a single INTEGER representing the last update time.
+
+     local lastupdate = rrd.last('example.rrd')
+
+B<rrd.graph> returns the x-size and y-size of the created image and a table
+with the results of the PRINT arguments.
+
+     local xsize, ysize, averages = rrd.graph ...
+     print(string.format("Image size: %dx%d", xsize, ysize)
+     print("Averages: ", table.concat(averages, ', '))
+
+B<rrd.info> returns a table where the keys and the values represent property
+names and property values of the RRD.
+
+     local info = rrd.info("test.rrd")
+     for key, value in pairs(info) do
+       print(key, ' = ', value)
+     end
+
+B<rrd.graphv> takes the same parameters as rrd.graph but it returns a table
+only. The table returned contains meta information about the graph, like
+its size as well as the position of the graph area on the image. When
+called with and empty filename, the contents of the graph will be returned
+in the table as well (key 'image').
+
+B<rrd.updatev> also returns a table. The keys of the table are strings
+formed by the concatenation of timestamp, RRA index and data source name
+for each consolidated data point (CDP) written to disk as a result of the
+current update call. The key values are CDP values.
+
+B<rrd.fetch> is the most complex of the pack regarding return values. It
+returns 5 values: the initial timestamp, the step, two parallel arrays
+containing the data source names and their data points respectively, and
+the final timestamp.
+
+     --require compat-5.1 if necessary
+    
+     package.cpath = '/usr/local/rrdtool-1.3.2/lib/lua/5.0/?.so;' ..
+                     package.cpath
+    
+     local rrd = require "rrd"
+     local first, last = rrd.first("test.rrd"), rrd.last("test.rrd")
+     local start, step, names, data =
+       rrd.fetch("test.rrd", "--start", first, "--end", last, "AVERAGE")
+     io.write(string.format("Start:       %s (%d)\n",
+                            os.date("%c", start),start))
+     io.write("Step size:   ", step, " seconds\n")
+     io.write("DS names:    ", table.concat(names, ', '), "\n")
+     io.write("Data points: ", #data[1], "\n")
+     io.write("Data:\n")
+     for i,dp in ipairs(data) do
+       io.write(os.date("%t", start), " (", start, "): ")
+       start = start + step
+       for j,v in ipairs(dp) do
+         io.write(v, " ")
+       end
+     io.write("\n")
+     end
+
+=head1 AUTHOR
+
+Fidelis Assis E<lt>fidelis@pobox.comE<gt>
+
+
+
index 638c736f80d8ee4668aa27429b9920350d8fc282..c8ae15eccebc0d1fccaf07787d8a97314d6bdc5a 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDRESIZE 1"
-.TH RRDRESIZE 1 "2009-02-21" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDRESIZE 1 "2009-02-21" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdresize \- alters the size of an RRA and creates a new .rrd file
 .SH "SYNOPSIS"
index 474040f8abf3edb57d8369981d9ac4ccf0632d1d..fedaf98fe73d92f5ad6a40f624834a78c3ec8bb2 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdresize</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#notes">NOTES</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
 <p>The <strong>resize</strong> function is used to modify the number of rows in
 an <strong>RRA</strong>.</p>
 <dl>
-<dt><strong><a name="filename" class="item"><em>filename</em></a></strong></dt>
-
+<dt><strong><a name="item_filename"><em>filename</em></a></strong><br />
+</dt>
 <dd>
-<p>the name of the <strong>RRD</strong> you want to alter.</p>
+the name of the <strong>RRD</strong> you want to alter.
 </dd>
-<dt><strong><a name="rra_num" class="item"><em>rra-num</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rra_2dnum"><em>rra-num</em></a></strong><br />
+</dt>
 <dd>
-<p>the <strong>RRA</strong> you want to alter. You can find the number using <strong>rrdtool info</strong>.</p>
+the <strong>RRA</strong> you want to alter. You can find the number using <strong>rrdtool info</strong>.
 </dd>
-<dt><strong><a name="grow" class="item"><strong>GROW</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_grow"><strong>GROW</strong></a></strong><br />
+</dt>
 <dd>
-<p>used if you want to add extra rows to an RRA. The extra rows will be inserted
-as the rows that are oldest.</p>
+used if you want to add extra rows to an RRA. The extra rows will be inserted
+as the rows that are oldest.
 </dd>
-<dt><strong><a name="shrink" class="item"><strong>SHRINK</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_shrink"><strong>SHRINK</strong></a></strong><br />
+</dt>
 <dd>
-<p>used if you want to remove rows from an RRA. The rows that will be removed
-are the oldest rows.</p>
+used if you want to remove rows from an RRA. The rows that will be removed
+are the oldest rows.
 </dd>
-<dt><strong><a name="rows" class="item"><em>rows</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rows"><em>rows</em></a></strong><br />
+</dt>
 <dd>
-<p>the number of rows you want to add or remove.</p>
+the number of rows you want to add or remove.
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index 174f57cdc79b8f3b96674675ee1a3c44e7c4ed1d..29566aeb3268735c8892b327ba38ee269ada1799 100644 (file)
@@ -14,8 +14,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
                the name of the R\bRR\bRD\bD you want to alter.
 
-       _\br_\br_\ba_\b-_\bn_\bu_\bm the R\bRR\bRA\bA you want to alter. You can find the number using
-               r\brr\brd\bdt\bto\boo\bol\bl i\bin\bnf\bfo\bo.
+       _\br_\br_\ba_\b-_\bn_\bu_\bm the R\bRR\bRA\bA you want to alter. You can find the number using r\brr\brd\bd-\b-
+               t\bto\boo\bol\bl i\bin\bnf\bfo\bo.
 
        G\bGR\bRO\bOW\bW    used if you want to add extra rows to an RRA. The extra rows
                will be inserted as the rows that are oldest.
@@ -41,4 +41,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2009-02-21                      RRDRESIZE(1)
+1.3.99909060808                   2009-02-21                      RRDRESIZE(1)
index cb089796b8661e19e282c34bc85c2b908d604b1d..95c5513187d83188f77172a1421c1e3958f335dd 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDRESTORE 1"
-.TH RRDRESTORE 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDRESTORE 1 "2008-03-15" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdrestore \- Restore the contents of an RRD from its XML dump format
 .SH "SYNOPSIS"
index 17d331e532236d44d07a1119e862b255ed72535e..18f647401d0c05bc4f6faad77a49939f04129559 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdrestore</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#description">DESCRIPTION</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
 <p>The <strong>restore</strong> function reads the XML representation of an RRD and converts
 it to the native <strong>RRD</strong> format.</p>
 <dl>
-<dt><strong><a name="filename_xml" class="item"><em>filename.xml</em></a></strong></dt>
-
+<dt><strong><a name="item_filename_2exml"><em>filename.xml</em></a></strong><br />
+</dt>
 <dd>
-<p>The name of the <strong>XML</strong> file you want to restore.</p>
+The name of the <strong>XML</strong> file you want to restore.
 </dd>
-<dt><strong><a name="filename_rrd" class="item"><em>filename.rrd</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_filename_2errd"><em>filename.rrd</em></a></strong><br />
+</dt>
 <dd>
-<p>The name of the <strong>RRD</strong> to restore.</p>
+The name of the <strong>RRD</strong> to restore.
 </dd>
-<dt><strong><a name="range_check_r" class="item"><strong>--range-check</strong>|<strong>-r</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2drange_2dcheck_7c_2dr"><strong>--range-check</strong>|<strong>-r</strong></a></strong><br />
+</dt>
 <dd>
-<p>Make sure the values in the RRAs do not exceed the limits defined for
-the various data sources.</p>
+Make sure the values in the RRAs do not exceed the limits defined for
+the various data sources.
 </dd>
-<dt><strong><a name="force_overwrite_f" class="item"><strong>--force-overwrite</strong>|<strong>-f</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dforce_2doverwrite_7c_2df"><strong>--force-overwrite</strong>|<strong>-f</strong></a></strong><br />
+</dt>
 <dd>
-<p>Allows <strong>RRDtool</strong> to overwrite the destination <strong>RRD</strong>.</p>
+Allows <strong>RRDtool</strong> to overwrite the destination <strong>RRD</strong>.
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index 51c55e088d8e6b2525f6d5752648c21b69a7da86..4e644cc7694af7528c27493bcfcbe3f05a0c7d77 100644 (file)
@@ -9,8 +9,8 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
        r\brr\brd\bdt\bto\boo\bol\bl r\bre\bes\bst\bto\bor\bre\be _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\bx_\bm_\bl _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\br_\br_\bd [-\b--\b-r\bra\ban\bng\bge\be-\b-c\bch\bhe\bec\bck\bk|-\b-r\br]
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-       The r\bre\bes\bst\bto\bor\bre\be function reads the XML representation of an RRD and
-       converts it to the native R\bRR\bRD\bD format.
+       The r\bre\bes\bst\bto\bor\bre\be function reads the XML representation of an RRD and con-
+       verts it to the native R\bRR\bRD\bD format.
 
        _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b._\bx_\bm_\bl
                The name of the X\bXM\bML\bL file you want to restore.
@@ -30,4 +30,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2008-03-15                     RRDRESTORE(1)
+1.3.99909060808                   2008-03-15                     RRDRESTORE(1)
index f0a028f778f53b6466a627fa03d874579a3eb59e..4d846c6d74b91c6cc2e62c70a9564941bc1abe52 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDTHREADS 1"
-.TH RRDTHREADS 1 "2008-06-08" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDTHREADS 1 "2008-06-08" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdthreads \- Provisions for linking the RRD library to use in multi\-threaded programs
 .SH "SYNOPSIS"
@@ -138,7 +139,7 @@ precautions, as the \s-1RRD\s0 library in its original form was not
 thread-safe at all. This document describes requirements and pitfalls
 on the way to use the multi-threaded version of librrd in your own
 programs. It also gives hints for future \s-1RRD\s0 development to keep the
-library thread-safe.
+library thread\-safe.
 .PP
 Currently only some \s-1RRD\s0 operations are implemented in a thread-safe
 way. They all end in the usual "\f(CW\*(C`_r\*(C'\fR" suffix.
@@ -152,10 +153,10 @@ linking)
 Use the "\f(CW\*(C`_r\*(C'\fR" functions instead of the normal API-functions
 .IP "\(bu" 4
 Do not use any at-style time specifications. Parsing of such time
-specifications is terribly non-thread-safe.
+specifications is terribly non\-thread\-safe.
 .IP "\(bu" 4
 Never use non *\f(CW\*(C`_r\*(C'\fR functions unless it is explicitly documented that
-the function is tread-safe.
+the function is tread\-safe.
 .IP "\(bu" 4
 Every thread \s-1SHOULD\s0 call \f(CW\*(C`rrd_get_context()\*(C'\fR before its first call to
 any \f(CW\*(C`librrd_th\*(C'\fR function in order to set up thread specific data. This
@@ -165,12 +166,12 @@ with a \s-1SIGSEGV\s0 in a low-memory situation.
 .IP "\(bu" 4
 Always call \f(CW\*(C`rrd_error_clear()\*(C'\fR before any call to the
 library. Otherwise the call might fail due to some earlier error.
-.SS "\s-1NOTES\s0 \s-1FOR\s0 \s-1RRD\s0 \s-1CONTRIBUTORS\s0"
+.Sh "\s-1NOTES\s0 \s-1FOR\s0 \s-1RRD\s0 \s-1CONTRIBUTORS\s0"
 .IX Subsection "NOTES FOR RRD CONTRIBUTORS"
 Some precautions must be followed when developing \s-1RRD\s0 from now on:
 .IP "\(bu" 4
 Only use thread-safe functions in library code. Many often used libc
-functions aren't thread-safe. Take care in the following
+functions aren't thread\-safe. Take care in the following
 situations or when using the following library functions:
 .RS 4
 .IP "\(bu" 4
@@ -178,7 +179,7 @@ Direct calls to \f(CW\*(C`strerror()\*(C'\fR must be avoided: use \f(CW\*(C`rrd_
 instead, it provides a per-thread error message.
 .IP "\(bu" 4
 The \f(CW\*(C`getpw*\*(C'\fR, \f(CW\*(C`getgr*\*(C'\fR, \f(CW\*(C`gethost*\*(C'\fR function families (and some more
-\&\f(CW\*(C`get*\*(C'\fR functions) are not thread-safe: use the *\f(CW\*(C`_r\*(C'\fR variants
+\&\f(CW\*(C`get*\*(C'\fR functions) are not thread\-safe: use the *\f(CW\*(C`_r\*(C'\fR variants
 .IP "\(bu" 4
 Time functions: \f(CW\*(C`asctime\*(C'\fR, \f(CW\*(C`ctime\*(C'\fR, \f(CW\*(C`gmtime\*(C'\fR, \f(CW\*(C`localtime\*(C'\fR: use
 *\f(CW\*(C`_r\*(C'\fR variants
@@ -196,7 +197,7 @@ A header file named \fIrrd_is_thread_safe.h\fR is provided
 that works with the \s-1GNU\s0 C\-preprocessor to \*(L"poison\*(R" some of the most
 common non-thread-safe functions using the \f(CW\*(C`#pragma GCC poison\*(C'\fR
 directive. Just include this header in source files you want to keep
-thread-safe.
+thread\-safe.
 .IP "\(bu" 4
 Do not introduce global variables!
 .Sp
@@ -216,9 +217,9 @@ taking all options as function parameters. You may provide argc and
 Do not use the \f(CW\*(C`rrd_parsetime\*(C'\fR function!
 .Sp
 It uses lots of global variables. You may use it in functions not designed
-to be thread-safe, like in functions wrapping the \f(CW\*(C`_r\*(C'\fR version of some
+to be thread\-safe, like in functions wrapping the \f(CW\*(C`_r\*(C'\fR version of some
 operation (e.g., \f(CW\*(C`rrd_create\*(C'\fR, but not in \f(CW\*(C`rrd_create_r\*(C'\fR)
-.SS "\s-1CURRENTLY\s0 \s-1IMPLEMENTED\s0 \s-1THREAD\s0 \s-1SAFE\s0 \s-1FUNCTIONS\s0"
+.Sh "\s-1CURRENTLY\s0 \s-1IMPLEMENTED\s0 \s-1THREAD\s0 \s-1SAFE\s0 \s-1FUNCTIONS\s0"
 .IX Subsection "CURRENTLY IMPLEMENTED THREAD SAFE FUNCTIONS"
 Currently there exist thread-safe variants of \f(CW\*(C`rrd_update\*(C'\fR,
 \&\f(CW\*(C`rrd_create\*(C'\fR, \f(CW\*(C`rrd_dump\*(C'\fR, \f(CW\*(C`rrd_info\*(C'\fR, \f(CW\*(C`rrd_last\*(C'\fR, and \f(CW\*(C`rrd_fetch\*(C'\fR.
index 36b365081ffe4b9e30d8fff8f386575c9830d352..7375bc8e247d9f602a75b766f51afc0f9b663ed7 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdthreads</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
 
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -50,102 +42,98 @@ on the way to use the multi-threaded version of librrd in your own
 programs. It also gives hints for future RRD development to keep the
 library thread-safe.</p>
 <p>Currently only some RRD operations are implemented in a thread-safe
-way. They all end in the usual &quot;<code>_r</code>&quot; suffix.</p>
+way. They all end in the usual ``<code>_r</code>'' suffix.</p>
 <p>
 </p>
 <hr />
 <h1><a name="description">DESCRIPTION</a></h1>
 <p>In order to use librrd in multi-threaded programs you must:</p>
 <ul>
-<li>
-<p>Link with <em class="file">librrd_th</em> instead of <em class="file">librrd</em> (use <code>-lrrd_th</code> when
-linking)</p>
-</li>
-<li>
-<p>Use the &quot;<code>_r</code>&quot; functions instead of the normal API-functions</p>
-</li>
-<li>
-<p>Do not use any at-style time specifications. Parsing of such time
-specifications is terribly non-thread-safe.</p>
-</li>
-<li>
-<p>Never use non *<code>_r</code> functions unless it is explicitly documented that
-the function is tread-safe.</p>
-</li>
-<li>
-<p>Every thread SHOULD call <code>rrd_get_context()</code> before its first call to
+<li></li>
+Link with <em>librrd_th</em> instead of <em>librrd</em> (use <code>-lrrd_th</code> when
+linking)
+<p></p>
+<li></li>
+Use the ``<code>_r</code>'' functions instead of the normal API-functions
+<p></p>
+<li></li>
+Do not use any at-style time specifications. Parsing of such time
+specifications is terribly non-thread-safe.
+<p></p>
+<li></li>
+Never use non *<code>_r</code> functions unless it is explicitly documented that
+the function is tread-safe.
+<p></p>
+<li></li>
+Every thread SHOULD call <code>rrd_get_context()</code> before its first call to
 any <code>librrd_th</code> function in order to set up thread specific data. This
 is not strictly required, but it is the only way to test if memory
 allocation can be done by this function. Otherwise the program may die
-with a SIGSEGV in a low-memory situation.</p>
-</li>
-<li>
-<p>Always call <code>rrd_error_clear()</code> before any call to the
-library. Otherwise the call might fail due to some earlier error.</p>
-</li>
-</ul>
+with a SIGSEGV in a low-memory situation.
+<p></p>
+<li></li>
+Always call <code>rrd_error_clear()</code> before any call to the
+library. Otherwise the call might fail due to some earlier error.
+<p></p></ul>
 <p>
 </p>
 <h2><a name="notes_for_rrd_contributors">NOTES FOR RRD CONTRIBUTORS</a></h2>
 <p>Some precautions must be followed when developing RRD from now on:</p>
 <ul>
-<li>
-<p>Only use thread-safe functions in library code. Many often used libc
+<li></li>
+Only use thread-safe functions in library code. Many often used libc
 functions aren't thread-safe. Take care in the following
-situations or when using the following library functions:</p>
+situations or when using the following library functions:
 <ul>
-<li>
-<p>Direct calls to <code>strerror()</code> must be avoided: use <code>rrd_strerror()</code>
-instead, it provides a per-thread error message.</p>
-</li>
-<li>
-<p>The <code>getpw*</code>, <code>getgr*</code>, <code>gethost*</code> function families (and some more
-<code>get*</code> functions) are not thread-safe: use the *<code>_r</code> variants</p>
-</li>
-<li>
-<p>Time functions: <code>asctime</code>, <code>ctime</code>, <code>gmtime</code>, <code>localtime</code>: use
-*<code>_r</code> variants</p>
-</li>
-<li>
-<p><code>strtok</code>: use <code>strtok_r</code></p>
-</li>
-<li>
-<p><code>tmpnam</code>: use <code>tmpnam_r</code></p>
-</li>
-<li>
-<p>Many others (lookup documentation)</p>
-</li>
-</ul>
-</li>
-<li>
-<p>A header file named <em class="file">rrd_is_thread_safe.h</em> is provided
-that works with the GNU C-preprocessor to &quot;poison&quot; some of the most
+<li></li>
+Direct calls to <code>strerror()</code> must be avoided: use <code>rrd_strerror()</code>
+instead, it provides a per-thread error message.
+<p></p>
+<li></li>
+The <code>getpw*</code>, <code>getgr*</code>, <code>gethost*</code> function families (and some more
+<code>get*</code> functions) are not thread-safe: use the *<code>_r</code> variants
+<p></p>
+<li></li>
+Time functions: <code>asctime</code>, <code>ctime</code>, <code>gmtime</code>, <code>localtime</code>: use
+*<code>_r</code> variants
+<p></p>
+<li></li>
+<code>strtok</code>: use <code>strtok_r</code>
+<p></p>
+<li></li>
+<code>tmpnam</code>: use <code>tmpnam_r</code>
+<p></p>
+<li></li>
+Many others (lookup documentation)
+<p></p></ul>
+<li></li>
+A header file named <em>rrd_is_thread_safe.h</em> is provided
+that works with the GNU C-preprocessor to ``poison'' some of the most
 common non-thread-safe functions using the <code>#pragma GCC poison</code>
 directive. Just include this header in source files you want to keep
-thread-safe.</p>
-</li>
-<li>
-<p>Do not introduce global variables!</p>
+thread-safe.
+<p></p>
+<li></li>
+Do not introduce global variables!
 <p>If you really, really have to use a global variable you may add a new
-field to the <code>rrd_context</code> structure and modify <em class="file">rrd_error.c</em>,
-<em class="file">rrd_thread_safe.c</em> and <em class="file">rrd_non_thread_safe.c</em></p>
-</li>
-<li>
-<p>Do not use <code>getopt</code> or <code>getopt_long</code> in *<code>_r</code> (neither directly nor
-indirectly).</p>
+field to the <code>rrd_context</code> structure and modify <em>rrd_error.c</em>,
+<em>rrd_thread_safe.c</em> and <em>rrd_non_thread_safe.c</em></p>
+<p></p>
+<li></li>
+Do not use <code>getopt</code> or <code>getopt_long</code> in *<code>_r</code> (neither directly nor
+indirectly).
 <p><code>getopt</code> uses global variables and behaves badly in a multi-threaded
 application when called concurrently. Instead provide a *_r function
 taking all options as function parameters. You may provide argc and
 **argv arguments for variable length argument lists. See
 <code>rrd_update_r</code> as an example.</p>
-</li>
-<li>
-<p>Do not use the <code>rrd_parsetime</code> function!</p>
+<p></p>
+<li></li>
+Do not use the <code>rrd_parsetime</code> function!
 <p>It uses lots of global variables. You may use it in functions not designed
 to be thread-safe, like in functions wrapping the <code>_r</code> version of some
 operation (e.g., <code>rrd_create</code>, but not in <code>rrd_create_r</code>)</p>
-</li>
-</ul>
+<p></p></ul>
 <p>
 </p>
 <h2><a name="currently_implemented_thread_safe_functions">CURRENTLY IMPLEMENTED THREAD SAFE FUNCTIONS</a></h2>
index 678f4dfab64e92941c44ec1a843e38d1b3caa99a..21ed7927095c35df76f18ebdd053e4f11c3e2b2f 100644 (file)
@@ -7,12 +7,11 @@ N\bNA\bAM\bME\bE
        multi-threaded programs
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
-       Using librrd in multi-threaded programs requires some extra
-       precautions, as the RRD library in its original form was not thread-
-       safe at all. This document describes requirements and pitfalls on the
-       way to use the multi-threaded version of librrd in your own programs.
-       It also gives hints for future RRD development to keep the library
-       thread-safe.
+       Using librrd in multi-threaded programs requires some extra precau-
+       tions, as the RRD library in its original form was not thread-safe at
+       all. This document describes requirements and pitfalls on the way to
+       use the multi-threaded version of librrd in your own programs. It also
+       gives hints for future RRD development to keep the library thread-safe.
 
        Currently only some RRD operations are implemented in a thread-safe
        way. They all end in the usual ""_r"" suffix.
@@ -39,20 +38,20 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        ·   Always call "rrd_error_clear()" before any call to the library.
            Otherwise the call might fail due to some earlier error.
 
-   N\bNO\bOT\bTE\bES\bS F\bFO\bOR\bR R\bRR\bRD\bD C\bCO\bON\bNT\bTR\bRI\bIB\bBU\bUT\bTO\bOR\bRS\bS
+       N\bNO\bOT\bTE\bES\bS F\bFO\bOR\bR R\bRR\bRD\bD C\bCO\bON\bNT\bTR\bRI\bIB\bBU\bUT\bTO\bOR\bRS\bS
+
        Some precautions must be followed when developing RRD from now on:
 
        ·   Only use thread-safe functions in library code. Many often used
-           libc functions aren't thread-safe. Take care in the following
-           situations or when using the following library functions:
+           libc functions aren't thread-safe. Take care in the following situ-
+           ations or when using the following library functions:
 
-           ·   Direct calls to "strerror()" must be avoided: use
-               "rrd_strerror()" instead, it provides a per-thread error
-               message.
+           ·   Direct calls to "strerror()" must be avoided: use "rrd_str-
+               error()" instead, it provides a per-thread error message.
 
            ·   The "getpw*", "getgr*", "gethost*" function families (and some
-               more "get*" functions) are not thread-safe: use the *"_r"
-               variants
+               more "get*" functions) are not thread-safe: use the *"_r" vari-
+               ants
 
            ·   Time functions: "asctime", "ctime", "gmtime", "localtime": use
                *"_r" variants
@@ -66,8 +65,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        ·   A header file named _\br_\br_\bd_\b__\bi_\bs_\b__\bt_\bh_\br_\be_\ba_\bd_\b__\bs_\ba_\bf_\be_\b._\bh is provided that works
            with the GNU C-preprocessor to "poison" some of the most common
            non-thread-safe functions using the "#pragma GCC poison" directive.
-           Just include this header in source files you want to keep thread-
-           safe.
+           Just include this header in source files you want to keep
+           thread-safe.
 
        ·   Do not introduce global variables!
 
@@ -88,16 +87,17 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
            It uses lots of global variables. You may use it in functions not
            designed to be thread-safe, like in functions wrapping the "_r"
-           version of some operation (e.g., "rrd_create", but not in
-           "rrd_create_r")
+           version of some operation (e.g., "rrd_create", but not in "rrd_cre-
+           ate_r")
+
+       C\bCU\bUR\bRR\bRE\bEN\bNT\bTL\bLY\bY I\bIM\bMP\bPL\bLE\bEM\bME\bEN\bNT\bTE\bED\bD T\bTH\bHR\bRE\bEA\bAD\bD S\bSA\bAF\bFE\bE F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
 
-   C\bCU\bUR\bRR\bRE\bEN\bNT\bTL\bLY\bY I\bIM\bMP\bPL\bLE\bEM\bME\bEN\bNT\bTE\bED\bD T\bTH\bHR\bRE\bEA\bAD\bD S\bSA\bAF\bFE\bE F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
-       Currently there exist thread-safe variants of "rrd_update",
-       "rrd_create", "rrd_dump", "rrd_info", "rrd_last", and "rrd_fetch".
+       Currently there exist thread-safe variants of "rrd_update", "rrd_cre-
+       ate", "rrd_dump", "rrd_info", "rrd_last", and "rrd_fetch".
 
 A\bAU\bUT\bTH\bHO\bOR\bR
        Peter Stamfest <peter@stamfest.at>
 
 
 
-1.3.8                             2008-06-08                     RRDTHREADS(1)
+1.3.99909060808                   2008-06-08                     RRDTHREADS(1)
index baa71dfe532ec0b842e53e66af7de9f1c30a80a9..e336c2ffa74c6c56b157c98b8a3207ab6f94d4f8 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDTOOL 1"
-.TH RRDTOOL 1 "2008-12-22" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDTOOL 1 "2009-05-26" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdtool \- Round Robin Database Tool
 .SH "SYNOPSIS"
@@ -136,7 +137,7 @@ rrdtool \- Round Robin Database Tool
 \&\fBrrdtool\fR \fB\-\fR [workdir]| \fIfunction\fR
 .SH "DESCRIPTION"
 .IX Header "DESCRIPTION"
-.SS "\s-1OVERVIEW\s0"
+.Sh "\s-1OVERVIEW\s0"
 .IX Subsection "OVERVIEW"
 It is pretty easy to gather status information from all sorts of
 things, ranging from the temperature in your office to the number of
@@ -155,7 +156,7 @@ detailed description of how to use the individual functions of
 .PP
 For an introduction to the usage of RRDtool make sure you consult the
 rrdtutorial.
-.SS "\s-1FUNCTIONS\s0"
+.Sh "\s-1FUNCTIONS\s0"
 .IX Subsection "FUNCTIONS"
 While the man pages talk of command line switches you have to set in
 order to make \fBRRDtool\fR work it is important to note that
@@ -204,12 +205,15 @@ Get information about an \s-1RRD\s0. Check rrdinfo.
 Change the size of individual RRAs. This is dangerous! Check rrdresize.
 .IP "\fBxport\fR" 8
 .IX Item "xport"
-Export data retrieved from one or several RRDs. Check rrdxport
+Export data retrieved from one or several RRDs. Check rrdxport.
+.IP "\fBflushcached\fR" 8
+.IX Item "flushcached"
+Flush the values for a specific \s-1RRD\s0 file from memory. Check rrdflushcached.
 .IP "\fBrrdcgi\fR" 8
 .IX Item "rrdcgi"
 This is a standalone tool for producing \s-1RRD\s0 graphs on the fly. Check
 rrdcgi.
-.SS "\s-1HOW\s0 \s-1DOES\s0 \s-1RRDTOOL\s0 \s-1WORK\s0?"
+.Sh "\s-1HOW\s0 \s-1DOES\s0 \s-1RRDTOOL\s0 \s-1WORK\s0?"
 .IX Subsection "HOW DOES RRDTOOL WORK?"
 .IP "Data Acquisition" 8
 .IX Item "Data Acquisition"
@@ -293,12 +297,12 @@ by Jake Brutlag
 \&\fBRRDtool\fR provides the building blocks for near real-time aberrant
 behavior detection. These components include:
 .RS 8
-.IP "\(bu" 4
+.IP "*" 4
 An algorithm for predicting the value of a time series one time step
 into the future.
-.IP "\(bu" 4
+.IP "*" 4
 A measure of deviation between predicted and observed values.
-.IP "\(bu" 4
+.IP "*" 4
 A mechanism to decide if and when an observed value or sequence of
 observed values is \fItoo deviant\fR from the predicted value(s).
 .RE
@@ -343,7 +347,7 @@ initiate real-time alerts.
 .Sp
 For a detailed description on how to set this up, see rrdcreate.
 .RE
-.SS "\s-1REMOTE\s0 \s-1CONTROL\s0"
+.Sh "\s-1REMOTE\s0 \s-1CONTROL\s0"
 .IX Subsection "REMOTE CONTROL"
 When you start \fBRRDtool\fR with the command line option '\fB\-\fR' it waits
 for input via standard input (\s-1STDIN\s0). With this feature you can
@@ -366,9 +370,9 @@ unless something really serious happens. If
 a \fBworkdir\fR is specified and the \s-1UID\s0 is 0, RRDtool will do a chroot to that
 workdir. If the \s-1UID\s0 is not 0, RRDtool only changes the current directory to
 \&\fBworkdir\fR.
-.SS "\s-1RRD\s0 Server"
+.Sh "\s-1RRD\s0 Server"
 .IX Subsection "RRD Server"
-If you want to create a RRD-Server, you must choose a \s-1TCP/IP\s0 Service
+If you want to create a RRD\-Server, you must choose a \s-1TCP/IP\s0 Service
 number and add them to \fI/etc/services\fR like this:
 .PP
 .Vb 1
@@ -395,9 +399,16 @@ sockets, tools like netcat, or in a quick interactive test by using
 .PP
 \&\fB\s-1NOTE:\s0\fR that there is no authentication with this feature! Do not setup
 such a port unless you are sure what you are doing.
+.SH "RRDCACHED, THE CACHING DAEMON"
+.IX Header "RRDCACHED, THE CACHING DAEMON"
+For very big setups, updating thousands of \s-1RRD\s0 files often becomes a serious \s-1IO\s0
+problem. If you run into such problems, you might want to take a look at
+rrdcached, a caching daemon for RRDTool which may help you lessen the
+stress on your disks.
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
-rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast, rrdxport
+rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast, rrdxport,
+rrdflushcached, rrdcached
 .SH "BUGS"
 .IX Header "BUGS"
 Bugs? Features!
index abe72c807e62bbb30a4aab787575f96bea646780..bd284e74f7304ea9c862f6f638f5756b601b22ed 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdtool</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
                <li><a href="#rrd_server">RRD Server</a></li>
        </ul>
 
+       <li><a href="#rrdcached__the_caching_daemon">RRDCACHED, THE CACHING DAEMON</a></li>
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#bugs">BUGS</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -83,85 +76,103 @@ further down. There is also a number of language bindings
 for RRDtool which allow you to use it directly from Perl, python, Tcl,
 PHP, etc.</p>
 <dl>
-<dt><strong><a name="create" class="item"><strong>create</strong></a></strong></dt>
-
+<dt><strong><a name="item_create"><strong>create</strong></a></strong><br />
+</dt>
 <dd>
-<p>Set up a new Round Robin Database (RRD). Check <a href="././rrdcreate.html">the rrdcreate manpage</a>.</p>
+Set up a new Round Robin Database (RRD). Check <a href="././rrdcreate.html">the rrdcreate manpage</a>.
 </dd>
-<dt><strong><a name="update" class="item"><strong>update</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_update"><strong>update</strong></a></strong><br />
+</dt>
 <dd>
-<p>Store new data values into an RRD. Check <a href="././rrdupdate.html">the rrdupdate manpage</a>.</p>
+Store new data values into an RRD. Check <a href="././rrdupdate.html">the rrdupdate manpage</a>.
 </dd>
-<dt><strong><a name="updatev" class="item"><strong>updatev</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_updatev"><strong>updatev</strong></a></strong><br />
+</dt>
 <dd>
-<p>Operationally equivalent to <strong>update</strong> except for output. Check <a href="././rrdupdate.html">the rrdupdate manpage</a>.</p>
+Operationally equivalent to <strong>update</strong> except for output. Check <a href="././rrdupdate.html">the rrdupdate manpage</a>.
 </dd>
-<dt><strong><a name="graph" class="item"><strong>graph</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_graph"><strong>graph</strong></a></strong><br />
+</dt>
 <dd>
-<p>Create a graph from data stored in one or several RRDs. Apart from
-generating graphs, data can also be extracted to stdout. Check <a href="././rrdgraph.html">the rrdgraph manpage</a>.</p>
+Create a graph from data stored in one or several RRDs. Apart from
+generating graphs, data can also be extracted to stdout. Check <a href="././rrdgraph.html">the rrdgraph manpage</a>.
 </dd>
-<dt><strong><a name="dump" class="item"><strong>dump</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_dump"><strong>dump</strong></a></strong><br />
+</dt>
 <dd>
-<p>Dump the contents of an RRD in plain ASCII. In connection with restore
+Dump the contents of an RRD in plain ASCII. In connection with restore
 you can use this to move an RRD from one computer architecture to
-another.  Check <a href="././rrddump.html">the rrddump manpage</a>.</p>
+another.  Check <a href="././rrddump.html">the rrddump manpage</a>.
 </dd>
-<dt><strong><a name="restore" class="item"><strong>restore</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_restore"><strong>restore</strong></a></strong><br />
+</dt>
 <dd>
-<p>Restore an RRD in XML format to a binary RRD. Check <a href="././rrdrestore.html">the rrdrestore manpage</a></p>
+Restore an RRD in XML format to a binary RRD. Check <a href="././rrdrestore.html">the rrdrestore manpage</a>
 </dd>
-<dt><strong><a name="fetch" class="item"><strong>fetch</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_fetch"><strong>fetch</strong></a></strong><br />
+</dt>
 <dd>
-<p>Get data for a certain time period from a RRD. The graph function
-uses fetch to retrieve its data from an RRD. Check <a href="././rrdfetch.html">the rrdfetch manpage</a>.</p>
+Get data for a certain time period from a RRD. The graph function
+uses fetch to retrieve its data from an RRD. Check <a href="././rrdfetch.html">the rrdfetch manpage</a>.
 </dd>
-<dt><strong><a name="tune" class="item"><strong>tune</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_tune"><strong>tune</strong></a></strong><br />
+</dt>
 <dd>
-<p>Alter setup of an RRD. Check <a href="././rrdtune.html">the rrdtune manpage</a>.</p>
+Alter setup of an RRD. Check <a href="././rrdtune.html">the rrdtune manpage</a>.
 </dd>
-<dt><strong><a name="last" class="item"><strong>last</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_last"><strong>last</strong></a></strong><br />
+</dt>
 <dd>
-<p>Find the last update time of an RRD. Check <a href="././rrdlast.html">the rrdlast manpage</a>.</p>
+Find the last update time of an RRD. Check <a href="././rrdlast.html">the rrdlast manpage</a>.
 </dd>
-<dt><strong><a name="info" class="item"><strong>info</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_info"><strong>info</strong></a></strong><br />
+</dt>
 <dd>
-<p>Get information about an RRD. Check <a href="././rrdinfo.html">the rrdinfo manpage</a>.</p>
+Get information about an RRD. Check <a href="././rrdinfo.html">the rrdinfo manpage</a>.
 </dd>
-<dt><strong><a name="rrdresize" class="item"><strong>rrdresize</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rrdresize"><strong>rrdresize</strong></a></strong><br />
+</dt>
 <dd>
-<p>Change the size of individual RRAs. This is dangerous! Check <a href="././rrdresize.html">the rrdresize manpage</a>.</p>
+Change the size of individual RRAs. This is dangerous! Check <a href="././rrdresize.html">the rrdresize manpage</a>.
 </dd>
-<dt><strong><a name="xport" class="item"><strong>xport</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_xport"><strong>xport</strong></a></strong><br />
+</dt>
 <dd>
-<p>Export data retrieved from one or several RRDs. Check <a href="././rrdxport.html">the rrdxport manpage</a></p>
+Export data retrieved from one or several RRDs. Check <a href="././rrdxport.html">the rrdxport manpage</a>.
 </dd>
-<dt><strong><a name="rrdcgi" class="item"><strong>rrdcgi</strong></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_flushcached"><strong>flushcached</strong></a></strong><br />
+</dt>
 <dd>
-<p>This is a standalone tool for producing RRD graphs on the fly. Check
-<a href="././rrdcgi.html">the rrdcgi manpage</a>.</p>
+Flush the values for a specific RRD file from memory. Check <a href="././rrdflushcached.html">the rrdflushcached manpage</a>.
 </dd>
-</dl>
+<p></p>
+<dt><strong><a name="item_rrdcgi"><strong>rrdcgi</strong></a></strong><br />
+</dt>
+<dd>
+This is a standalone tool for producing RRD graphs on the fly. Check
+<a href="././rrdcgi.html">the rrdcgi manpage</a>.
+</dd>
+<p></p></dl>
 <p>
 </p>
 <h2><a name="how_does_rrdtool_work">HOW DOES RRDTOOL WORK?</a></h2>
 <dl>
-<dt><strong><a name="data_acquisition" class="item">Data Acquisition</a></strong></dt>
-
+<dt><strong><a name="item_data_acquisition">Data Acquisition</a></strong><br />
+</dt>
 <dd>
-<p>When monitoring the state of a system, it is convenient to have the
+When monitoring the state of a system, it is convenient to have the
 data available at a constant time interval. Unfortunately, you may not
 always be able to fetch data at exactly the time you want
 to. Therefore <strong>RRDtool</strong> lets you update the logfile at any time you
@@ -169,12 +180,13 @@ want. It will automatically interpolate the value of the data-source
 (<strong>DS</strong>) at the latest official time-slot (interval) and write this
 interpolated value to the log. The original value you have supplied is
 stored as well and is also taken into account when interpolating the
-next log entry.</p>
+next log entry.
 </dd>
-<dt><strong><a name="consolidation" class="item">Consolidation</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_consolidation">Consolidation</a></strong><br />
+</dt>
 <dd>
-<p>You may log data at a 1 minute interval, but you might also be
+You may log data at a 1 minute interval, but you might also be
 interested to know the development of the data over the last year. You
 could do this by simply storing the data in 1 minute intervals for the
 whole year. While this would take considerable disk space it would
@@ -186,15 +198,18 @@ consolidation should occur, and what consolidation function (<strong>CF</strong>
 (average, minimum, maximum, total, last) should be used to build the
 consolidated values (see rrdcreate). You can define any number of
 different consolidation setups within one <strong>RRD</strong>. They will all be
-maintained on the fly when new data is loaded into the <strong>RRD</strong>.</p>
+maintained on the fly when new data is loaded into the <strong>RRD</strong>.
 </dd>
-<dt><strong><a name="round_robin_archives" class="item">Round Robin Archives</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_round_robin_archives">Round Robin Archives</a></strong><br />
+</dt>
 <dd>
-<p>Data values of the same consolidation setup are stored into Round
+Data values of the same consolidation setup are stored into Round
 Robin Archives (<strong>RRA</strong>). This is a very efficient manner to store data
 for a certain amount of time, while using a known and constant amount
-of storage space.</p>
+of storage space.
+</dd>
+<dd>
 <p>It works like this: If you want to store 1'000 values in 5 minute
 interval, <strong>RRDtool</strong> will allocate space for 1'000 data values and a
 header area. In the header it will store a pointer telling which slots
@@ -205,20 +220,25 @@ manner. This automatically limits the history to the last 1'000 values
 single <strong>RRD</strong>, you can setup another one, for storing 750 data values
 at a 2 hour interval, for example, and thus keep a log for the last
 two months at a lower resolution.</p>
+</dd>
+<dd>
 <p>The use of <strong>RRA</strong>s guarantees that the <strong>RRD</strong> does not grow over
 time and that old data is automatically eliminated. By using the
 consolidation feature, you can still keep data for a very long time,
 while gradually reducing the resolution of the data along the time
 axis.</p>
+</dd>
+<dd>
 <p>Using different consolidation functions (<strong>CF</strong>) allows you to store
 exactly the type of information that actually interests you: the maximum
 one minute traffic on the LAN, the minimum temperature of your wine cellar,
 the total minutes of down time, etc.</p>
 </dd>
-<dt><strong><a name="unknown_data" class="item">Unknown Data</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_unknown_data">Unknown Data</a></strong><br />
+</dt>
 <dd>
-<p>As mentioned earlier, the <strong>RRD</strong> stores data at a constant
+As mentioned earlier, the <strong>RRD</strong> stores data at a constant
 interval. Sometimes it may happen that no new data is available when a
 value has to be written to the <strong>RRD</strong>. Data acquisition may not be
 possible for one reason or other. With <strong>RRDtool</strong> you can handle these
@@ -229,36 +249,40 @@ values is accounted for and when a new consolidated value is ready to
 be written to its Round Robin Archive (<strong>RRA</strong>), a validity check is
 performed to make sure that the percentage of unknown values in the
 data point is above a configurable level. If not, an <em>*UNKNOWN*</em> value
-will be written to the <strong>RRA</strong>.</p>
+will be written to the <strong>RRA</strong>.
 </dd>
-<dt><strong><a name="graphing" class="item">Graphing</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_graphing">Graphing</a></strong><br />
+</dt>
 <dd>
-<p><strong>RRDtool</strong> allows you to generate reports in numerical and
+<strong>RRDtool</strong> allows you to generate reports in numerical and
 graphical form based on the data stored in one or several
 <strong>RRD</strong>s. The graphing feature is fully configurable. Size, color and
 contents of the graph can be defined freely. Check <a href="././rrdgraph.html">the rrdgraph manpage</a>
-for more information on this.</p>
+for more information on this.
+</dd>
+<p></p>
+<dt><strong><a name="item_aberrant_behavior_detection">Aberrant Behavior Detection</a></strong><br />
+</dt>
+<dd>
+by Jake Brutlag
 </dd>
-<dt><strong><a name="aberrant_behavior_detection" class="item">Aberrant Behavior Detection</a></strong></dt>
-
 <dd>
-<p>by Jake Brutlag</p>
 <p><strong>RRDtool</strong> provides the building blocks for near real-time aberrant
 behavior detection. These components include:</p>
+</dd>
 <ul>
-<li>
-<p>An algorithm for predicting the value of a time series one time step
-into the future.</p>
-</li>
-<li>
-<p>A measure of deviation between predicted and observed values.</p>
-</li>
-<li>
-<p>A mechanism to decide if and when an observed value or sequence of
-observed values is <em>too deviant</em> from the predicted value(s).</p>
-</li>
-</ul>
+<li></li>
+An algorithm for predicting the value of a time series one time step
+into the future.
+<p></p>
+<li></li>
+A measure of deviation between predicted and observed values.
+<p></p>
+<li></li>
+A mechanism to decide if and when an observed value or sequence of
+observed values is <em>too deviant</em> from the predicted value(s).
+<p></p></ul>
 <p>Here is a brief explanation of these components:</p>
 <p>The Holt-Winters time series forecasting algorithm is an on-line (or
 incremental) algorithm that adaptively predicts future observations in
@@ -267,7 +291,7 @@ a time series. Its forecast is the sum of three components: a baseline
 coefficient (a periodic effect, such as a daily cycle). There is one
 seasonal coefficient for each time point in the period (cycle). After
 a value is observed, each of these components is updated via
-exponential smoothing. This means that the algorithm &quot;learns&quot; from
+exponential smoothing. This means that the algorithm ``learns'' from
 past values and uses them to predict the future. The rate of
 adaptation is governed by 3 parameters, alpha (intercept), beta
 (slope), and gamma (seasonal). The prediction can also be viewed as a
@@ -292,7 +316,6 @@ particular, a FAILURES <strong>RRA</strong> logs potential failures. With these
 you could, for example, use a front-end application to <strong>RRDtool</strong> to
 initiate real-time alerts.</p>
 <p>For a detailed description on how to set this up, see <a href="././rrdcreate.html">the rrdcreate manpage</a>.</p>
-</dd>
 </dl>
 <p>
 </p>
@@ -339,8 +362,17 @@ such a port unless you are sure what you are doing.</p>
 <p>
 </p>
 <hr />
+<h1><a name="rrdcached__the_caching_daemon">RRDCACHED, THE CACHING DAEMON</a></h1>
+<p>For very big setups, updating thousands of RRD files often becomes a serious IO
+problem. If you run into such problems, you might want to take a look at
+<a href="././rrdcached.html">the rrdcached manpage</a>, a caching daemon for RRDTool which may help you lessen the
+stress on your disks.</p>
+<p>
+</p>
+<hr />
 <h1><a name="see_also">SEE ALSO</a></h1>
-<p>rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast, rrdxport</p>
+<p>rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast, rrdxport,
+rrdflushcached, rrdcached</p>
 <p>
 </p>
 <hr />
index e3523fe9eee733697f20155cb96f8944fadc52cf..8cb83fa47062070ce0ecaa92e01d858e770387a2 100644 (file)
@@ -91,7 +91,11 @@ Change the size of individual RRAs. This is dangerous! Check L<rrdresize>.
 
 =item B<xport>
 
-Export data retrieved from one or several RRDs. Check L<rrdxport>
+Export data retrieved from one or several RRDs. Check L<rrdxport>.
+
+=item B<flushcached>
+
+Flush the values for a specific RRD file from memory. Check L<rrdflushcached>.
 
 =item B<rrdcgi>
 
@@ -298,9 +302,17 @@ sockets, tools like netcat, or in a quick interactive test by using
 B<NOTE:> that there is no authentication with this feature! Do not setup
 such a port unless you are sure what you are doing.
 
+=head1 RRDCACHED, THE CACHING DAEMON
+
+For very big setups, updating thousands of RRD files often becomes a serious IO
+problem. If you run into such problems, you might want to take a look at
+L<rrdcached>, a caching daemon for RRDTool which may help you lessen the
+stress on your disks.
+
 =head1 SEE ALSO
 
-rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast, rrdxport
+rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast, rrdxport,
+rrdflushcached, rrdcached
 
 =head1 BUGS
 
index 5c777d8af3a6b9e4386c8bbdf9314ca4a5ba38c0..113857ef4b10f51d817969067f5796c51a911bbe 100644 (file)
@@ -9,16 +9,17 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
        r\brr\brd\bdt\bto\boo\bol\bl -\b- [workdir]| _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-   O\bOV\bVE\bER\bRV\bVI\bIE\bEW\bW
+       O\bOV\bVE\bER\bRV\bVI\bIE\bEW\bW
+
        It is pretty easy to gather status information from all sorts of
        things, ranging from the temperature in your office to the number of
        octets which have passed through the FDDI interface of your router. But
        it is not so trivial to store this data in an efficient and systematic
-       manner. This is where R\bRR\bRD\bDt\bto\boo\bol\bl comes in handy. It lets you _\bl_\bo_\bg _\ba_\bn_\bd
-       _\ba_\bn_\ba_\bl_\by_\bz_\be the data you gather from all kinds of data-sources (D\bDS\bS). The
-       data analysis part of RRDtool is based on the ability to quickly
-       generate graphical representations of the data values collected over a
-       definable time period.
+       manner. This is where R\bRR\bRD\bDt\bto\boo\bol\bl comes in handy. It lets you _\bl_\bo_\bg _\ba_\bn_\bd _\ba_\bn_\ba_\b-
+       _\bl_\by_\bz_\be the data you gather from all kinds of data-sources (D\bDS\bS). The data
+       analysis part of RRDtool is based on the ability to quickly generate
+       graphical representations of the data values collected over a definable
+       time period.
 
        In this man page you will find general information on the design and
        functionality of the Round Robin Database Tool (RRDtool). For a more
@@ -28,7 +29,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        For an introduction to the usage of RRDtool make sure you consult the
        rrdtutorial.
 
-   F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
+       F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
+
        While the man pages talk of command line switches you have to set in
        order to make R\bRR\bRD\bDt\bto\boo\bol\bl work it is important to note that R\bRR\bRD\bDt\bto\boo\bol\bl can be
        remotely controlled through a set of pipes. This saves a considerable
@@ -54,9 +56,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        r\bre\bes\bst\bto\bor\bre\be Restore an RRD in XML format to a binary RRD. Check rrdrestore
 
-       f\bfe\bet\btc\bch\bh   Get data for a certain time period from a RRD. The graph
-               function uses fetch to retrieve its data from an RRD. Check
-               rrdfetch.
+       f\bfe\bet\btc\bch\bh   Get data for a certain time period from a RRD. The graph func-
+               tion uses fetch to retrieve its data from an RRD. Check rrd-
+               fetch.
 
        t\btu\bun\bne\be    Alter setup of an RRD. Check rrdtune.
 
@@ -68,12 +70,18 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                Change the size of individual RRAs. This is dangerous! Check
                rrdresize.
 
-       x\bxp\bpo\bor\brt\bt   Export data retrieved from one or several RRDs. Check rrdxport
+       x\bxp\bpo\bor\brt\bt   Export data retrieved from one or several RRDs. Check rrdxport.
+
+       f\bfl\blu\bus\bsh\bhc\bca\bac\bch\bhe\bed\bd
+               Flush the values for a specific RRD file from memory. Check
+               rrdflushcached.
 
        r\brr\brd\bdc\bcg\bgi\bi  This is a standalone tool for producing RRD graphs on the fly.
                Check rrdcgi.
 
-   H\bHO\bOW\bW D\bDO\bOE\bES\bS R\bRR\bRD\bDT\bTO\bOO\bOL\bL W\bWO\bOR\bRK\bK?\b?
+       H\bHO\bOW\bW D\bDO\bOE\bES\bS R\bRR\bRD\bDT\bTO\bOO\bOL\bL W\bWO\bOR\bRK\bK?\b?
+
+
        Data Acquisition
                When monitoring the state of a system, it is convenient to have
                the data available at a constant time interval. Unfortunately,
@@ -89,18 +97,17 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                You may log data at a 1 minute interval, but you might also be
                interested to know the development of the data over the last
                year. You could do this by simply storing the data in 1 minute
-               intervals for the whole year. While this would take
-               considerable disk space it would also take a lot of time to
-               analyze the data when you wanted to create a graph covering the
-               whole year. R\bRR\bRD\bDt\bto\boo\bol\bl offers a solution to this problem through
-               its data consolidation feature. When setting up an Round Robin
-               Database (R\bRR\bRD\bD), you can define at which interval this
-               consolidation should occur, and what consolidation function
-               (C\bCF\bF) (average, minimum, maximum, total, last) should be used to
-               build the consolidated values (see rrdcreate). You can define
-               any number of different consolidation setups within one R\bRR\bRD\bD.
-               They will all be maintained on the fly when new data is loaded
-               into the R\bRR\bRD\bD.
+               intervals for the whole year. While this would take consider-
+               able disk space it would also take a lot of time to analyze the
+               data when you wanted to create a graph covering the whole year.
+               R\bRR\bRD\bDt\bto\boo\bol\bl offers a solution to this problem through its data con-
+               solidation feature. When setting up an Round Robin Database
+               (R\bRR\bRD\bD), you can define at which interval this consolidation
+               should occur, and what consolidation function (C\bCF\bF) (average,
+               minimum, maximum, total, last) should be used to build the con-
+               solidated values (see rrdcreate). You can define any number of
+               different consolidation setups within one R\bRR\bRD\bD. They will all be
+               maintained on the fly when new data is loaded into the R\bRR\bRD\bD.
 
        Round Robin Archives
                Data values of the same consolidation setup are stored into
@@ -111,14 +118,14 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                It works like this: If you want to store 1'000 values in 5
                minute interval, R\bRR\bRD\bDt\bto\boo\bol\bl will allocate space for 1'000 data
                values and a header area. In the header it will store a pointer
-               telling which slots (value) in the storage area was last
-               written to. New values are written to the Round Robin Archive
-               in, you guessed it, a round robin manner. This automatically
-               limits the history to the last 1'000 values (in our example).
-               Because you can define several R\bRR\bRA\bAs within a single R\bRR\bRD\bD, you
-               can setup another one, for storing 750 data values at a 2 hour
-               interval, for example, and thus keep a log for the last two
-               months at a lower resolution.
+               telling which slots (value) in the storage area was last writ-
+               ten to. New values are written to the Round Robin Archive in,
+               you guessed it, a round robin manner. This automatically limits
+               the history to the last 1'000 values (in our example). Because
+               you can define several R\bRR\bRA\bAs within a single R\bRR\bRD\bD, you can setup
+               another one, for storing 750 data values at a 2 hour interval,
+               for example, and thus keep a log for the last two months at a
+               lower resolution.
 
                The use of R\bRR\bRA\bAs guarantees that the R\bRR\bRD\bD does not grow over time
                and that old data is automatically eliminated. By using the
@@ -133,11 +140,11 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                time, etc.
 
        Unknown Data
-               As mentioned earlier, the R\bRR\bRD\bD stores data at a constant
-               interval. Sometimes it may happen that no new data is available
-               when a value has to be written to the R\bRR\bRD\bD. Data acquisition may
-               not be possible for one reason or other. With R\bRR\bRD\bDt\bto\boo\bol\bl you can
-               handle these situations by storing an _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* value into the
+               As mentioned earlier, the R\bRR\bRD\bD stores data at a constant inter-
+               val. Sometimes it may happen that no new data is available when
+               a value has to be written to the R\bRR\bRD\bD. Data acquisition may not
+               be possible for one reason or other. With R\bRR\bRD\bDt\bto\boo\bol\bl you can han-
+               dle these situations by storing an _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* value into the
                database. The value '_\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*' is supported through all the
                functions of the tool. When consolidating a data set, the
                amount of _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* data values is accounted for and when a new
@@ -148,27 +155,27 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                to the R\bRR\bRA\bA.
 
        Graphing
-               R\bRR\bRD\bDt\bto\boo\bol\bl allows you to generate reports in numerical and
-               graphical form based on the data stored in one or several R\bRR\bRD\bDs.
-               The graphing feature is fully configurable. Size, color and
-               contents of the graph can be defined freely. Check rrdgraph for
+               R\bRR\bRD\bDt\bto\boo\bol\bl allows you to generate reports in numerical and graphi-
+               cal form based on the data stored in one or several R\bRR\bRD\bDs. The
+               graphing feature is fully configurable. Size, color and con-
+               tents of the graph can be defined freely. Check rrdgraph for
                more information on this.
 
        Aberrant Behavior Detection
                by Jake Brutlag
 
-               R\bRR\bRD\bDt\bto\boo\bol\bl provides the building blocks for near real-time
-               aberrant behavior detection. These components include:
+               R\bRR\bRD\bDt\bto\boo\bol\bl provides the building blocks for near real-time aber-
+               rant behavior detection. These components include:
 
-               ·   An algorithm for predicting the value of a time series one
+               *   An algorithm for predicting the value of a time series one
                    time step into the future.
 
-               ·   A measure of deviation between predicted and observed
-                   values.
+               *   A measure of deviation between predicted and observed val-
+                   ues.
 
-               ·   A mechanism to decide if and when an observed value or
-                   sequence of observed values is _\bt_\bo_\bo _\bd_\be_\bv_\bi_\ba_\bn_\bt from the
-                   predicted value(s).
+               *   A mechanism to decide if and when an observed value or
+                   sequence of observed values is _\bt_\bo_\bo _\bd_\be_\bv_\bi_\ba_\bn_\bt from the pre-
+                   dicted value(s).
 
                Here is a brief explanation of these components:
 
@@ -181,22 +188,22 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                time point in the period (cycle). After a value is observed,
                each of these components is updated via exponential smoothing.
                This means that the algorithm "learns" from past values and
-               uses them to predict the future. The rate of adaptation is
-               governed by 3 parameters, alpha (intercept), beta (slope), and
+               uses them to predict the future. The rate of adaptation is gov-
+               erned by 3 parameters, alpha (intercept), beta (slope), and
                gamma (seasonal). The prediction can also be viewed as a
                smoothed value for the time series.
 
-               The measure of deviation is a seasonal weighted absolute
-               deviation. The term _\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl means deviation is measured
-               separately for each time point in the seasonal cycle. As with
-               Holt-Winters forecasting, deviation is predicted using the
-               measure computed from past values (but only at that point in
-               the seasonal cycle). After the value is observed, the algorithm
-               learns from the observed value via exponential smoothing.
-               Confidence bands for the observed time series are generated by
-               scaling the sequence of predicted deviation values (we usually
-               think of the sequence as a continuous line rather than a set of
-               discrete points).
+               The measure of deviation is a seasonal weighted absolute devia-
+               tion. The term _\bs_\be_\ba_\bs_\bo_\bn_\ba_\bl means deviation is measured separately
+               for each time point in the seasonal cycle. As with Holt-Winters
+               forecasting, deviation is predicted using the measure computed
+               from past values (but only at that point in the seasonal
+               cycle). After the value is observed, the algorithm learns from
+               the observed value via exponential smoothing. Confidence bands
+               for the observed time series are generated by scaling the
+               sequence of predicted deviation values (we usually think of the
+               sequence as a continuous line rather than a set of discrete
+               points).
 
                Aberrant behavior (a potential failure) is reported whenever
                the number of times the observed value violates the confidence
@@ -209,16 +216,17 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                data you could, for example, use a front-end application to
                R\bRR\bRD\bDt\bto\boo\bol\bl to initiate real-time alerts.
 
-               For a detailed description on how to set this up, see
-               rrdcreate.
+               For a detailed description on how to set this up, see rrdcre-
+               ate.
+
+       R\bRE\bEM\bMO\bOT\bTE\bE C\bCO\bON\bNT\bTR\bRO\bOL\bL
 
-   R\bRE\bEM\bMO\bOT\bTE\bE C\bCO\bON\bNT\bTR\bRO\bOL\bL
        When you start R\bRR\bRD\bDt\bto\boo\bol\bl with the command line option '-\b-' it waits for
        input via standard input (STDIN). With this feature you can improve
-       performance by attaching R\bRR\bRD\bDt\bto\boo\bol\bl to another process (MRTG is one
-       example) through a set of pipes. Over these pipes R\bRR\bRD\bDt\bto\boo\bol\bl accepts the
-       same arguments as on the command line and some special commands like
-       q\bqu\bui\bit\bt,\bc\bcd\bd,\b, m\bmk\bkd\bdi\bir\br and l\bls\bs. For detailed help on the server commands type:
+       performance by attaching R\bRR\bRD\bDt\bto\boo\bol\bl to another process (MRTG is one exam-
+       ple) through a set of pipes. Over these pipes R\bRR\bRD\bDt\bto\boo\bol\bl accepts the same
+       arguments as on the command line and some special commands like q\bqu\bui\bit\bt,\b,
+       c\bcd\bd,\b, m\bmk\bkd\bdi\bir\br and l\bls\bs. For detailed help on the server commands type:
 
           rrdtool help cd|mkdir|pwd|ls|quit
 
@@ -226,12 +234,13 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        followed by timing information of the form u\bu:\b:_\bu_\bs_\be_\br_\bt_\bi_\bm_\be s\bs:\b:_\bs_\by_\bs_\bt_\be_\bm_\bt_\bi_\bm_\be.
        Both values are the running totals of seconds since RRDtool was
        started. If an error occurs, a line of the form '"ERROR:" _\bD_\be_\bs_\bc_\br_\bi_\bp_\bt_\bi_\bo_\bn
-       _\bo_\bf _\be_\br_\br_\bo_\br' will be printed instead. R\bRR\bRD\bDt\bto\boo\bol\bl will not abort, unless
-       something really serious happens. If a w\bwo\bor\brk\bkd\bdi\bir\br is specified and the UID
-       is 0, RRDtool will do a chroot to that workdir. If the UID is not 0,
-       RRDtool only changes the current directory to w\bwo\bor\brk\bkd\bdi\bir\br.
+       _\bo_\bf _\be_\br_\br_\bo_\br' will be printed instead. R\bRR\bRD\bDt\bto\boo\bol\bl will not abort, unless some-
+       thing really serious happens. If a w\bwo\bor\brk\bkd\bdi\bir\br is specified and the UID is
+       0, RRDtool will do a chroot to that workdir. If the UID is not 0, RRD-
+       tool only changes the current directory to w\bwo\bor\brk\bkd\bdi\bir\br.
+
+       R\bRR\bRD\bD S\bSe\ber\brv\bve\ber\br
 
-   R\bRR\bRD\bD S\bSe\ber\brv\bve\ber\br
        If you want to create a RRD-Server, you must choose a TCP/IP Service
        number and add them to _\b/_\be_\bt_\bc_\b/_\bs_\be_\br_\bv_\bi_\bc_\be_\bs like this:
 
@@ -249,16 +258,22 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        Don't forget to create the database directory /var/rrd and reinitialize
        your inetd.
 
-       If all was setup correctly, you can access the server with Perl
-       sockets, tools like netcat, or in a quick interactive test by using
-       'telnet localhost rrdsrv'.
+       If all was setup correctly, you can access the server with Perl sock-
+       ets, tools like netcat, or in a quick interactive test by using 'telnet
+       localhost rrdsrv'.
 
        N\bNO\bOT\bTE\bE:\b: that there is no authentication with this feature! Do not setup
        such a port unless you are sure what you are doing.
 
+R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD,\b, T\bTH\bHE\bE C\bCA\bAC\bCH\bHI\bIN\bNG\bG D\bDA\bAE\bEM\bMO\bON\bN
+       For very big setups, updating thousands of RRD files often becomes a
+       serious IO problem. If you run into such problems, you might want to
+       take a look at rrdcached, a caching daemon for RRDTool which may help
+       you lessen the stress on your disks.
+
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
        rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast,
-       rrdxport
+       rrdxport, rrdflushcached, rrdcached
 
 B\bBU\bUG\bGS\bS
        Bugs? Features!
@@ -268,4 +283,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2008-12-22                        RRDTOOL(1)
+1.3.99909060808                   2009-05-26                        RRDTOOL(1)
index 0be1a528799b2233f3e3fc7c44347df492cfe24e..83a71b766eea118b2cbc014a754ec2a46a877b2b 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDTUNE 1"
-.TH RRDTUNE 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDTUNE 1 "2008-03-15" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdtune \- Modify some basic properties of a Round Robin Database
 .SH "SYNOPSIS"
index feeba0d7fa11411c8ea2e6be772660abbc6848d1..ea6baad9ae45e3acbe86af32e873e6caa1f792ec 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdtune</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#example_2">EXAMPLE 2</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -72,115 +64,131 @@ the data source header in the <strong>RRD</strong>.</p>
 <p>A second application of the <strong>tune</strong> function is to set or alter parameters
 used by the specialized function <strong>RRAs</strong> for aberrant behavior detection.</p>
 <dl>
-<dt><strong><a name="filename" class="item"><em>filename</em></a></strong></dt>
-
+<dt><strong><a name="item_filename"><em>filename</em></a></strong><br />
+</dt>
 <dd>
-<p>The name of the <strong>RRD</strong> you want to tune.</p>
+The name of the <strong>RRD</strong> you want to tune.
 </dd>
-<dt><strong><a name="heartbeat_h_ds_name_heartbeat" class="item"><strong>--heartbeat</strong>|<strong>-h</strong>&nbsp;<em>ds-name</em>:<em>heartbeat</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dheartbeat_7c_2dh_ds_2dname_3aheartbeat"><strong>--heartbeat</strong>|<strong>-h</strong>&nbsp;<em>ds-name</em>:<em>heartbeat</em></a></strong><br />
+</dt>
 <dd>
-<p>modify the <em>heartbeat</em> of a data source. By setting this to a high
-value the RRD will accept things like one value per day.</p>
+modify the <em>heartbeat</em> of a data source. By setting this to a high
+value the RRD will accept things like one value per day.
 </dd>
-<dt><strong><a name="minimum_i_ds_name_min" class="item"><strong>--minimum</strong>|<strong>-i</strong>&nbsp;<em>ds-name</em>:<em>min</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dminimum_7c_2di_ds_2dname_3amin"><strong>--minimum</strong>|<strong>-i</strong>&nbsp;<em>ds-name</em>:<em>min</em></a></strong><br />
+</dt>
 <dd>
-<p>alter the minimum value acceptable as input from the data source.
-Setting <em>min</em> to 'U' will disable this limit.</p>
+alter the minimum value acceptable as input from the data source.
+Setting <em>min</em> to 'U' will disable this limit.
 </dd>
-<dt><strong><a name="maximum_a_ds_name_max" class="item"><strong>--maximum</strong>|<strong>-a</strong>&nbsp;<em>ds-name</em>:<em>max</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dmaximum_7c_2da_ds_2dname_3amax"><strong>--maximum</strong>|<strong>-a</strong>&nbsp;<em>ds-name</em>:<em>max</em></a></strong><br />
+</dt>
 <dd>
-<p>alter the maximum value acceptable as input from the data source.
-Setting <em>max</em> to 'U' will disable this limit.</p>
+alter the maximum value acceptable as input from the data source.
+Setting <em>max</em> to 'U' will disable this limit.
 </dd>
-<dt><strong><a name="data_source_type_d_ds_name_dst" class="item"><strong>--data-source-type</strong>|<strong>-d</strong>&nbsp;<em>ds-name</em>:<em>DST</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2ddata_2dsource_2dtype_7c_2dd_ds_2dname_3adst"><strong>--data-source-type</strong>|<strong>-d</strong>&nbsp;<em>ds-name</em>:<em>DST</em></a></strong><br />
+</dt>
 <dd>
-<p>alter the type <strong>DST</strong> of a data source.</p>
+alter the type <strong>DST</strong> of a data source.
 </dd>
-<dt><strong><a name="data_source_rename_r_old_name_new_name" class="item"><strong>--data-source-rename</strong>|<strong>-r</strong>&nbsp;<em>old-name</em>:<em>new-name</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2ddata_2dsource_2drename_7c_2dr_old_2dname_3an"><strong>--data-source-rename</strong>|<strong>-r</strong>&nbsp;<em>old-name</em>:<em>new-name</em></a></strong><br />
+</dt>
 <dd>
-<p>rename a data source.</p>
+rename a data source.
 </dd>
-<dt><strong><a name="deltapos_scale_value" class="item"><strong>--deltapos</strong>&nbsp;<em>scale-value</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2ddeltapos_scale_2dvalue"><strong>--deltapos</strong>&nbsp;<em>scale-value</em></a></strong><br />
+</dt>
 <dd>
-<p>Alter the deviation scaling factor for the upper bound of the
+Alter the deviation scaling factor for the upper bound of the
 confidence band used internally to calculate violations for the
 FAILURES <strong>RRA</strong>. The default value is 2. Note that this parameter is
 not related to graphing confidence bounds which must be specified as a
 CDEF argument to generate a graph with confidence bounds. The graph
 scale factor need not to agree with the value used internally by the
-FAILURES <strong>RRA</strong>.</p>
+FAILURES <strong>RRA</strong>.
 </dd>
-<dt><strong><a name="deltaneg_scale_value" class="item"><strong>--deltaneg</strong>&nbsp;<em>scale-value</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2ddeltaneg_scale_2dvalue"><strong>--deltaneg</strong>&nbsp;<em>scale-value</em></a></strong><br />
+</dt>
 <dd>
-<p>Alter the deviation scaling factor for the lower bound of the confidence band
+Alter the deviation scaling factor for the lower bound of the confidence band
 used internally to calculate violations for the FAILURES <strong>RRA</strong>. The default
 value is 2. As with <strong>--deltapos</strong>, this argument is unrelated to the scale
-factor chosen when graphing confidence bounds.</p>
+factor chosen when graphing confidence bounds.
 </dd>
-<dt><strong><a name="failure_threshold_failure_threshold" class="item"><strong>--failure-threshold</strong>&nbsp;<em>failure-threshold</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dfailure_2dthreshold_failure_2dthreshold"><strong>--failure-threshold</strong>&nbsp;<em>failure-threshold</em></a></strong><br />
+</dt>
 <dd>
-<p>Alter the number of confidence bound violations that constitute a failure for
+Alter the number of confidence bound violations that constitute a failure for
 purposes of the FAILURES <strong>RRA</strong>. This must be an integer less than or equal to
 the window length of the FAILURES <strong>RRA</strong>. This restriction is not verified by
 the tune option, so one can reset failure-threshold and window-length
-simultaneously. Setting this option will reset the count of violations to 0.</p>
+simultaneously. Setting this option will reset the count of violations to 0.
 </dd>
-<dt><strong><a name="window_length_window_length" class="item"><strong>--window-length</strong>&nbsp;<em>window-length</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dwindow_2dlength_window_2dlength"><strong>--window-length</strong>&nbsp;<em>window-length</em></a></strong><br />
+</dt>
 <dd>
-<p>Alter the number of time points in the temporal window for determining
+Alter the number of time points in the temporal window for determining
 failures. This must be an integer greater than or equal to the window
 length of the FAILURES <strong>RRA</strong> and less than or equal to 28. Setting
-this option will reset the count of violations to 0.</p>
+this option will reset the count of violations to 0.
 </dd>
-<dt><strong><a name="alpha_adaption_parameter" class="item"><strong>--alpha</strong>&nbsp;<em>adaption-parameter</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dalpha_adaption_2dparameter"><strong>--alpha</strong>&nbsp;<em>adaption-parameter</em></a></strong><br />
+</dt>
 <dd>
-<p>Alter the intercept adaptation parameter for the Holt-Winters
-forecasting algorithm. This parameter must be between 0 and 1.</p>
+Alter the intercept adaptation parameter for the Holt-Winters
+forecasting algorithm. This parameter must be between 0 and 1.
 </dd>
-<dt><strong><a name="beta_adaption_parameter" class="item"><strong>--beta</strong>&nbsp;<em>adaption-parameter</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dbeta_adaption_2dparameter"><strong>--beta</strong>&nbsp;<em>adaption-parameter</em></a></strong><br />
+</dt>
 <dd>
-<p>Alter the slope adaptation parameter for the Holt-Winters forecasting
-algorithm. This parameter must be between 0 and 1.</p>
+Alter the slope adaptation parameter for the Holt-Winters forecasting
+algorithm. This parameter must be between 0 and 1.
 </dd>
-<dt><strong><a name="gamma_adaption_parameter" class="item"><strong>--gamma</strong>&nbsp;<em>adaption-parameter</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dgamma_adaption_2dparameter"><strong>--gamma</strong>&nbsp;<em>adaption-parameter</em></a></strong><br />
+</dt>
 <dd>
-<p>Alter the seasonal coefficient adaptation parameter for the SEASONAL
-<strong>RRA</strong>. This parameter must be between 0 and 1.</p>
+Alter the seasonal coefficient adaptation parameter for the SEASONAL
+<strong>RRA</strong>. This parameter must be between 0 and 1.
 </dd>
-<dt><strong><a name="gamma_deviation_adaption_parameter" class="item"><strong>--gamma-deviation</strong>&nbsp;<em>adaption-parameter</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dgamma_2ddeviation_adaption_2dparameter"><strong>--gamma-deviation</strong>&nbsp;<em>adaption-parameter</em></a></strong><br />
+</dt>
 <dd>
-<p>Alter the seasonal deviation adaptation parameter for the DEVSEASONAL
-<strong>RRA</strong>. This parameter must be between 0 and 1.</p>
+Alter the seasonal deviation adaptation parameter for the DEVSEASONAL
+<strong>RRA</strong>. This parameter must be between 0 and 1.
 </dd>
-<dt><strong><a name="smoothing_window_fraction_of_season" class="item"><strong>--smoothing-window</strong>&nbsp;<em>fraction-of-season</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dsmoothing_2dwindow_fraction_2dof_2dseason"><strong>--smoothing-window</strong>&nbsp;<em>fraction-of-season</em></a></strong><br />
+</dt>
 <dd>
-<p>Alter the size of the smoothing window for the SEASONAL <strong>RRA</strong>. This must
-be between 0 and 1.</p>
+Alter the size of the smoothing window for the SEASONAL <strong>RRA</strong>. This must
+be between 0 and 1.
 </dd>
-<dt><strong><a name="smoothing_window_deviation_fraction_of_season" class="item"><strong>--smoothing-window-deviation</strong>&nbsp;<em>fraction-of-season</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2dsmoothing_2dwindow_2ddeviation_fraction_2dof"><strong>--smoothing-window-deviation</strong>&nbsp;<em>fraction-of-season</em></a></strong><br />
+</dt>
 <dd>
-<p>Alter the size of the smoothing window for the DEVSEASONAL <strong>RRA</strong>. This must
-be between 0 and 1.</p>
+Alter the size of the smoothing window for the DEVSEASONAL <strong>RRA</strong>. This must
+be between 0 and 1.
 </dd>
-<dt><strong><a name="aberrant_reset_ds_name" class="item"><strong>--aberrant-reset</strong>&nbsp;<em>ds-name</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2daberrant_2dreset_ds_2dname"><strong>--aberrant-reset</strong>&nbsp;<em>ds-name</em></a></strong><br />
+</dt>
 <dd>
-<p>This option causes the aberrant behavior detection algorithm to reset
+This option causes the aberrant behavior detection algorithm to reset
 for the specified data source; that is, forget all it is has learnt so far.
 Specifically, for the HWPREDICT or MHWPREDICT <strong>RRA</strong>, it sets the intercept and
 slope coefficients to unknown. For the SEASONAL <strong>RRA</strong>, it sets all seasonal
@@ -190,7 +198,9 @@ violation history. Note that reset does not erase past predictions
 (the values of the HWPREDICT or MHWPREDICT <strong>RRA</strong>), predicted deviations (the
 values of the DEVPREDICT <strong>RRA</strong>), or failure history (the values of the 
 FAILURES <strong>RRA</strong>).  This option will function even if not all the listed 
-<strong>RRAs</strong> are present.</p>
+<strong>RRAs</strong> are present.
+</dd>
+<dd>
 <p>Due to the implementation of this option, there is an indirect impact on
 other data sources in the RRD. A smoothing algorithm is applied to
 SEASONAL and DEVSEASONAL values on a periodic basis. During bootstrap
@@ -201,10 +211,12 @@ for all data sources in the file. This is unlikely to have serious
 consequences, unless the data being collected for the non-reset data sources
 is unusually volatile during the reinitialization period of the reset
 data source.</p>
+</dd>
+<dd>
 <p>Use of this tuning option is advised when the behavior of the data source
 time series changes in a drastic and permanent manner.</p>
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
index b9a14ddc223b545c1d4b64f37646110fb5c5c3fe..a3f12c06c7645373e5d7ce99089e94375f262675 100644 (file)
@@ -6,16 +6,15 @@ N\bNA\bAM\bME\bE
        rrdtune - Modify some basic properties of a Round Robin Database
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
-       r\brr\brd\bdt\bto\boo\bol\bl t\btu\bun\bne\be _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [-\b--\b-h\bhe\bea\bar\brt\btb\bbe\bea\bat\bt|-\b-h\bh _\bd_\bs_\b-_\bn_\ba_\bm_\be:_\bh_\be_\ba_\br_\bt_\bb_\be_\ba_\bt]
-       [-\b--\b-m\bmi\bin\bni\bim\bmu\bum\bm|-\b-i\bi _\bd_\bs_\b-_\bn_\ba_\bm_\be:_\bm_\bi_\bn] [-\b--\b-m\bma\bax\bxi\bim\bmu\bum\bm|-\b-a\ba _\bd_\bs_\b-_\bn_\ba_\bm_\be:_\bm_\ba_\bx]
+       r\brr\brd\bdt\bto\boo\bol\bl t\btu\bun\bne\be _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [-\b--\b-h\bhe\bea\bar\brt\btb\bbe\bea\bat\bt|-\b-h\bh _\bd_\bs_\b-_\bn_\ba_\bm_\be:_\bh_\be_\ba_\br_\bt_\bb_\be_\ba_\bt] [-\b--\b-m\bmi\bin\bni\bi-\b-
+       m\bmu\bum\bm|-\b-i\bi _\bd_\bs_\b-_\bn_\ba_\bm_\be:_\bm_\bi_\bn] [-\b--\b-m\bma\bax\bxi\bim\bmu\bum\bm|-\b-a\ba _\bd_\bs_\b-_\bn_\ba_\bm_\be:_\bm_\ba_\bx]
        [-\b--\b-d\bda\bat\bta\ba-\b-s\bso\bou\bur\brc\bce\be-\b-t\bty\byp\bpe\be|-\b-d\bd _\bd_\bs_\b-_\bn_\ba_\bm_\be:_\bD_\bS_\bT] [-\b--\b-d\bda\bat\bta\ba-\b-s\bso\bou\bur\brc\bce\be-\b-r\bre\ben\bna\bam\bme\be|-\b-r\br _\bo_\bl_\bd_\b-
        _\bn_\ba_\bm_\be:_\bn_\be_\bw_\b-_\bn_\ba_\bm_\be] [-\b--\b-d\bde\bel\blt\bta\bap\bpo\bos\bs _\bs_\bc_\ba_\bl_\be_\b-_\bv_\ba_\bl_\bu_\be] [-\b--\b-d\bde\bel\blt\bta\ban\bne\beg\bg _\bs_\bc_\ba_\bl_\be_\b-_\bv_\ba_\bl_\bu_\be]
        [-\b--\b-f\bfa\bai\bil\blu\bur\bre\be-\b-t\bth\bhr\bre\bes\bsh\bho\bol\bld\bd _\bf_\ba_\bi_\bl_\bu_\br_\be_\b-_\bt_\bh_\br_\be_\bs_\bh_\bo_\bl_\bd] [-\b--\b-w\bwi\bin\bnd\bdo\bow\bw-\b-l\ble\ben\bng\bgt\bth\bh _\bw_\bi_\bn_\bd_\bo_\bw_\b-_\bl_\be_\bn_\bg_\bt_\bh]
-       [-\b--\b-a\bal\blp\bph\bha\ba _\ba_\bd_\ba_\bp_\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br] [-\b--\b-b\bbe\bet\bta\ba _\ba_\bd_\ba_\bp_\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br]
-       [-\b--\b-g\bga\bam\bmm\bma\ba _\ba_\bd_\ba_\bp_\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br] [-\b--\b-g\bga\bam\bmm\bma\ba-\b-d\bde\bev\bvi\bia\bat\bti\bio\bon\bn _\ba_\bd_\ba_\bp_\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br]
-       [-\b--\b-s\bsm\bmo\boo\bot\bth\bhi\bin\bng\bg-\b-w\bwi\bin\bnd\bdo\bow\bw _\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn_\b-_\bo_\bf_\b-_\bs_\be_\ba_\bs_\bo_\bn]
-       [-\b--\b-s\bsm\bmo\boo\bot\bth\bhi\bin\bng\bg-\b-w\bwi\bin\bnd\bdo\bow\bw-\b-d\bde\bev\bvi\bia\bat\bti\bio\bon\bn _\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn_\b-_\bo_\bf_\b-_\bs_\be_\ba_\bs_\bo_\bn] [-\b--\b-a\bab\bbe\ber\brr\bra\ban\bnt\bt-\b-r\bre\bes\bse\bet\bt _\bd_\bs_\b-
-       _\bn_\ba_\bm_\be]
+       [-\b--\b-a\bal\blp\bph\bha\ba _\ba_\bd_\ba_\bp_\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br] [-\b--\b-b\bbe\bet\bta\ba _\ba_\bd_\ba_\bp_\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br] [-\b--\b-g\bga\bam\bmm\bma\ba _\ba_\bd_\ba_\bp_\b-
+       _\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br] [-\b--\b-g\bga\bam\bmm\bma\ba-\b-d\bde\bev\bvi\bia\bat\bti\bio\bon\bn _\ba_\bd_\ba_\bp_\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br] [-\b--\b-s\bsm\bmo\boo\bot\bth\bh-\b-
+       i\bin\bng\bg-\b-w\bwi\bin\bnd\bdo\bow\bw _\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn_\b-_\bo_\bf_\b-_\bs_\be_\ba_\bs_\bo_\bn] [-\b--\b-s\bsm\bmo\boo\bot\bth\bhi\bin\bng\bg-\b-w\bwi\bin\bnd\bdo\bow\bw-\b-d\bde\bev\bvi\bia\bat\bti\bio\bon\bn _\bf_\br_\ba_\bc_\bt_\bi_\bo_\bn_\b-
+       _\bo_\bf_\b-_\bs_\be_\ba_\bs_\bo_\bn] [-\b--\b-a\bab\bbe\ber\brr\bra\ban\bnt\bt-\b-r\bre\bes\bse\bet\bt _\bd_\bs_\b-_\bn_\ba_\bm_\be]
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        The tune option allows you to alter some of the basic configuration
@@ -58,9 +57,9 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                confidence band used internally to calculate violations for the
                FAILURES R\bRR\bRA\bA. The default value is 2. Note that this parameter
                is not related to graphing confidence bounds which must be
-               specified as a CDEF argument to generate a graph with
-               confidence bounds. The graph scale factor need not to agree
-               with the value used internally by the FAILURES R\bRR\bRA\bA.
+               specified as a CDEF argument to generate a graph with confi-
+               dence bounds. The graph scale factor need not to agree with the
+               value used internally by the FAILURES R\bRR\bRA\bA.
 
        -\b--\b-d\bde\bel\blt\bta\ban\bne\beg\bg _\bs_\bc_\ba_\bl_\be_\b-_\bv_\ba_\bl_\bu_\be
                Alter the deviation scaling factor for the lower bound of the
@@ -74,24 +73,24 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                a failure for purposes of the FAILURES R\bRR\bRA\bA. This must be an
                integer less than or equal to the window length of the FAILURES
                R\bRR\bRA\bA. This restriction is not verified by the tune option, so
-               one can reset failure-threshold and window-length
-               simultaneously. Setting this option will reset the count of
-               violations to 0.
+               one can reset failure-threshold and window-length simultane-
+               ously. Setting this option will reset the count of violations
+               to 0.
 
        -\b--\b-w\bwi\bin\bnd\bdo\bow\bw-\b-l\ble\ben\bng\bgt\bth\bh _\bw_\bi_\bn_\bd_\bo_\bw_\b-_\bl_\be_\bn_\bg_\bt_\bh
                Alter the number of time points in the temporal window for
                determining failures. This must be an integer greater than or
                equal to the window length of the FAILURES R\bRR\bRA\bA and less than or
-               equal to 28. Setting this option will reset the count of
-               violations to 0.
+               equal to 28. Setting this option will reset the count of viola-
+               tions to 0.
 
        -\b--\b-a\bal\blp\bph\bha\ba _\ba_\bd_\ba_\bp_\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
                Alter the intercept adaptation parameter for the Holt-Winters
                forecasting algorithm. This parameter must be between 0 and 1.
 
        -\b--\b-b\bbe\bet\bta\ba _\ba_\bd_\ba_\bp_\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
-               Alter the slope adaptation parameter for the Holt-Winters
-               forecasting algorithm. This parameter must be between 0 and 1.
+               Alter the slope adaptation parameter for the Holt-Winters fore-
+               casting algorithm. This parameter must be between 0 and 1.
 
        -\b--\b-g\bga\bam\bmm\bma\ba _\ba_\bd_\ba_\bp_\bt_\bi_\bo_\bn_\b-_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
                Alter the seasonal coefficient adaptation parameter for the
@@ -112,17 +111,17 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        -\b--\b-a\bab\bbe\ber\brr\bra\ban\bnt\bt-\b-r\bre\bes\bse\bet\bt _\bd_\bs_\b-_\bn_\ba_\bm_\be
                This option causes the aberrant behavior detection algorithm to
                reset for the specified data source; that is, forget all it is
-               has learnt so far.  Specifically, for the HWPREDICT or
-               MHWPREDICT R\bRR\bRA\bA, it sets the intercept and slope coefficients to
-               unknown. For the SEASONAL R\bRR\bRA\bA, it sets all seasonal
-               coefficients to unknown. For the DEVSEASONAL R\bRR\bRA\bA, it sets all
-               seasonal deviation coefficients to unknown. For the FAILURES
-               R\bRR\bRA\bA, it erases the violation history. Note that reset does not
-               erase past predictions (the values of the HWPREDICT or
-               MHWPREDICT R\bRR\bRA\bA), predicted deviations (the values of the
-               DEVPREDICT R\bRR\bRA\bA), or failure history (the values of the FAILURES
-               R\bRR\bRA\bA).  This option will function even if not all the listed
-               R\bRR\bRA\bAs\bs are present.
+               has learnt so far.  Specifically, for the HWPREDICT or MHWPRE-
+               DICT R\bRR\bRA\bA, it sets the intercept and slope coefficients to
+               unknown. For the SEASONAL R\bRR\bRA\bA, it sets all seasonal coeffi-
+               cients to unknown. For the DEVSEASONAL R\bRR\bRA\bA, it sets all sea-
+               sonal deviation coefficients to unknown. For the FAILURES R\bRR\bRA\bA,
+               it erases the violation history. Note that reset does not erase
+               past predictions (the values of the HWPREDICT or MHWPREDICT
+               R\bRR\bRA\bA), predicted deviations (the values of the DEVPREDICT R\bRR\bRA\bA),
+               or failure history (the values of the FAILURES R\bRR\bRA\bA).  This
+               option will function even if not all the listed R\bRR\bRA\bAs\bs are
+               present.
 
                Due to the implementation of this option, there is an indirect
                impact on other data sources in the RRD. A smoothing algorithm
@@ -137,8 +136,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                period of the reset data source.
 
                Use of this tuning option is advised when the behavior of the
-               data source time series changes in a drastic and permanent
-               manner.
+               data source time series changes in a drastic and permanent man-
+               ner.
 
 E\bEX\bXA\bAM\bMP\bPL\bLE\bE 1\b1
        "rrdtool tune data.rrd -h in:100000 -h out:100000 -h through:100000"
@@ -160,4 +159,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2008-03-15                        RRDTUNE(1)
+1.3.99909060808                   2008-03-15                        RRDTUNE(1)
index 1989ed0c11bc65490dbd0341a0513efce56eafea..5ace3cefed85c4e8c0bf25682e35c6c437ea2be2 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDTUTORIAL 1"
-.TH RRDTUTORIAL 1 "2009-04-09" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDTUTORIAL 1 "2009-04-09" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdtutorial \- Alex van den Bogaerdt's RRDtool tutorial
 .SH "DESCRIPTION"
@@ -145,7 +146,7 @@ It also explains the general things about statistics with a focus on
 networking.
 .SH "TUTORIAL"
 .IX Header "TUTORIAL"
-.SS "Important"
+.Sh "Important"
 .IX Subsection "Important"
 Please don't skip ahead in this document!  The first part of this
 document explains the basics and may be boring.  But if you don't
@@ -169,7 +170,7 @@ examples which suffer from the same or a similar bug.  Try to fix it
 yourself, which is a great excercise. But please do not submit your
 result as a fix to the source of this document. Discuss it on the
 user's list, or write to me.
-.SS "What is RRDtool?"
+.Sh "What is RRDtool?"
 .IX Subsection "What is RRDtool?"
 RRDtool refers to Round Robin Database tool.
 Round robin is a technique that works with a fixed amount of data, and a
@@ -183,7 +184,7 @@ the process automatically reuses old locations. This way, the dataset
 will not grow in size and therefore requires no maintenance.
 RRDtool works with with Round Robin Databases (RRDs). It stores and retrieves
 data from them.
-.SS "What data can be put into an \s-1RRD\s0?"
+.Sh "What data can be put into an \s-1RRD\s0?"
 .IX Subsection "What data can be put into an RRD?"
 You name it, it will probably fit as long as it is some sort of
 time-series data. This means you have to be able to measure some value
@@ -199,7 +200,7 @@ way through this document, you should know enough to be able to
 understand what people are talking about. For now, just realize that
 \&\s-1SNMP\s0 can be used to query devices for the values of counters they keep. It
 is the value from those counters that we want to store in the \s-1RRD\s0.
-.SS "What can I do with this tool?"
+.Sh "What can I do with this tool?"
 .IX Subsection "What can I do with this tool?"
 RRDtool originated from \s-1MRTG\s0 (Multi Router Traffic Grapher). \s-1MRTG\s0
 started as a tiny little script for graphing the use of a university's
@@ -221,7 +222,7 @@ data in it, retrieve that data and create graphs in \s-1PNG\s0 format for
 display on a web browser. Those \s-1PNG\s0 images are dependent on the data
 you collected and could be, for instance, an overview of the average
 network usage, or the peaks that occurred.
-.SS "What if I still have problems after reading this document?"
+.Sh "What if I still have problems after reading this document?"
 .IX Subsection "What if I still have problems after reading this document?"
 First of all: read it again! You may have missed something.
 If you are unable to compile the sources and you have a fairly common
@@ -244,7 +245,7 @@ I suggest you take a moment to subscribe to the mailing list right now
 by sending an email to <rrd\-users\-request@lists.oetiker.ch> with a
 subject of \*(L"subscribe\*(R". If you ever want to leave this list, just write
 an email to the same address but now with a subject of \*(L"unsubscribe\*(R".
-.SS "How will you help me?"
+.Sh "How will you help me?"
 .IX Subsection "How will you help me?"
 By giving you some detailed descriptions with detailed examples.
 I assume that following the instructions in the order presented
@@ -257,7 +258,7 @@ more important, some background information of how it works.
 .PP
 You will need to know something about hexadecimal numbers. If you don't
 then start with reading bin_dec_hex before you continue here.
-.SS "Your first Round Robin Database"
+.Sh "Your first Round Robin Database"
 .IX Subsection "Your first Round Robin Database"
 In my opinion the best way to learn something is to actually do it.
 Why not start right now?  We will create a database, put some values
@@ -353,7 +354,7 @@ and skip all of the '\e' characters.
 .Ve
 .PP
 (So enter: \f(CW\*(C`rrdtool create test.rrd \-\-start 920804400 DS ...\*(C'\fR)
-.SS "What has been created?"
+.Sh "What has been created?"
 .IX Subsection "What has been created?"
 We created the round robin database called test (test.rrd) which starts at
 noon the day I started writing this document, 7th of March, 1999 (this date
@@ -379,7 +380,7 @@ As an example: where I will see \*(L"12:05\*(R" the \s-1UK\s0 folks will see \*(
 We now have to fill our database with some numbers. We'll pretend to
 have read the following numbers:
 .PP
-.Vb 10
+.Vb 15
 \& 12:05  12345 km
 \& 12:10  12357 km
 \& 12:15  12363 km
@@ -430,7 +431,9 @@ It should return the following output:
 .PP
 .Vb 1
 \&                          speed
-\&
+.Ve
+.PP
+.Vb 16
 \& 920804700: nan
 \& 920805000: 4.0000000000e\-02
 \& 920805300: 2.0000000000e\-02
@@ -454,10 +457,10 @@ If it doesn't, something may be wrong.  Perhaps your \s-1OS\s0 will print
 writes \*(L"U\*(R" or \*(L"\s-1UNKN\s0\*(R" or something similar that's okay.  If something
 else is wrong, it will probably be due to an error you made (assuming
 that my tutorial is correct of course :\-). In that case: delete the
-database and try again.
+database and try again. 
 .PP
 The meaning of the above output will become clear below.
-.SS "Time to create some graphics"
+.Sh "Time to create some graphics"
 .IX Subsection "Time to create some graphics"
 Try the following command:
 .PP
@@ -472,7 +475,7 @@ This will create speed.png which starts at 12:00 and ends at 13:00.
 There is a definition of a variable called myspeed, using the data from \s-1RRA\s0
 \&\*(L"speed\*(R" out of database \*(L"test.rrd\*(R". The line drawn is 2 pixels high
 and represents the variable myspeed. The color is red (specified by
-its rgb-representation, see below).
+its rgb\-representation, see below).
 .PP
 You'll notice that the start of the graph is not at 12:00 but at 12:05.
 This is because we have insufficient data to tell the average before
@@ -496,12 +499,12 @@ The \*(L"color\*(R" black is all colors off: 000000
 .Ve
 .PP
 Additionally you can (with a recent RRDtool)  add an alpha channel
-(transparency).  The default will be \*(L"\s-1FF\s0\*(R" which means non-transparent.
+(transparency).  The default will be \*(L"\s-1FF\s0\*(R" which means non\-transparent.
 .PP
 The \s-1PNG\s0 you just created can be displayed using your favorite image
 viewer.  Web browsers will display the \s-1PNG\s0 via the \s-1URL\s0
 \&\*(L"file:///the/path/to/speed.png\*(R"
-.SS "Graphics with some math"
+.Sh "Graphics with some math"
 .IX Subsection "Graphics with some math"
 When looking at the image, you notice that the horizontal axis is labeled
 12:10, 12:20, 12:30, 12:40 and 12:50. Sometimes a label doesn't fit (12:00
@@ -613,13 +616,13 @@ For values above the speed limit:
 \&   Check if kmh is greater than 100    ( kmh,100 ) GT
 \&   If so, return kmh, else return 0    ((( kmh,100) GT ), kmh, 0) IF
 .Ve
-.SS "Graphics Magic"
+.Sh "Graphics Magic"
 .IX Subsection "Graphics Magic"
 I like to believe there are virtually no limits to how RRDtool graph
 can manipulate data. I will not explain how it works, but look at the
 following \s-1PNG:\s0
 .PP
-.Vb 10
+.Vb 13
 \&   rrdtool graph speed4.png                           \e
 \&      \-\-start 920804400 \-\-end 920808000               \e
 \&      \-\-vertical\-label km/h                           \e
@@ -658,7 +661,7 @@ database.  When you want to view the data, recreate the PNGs and make
 sure to refresh them in your browser. (Note: just clicking reload may
 not be enough, especially when proxies are involved.  Try shift-reload
 or ctrl\-F5).
-.SS "Updates in Reality"
+.Sh "Updates in Reality"
 .IX Subsection "Updates in Reality"
 We've already used the \f(CW\*(C`update\*(C'\fR command: it took one or more
 parameters in the form of \*(L"<time>:<value>\*(R". You'll be glad to know
@@ -667,7 +670,7 @@ Or you could use the \*(L"time\*(R" function in Perl (the shortest example in
 this tutorial):
 .PP
 .Vb 1
-\&   perl \-e \*(Aqprint time, "\en" \*(Aq
+\&   perl \-e 'print time, "\en" '
 .Ve
 .PP
 How to run a program on regular intervals is \s-1OS\s0 specific. But here is
@@ -684,7 +687,7 @@ This is all. Run the above script every five minutes. When you need to know
 what the graphs look like, run the examples above. You could put them
 in a script as well. After running that script, view the page
 index.html we created above.
-.SS "Some words on \s-1SNMP\s0"
+.Sh "Some words on \s-1SNMP\s0"
 .IX Subsection "Some words on SNMP"
 I can imagine very few people that will be able to get real data from
 their car every five minutes. All other people will have to settle for
@@ -803,7 +806,9 @@ interface and from the above output I see that it is number four. I try:
 .PP
 .Vb 1
 \&   [user@host /home/alex]$ snmpget \-v2c \-c public cisco 2.2.1.10.4 2.2.1.16.4
-\&
+.Ve
+.PP
+.Vb 2
 \&   interfaces.ifTable.ifEntry.ifInOctets.4 = 2290729126
 \&   interfaces.ifTable.ifEntry.ifOutOctets.4 = 1256486519
 .Ve
@@ -831,7 +836,7 @@ and try snmpwalk if you don't get an answer from snmpget.
 .PP
 If you understand the above section and get numbers from your device, continue
 on with this tutorial. If not, then go back and re-read this part.
-.SS "A Real World Example"
+.Sh "A Real World Example"
 .IX Subsection "A Real World Example"
 Let the fun begin. First, create a new database. It contains data from
 two counters, called input and output. The data is put into archives
@@ -870,7 +875,9 @@ We will need:
 \& 700 samples of 30 minutes (2 days and 2 hours, plus 12.5 days)
 \& 775 samples of 2 hours    (above + 50 days)
 \& 797 samples of 1 day      (above + 732 days, rounded up to 797)
-\&
+.Ve
+.PP
+.Vb 11
 \&   rrdtool create myrouter.rrd         \e
 \&            DS:input:COUNTER:600:U:U   \e
 \&            DS:output:COUNTER:600:U:U  \e
@@ -897,9 +904,13 @@ to do exactly on your \s-1OS\s0 to make it work.
 \&      get result of
 \&         snmpget router community 2.2.1.16.4
 \&      into variable $out
-\&
+.Ve
+.PP
+.Vb 1
 \&      rrdtool update myrouter.rrd N:$in:$out
-\&
+.Ve
+.PP
+.Vb 2
 \&      wait for 5 minutes
 \&   done
 .Ve
@@ -927,7 +938,7 @@ see if you can get various options and calculations to work.
 Suggestion: Display in bytes per second and in bits per second. Make
 the Ethernet graphics go red if they are over four megabits per
 second.
-.SS "Consolidation Functions"
+.Sh "Consolidation Functions"
 .IX Subsection "Consolidation Functions"
 A few paragraphs back I mentioned the possibility of keeping
 the maximum values instead of the average values. Let's go
@@ -991,7 +1002,7 @@ interpret the data in an appropriate way. This is true for all data.
 The biggest mistake you can make is to use the collected data for
 something that it is not suitable for. You would be better off if
 you didn't have the graph at all.
-.SS "Let's review what you now should know"
+.Sh "Let's review what you now should know"
 .IX Subsection "Let's review what you now should know"
 You know how to create a database and can put data in it. You can get
 the numbers out again by creating an image, do math on the data from
@@ -1005,7 +1016,7 @@ the start and try some modifications on the examples. Make sure you
 fully understand everything. It will be worth the effort and helps
 you not only with the rest of this tutorial, but also in your day to day
 monitoring long after you read this introduction.
-.SS "Data Source Types"
+.Sh "Data Source Types"
 .IX Subsection "Data Source Types"
 All right, you feel like continuing. Welcome back and get ready
 for an increased speed in the examples and explanations.
@@ -1051,7 +1062,7 @@ calculations stay the same.
 .PP
 Let's try them all:
 .PP
-.Vb 10
+.Vb 22
 \&   rrdtool create all.rrd \-\-start 978300900 \e
 \&            DS:a:COUNTER:600:U:U \e
 \&            DS:b:GAUGE:600:U:U \e
@@ -1075,7 +1086,7 @@ Let's try them all:
 \&            DEF:linec=all.rrd:c:AVERAGE LINE3:linec#0000FF:"Line C" \e
 \&            DEF:lined=all.rrd:d:AVERAGE LINE3:lined#000000:"Line D"
 .Ve
-.SS "RRDtool under the Microscope"
+.Sh "RRDtool under the Microscope"
 .IX Subsection "RRDtool under the Microscope"
 .IP "\(bu" 2
 Line A is a \s-1COUNTER\s0 type, so it should continuously increment and RRDtool
@@ -1087,7 +1098,7 @@ Line B is of type \s-1GAUGE\s0. These are \*(L"real\*(R" values so they should m
 what we put in: a sort of a wave.
 .IP "\(bu" 2
 Line C is of type \s-1DERIVE\s0. It should be a counter that can decrease. It does
-so between 2400 and 0, with 1800 in-between.
+so between 2400 and 0, with 1800 in\-between.
 .IP "\(bu" 2
 Line D is of type \s-1ABSOLUTE\s0. This is like counter but it works on
 values without calculating the difference. The numbers are the same
@@ -1136,7 +1147,7 @@ the meaning of this input is different and thus the line is different.
 In this case the deltas increase each time with 300. The time delta
 stays at a constant 300 and therefore the division of the two gives
 increasing values.
-.SS "Counter Wraps"
+.Sh "Counter Wraps"
 .IX Subsection "Counter Wraps"
 There are a few more basics to show. Some important options are still to
 be covered and we haven't look at counter wraps yet. First the counter wrap:
@@ -1153,7 +1164,9 @@ maximum value of the counter + 1. For our car this would be:
 .PP
 .Vb 1
 \& Delta = 7 \- 999987 = \-999980    (instead of 1000007\-999987=20)
-\&
+.Ve
+.PP
+.Vb 1
 \& Real delta = \-999980 + 999999 + 1 = 20
 .Ve
 .PP
@@ -1189,7 +1202,7 @@ other problems as well and this particular problem would not even be
 worth thinking about. Even though, I did include an example, so you
 can judge for yourself.
 .PP
-The next section gives you some numerical examples for counter-wraps.
+The next section gives you some numerical examples for counter\-wraps.
 Try to do the calculations yourself or just believe me if your calculator
 can't handle the numbers :)
 .PP
@@ -1199,14 +1212,18 @@ Correction numbers:
 \& \- 32 bits: (4294967295 + 1) =                                4294967296
 \& \- 64 bits: (18446744073709551615 + 1)
 \&                                    \- correction1 = 18446744069414584320
-\&
+.Ve
+.PP
+.Vb 6
 \& Before:        4294967200
 \& Increase:                100
 \& Should become: 4294967300
 \& But really is:             4
 \& Delta:        \-4294967196
 \& Correction1:  \-4294967196 + 4294967296 = 100
-\&
+.Ve
+.PP
+.Vb 9
 \& Before:        18446744073709551000
 \& Increase:                             800
 \& Should become: 18446744073709551800
@@ -1216,7 +1233,9 @@ Correction numbers:
 \&                                + 4294967296 = \-18446744069414583520
 \& Correction2:  \-18446744069414583520
 \&                   + 18446744069414584320 = 800
-\&
+.Ve
+.PP
+.Vb 7
 \& Before:        18446744073709551615 ( maximum value )
 \& Increase:      18446744069414584320 ( absurd increase, minimum for
 \& Should become: 36893488143124135935             this example to work )
@@ -1224,7 +1243,9 @@ Correction numbers:
 \& Delta:                     \-4294967296
 \& Correction1:  \-4294967296 + 4294967296 = 0
 \& (not negative \-> no correction2)
-\&
+.Ve
+.PP
+.Vb 7
 \& Before:        18446744073709551615 ( maximum value )
 \& Increase:      18446744069414584319 ( one less increase )
 \& Should become: 36893488143124135934
@@ -1254,7 +1275,7 @@ and there must have been an error. Remember: the opposite is not true,
 if the numbers pass this check, it doesn't mean that they are
 correct. Always judge the graph with a healthy dose of suspicion if it
 seems weird to you.
-.SS "Data Resampling"
+.Sh "Data Resampling"
 .IX Subsection "Data Resampling"
 One important feature of RRDtool has not been explained yet: it is
 virtually impossible to collect data and feed it into RRDtool on exact
@@ -1276,7 +1297,9 @@ RRDtool interpolates and stores 300 as it should be.
 .PP
 .Vb 1
 \&      in the RRD                 in reality
-\&
+.Ve
+.PP
+.Vb 4
 \& time+000:   0 delta="U"   time+000:    0 delta="U"
 \& time+300: 300 delta=300   time+300:  300 delta=300
 \& time+600: 600 delta=300   time+603:  603 delta=303
@@ -1312,7 +1335,7 @@ Put in some data
 .PP
 Create output
 .PP
-.Vb 10
+.Vb 16
 \&   rrdtool graph seconds1.png                       \e
 \&      \-\-start 920804700 \-\-end 920806200             \e
 \&      \-\-height 200                                  \e
index 105c758d757e14d939edf14584d9ef716b4a47fc..4eda356ae9847c7ca648963508dbc120b2ef6b9f 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdtutorial</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#see_also">SEE ALSO</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -85,7 +77,7 @@ networking.</p>
 document explains the basics and may be boring.  But if you don't
 understand the basics, the examples will not be as meaningful to you.</p>
 <p>Sometimes things change.  This example used to provide numbers like
-&quot;0.04&quot; in stead of &quot;4.00000e-02&quot;.  Those are really the same numbers,
+``0.04'' in stead of ``4.00000e-02''.  Those are really the same numbers,
 just written down differently.  Don't be alarmed if a future version
 of rrdtool displays a slightly different form of output. The examples
 in this document are correct for version 1.2.0 of RRDtool.</p>
@@ -125,7 +117,7 @@ you can do this, RRDtool will be able to store it. The values must be
 numerical but don't have to be integers, as is the case with MRTG (the
 next section will give more details on this more specialized application).</p>
 <p>Many examples below talk about SNMP which is an acronym for Simple Network
-Management Protocol. &quot;Simple&quot; refers to the protocol. It does not
+Management Protocol. ``Simple'' refers to the protocol. It does not
 mean it is simple to manage or monitor a network. After working your
 way through this document, you should know enough to be able to
 understand what people are talking about. For now, just realize that
@@ -171,8 +163,8 @@ and not only for this particular one. Look in the documentation that
 came with RRDtool for the location and usage of the list.</p>
 <p>I suggest you take a moment to subscribe to the mailing list right now
 by sending an email to &lt;<a href="mailto:rrd-users-request@lists.oetiker.ch">rrd-users-request@lists.oetiker.ch</a>&gt; with a
-subject of &quot;subscribe&quot;. If you ever want to leave this list, just write
-an email to the same address but now with a subject of &quot;unsubscribe&quot;.</p>
+subject of ``subscribe''. If you ever want to leave this list, just write
+an email to the same address but now with a subject of ``unsubscribe''.</p>
 <p>
 </p>
 <h2><a name="how_will_you_help_me">How will you help me?</a></h2>
@@ -211,18 +203,17 @@ know the time that has passes since we last asked so we now know how
 many bytes have been transfered ***on average*** per second. This is
 not very hard to calculate. First in words, then in calculations:</p>
 <ol>
-<li>
-<p>Take the current counter, subtract the previous value from it.</p>
-</li>
-<li>
-<p>Do the same with the current time and the previous time (in seconds).</p>
-</li>
-<li>
-<p>Divide the outcome of (1) by the outcome of (2), the result is
+<li></li>
+Take the current counter, subtract the previous value from it.
+<p></p>
+<li></li>
+Do the same with the current time and the previous time (in seconds).
+<p></p>
+<li></li>
+Divide the outcome of (1) by the outcome of (2), the result is
 the amount of bytes per second. Multiply by eight to get the
-number of bits per second (bps).</p>
-</li>
-</ol>
+number of bits per second (bps).
+<p></p></ol>
 <pre>
   bps = (counter_now - counter_before) / (time_now - time_before) * 8</pre>
 <p>For some people it may help to translate this to an automobile example.
@@ -275,7 +266,7 @@ and skip all of the '\' characters.</p>
 <p>We created the round robin database called test (test.rrd) which starts at
 noon the day I started writing this document, 7th of March, 1999 (this date
 translates to 920804400 seconds as explained below). Our database holds
-one data source (DS) named &quot;speed&quot; that represents a counter. This counter
+one data source (DS) named ``speed'' that represents a counter. This counter
 is read every five minutes (this is the default therefore you don't have to
 put <code>--step=300</code>).  In the same database two round robin archives (RRAs)
 are kept, one averages the data every time it is read (e.g., there's nothing
@@ -289,7 +280,7 @@ it will therefore look different for different time zones.</p>
 This means your time zone is different. In all examples where I talk
 about time, the hours may be wrong for you. This has little effect on
 the results of the examples, just correct the hours while reading.
-As an example: where I will see &quot;12:05&quot; the UK folks will see &quot;11:05&quot;.</p>
+As an example: where I will see ``12:05'' the UK folks will see ``11:05''.</p>
 <p>We now have to fill our database with some numbers. We'll pretend to
 have read the following numbers:</p>
 <pre>
@@ -323,7 +314,7 @@ have read the following numbers:</p>
 <p>As you can see, it is possible to feed more than one value into the
 database in one command. I had to stop at three for readability but
 the real maximum per line is OS dependent.</p>
-<p>We can now retrieve the data from our database using &quot;rrdtool fetch&quot;:</p>
+<p>We can now retrieve the data from our database using ``rrdtool fetch'':</p>
 <pre>
  rrdtool fetch test.rrd AVERAGE --start 920804400 --end 920809200</pre>
 <p>It should return the following output:</p>
@@ -347,8 +338,8 @@ the real maximum per line is OS dependent.</p>
  920808900: 3.3333333333e-03
  920809200: nan</pre>
 <p>If it doesn't, something may be wrong.  Perhaps your OS will print
-&quot;NaN&quot; in a different form. &quot;NaN&quot; stands for &quot;Not A Number&quot;.  If your OS
-writes &quot;U&quot; or &quot;UNKN&quot; or something similar that's okay.  If something
+``NaN'' in a different form. ``NaN'' stands for ``Not A Number''.  If your OS
+writes ``U'' or ``UNKN'' or something similar that's okay.  If something
 else is wrong, it will probably be due to an error you made (assuming
 that my tutorial is correct of course :-). In that case: delete the
 database and try again.</p>
@@ -364,7 +355,7 @@ database and try again.</p>
          LINE2:myspeed#FF0000</pre>
 <p>This will create speed.png which starts at 12:00 and ends at 13:00.
 There is a definition of a variable called myspeed, using the data from RRA
-&quot;speed&quot; out of database &quot;test.rrd&quot;. The line drawn is 2 pixels high
+``speed'' out of database ``test.rrd''. The line drawn is 2 pixels high
 and represents the variable myspeed. The color is red (specified by
 its rgb-representation, see below).</p>
 <p>You'll notice that the start of the graph is not at 12:00 but at 12:05.
@@ -375,8 +366,8 @@ not happen a lot, hopefully.</p>
 <p>The colors are built up from red, green and blue. For each of the
 components, you specify how much to use in hexadecimal where 00 means
 not included and FF means fully included.
-The &quot;color&quot; white is a mixture of red, green and blue: FFFFFF
-The &quot;color&quot; black is all colors off: 000000</p>
+The ``color'' white is a mixture of red, green and blue: FFFFFF
+The ``color'' black is all colors off: 000000</p>
 <pre>
    red     #FF0000
    green   #00FF00
@@ -384,10 +375,10 @@ The &quot;color&quot; black is all colors off: 000000</p>
    magenta #FF00FF     (mixed red with blue)
    gray    #555555     (one third of all components)</pre>
 <p>Additionally you can (with a recent RRDtool)  add an alpha channel
-(transparency).  The default will be &quot;FF&quot; which means non-transparent.</p>
+(transparency).  The default will be ``FF'' which means non-transparent.</p>
 <p>The PNG you just created can be displayed using your favorite image
 viewer.  Web browsers will display the PNG via the URL
-&quot;file:///the/path/to/speed.png&quot;</p>
+``file:///the/path/to/speed.png''</p>
 <p>
 </p>
 <h2><a name="graphics_with_some_math">Graphics with some math</a></h2>
@@ -397,8 +388,8 @@ and 13:00 would be likely candidates) so they are skipped.</p>
 <p>The vertical axis displays the range we entered. We provided
 kilometers and when divided by 300 seconds, we get very small
 numbers. To be exact, the first value was 12 (12357-12345) and divided
-by 300 this makes 0.04, which is displayed by RRDtool as &quot;40 m&quot;
-meaning &quot;40/1000&quot;. The &quot;m&quot; (milli) has nothing to do with meters (also m),
+by 300 this makes 0.04, which is displayed by RRDtool as ``40 m''
+meaning ``40/1000''. The ``m'' (milli) has nothing to do with meters (also m),
 kilometers or millimeters! RRDtool doesn't know about the physical
 units of our data, it just works with dimensionless numbers.</p>
 <p>If we had measured our distances in meters, this would have been
@@ -424,14 +415,14 @@ like so:</p>
 And it is your shell interpreting \, not RRDtool. You may need to
 adjust examples accordingly if you happen to use an operating
 system or shell which behaves differently.</p>
-<p>After viewing this PNG, you notice the &quot;m&quot; (milli) has
+<p>After viewing this PNG, you notice the ``m'' (milli) has
 disappeared. This it what the correct result would be. Also, a label
 has been added to the image.  Apart from the things mentioned above,
 the PNG should look the same.</p>
 <p>The calculations are specified in the CDEF part above and are in
-Reverse Polish Notation (&quot;RPN&quot;). What we requested RRDtool to do is:
-&quot;take the data source myspeed and the number 1000; multiply
-those&quot;. Don't bother with RPN yet, it will be explained later on in
+Reverse Polish Notation (``RPN''). What we requested RRDtool to do is:
+``take the data source myspeed and the number 1000; multiply
+those''. Don't bother with RPN yet, it will be explained later on in
 more detail. Also, you may want to read my tutorial on CDEFs and Steve
 Rader's tutorial on RPN. But first finish this tutorial.</p>
 <p>Hang on! If we can multiply values with 1000, it should also be possible
@@ -504,7 +495,7 @@ be the 5th line) used to read 'CDEF:kmh=myspeed,3600,*'</p>
    &lt;BR&gt;
    &lt;IMG src=&quot;speed4.png&quot; alt=&quot;Traveled too fast?&quot;&gt;
    &lt;/BODY&gt;&lt;/HTML&gt;</pre>
-<p>Name the file &quot;speed.html&quot; or similar, and look at it in your web browser.</p>
+<p>Name the file ``speed.html'' or similar, and look at it in your web browser.</p>
 <p>Now, all you have to do is measure the values regularly and update the
 database.  When you want to view the data, recreate the PNGs and make
 sure to refresh them in your browser. (Note: just clicking reload may
@@ -514,9 +505,9 @@ or ctrl-F5).</p>
 </p>
 <h2><a name="updates_in_reality">Updates in Reality</a></h2>
 <p>We've already used the <code>update</code> command: it took one or more
-parameters in the form of &quot;&lt;time&gt;:&lt;value&gt;&quot;. You'll be glad to know
-that you can specify the current time by filling in a &quot;N&quot; as the time.
-Or you could use the &quot;time&quot; function in Perl (the shortest example in
+parameters in the form of ``&lt;time&gt;:&lt;value&gt;''. You'll be glad to know
+that you can specify the current time by filling in a ``N'' as the time.
+Or you could use the ``time'' function in Perl (the shortest example in
 this tutorial):</p>
 <pre>
    perl -e 'print time, &quot;\n&quot; '</pre>
@@ -550,7 +541,7 @@ you understand they are not necessary. When you have to determine why
 things went wrong you need to know how they work.</p>
 <p>One tool used in the example has been talked about very briefly in the
 beginning of this document, it is called SNMP. It is a way of talking
-to networked equipment. The tool I use below is called &quot;snmpget&quot; and
+to networked equipment. The tool I use below is called ``snmpget'' and
 this is how it works:</p>
 <pre>
    snmpget device password OID</pre>
@@ -558,14 +549,14 @@ this is how it works:</p>
 <pre>
    snmpget -v[version] -c[password] device OID</pre>
 <p>For device you substitute the name, or the IP address, of your device.
-For password you use the &quot;community read string&quot; as it is called in the
-SNMP world.  For some devices the default of &quot;public&quot; might work, however
+For password you use the ``community read string'' as it is called in the
+SNMP world.  For some devices the default of ``public'' might work, however
 this can be disabled, altered or protected for privacy and security
 reasons.  Read the documentation that comes with your device or program.</p>
-<p>Then there is this parameter, called OID, which means &quot;object identifier&quot;.</p>
+<p>Then there is this parameter, called OID, which means ``object identifier''.</p>
 <p>When you start to learn about SNMP it looks very confusing. It isn't
 all that difficult when you look at the Management Information Base
-(&quot;MIB&quot;).  It is an upside-down tree that describes data, with a single node
+(``MIB'').  It is an upside-down tree that describes data, with a single node
 as the root and from there a number of branches.  These branches end
 up in another node, they branch out, etc.  All the branches have a name
 and they form the path that we follow all the way down.  The branches
@@ -581,7 +572,7 @@ you specify the complete OID.  Often those programs will leave out
 the default portion when returning the data to you.  To make things
 worse, they have several default prefixes ...</p>
 <p>Ok, lets continue to the start of our OID: we had 1.3.6.1.2.1
-From there, we are especially interested in the branch &quot;interfaces&quot;
+From there, we are especially interested in the branch ``interfaces''
 which has number 2 (e.g., 1.3.6.1.2.1.2 or 1.3.6.1.2.1.interfaces).</p>
 <p>First, we have to get some SNMP program. First look if there is a
 pre-compiled package available for your OS. This is the preferred way.
@@ -598,12 +589,12 @@ adapt the example to make it work.</p>
    snmpget -v2c -c public myrouter system.sysDescr.0</pre>
 <p>The device should answer with a description of itself, perhaps an
 empty one. Until you got a valid answer from a device, perhaps using a
-different &quot;password&quot;, or a different device, there is no point in
+different ``password'', or a different device, there is no point in
 continuing.</p>
 <pre>
    snmpget -v2c -c public myrouter interfaces.ifNumber.0</pre>
 <p>Hopefully you get a number as a result, the number of interfaces.
-If so, you can carry on and try a different program called &quot;snmpwalk&quot;.</p>
+If so, you can carry on and try a different program called ``snmpwalk''.</p>
 <pre>
    snmpwalk -v2c -c public myrouter interfaces.ifTable.ifEntry.ifDescr</pre>
 <p>If it returns with a list of interfaces, you're almost there.
@@ -615,7 +606,7 @@ Here's an example:
    interfaces.ifTable.ifEntry.ifDescr.3 = &quot;BRI0&quot; Hex: 42 52 49 30
    interfaces.ifTable.ifEntry.ifDescr.4 = &quot;Ethernet0&quot;
    interfaces.ifTable.ifEntry.ifDescr.5 = &quot;Loopback0&quot;</pre>
-<p>On this cisco equipment, I would like to monitor the &quot;Ethernet0&quot;
+<p>On this cisco equipment, I would like to monitor the ``Ethernet0''
 interface and from the above output I see that it is number four. I try:</p>
 <pre>
    [user@host /home/alex]$ snmpget -v2c -c public cisco 2.2.1.10.4 2.2.1.16.4</pre>
@@ -660,9 +651,9 @@ amount of data:</p>
  732 1-day samples:     732   days</pre>
 <p>These ranges are appended, so the total amount of data stored in the
 database is approximately 797 days. RRDtool stores the data
-differently, it doesn't start the &quot;weekly&quot; archive where the &quot;daily&quot;
+differently, it doesn't start the ``weekly'' archive where the ``daily''
 archive stopped. For both archives the most recent data will be near
-&quot;now&quot; and therefore we will need to keep more data than MRTG does!</p>
+``now'' and therefore we will need to keep more data than MRTG does!</p>
 <p>We will need:</p>
 <pre>
  600 samples of 5 minutes  (2 days and 2 hours)
@@ -709,7 +700,7 @@ to do exactly on your OS to make it work.</p>
 One day is 24 hours of 60 minutes of 60 seconds: 24*60*60=86400, we
 start at now minus 86400 seconds. We define (with DEFs) inoctets and
 outoctets as the average values from the database myrouter.rrd and draw
-an area for the &quot;in&quot; traffic and a line for the &quot;out&quot; traffic.</p>
+an area for the ``in'' traffic and a line for the ``out'' traffic.</p>
 <p>View the image and keep logging data for a few more days.
 If you like, you could try the examples from the test database and
 see if you can get various options and calculations to work.</p>
@@ -853,28 +844,27 @@ calculations stay the same.</p>
 </p>
 <h2><a name="rrdtool_under_the_microscope">RRDtool under the Microscope</a></h2>
 <ul>
-<li>
-<p>Line A is a COUNTER type, so it should continuously increment and RRDtool
+<li></li>
+Line A is a COUNTER type, so it should continuously increment and RRDtool
 must calculate the differences. Also, RRDtool needs to divide the
 difference by the amount of time lapsed. This should end up as a
-straight line at 1 (the deltas are 300, the time is 300).</p>
-</li>
-<li>
-<p>Line B is of type GAUGE. These are &quot;real&quot; values so they should match
-what we put in: a sort of a wave.</p>
-</li>
-<li>
-<p>Line C is of type DERIVE. It should be a counter that can decrease. It does
-so between 2400 and 0, with 1800 in-between.</p>
-</li>
-<li>
-<p>Line D is of type ABSOLUTE. This is like counter but it works on
+straight line at 1 (the deltas are 300, the time is 300).
+<p></p>
+<li></li>
+Line B is of type GAUGE. These are ``real'' values so they should match
+what we put in: a sort of a wave.
+<p></p>
+<li></li>
+Line C is of type DERIVE. It should be a counter that can decrease. It does
+so between 2400 and 0, with 1800 in-between.
+<p></p>
+<li></li>
+Line D is of type ABSOLUTE. This is like counter but it works on
 values without calculating the difference. The numbers are the same
-and as you can see (hopefully) this has a different result.</p>
-</li>
-</ul>
+and as you can see (hopefully) this has a different result.
+<p></p></ul>
 <p>This translates in the following values, starting at 23:10 and ending
-at 00:10 the next day (where &quot;u&quot; means unknown/unplotted):</p>
+at 00:10 the next day (where ``u'' means unknown/unplotted):</p>
 <pre>
  - Line A:  u  u  1  1  1  1  1  1  1  1  1  u
  - Line B:  u  1  3  5  3  1  2  4  6  4  2  u
@@ -887,35 +877,34 @@ and you successfully entered the year 2000 :)</p>
 the lines.</p>
 <p>Let's go over the data again:</p>
 <ul>
-<li>
-<p>Line A: 300,600,900 and so on. The counter delta is a constant 300 and
+<li></li>
+Line A: 300,600,900 and so on. The counter delta is a constant 300 and
 so is the time delta. A number divided by itself is always 1 (except
-when dividing by zero which is undefined/illegal).</p>
+when dividing by zero which is undefined/illegal).
 <p>Why is it that the first point is unknown? We do know what we put into
 the database, right? True, But we didn't have a value to calculate the delta
 from, so we don't know where we started. It would be wrong to assume we
 started at zero so we don't!</p>
-</li>
-<li>
-<p>Line B: There is nothing to calculate. The numbers are as they are.</p>
-</li>
-<li>
-<p>Line C: Again, the start-out value is unknown. The same story is holds
+<p></p>
+<li></li>
+Line B: There is nothing to calculate. The numbers are as they are.
+<p></p>
+<li></li>
+Line C: Again, the start-out value is unknown. The same story is holds
 as for line A. In this case the deltas are not constant, therefore the line
 is not either. If we would put the same numbers in the database as we did for
 line A, we would have gotten the same line. Unlike type counter,
 this type can decrease and I hope to show you later on why
-this makes a difference.</p>
-</li>
-<li>
-<p>Line D: Here the device calculates the deltas. Therefore we DO know the
+this makes a difference.
+<p></p>
+<li></li>
+Line D: Here the device calculates the deltas. Therefore we DO know the
 first delta and it is plotted. We had the same input as with line A, but
 the meaning of this input is different and thus the line is different.
 In this case the deltas increase each time with 300. The time delta
 stays at a constant 300 and therefore the division of the two gives
-increasing values.</p>
-</li>
-</ul>
+increasing values.
+<p></p></ul>
 <p>
 </p>
 <h2><a name="counter_wraps">Counter Wraps</a></h2>
@@ -1004,10 +993,10 @@ can't handle the numbers :)</p>
 for RRDtool to fail (provided it's bug free of course), so this should
 not happen. However, SNMP or whatever method you choose to collect the
 data, might also report wrong numbers occasionally.  We can't prevent all
-errors, but there are some things we can do. The RRDtool &quot;create&quot; command
+errors, but there are some things we can do. The RRDtool ``create'' command
 takes two special parameters for this. They define
-the minimum and maximum allowed values. Until now, we used &quot;U&quot;, meaning
-&quot;unknown&quot;. If you provide values for one or both of them and if RRDtool
+the minimum and maximum allowed values. Until now, we used ``U'', meaning
+``unknown''. If you provide values for one or both of them and if RRDtool
 receives data points that are outside these limits, it will ignore those
 values. For a thermometer in degrees Celsius, the absolute minimum is
 just under -273. For my router, I can assume this minimum is much higher
index 2c250f1b148fe8797bb49f63f8a0cced855c43c7..29d5de337215e76e84d58c8e97042112d6a2f415 100644 (file)
@@ -6,22 +6,23 @@ N\bNA\bAM\bME\bE
        rrdtutorial - Alex van den Bogaerdt's RRDtool tutorial
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-       RRDtool is written by Tobias Oetiker <tobi@oetiker.ch> with
-       contributions from many people all around the world. This document is
-       written by Alex van den Bogaerdt <alex@vandenbogaerdt.nl> to help you
-       understand what RRDtool is and what it can do for you.
+       RRDtool is written by Tobias Oetiker <tobi@oetiker.ch> with contribu-
+       tions from many people all around the world. This document is written
+       by Alex van den Bogaerdt <alex@vandenbogaerdt.nl> to help you under-
+       stand what RRDtool is and what it can do for you.
 
        The documentation provided with RRDtool can be too technical for some
-       people. This tutorial is here to help you understand the basics of
-       RRDtool. It should prepare you to read the documentation yourself.  It
-       also explains the general things about statistics with a focus on
-       networking.
+       people. This tutorial is here to help you understand the basics of RRD-
+       tool. It should prepare you to read the documentation yourself.  It
+       also explains the general things about statistics with a focus on net-
+       working.
 
 T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
-   I\bIm\bmp\bpo\bor\brt\bta\ban\bnt\bt
-       Please don't skip ahead in this document!  The first part of this
-       document explains the basics and may be boring.  But if you don't
-       understand the basics, the examples will not be as meaningful to you.
+       I\bIm\bmp\bpo\bor\brt\bta\ban\bnt\bt
+
+       Please don't skip ahead in this document!  The first part of this docu-
+       ment explains the basics and may be boring.  But if you don't under-
+       stand the basics, the examples will not be as meaningful to you.
 
        Sometimes things change.  This example used to provide numbers like
        "0.04" in stead of "4.00000e-02".  Those are really the same numbers,
@@ -42,64 +43,68 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        result as a fix to the source of this document. Discuss it on the
        user's list, or write to me.
 
-   W\bWh\bha\bat\bt i\bis\bs R\bRR\bRD\bDt\bto\boo\bol\bl?\b?
-       RRDtool refers to Round Robin Database tool.  Round robin is a
-       technique that works with a fixed amount of data, and a pointer to the
-       current element. Think of a circle with some dots plotted on the edge.
+       W\bWh\bha\bat\bt i\bis\bs R\bRR\bRD\bDt\bto\boo\bol\bl?\b?
+
+       RRDtool refers to Round Robin Database tool.  Round robin is a tech-
+       nique that works with a fixed amount of data, and a pointer to the cur-
+       rent element. Think of a circle with some dots plotted on the edge.
        These dots are the places where data can be stored. Draw an arrow from
        the center of the circle to one of the dots; this is the pointer.  When
-       the current data is read or written, the pointer moves to the next
-       element. As we are on a circle there is neither a beginning nor an end,
+       the current data is read or written, the pointer moves to the next ele-
+       ment. As we are on a circle there is neither a beginning nor an end,
        you can go on and on and on. After a while, all the available places
        will be used and the process automatically reuses old locations. This
-       way, the dataset will not grow in size and therefore requires no
-       maintenance.  RRDtool works with with Round Robin Databases (RRDs). It
+       way, the dataset will not grow in size and therefore requires no main-
+       tenance.  RRDtool works with with Round Robin Databases (RRDs). It
        stores and retrieves data from them.
 
-   W\bWh\bha\bat\bt d\bda\bat\bta\ba c\bca\ban\bn b\bbe\be p\bpu\but\bt i\bin\bnt\bto\bo a\ban\bn R\bRR\bRD\bD?\b?
+       W\bWh\bha\bat\bt d\bda\bat\bta\ba c\bca\ban\bn b\bbe\be p\bpu\but\bt i\bin\bnt\bto\bo a\ban\bn R\bRR\bRD\bD?\b?
+
        You name it, it will probably fit as long as it is some sort of time-
        series data. This means you have to be able to measure some value at
        several points in time and provide this information to RRDtool. If you
        can do this, RRDtool will be able to store it. The values must be
        numerical but don't have to be integers, as is the case with MRTG (the
-       next section will give more details on this more specialized
-       application).
-
-       Many examples below talk about SNMP which is an acronym for Simple
-       Network Management Protocol. "Simple" refers to the protocol. It does
-       not mean it is simple to manage or monitor a network. After working
-       your way through this document, you should know enough to be able to
-       understand what people are talking about. For now, just realize that
-       SNMP can be used to query devices for the values of counters they keep.
-       It is the value from those counters that we want to store in the RRD.
-
-   W\bWh\bha\bat\bt c\bca\ban\bn I\bI d\bdo\bo w\bwi\bit\bth\bh t\bth\bhi\bis\bs t\bto\boo\bol\bl?\b?
+       next section will give more details on this more specialized applica-
+       tion).
+
+       Many examples below talk about SNMP which is an acronym for Simple Net-
+       work Management Protocol. "Simple" refers to the protocol. It does not
+       mean it is simple to manage or monitor a network. After working your
+       way through this document, you should know enough to be able to under-
+       stand what people are talking about. For now, just realize that SNMP
+       can be used to query devices for the values of counters they keep. It
+       is the value from those counters that we want to store in the RRD.
+
+       W\bWh\bha\bat\bt c\bca\ban\bn I\bI d\bdo\bo w\bwi\bit\bth\bh t\bth\bhi\bis\bs t\bto\boo\bol\bl?\b?
+
        RRDtool originated from MRTG (Multi Router Traffic Grapher). MRTG
        started as a tiny little script for graphing the use of a university's
        connection to the Internet. MRTG was later (ab-)used as a tool for
-       graphing other data sources including temperature, speed, voltage,
-       number of printouts and the like.
+       graphing other data sources including temperature, speed, voltage, num-
+       ber of printouts and the like.
 
        Most likely you will start to use RRDtool to store and process data
-       collected via SNMP. The data will most likely be bytes (or bits)
-       transfered from and to a network or a computer.  But it can also be
-       used to display tidal waves, solar radiation, power consumption, number
-       of visitors at an exhibition, noise levels near an airport, temperature
-       on your favorite holiday location, temperature in the fridge and
-       whatever you imagination can come up with.
-
-       You only need a sensor to measure the data and be able to feed the
-       numbers into RRDtool. RRDtool then lets you create a database, store
-       data in it, retrieve that data and create graphs in PNG format for
-       display on a web browser. Those PNG images are dependent on the data
-       you collected and could be, for instance, an overview of the average
-       network usage, or the peaks that occurred.
-
-   W\bWh\bha\bat\bt i\bif\bf I\bI s\bst\bti\bil\bll\bl h\bha\bav\bve\be p\bpr\bro\bob\bbl\ble\bem\bms\bs a\baf\bft\bte\ber\br r\bre\bea\bad\bdi\bin\bng\bg t\bth\bhi\bis\bs d\bdo\boc\bcu\bum\bme\ben\bnt\bt?\b?
+       collected via SNMP. The data will most likely be bytes (or bits) trans-
+       fered from and to a network or a computer.  But it can also be used to
+       display tidal waves, solar radiation, power consumption, number of vis-
+       itors at an exhibition, noise levels near an airport, temperature on
+       your favorite holiday location, temperature in the fridge and whatever
+       you imagination can come up with.
+
+       You only need a sensor to measure the data and be able to feed the num-
+       bers into RRDtool. RRDtool then lets you create a database, store data
+       in it, retrieve that data and create graphs in PNG format for display
+       on a web browser. Those PNG images are dependent on the data you col-
+       lected and could be, for instance, an overview of the average network
+       usage, or the peaks that occurred.
+
+       W\bWh\bha\bat\bt i\bif\bf I\bI s\bst\bti\bil\bll\bl h\bha\bav\bve\be p\bpr\bro\bob\bbl\ble\bem\bms\bs a\baf\bft\bte\ber\br r\bre\bea\bad\bdi\bin\bng\bg t\bth\bhi\bis\bs d\bdo\boc\bcu\bum\bme\ben\bnt\bt?\b?
+
        First of all: read it again! You may have missed something.  If you are
        unable to compile the sources and you have a fairly common OS, it will
-       probably not be the fault of RRDtool. There may be pre-compiled
-       versions around on the Internet. If they come from trusted sources, get
+       probably not be the fault of RRDtool. There may be pre-compiled ver-
+       sions around on the Internet. If they come from trusted sources, get
        one of those.
 
        If on the other hand the program works but does not give you the
@@ -107,19 +112,19 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        configuration and compare it with the examples that follow.
 
        There is a mailing list and an archive of it. Read the list for a few
-       weeks and search the archive. It is considered rude to just ask a
-       question without searching the archives: your problem may already have
-       been solved for somebody else!  This is true for most, if not all,
-       mailing lists and not only for this particular one. Look in the
-       documentation that came with RRDtool for the location and usage of the
-       list.
+       weeks and search the archive. It is considered rude to just ask a ques-
+       tion without searching the archives: your problem may already have been
+       solved for somebody else!  This is true for most, if not all, mailing
+       lists and not only for this particular one. Look in the documentation
+       that came with RRDtool for the location and usage of the list.
 
        I suggest you take a moment to subscribe to the mailing list right now
-       by sending an email to <rrd-users-request@lists.oetiker.ch> with a
-       subject of "subscribe". If you ever want to leave this list, just write
-       an email to the same address but now with a subject of "unsubscribe".
+       by sending an email to <rrd-users-request@lists.oetiker.ch> with a sub-
+       ject of "subscribe". If you ever want to leave this list, just write an
+       email to the same address but now with a subject of "unsubscribe".
+
+       H\bHo\bow\bw w\bwi\bil\bll\bl y\byo\bou\bu h\bhe\bel\blp\bp m\bme\be?\b?
 
-   H\bHo\bow\bw w\bwi\bil\bll\bl y\byo\bou\bu h\bhe\bel\blp\bp m\bme\be?\b?
        By giving you some detailed descriptions with detailed examples.  I
        assume that following the instructions in the order presented will give
        you enough knowledge of RRDtool to experiment for yourself.  If it
@@ -132,7 +137,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        You will need to know something about hexadecimal numbers. If you don't
        then start with reading bin_dec_hex before you continue here.
 
-   Y\bYo\bou\bur\br f\bfi\bir\brs\bst\bt R\bRo\bou\bun\bnd\bd R\bRo\bob\bbi\bin\bn D\bDa\bat\bta\bab\bba\bas\bse\be
+       Y\bYo\bou\bur\br f\bfi\bir\brs\bst\bt R\bRo\bou\bun\bnd\bd R\bRo\bob\bbi\bin\bn D\bDa\bat\bta\bab\bba\bas\bse\be
+
        In my opinion the best way to learn something is to actually do it.
        Why not start right now?  We will create a database, put some values in
        it and extract this data again.  Your output should be the same as the
@@ -144,26 +150,26 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
 
        Assume we have a device that transfers bytes to and from the Internet.
        This device keeps a counter that starts at zero when it is turned on,
-       increasing with every byte that is transfered. This counter will
-       probably have a maximum value. If this value is reached and an extra
-       byte is counted, the counter starts over at zero. This is the same as
-       many counters in the world such as the mileage counter in a car.
+       increasing with every byte that is transfered. This counter will proba-
+       bly have a maximum value. If this value is reached and an extra byte is
+       counted, the counter starts over at zero. This is the same as many
+       counters in the world such as the mileage counter in a car.
 
        Most discussions about networking talk about bits per second so lets
        get used to that right away. Assume a byte is eight bits and start to
        think in bits not bytes. The counter, however, still counts bytes!  In
        the SNMP world most of the counters are 32 bits. That means they are
-       counting from 0 to 4294967295. We will use these values in the
-       examples.  The device, when asked, returns the current value of the
+       counting from 0 to 4294967295. We will use these values in the exam-
+       ples.  The device, when asked, returns the current value of the
        counter. We know the time that has passes since we last asked so we now
        know how many bytes have been transfered ***on average*** per second.
-       This is not very hard to calculate. First in words, then in
-       calculations:
+       This is not very hard to calculate. First in words, then in calcula-
+       tions:
 
        1. Take the current counter, subtract the previous value from it.
 
-       2. Do the same with the current time and the previous time (in
-          seconds).
+       2. Do the same with the current time and the previous time (in sec-
+          onds).
 
        3. Divide the outcome of (1) by the outcome of (2), the result is the
           amount of bytes per second. Multiply by eight to get the number of
@@ -197,8 +203,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
 
        We could also calculate the speed in km/h: 12 times 5 minutes is an
        hour, so we have to multiply 12 km by 12 to get 144 km/h.  For our
-       native English speaking friends: that's 90 mph so don't try this
-       example at home or where I live :)
+       native English speaking friends: that's 90 mph so don't try this exam-
+       ple at home or where I live :)
 
        Remember: these numbers are averages only.  There is no way to figure
        out from the numbers, if you drove at a constant speed.  There is an
@@ -213,8 +219,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        OS to OS, but I assume you can figure it out if it works different on
        your's. Make sure you do not overwrite any file on your system when
        executing the following command and type the whole line as one long
-       line (I had to split it for readability) and skip all of the '\'
-       characters.
+       line (I had to split it for readability) and skip all of the '\' char-
+       acters.
 
           rrdtool create test.rrd             \
                    --start 920804400          \
@@ -224,7 +230,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
 
        (So enter: "rrdtool create test.rrd --start 920804400 DS ...")
 
-   W\bWh\bha\bat\bt h\bha\bas\bs b\bbe\bee\ben\bn c\bcr\bre\bea\bat\bte\bed\bd?\b?
+       W\bWh\bha\bat\bt h\bha\bas\bs b\bbe\bee\ben\bn c\bcr\bre\bea\bat\bte\bed\bd?\b?
+
        We created the round robin database called test (test.rrd) which starts
        at noon the day I started writing this document, 7th of March, 1999
        (this date translates to 920804400 seconds as explained below). Our
@@ -319,7 +326,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
 
        The meaning of the above output will become clear below.
 
-   T\bTi\bim\bme\be t\bto\bo c\bcr\bre\bea\bat\bte\be s\bso\bom\bme\be g\bgr\bra\bap\bph\bhi\bic\bcs\bs
+       T\bTi\bim\bme\be t\bto\bo c\bcr\bre\bea\bat\bte\be s\bso\bom\bme\be g\bgr\bra\bap\bph\bhi\bic\bcs\bs
+
        Try the following command:
 
         rrdtool graph speed.png                                 \
@@ -340,11 +348,11 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
 
        If this has worked: congratulations! If not, check what went wrong.
 
-       The colors are built up from red, green and blue. For each of the
-       components, you specify how much to use in hexadecimal where 00 means
-       not included and FF means fully included.  The "color" white is a
-       mixture of red, green and blue: FFFFFF The "color" black is all colors
-       off: 000000
+       The colors are built up from red, green and blue. For each of the com-
+       ponents, you specify how much to use in hexadecimal where 00 means not
+       included and FF means fully included.  The "color" white is a mixture
+       of red, green and blue: FFFFFF The "color" black is all colors off:
+       000000
 
           red     #FF0000
           green   #00FF00
@@ -359,7 +367,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        viewer.  Web browsers will display the PNG via the URL
        "file:///the/path/to/speed.png"
 
-   G\bGr\bra\bap\bph\bhi\bic\bcs\bs w\bwi\bit\bth\bh s\bso\bom\bme\be m\bma\bat\bth\bh
+       G\bGr\bra\bap\bph\bhi\bic\bcs\bs w\bwi\bit\bth\bh s\bso\bom\bme\be m\bma\bat\bth\bh
+
        When looking at the image, you notice that the horizontal axis is
        labeled 12:10, 12:20, 12:30, 12:40 and 12:50. Sometimes a label doesn't
        fit (12:00 and 13:00 would be likely candidates) so they are skipped.
@@ -375,10 +384,10 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        If we had measured our distances in meters, this would have been
        (12357000-12345000)/300 = 12000/300 = 40.
 
-       As most people have a better feel for numbers in this range, we'll
-       correct that. We could recreate our database and store the correct
-       data, but there is a better way: we do some calculations while creating
-       the png file!
+       As most people have a better feel for numbers in this range, we'll cor-
+       rect that. We could recreate our database and store the correct data,
+       but there is a better way: we do some calculations while creating the
+       png file!
 
           rrdtool graph speed2.png                           \
              --start 920804400 --end 920808000               \
@@ -411,8 +420,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        detail. Also, you may want to read my tutorial on CDEFs and Steve
        Rader's tutorial on RPN. But first finish this tutorial.
 
-       Hang on! If we can multiply values with 1000, it should also be
-       possible to display kilometers per hour from the same data!
+       Hang on! If we can multiply values with 1000, it should also be possi-
+       ble to display kilometers per hour from the same data!
 
        To change a value that is measured in meters per second:
 
@@ -457,7 +466,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
           Check if kmh is greater than 100    ( kmh,100 ) GT
           If so, return kmh, else return 0    ((( kmh,100) GT ), kmh, 0) IF
 
-   G\bGr\bra\bap\bph\bhi\bic\bcs\bs M\bMa\bag\bgi\bic\bc
+       G\bGr\bra\bap\bph\bhi\bic\bcs\bs M\bMa\bag\bgi\bic\bc
+
        I like to believe there are virtually no limits to how RRDtool graph
        can manipulate data. I will not explain how it works, but look at the
        following PNG:
@@ -499,12 +509,13 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        not be enough, especially when proxies are involved.  Try shift-reload
        or ctrl-F5).
 
-   U\bUp\bpd\bda\bat\bte\bes\bs i\bin\bn R\bRe\bea\bal\bli\bit\bty\by
+       U\bUp\bpd\bda\bat\bte\bes\bs i\bin\bn R\bRe\bea\bal\bli\bit\bty\by
+
        We've already used the "update" command: it took one or more parameters
        in the form of "<time>:<value>". You'll be glad to know that you can
        specify the current time by filling in a "N" as the time.  Or you could
-       use the "time" function in Perl (the shortest example in this
-       tutorial):
+       use the "time" function in Perl (the shortest example in this tuto-
+       rial):
 
           perl -e 'print time, "\n" '
 
@@ -522,23 +533,24 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        them in a script as well. After running that script, view the page
        index.html we created above.
 
-   S\bSo\bom\bme\be w\bwo\bor\brd\bds\bs o\bon\bn S\bSN\bNM\bMP\bP
+       S\bSo\bom\bme\be w\bwo\bor\brd\bds\bs o\bon\bn S\bSN\bNM\bMP\bP
+
        I can imagine very few people that will be able to get real data from
        their car every five minutes. All other people will have to settle for
        some other kind of counter. You could measure the number of pages
-       printed by a printer, for example, the cups of coffee made by the
-       coffee machine, a device that counts the electricity used, whatever.
-       Any incrementing counter can be monitored and graphed using the stuff
-       you learned so far. Later on we will also be able to monitor other
-       types of values like temperature.
+       printed by a printer, for example, the cups of coffee made by the cof-
+       fee machine, a device that counts the electricity used, whatever. Any
+       incrementing counter can be monitored and graphed using the stuff you
+       learned so far. Later on we will also be able to monitor other types of
+       values like temperature.
 
        Many people interested in RRDtool will use the counter that keeps track
        of octets (bytes) transfered by a network device. So let's do just that
        next. We will start with a description of how to collect data.
 
        Some people will make a remark that there are tools which can do this
-       data collection for you. They are right! However, I feel it is
-       important that you understand they are not necessary. When you have to
+       data collection for you. They are right! However, I feel it is impor-
+       tant that you understand they are not necessary. When you have to
        determine why things went wrong you need to know how they work.
 
        One tool used in the example has been talked about very briefly in the
@@ -554,13 +566,13 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
 
        For device you substitute the name, or the IP address, of your device.
        For password you use the "community read string" as it is called in the
-       SNMP world.  For some devices the default of "public" might work,
-       however this can be disabled, altered or protected for privacy and
-       security reasons.  Read the documentation that comes with your device
-       or program.
+       SNMP world.  For some devices the default of "public" might work, how-
+       ever this can be disabled, altered or protected for privacy and secu-
+       rity reasons.  Read the documentation that comes with your device or
+       program.
 
-       Then there is this parameter, called OID, which means "object
-       identifier".
+       Then there is this parameter, called OID, which means "object identi-
+       fier".
 
        When you start to learn about SNMP it looks very confusing. It isn't
        all that difficult when you look at the Management Information Base
@@ -603,9 +615,9 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
           snmpget -v2c -c public myrouter system.sysDescr.0
 
        The device should answer with a description of itself, perhaps an empty
-       one. Until you got a valid answer from a device, perhaps using a
-       different "password", or a different device, there is no point in
-       continuing.
+       one. Until you got a valid answer from a device, perhaps using a dif-
+       ferent "password", or a different device, there is no point in continu-
+       ing.
 
           snmpget -v2c -c public myrouter interfaces.ifNumber.0
 
@@ -624,9 +636,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
           interfaces.ifTable.ifEntry.ifDescr.4 = "Ethernet0"
           interfaces.ifTable.ifEntry.ifDescr.5 = "Loopback0"
 
-       On this cisco equipment, I would like to monitor the "Ethernet0"
-       interface and from the above output I see that it is number four. I
-       try:
+       On this cisco equipment, I would like to monitor the "Ethernet0" inter-
+       face and from the above output I see that it is number four. I try:
 
           [user@host /home/alex]$ snmpget -v2c -c public cisco 2.2.1.10.4 2.2.1.16.4
 
@@ -654,7 +665,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        continue on with this tutorial. If not, then go back and re-read this
        part.
 
-   A\bA R\bRe\bea\bal\bl W\bWo\bor\brl\bld\bd E\bEx\bxa\bam\bmp\bpl\ble\be
+       A\bA R\bRe\bea\bal\bl W\bWo\bor\brl\bld\bd E\bEx\bxa\bam\bmp\bpl\ble\be
+
        Let the fun begin. First, create a new database. It contains data from
        two counters, called input and output. The data is put into archives
        that average it. They take 1, 6, 24 or 288 samples at a time.  They
@@ -676,10 +688,10 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
         732 1-day samples:     732   days
 
        These ranges are appended, so the total amount of data stored in the
-       database is approximately 797 days. RRDtool stores the data
-       differently, it doesn't start the "weekly" archive where the "daily"
-       archive stopped. For both archives the most recent data will be near
-       "now" and therefore we will need to keep more data than MRTG does!
+       database is approximately 797 days. RRDtool stores the data differ-
+       ently, it doesn't start the "weekly" archive where the "daily" archive
+       stopped. For both archives the most recent data will be near "now" and
+       therefore we will need to keep more data than MRTG does!
 
        We will need:
 
@@ -739,19 +751,20 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        Suggestion: Display in bytes per second and in bits per second. Make
        the Ethernet graphics go red if they are over four megabits per second.
 
-   C\bCo\bon\bns\bso\bol\bli\bid\bda\bat\bti\bio\bon\bn F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs
-       A few paragraphs back I mentioned the possibility of keeping the
-       maximum values instead of the average values. Let's go into this a bit
+       C\bCo\bon\bns\bso\bol\bli\bid\bda\bat\bti\bio\bon\bn F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs
+
+       A few paragraphs back I mentioned the possibility of keeping the maxi-
+       mum values instead of the average values. Let's go into this a bit
        more.
 
        Recall all the stuff about the speed of the car. Suppose we drove at
        144 km/h during 5 minutes and then were stopped by the police for 25
        minutes.  At the end of the lecture we would take our laptop and create
        and view the image taken from the database. If we look at the second
-       RRA we did create, we would have the average from 6 samples. The
-       samples measured would be 144+0+0+0+0+0=144, divided by 30 minutes,
-       corrected for the error by 1000, translated into km/h, with a result of
-       24 km/h.  I would still get a ticket but not for speeding anymore :)
+       RRA we did create, we would have the average from 6 samples. The sam-
+       ples measured would be 144+0+0+0+0+0=144, divided by 30 minutes, cor-
+       rected for the error by 1000, translated into km/h, with a result of 24
+       km/h.  I would still get a ticket but not for speeding anymore :)
 
        Obviously, in this case we shouldn't look at the averages. In some
        cases they are handy. If you want to know how many km you had traveled,
@@ -763,17 +776,17 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        averages. If you want to know the rate, look at the maximum.  Over
        time, they will grow apart more and more. In the last database we have
        created, there are two archives that keep data per day. The archive
-       that keeps averages will show low numbers, the archive that shows
-       maxima will have higher numbers.
+       that keeps averages will show low numbers, the archive that shows max-
+       ima will have higher numbers.
 
        For my car this would translate in averages per day of 96/24=4 km/h (as
        I travel about 94 kilometers on a day) during working days, and maxima
        of 120 km/h (my top speed that I reach every day).
 
-       Big difference. Do not look at the second graph to estimate the
-       distances that I travel and do not look at the first graph to estimate
-       my speed. This will work if the samples are close together, as they are
-       in five minutes, but not if you average.
+       Big difference. Do not look at the second graph to estimate the dis-
+       tances that I travel and do not look at the first graph to estimate my
+       speed. This will work if the samples are close together, as they are in
+       five minutes, but not if you average.
 
        On some days, I go for a long ride. If I go across Europe and travel
        for 12 hours, the first graph will rise to about 60 km/h. The second
@@ -786,9 +799,9 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        stop a few times for gas and coffee. Drive slowly through Austria and
        the Netherlands. Be careful in the mountains and villages. If you would
        look at the graphs created from the five-minute averages you would get
-       a totally different picture. You would see the same values on the
-       average and maximum graphs (provided I measured every 300 seconds).
-       You would be able to see when I stopped, when I was in top gear, when I
+       a totally different picture. You would see the same values on the aver-
+       age and maximum graphs (provided I measured every 300 seconds).  You
+       would be able to see when I stopped, when I was in top gear, when I
        drove over fast highways etc. The granularity of the data is much
        higher, so you can see more. However, this takes 12 samples per hour,
        or 288 values per day, so it would be a lot of data over a longer
@@ -796,14 +809,15 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        day. From this one value, we cannot see much detail, of course.
 
        Make sure you understand the last few paragraphs. There is no value in
-       only a line and a few axis, you need to know what they mean and
-       interpret the data in an appropriate way. This is true for all data.
+       only a line and a few axis, you need to know what they mean and inter-
+       pret the data in an appropriate way. This is true for all data.
 
-       The biggest mistake you can make is to use the collected data for
-       something that it is not suitable for. You would be better off if you
+       The biggest mistake you can make is to use the collected data for some-
+       thing that it is not suitable for. You would be better off if you
        didn't have the graph at all.
 
-   L\bLe\bet\bt'\b's\bs r\bre\bev\bvi\bie\bew\bw w\bwh\bha\bat\bt y\byo\bou\bu n\bno\bow\bw s\bsh\bho\bou\bul\bld\bd k\bkn\bno\bow\bw
+       L\bLe\bet\bt'\b's\bs r\bre\bev\bvi\bie\bew\bw w\bwh\bha\bat\bt y\byo\bou\bu n\bno\bow\bw s\bsh\bho\bou\bul\bld\bd k\bkn\bno\bow\bw
+
        You know how to create a database and can put data in it. You can get
        the numbers out again by creating an image, do math on the data from
        the database and view the result instead of the raw data.  You know
@@ -817,25 +831,26 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        not only with the rest of this tutorial, but also in your day to day
        monitoring long after you read this introduction.
 
-   D\bDa\bat\bta\ba S\bSo\bou\bur\brc\bce\be T\bTy\byp\bpe\bes\bs
+       D\bDa\bat\bta\ba S\bSo\bou\bur\brc\bce\be T\bTy\byp\bpe\bes\bs
+
        All right, you feel like continuing. Welcome back and get ready for an
        increased speed in the examples and explanations.
 
        You know that in order to view a counter over time, you have to take
        two numbers and divide the difference of them between the time lapsed.
-       This makes sense for the examples I gave you but there are other
-       possibilities.  For instance, I'm able to retrieve the temperature from
-       my router in three places namely the inlet, the so called hot-spot and
-       the exhaust.  These values are not counters.  If I take the difference
-       of the two samples and divide that by 300 seconds I would be asking for
+       This makes sense for the examples I gave you but there are other possi-
+       bilities.  For instance, I'm able to retrieve the temperature from my
+       router in three places namely the inlet, the so called hot-spot and the
+       exhaust.  These values are not counters.  If I take the difference of
+       the two samples and divide that by 300 seconds I would be asking for
        the temperature change per second.  Hopefully this is zero! If not, the
        computer room is probably on fire :)
 
        So, what can we do?  We can tell RRDtool to store the values we measure
        directly as they are (this is not entirely true but close enough). The
        graphs we make will look much better, they will show a rather constant
-       value. I know when the router is busy (it works -> it uses more
-       electricity -> it generates more heat -> the temperature rises). I know
+       value. I know when the router is busy (it works -> it uses more elec-
+       tricity -> it generates more heat -> the temperature rises). I know
        when the doors are left open (the room is air conditioned) -> the warm
        air from the rest of the building flows into the computer room -> the
        inlet temperature rises). Etc. The data type we use when creating the
@@ -850,13 +865,13 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
 
        The two additional types are DERIVE and ABSOLUTE. Absolute can be used
        like counter with one difference: RRDtool assumes the counter is reset
-       when it's read. That is: its delta is known without calculation by
-       RRDtool whereas RRDtool needs to calculate it for the counter type.
-       Example: our first example (12345, 12357, 12363, 12363) would read:
+       when it's read. That is: its delta is known without calculation by RRD-
+       tool whereas RRDtool needs to calculate it for the counter type.  Exam-
+       ple: our first example (12345, 12357, 12363, 12363) would read:
        unknown, 12, 6, 0. The rest of the calculations stay the same.  The
        other one, derive, is like counter. Unlike counter, it can also
-       decrease so it can have a negative delta. Again, the rest of the
-       calculations stay the same.
+       decrease so it can have a negative delta. Again, the rest of the calcu-
+       lations stay the same.
 
        Let's try them all:
 
@@ -883,7 +898,9 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
                    DEF:linec=all.rrd:c:AVERAGE LINE3:linec#0000FF:"Line C" \
                    DEF:lined=all.rrd:d:AVERAGE LINE3:lined#000000:"Line D"
 
-   R\bRR\bRD\bDt\bto\boo\bol\bl u\bun\bnd\bde\ber\br t\bth\bhe\be M\bMi\bic\bcr\bro\bos\bsc\bco\bop\bpe\be
+       R\bRR\bRD\bDt\bto\boo\bol\bl u\bun\bnd\bde\ber\br t\bth\bhe\be M\bMi\bic\bcr\bro\bos\bsc\bco\bop\bpe\be
+
+
        · Line A is a COUNTER type, so it should continuously increment and
          RRDtool must calculate the differences. Also, RRDtool needs to divide
          the difference by the amount of time lapsed. This should end up as a
@@ -895,9 +912,9 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        · Line C is of type DERIVE. It should be a counter that can decrease.
          It does so between 2400 and 0, with 1800 in-between.
 
-       · Line D is of type ABSOLUTE. This is like counter but it works on
-         values without calculating the difference. The numbers are the same
-         and as you can see (hopefully) this has a different result.
+       · Line D is of type ABSOLUTE. This is like counter but it works on val-
+         ues without calculating the difference. The numbers are the same and
+         as you can see (hopefully) this has a different result.
 
        This translates in the following values, starting at 23:10 and ending
        at 00:10 the next day (where "u" means unknown/unplotted):
@@ -907,9 +924,9 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
         - Line C:  u  u  2  2  2  0 -2 -6  2  0  2  u
         - Line D:  u  1  2  3  4  5  6  7  8  9 10  u
 
-       If your PNG shows all this, you know you have entered the data
-       correctly, the RRDtool executable is working properly, your viewer
-       doesn't fool you, and you successfully entered the year 2000 :)
+       If your PNG shows all this, you know you have entered the data cor-
+       rectly, the RRDtool executable is working properly, your viewer doesn't
+       fool you, and you successfully entered the year 2000 :)
 
        You could try the same example four times, each time with only one of
        the lines.
@@ -921,18 +938,18 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
          (except when dividing by zero which is undefined/illegal).
 
          Why is it that the first point is unknown? We do know what we put
-         into the database, right? True, But we didn't have a value to
-         calculate the delta from, so we don't know where we started. It would
-         be wrong to assume we started at zero so we don't!
+         into the database, right? True, But we didn't have a value to calcu-
+         late the delta from, so we don't know where we started. It would be
+         wrong to assume we started at zero so we don't!
 
        · Line B: There is nothing to calculate. The numbers are as they are.
 
        · Line C: Again, the start-out value is unknown. The same story is
-         holds as for line A. In this case the deltas are not constant,
-         therefore the line is not either. If we would put the same numbers in
-         the database as we did for line A, we would have gotten the same
-         line. Unlike type counter, this type can decrease and I hope to show
-         you later on why this makes a difference.
+         holds as for line A. In this case the deltas are not constant, there-
+         fore the line is not either. If we would put the same numbers in the
+         database as we did for line A, we would have gotten the same line.
+         Unlike type counter, this type can decrease and I hope to show you
+         later on why this makes a difference.
 
        · Line D: Here the device calculates the deltas. Therefore we DO know
          the first delta and it is plotted. We had the same input as with line
@@ -941,7 +958,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
          time delta stays at a constant 300 and therefore the division of the
          two gives increasing values.
 
-   C\bCo\bou\bun\bnt\bte\ber\br W\bWr\bra\bap\bps\bs
+       C\bCo\bou\bun\bnt\bte\ber\br W\bWr\bra\bap\bps\bs
+
        There are a few more basics to show. Some important options are still
        to be covered and we haven't look at counter wraps yet. First the
        counter wrap: In our car we notice that the counter shows 999987. We
@@ -967,8 +985,8 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
         - 32 bits: 0 ..           4294967295
         - 64 bits: 0 .. 18446744073709551615
 
-       If these numbers look strange to you, you can view them in their
-       hexadecimal form:
+       If these numbers look strange to you, you can view them in their hex-
+       adecimal form:
 
         - 32 bits: 0 ..         FFFFFFFF
         - 64 bits: 0 .. FFFFFFFFFFFFFFFF
@@ -982,15 +1000,15 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        There is a risk in this: suppose the large counter wrapped while adding
        a huge delta, it could happen, theoretically, that adding the smaller
        value would make the delta positive. In this unlikely case the results
-       would not be correct. The increase should be nearly as high as the
-       maximum counter value for that to happen, so chances are you would have
+       would not be correct. The increase should be nearly as high as the max-
+       imum counter value for that to happen, so chances are you would have
        several other problems as well and this particular problem would not
        even be worth thinking about. Even though, I did include an example, so
        you can judge for yourself.
 
        The next section gives you some numerical examples for counter-wraps.
-       Try to do the calculations yourself or just believe me if your
-       calculator can't handle the numbers :)
+       Try to do the calculations yourself or just believe me if your calcula-
+       tor can't handle the numbers :)
 
        Correction numbers:
 
@@ -1052,9 +1070,10 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
        judge the graph with a healthy dose of suspicion if it seems weird to
        you.
 
-   D\bDa\bat\bta\ba R\bRe\bes\bsa\bam\bmp\bpl\bli\bin\bng\bg
-       One important feature of RRDtool has not been explained yet: it is
-       virtually impossible to collect data and feed it into RRDtool on exact
+       D\bDa\bat\bta\ba R\bRe\bes\bsa\bam\bmp\bpl\bli\bin\bng\bg
+
+       One important feature of RRDtool has not been explained yet: it is vir-
+       tually impossible to collect data and feed it into RRDtool on exact
        intervals. RRDtool therefore interpolates the data, so they are stored
        on exact intervals. If you do not know what this means or how it works,
        then here's the help you seek:
@@ -1118,17 +1137,17 @@ T\bTU\bUT\bTO\bOR\bRI\bIA\bAL\bL
              LINE2:seconds#0000FF                          \
              AREA:unknown#FF0000
 
-       View both images together (add them to your index.html file) and
-       compare. Both graphs should show the same, despite the input being
-       different.
+       View both images together (add them to your index.html file) and com-
+       pare. Both graphs should show the same, despite the input being differ-
+       ent.
 
 W\bWR\bRA\bAP\bPU\bUP\bP
        It's time now to wrap up this tutorial. We covered all the basics for
-       you to be able to work with RRDtool and to read the additional
-       documentation available. There is plenty more to discover about RRDtool
-       and you will find more and more uses for this package. You can easily
-       create graphs using just the examples provided and using only RRDtool.
-       You can also use one of the front ends to RRDtool that are available.
+       you to be able to work with RRDtool and to read the additional documen-
+       tation available. There is plenty more to discover about RRDtool and
+       you will find more and more uses for this package. You can easily cre-
+       ate graphs using just the examples provided and using only RRDtool. You
+       can also use one of the front ends to RRDtool that are available.
 
 M\bMA\bAI\bIL\bLI\bIN\bNG\bGL\bLI\bIS\bST\bT
        Remember to subscribe to the RRDtool mailing list. Even if you are not
@@ -1137,9 +1156,9 @@ M\bMA\bAI\bIL\bLI\bIN\bNG\bGL\bLI\bIS\bST\bT
        RRDtool) I've learned while just reading the list without posting to
        it. I did not need to ask the basic questions as they are answered in
        the FAQ (read it!) and in various mails by other users. With thousands
-       of users all over the world, there will always be people who ask
-       questions that you can answer because you read this and other
-       documentation and they didn't.
+       of users all over the world, there will always be people who ask ques-
+       tions that you can answer because you read this and other documentation
+       and they didn't.
 
 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
        The RRDtool manpages
@@ -1154,4 +1173,4 @@ A\bAU\bUT\bTH\bHO\bOR\bR
 
 
 
-1.3.8                             2009-04-09                    RRDTUTORIAL(1)
+1.3.99909060808                   2009-04-09                    RRDTUTORIAL(1)
index db05bd9a0e61b26d12af7d1d003d7d4aad85ab56..07683f51805abdb5bccc837bb354eeb0cbbf2b6b 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDUPDATE 1"
-.TH RRDUPDATE 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDUPDATE 1 "2009-06-02" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdupdate \- Store a new set of values into the RRD
 .SH "SYNOPSIS"
 .IX Header "SYNOPSIS"
 \&\fBrrdtool\fR {\fBupdate\fR | \fBupdatev\fR} \fIfilename\fR
 [\fB\-\-template\fR|\fB\-t\fR\ \fIds-name\fR[\fB:\fR\fIds-name\fR]...]
+[\fB\-\-daemon\fR\ \fIaddress\fR] [\fB\-\-\fR]
 \&\fBN\fR|\fItimestamp\fR\fB:\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]
 \&\fIat-timestamp\fR\fB@\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]
 [\fItimestamp\fR\fB:\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]\ ...]
@@ -153,6 +155,9 @@ invocation of update. The values are indexed by timestamp (time_t),
 \&\s-1RRA\s0 (consolidation function and PDPs per \s-1CDP\s0), and data source (name).
 Note that depending on the arguments of the current and previous call to
 update, the list may have no entries or a large number of entries.
+.Sp
+Since \fBupdatev\fR requires direct disk access, the \fB\-\-daemon\fR option cannot be
+used with this command.
 .IP "\fIfilename\fR" 8
 .IX Item "filename"
 The name of the \fB\s-1RRD\s0\fR you want to update.
@@ -178,6 +183,14 @@ Do not specify a value for a \s-1COMPUTE\s0 \fB\s-1DST\s0\fR in the \fBupdate\fR
 function. If this is done accidentally (and this can only be done
 using the template switch), \fBRRDtool\fR will ignore the value specified
 for the \s-1COMPUTE\s0 \fB\s-1DST\s0\fR.
+.IP "\fB\-\-daemon\fR \fIaddress\fR" 8
+.IX Item "--daemon address"
+If given, \fBRRDTool\fR will try to connect to the caching daemon rrdcached
+at \fIaddress\fR and will fail if the connection cannot be established. If the
+connection is successfully established the values will be sent to the daemon
+instead of accessing the files directly.
+.Sp
+For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
 .IP "\fBN\fR|\fItimestamp\fR\fB:\fR\fIvalue\fR[\fB:\fR\fIvalue\fR...]" 8
 .IX Item "N|timestamp:value[:value...]"
 The data used for updating the \s-1RRD\s0 was acquired at a certain
@@ -191,9 +204,17 @@ timing right to the second is especially important when you are
 working with data-sources of type \fB\s-1COUNTER\s0\fR, \fB\s-1DERIVE\s0\fR or
 \&\fB\s-1ABSOLUTE\s0\fR.
 .Sp
+When using negative time values, options and data have to be separated
+by two dashes (\fB\-\-\fR), else the time value would be parsed as an option.
+See below for an example.
+.Sp
+When using negative time values, options and data have to be separated
+by two dashes (\fB\-\-\fR), else the time value would be parsed as an option.
+See below for an example.
+.Sp
 The remaining elements of the argument are \s-1DS\s0 updates. The order of
 this list is the same as the order the data sources were defined in
-the \s-1RRA\s0. If there is no data for a certain data-source, the letter
+the \s-1RRA\s0. If there is no data for a certain data\-source, the letter
 \&\fBU\fR (e.g., N:0.1:U:1) can be specified.
 .Sp
 The format of the value acquired from the data source is dependent on
@@ -201,18 +222,51 @@ the data source type chosen. Normally it will be numeric, but the data
 acquisition modules may impose their very own parsing of this
 parameter as long as the colon (\fB:\fR) remains the data source value
 separator.
-.SH "EXAMPLE"
-.IX Header "EXAMPLE"
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ update\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
+.SH "EXAMPLES"
+.IX Header "EXAMPLES"
+.IP "\(bu" 4
 \&\f(CW\*(C`rrdtool update demo1.rrd N:3.44:3.15:U:23\*(C'\fR
-.PP
+.Sp
 Update the database file demo1.rrd with 3 known and one \fI*UNKNOWN*\fR
 value. Use the current time as the update time.
-.PP
+.IP "\(bu" 4
 \&\f(CW\*(C`rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7\*(C'\fR
-.PP
+.Sp
 Update the database file demo2.rrd which expects data from a single
-data-source, three times. First with an \fI*UNKNOWN*\fR value then with two
+data\-source, three times. First with an \fI*UNKNOWN*\fR value then with two
 regular readings. The update interval seems to be around 300 seconds.
-.SH "AUTHOR"
-.IX Header "AUTHOR"
-Tobias Oetiker <tobi@oetiker.ch>
+.IP "\(bu" 4
+\&\f(CW\*(C`rrdtool update demo3.rrd \-\- \-5:21 N:42\*(C'\fR
+.Sp
+Update the database file demo3.rrd two times, using five seconds in the
+past and the current time as the update times.
+.IP "\(bu" 4
+\&\f(CW\*(C`rrdtool update \-\-cache /var/lib/rrd/demo3.rrd N:42\*(C'\fR
+.Sp
+Update the file \f(CW\*(C`/var/lib/rrd/demo3.rrd\*(C'\fR with a single data source, using the
+current time. If the caching daemon cannot be reached, do \fBnot\fR fall back to
+direct file access.
+.IP "\(bu" 4
+\&\f(CW\*(C`rrdtool update \-\-daemon unix:/tmp/rrdd.sock demo4.rrd N:23\*(C'\fR
+.Sp
+Use the \s-1UNIX\s0 domain socket \f(CW\*(C`/tmp/rrdd.sock\*(C'\fR to contact the caching daemon. If
+the caching daemon is not available, update the file \f(CW\*(C`demo4.rrd\*(C'\fR directly.
+\&\fB\s-1WARNING:\s0\fR Since a relative path is specified, the following disturbing effect
+may occur: If the daemon is available, the file relative to the working
+directory \fBof the daemon\fR is used. If the daemon is not available, the file
+relative to the current working directory of the invoking process is used.
+\&\fBThis may update two different files depending on whether the daemon could be
+reached or not.\fR Don't do relative paths, kids!
+.SH "AUTHORS"
+.IX Header "AUTHORS"
+Tobias Oetiker <tobi@oetiker.ch>,
+Florian Forster <octo\ at\ verplant.org>
index a03dca26248b7ddcce1c81ea25700754521a247d..0baa9729c1ff6052be1766b0cb07aacd3d078e82 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdupdate</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#name">NAME</a></li>
        <li><a href="#synopsis">SYNOPSIS</a></li>
        <li><a href="#description">DESCRIPTION</a></li>
-       <li><a href="#example">EXAMPLE</a></li>
-       <li><a href="#author">AUTHOR</a></li>
+       <li><a href="#environment_variables">ENVIRONMENT VARIABLES</a></li>
+       <li><a href="#examples">EXAMPLES</a></li>
+       <li><a href="#authors">AUTHORS</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -40,6 +33,7 @@
 <h1><a name="synopsis">SYNOPSIS</a></h1>
 <p><strong>rrdtool</strong> {<strong>update</strong> | <strong>updatev</strong>} <em>filename</em>
 [<strong>--template</strong>|<strong>-t</strong>&nbsp;<em>ds-name</em>[<strong>:</strong><em>ds-name</em>]...]
+[<strong>--daemon</strong>&nbsp;<em>address</em>] [<strong>--</strong>]
 <strong>N</strong>|<em>timestamp</em><strong>:</strong><em>value</em>[<strong>:</strong><em>value</em>...]
 <em>at-timestamp</em><strong>@</strong><em>value</em>[<strong>:</strong><em>value</em>...]
 [<em>timestamp</em><strong>:</strong><em>value</em>[<strong>:</strong><em>value</em>...]&nbsp;...]</p>
 is time aligned (interpolated) according to the properties of the
 <strong>RRD</strong> to which the data is written.</p>
 <dl>
-<dt><strong><a name="updatev" class="item"><strong>updatev</strong></a></strong></dt>
-
+<dt><strong><a name="item_updatev"><strong>updatev</strong></a></strong><br />
+</dt>
 <dd>
-<p>This alternate version of <strong>update</strong> takes the same arguments and
+This alternate version of <strong>update</strong> takes the same arguments and
 performs the same function. The <em>v</em> stands for <em>verbose</em>, which
 describes the output returned. <strong>updatev</strong> returns a list of any and all
 consolidated data points (CDPs) written to disk as a result of the
 invocation of update. The values are indexed by timestamp (time_t),
 RRA (consolidation function and PDPs per CDP), and data source (name).
 Note that depending on the arguments of the current and previous call to
-update, the list may have no entries or a large number of entries.</p>
+update, the list may have no entries or a large number of entries.
 </dd>
-<dt><strong><a name="filename" class="item"><em>filename</em></a></strong></dt>
-
 <dd>
-<p>The name of the <strong>RRD</strong> you want to update.</p>
+<p>Since <strong>updatev</strong> requires direct disk access, the <strong>--daemon</strong> option cannot be
+used with this command.</p>
 </dd>
-<dt><strong><a name="template_t_ds_name_ds_name" class="item"><strong>--template</strong>|<strong>-t</strong> <em>ds-name</em>[<strong>:</strong><em>ds-name</em>]...</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_filename"><em>filename</em></a></strong><br />
+</dt>
 <dd>
-<p>By default, the <strong>update</strong> function expects its data input in the order
+The name of the <strong>RRD</strong> you want to update.
+</dd>
+<p></p>
+<dt><strong><a name="item__2d_2dtemplate_7c_2dt_ds_2dname_5b_3ads_2dname_5d_"><strong>--template</strong>|<strong>-t</strong> <em>ds-name</em>[<strong>:</strong><em>ds-name</em>]...</a></strong><br />
+</dt>
+<dd>
+By default, the <strong>update</strong> function expects its data input in the order
 the data sources are defined in the RRD, excluding any COMPUTE data
 sources (i.e. if the third data source <strong>DST</strong> is COMPUTE, the third
 input value will be mapped to the fourth data source in the <strong>RRD</strong> and
 so on). This is not very error resistant, as you might be sending the
-wrong data into an RRD.</p>
+wrong data into an RRD.
+</dd>
+<dd>
 <p>The template switch allows you to specify which data sources you are
 going to update and in which order. If the data sources specified in
 the template are not available in the RRD file, the update process
 will abort with an error message.</p>
+</dd>
+<dd>
 <p>While it appears possible with the template switch to update data sources
 asynchronously, <strong>RRDtool</strong> implicitly assigns non-COMPUTE data sources missing
 from the template the <em>*UNKNOWN*</em> value.</p>
+</dd>
+<dd>
 <p>Do not specify a value for a COMPUTE <strong>DST</strong> in the <strong>update</strong>
 function. If this is done accidentally (and this can only be done
 using the template switch), <strong>RRDtool</strong> will ignore the value specified
 for the COMPUTE <strong>DST</strong>.</p>
 </dd>
-<dt><strong><a name="n_timestamp_value_value" class="item"><strong>N</strong>|<em>timestamp</em><strong>:</strong><em>value</em>[<strong>:</strong><em>value</em>...]</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item__2d_2ddaemon_address"><strong>--daemon</strong> <em>address</em></a></strong><br />
+</dt>
 <dd>
-<p>The data used for updating the RRD was acquired at a certain
+If given, <strong>RRDTool</strong> will try to connect to the caching daemon <a href="././rrdcached.html">the rrdcached manpage</a>
+at <em>address</em> and will fail if the connection cannot be established. If the
+connection is successfully established the values will be sent to the daemon
+instead of accessing the files directly.
+</dd>
+<dd>
+<p>For a list of accepted formats, see the <strong>-l</strong> option in the <a href="././rrdcached.html">the rrdcached manpage</a> manual.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_n_7ctimestamp_3avalue_5b_3avalue_2e_2e_2e_5d"><strong>N</strong>|<em>timestamp</em><strong>:</strong><em>value</em>[<strong>:</strong><em>value</em>...]</a></strong><br />
+</dt>
+<dd>
+The data used for updating the RRD was acquired at a certain
 time. This time can either be defined in seconds since 1970-01-01 or
 by using the letter 'N', in which case the update time is set to be
 the current time. Negative time values are subtracted from the current
@@ -101,34 +120,91 @@ documentation) may also be used by delimiting the end of the time
 specification with the '@' character instead of a ':'. Getting the
 timing right to the second is especially important when you are
 working with data-sources of type <strong>COUNTER</strong>, <strong>DERIVE</strong> or
-<strong>ABSOLUTE</strong>.</p>
+<strong>ABSOLUTE</strong>.
+</dd>
+<dd>
+<p>When using negative time values, options and data have to be separated
+by two dashes (<strong>--</strong>), else the time value would be parsed as an option.
+See below for an example.</p>
+</dd>
+<dd>
+<p>When using negative time values, options and data have to be separated
+by two dashes (<strong>--</strong>), else the time value would be parsed as an option.
+See below for an example.</p>
+</dd>
+<dd>
 <p>The remaining elements of the argument are DS updates. The order of
 this list is the same as the order the data sources were defined in
 the RRA. If there is no data for a certain data-source, the letter
 <strong>U</strong> (e.g., N:0.1:U:1) can be specified.</p>
+</dd>
+<dd>
 <p>The format of the value acquired from the data source is dependent on
 the data source type chosen. Normally it will be numeric, but the data
 acquisition modules may impose their very own parsing of this
 parameter as long as the colon (<strong>:</strong>) remains the data source value
 separator.</p>
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
-<h1><a name="example">EXAMPLE</a></h1>
-<p><code>rrdtool update demo1.rrd N:3.44:3.15:U:23</code></p>
+<h1><a name="environment_variables">ENVIRONMENT VARIABLES</a></h1>
+<p>The following environment variables may be used to change the behavior of
+<code>rrdtoolupdate</code>:</p>
+<dl>
+<dt><strong><a name="item_rrdcached_address"><strong>RRDCACHED_ADDRESS</strong></a></strong><br />
+</dt>
+<dd>
+If this environment variable is set it will have the same effect as specifying
+the <code>--daemon</code> option on the command line. If both are present, the command
+line argument takes precedence.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="examples">EXAMPLES</a></h1>
+<ul>
+<li></li>
+<code>rrdtool update demo1.rrd N:3.44:3.15:U:23</code>
 <p>Update the database file demo1.rrd with 3 known and one <em>*UNKNOWN*</em>
 value. Use the current time as the update time.</p>
-<p><code>rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7</code></p>
+<p></p>
+<li></li>
+<code>rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7</code>
 <p>Update the database file demo2.rrd which expects data from a single
 data-source, three times. First with an <em>*UNKNOWN*</em> value then with two
 regular readings. The update interval seems to be around 300 seconds.</p>
+<p></p>
+<li></li>
+<code>rrdtool update demo3.rrd -- -5:21 N:42</code>
+<p>Update the database file demo3.rrd two times, using five seconds in the
+past and the current time as the update times.</p>
+<p></p>
+<li></li>
+<code>rrdtool update --cache /var/lib/rrd/demo3.rrd N:42</code>
+<p>Update the file <code>/var/lib/rrd/demo3.rrd</code> with a single data source, using the
+current time. If the caching daemon cannot be reached, do <strong>not</strong> fall back to
+direct file access.</p>
+<p></p>
+<li></li>
+<code>rrdtool update --daemon unix:/tmp/rrdd.sock demo4.rrd N:23</code>
+<p>Use the UNIX domain socket <code>/tmp/rrdd.sock</code> to contact the caching daemon. If
+the caching daemon is not available, update the file <code>demo4.rrd</code> directly.
+<strong>WARNING:</strong> Since a relative path is specified, the following disturbing effect
+may occur: If the daemon is available, the file relative to the working
+directory <strong>of the daemon</strong> is used. If the daemon is not available, the file
+relative to the current working directory of the invoking process is used.
+<strong>This may update two different files depending on whether the daemon could be
+reached or not.</strong> Don't do relative paths, kids!</p>
+<p></p></ul>
 <p>
 </p>
 <hr />
-<h1><a name="author">AUTHOR</a></h1>
-<p>Tobias Oetiker &lt;<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>&gt;</p>
+<h1><a name="authors">AUTHORS</a></h1>
+<p>Tobias Oetiker &lt;<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>&gt;,
+Florian Forster &lt;octo&nbsp;at&nbsp;verplant.org&gt;</p>
 
 </body>
 
index cc0b452f76ce0e9faeb3d6cbd54058f5fa86f40f..67908d016f986d6d64ee9af32d07160694267d6d 100644 (file)
@@ -6,6 +6,7 @@ rrdupdate - Store a new set of values into the RRD
 
 B<rrdtool> {B<update> | B<updatev>} I<filename>
 S<[B<--template>|B<-t> I<ds-name>[B<:>I<ds-name>]...]>
+S<[B<--daemon> I<address>]> [B<-->]
 S<B<N>|I<timestamp>B<:>I<value>[B<:>I<value>...]>
 S<I<at-timestamp>B<@>I<value>[B<:>I<value>...]>
 S<[I<timestamp>B<:>I<value>[B<:>I<value>...] ...]>
@@ -29,6 +30,9 @@ RRA (consolidation function and PDPs per CDP), and data source (name).
 Note that depending on the arguments of the current and previous call to
 update, the list may have no entries or a large number of entries.
 
+Since B<updatev> requires direct disk access, the B<--daemon> option cannot be
+used with this command.
+
 =item I<filename>
 
 The name of the B<RRD> you want to update.
@@ -56,6 +60,15 @@ function. If this is done accidentally (and this can only be done
 using the template switch), B<RRDtool> will ignore the value specified
 for the COMPUTE B<DST>.
 
+=item B<--daemon> I<address>
+
+If given, B<RRDTool> will try to connect to the caching daemon L<rrdcached>
+at I<address> and will fail if the connection cannot be established. If the
+connection is successfully established the values will be sent to the daemon
+instead of accessing the files directly.
+
+For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
+
 =item B<N>|I<timestamp>B<:>I<value>[B<:>I<value>...]
 
 The data used for updating the RRD was acquired at a certain
@@ -69,6 +82,14 @@ timing right to the second is especially important when you are
 working with data-sources of type B<COUNTER>, B<DERIVE> or
 B<ABSOLUTE>.
 
+When using negative time values, options and data have to be separated
+by two dashes (B<-->), else the time value would be parsed as an option.
+See below for an example.
+
+When using negative time values, options and data have to be separated
+by two dashes (B<-->), else the time value would be parsed as an option.
+See below for an example.
+
 The remaining elements of the argument are DS updates. The order of
 this list is the same as the order the data sources were defined in
 the RRA. If there is no data for a certain data-source, the letter
@@ -82,20 +103,72 @@ separator.
 
 =back
 
-=head1 EXAMPLE
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>update>:
+
+=over
+
+=item B<RRDCACHED_ADDRESS>
+
+If this environment variable is set it will have the same effect as specifying
+the C<--daemon> option on the command line. If both are present, the command
+line argument takes precedence.
+
+=back
+
+=head1 EXAMPLES
+
+=over
+
+=item *
 
 C<rrdtool update demo1.rrd N:3.44:3.15:U:23>
 
 Update the database file demo1.rrd with 3 known and one I<*UNKNOWN*>
 value. Use the current time as the update time.
 
+=item *
+
 C<rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7>
 
 Update the database file demo2.rrd which expects data from a single
 data-source, three times. First with an I<*UNKNOWN*> value then with two
 regular readings. The update interval seems to be around 300 seconds.
 
-=head1 AUTHOR
+=item *
+
+C<rrdtool update demo3.rrd -- -5:21 N:42>
+
+Update the database file demo3.rrd two times, using five seconds in the
+past and the current time as the update times.
+
+=item *
+
+C<rrdtool update --cache /var/lib/rrd/demo3.rrd N:42>
+
+Update the file C</var/lib/rrd/demo3.rrd> with a single data source, using the
+current time. If the caching daemon cannot be reached, do B<not> fall back to
+direct file access.
+
+=item *
+
+C<rrdtool update --daemon unix:/tmp/rrdd.sock demo4.rrd N:23>
+
+Use the UNIX domain socket C</tmp/rrdd.sock> to contact the caching daemon. If
+the caching daemon is not available, update the file C<demo4.rrd> directly.
+B<WARNING:> Since a relative path is specified, the following disturbing effect
+may occur: If the daemon is available, the file relative to the working
+directory B<of the daemon> is used. If the daemon is not available, the file
+relative to the current working directory of the invoking process is used.
+B<This may update two different files depending on whether the daemon could be
+reached or not.> Don't do relative paths, kids!
+
+=back
+
+=head1 AUTHORS
 
-Tobias Oetiker <tobi@oetiker.ch>
+Tobias Oetiker <tobi@oetiker.ch>,
+Florian Forster <octoE<nbsp>atE<nbsp>verplant.org>
 
index ec271e3a93e58b6430a6a36ce0f557c96531b67e..af77a25f52ba33444b847e806760434e9ff032e0 100644 (file)
@@ -7,8 +7,8 @@ N\bNA\bAM\bME\bE
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
        r\brr\brd\bdt\bto\boo\bol\bl {u\bup\bpd\bda\bat\bte\be | u\bup\bpd\bda\bat\bte\bev\bv} _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [-\b--\b-t\bte\bem\bmp\bpl\bla\bat\bte\be|-\b-t\bt _\bd_\bs_\b-_\bn_\ba_\bm_\be[:\b:_\bd_\bs_\b-
-       _\bn_\ba_\bm_\be]...]  N\bN|_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]  _\ba_\bt_\b-_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp@\b@_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]
-       [_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...] ...]
+       _\bn_\ba_\bm_\be]...]  [-\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs] [-\b--\b-] N\bN|_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]  _\ba_\bt_\b-
+       _\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp@\b@_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]  [_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...] ...]
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        The u\bup\bpd\bda\bat\bte\be function feeds new data values into an R\bRR\bRD\bD. The data is time
@@ -21,9 +21,12 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                and all consolidated data points (CDPs) written to disk as a
                result of the invocation of update. The values are indexed by
                timestamp (time_t), RRA (consolidation function and PDPs per
-               CDP), and data source (name).  Note that depending on the
-               arguments of the current and previous call to update, the list
-               may have no entries or a large number of entries.
+               CDP), and data source (name).  Note that depending on the argu-
+               ments of the current and previous call to update, the list may
+               have no entries or a large number of entries.
+
+               Since u\bup\bpd\bda\bat\bte\bev\bv requires direct disk access, the -\b--\b-d\bda\bae\bem\bmo\bon\bn option
+               cannot be used with this command.
 
        _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
                The name of the R\bRR\bRD\bD you want to update.
@@ -31,10 +34,10 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        -\b--\b-t\bte\bem\bmp\bpl\bla\bat\bte\be|-\b-t\bt _\bd_\bs_\b-_\bn_\ba_\bm_\be[:\b:_\bd_\bs_\b-_\bn_\ba_\bm_\be]...
                By default, the u\bup\bpd\bda\bat\bte\be function expects its data input in the
                order the data sources are defined in the RRD, excluding any
-               COMPUTE data sources (i.e. if the third data source D\bDS\bST\bT is
-               COMPUTE, the third input value will be mapped to the fourth
-               data source in the R\bRR\bRD\bD and so on). This is not very error
-               resistant, as you might be sending the wrong data into an RRD.
+               COMPUTE data sources (i.e. if the third data source D\bDS\bST\bT is COM-
+               PUTE, the third input value will be mapped to the fourth data
+               source in the R\bRR\bRD\bD and so on). This is not very error resistant,
+               as you might be sending the wrong data into an RRD.
 
                The template switch allows you to specify which data sources
                you are going to update and in which order. If the data sources
@@ -46,49 +49,101 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
                COMPUTE data sources missing from the template the _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*
                value.
 
-               Do not specify a value for a COMPUTE D\bDS\bST\bT in the u\bup\bpd\bda\bat\bte\be
-               function. If this is done accidentally (and this can only be
-               done using the template switch), R\bRR\bRD\bDt\bto\boo\bol\bl will ignore the value
-               specified for the COMPUTE D\bDS\bST\bT.
+               Do not specify a value for a COMPUTE D\bDS\bST\bT in the u\bup\bpd\bda\bat\bte\be func-
+               tion. If this is done accidentally (and this can only be done
+               using the template switch), R\bRR\bRD\bDt\bto\boo\bol\bl will ignore the value spec-
+               ified for the COMPUTE D\bDS\bST\bT.
+
+       -\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs
+               If given, R\bRR\bRD\bDT\bTo\boo\bol\bl will try to connect to the caching daemon
+               rrdcached at _\ba_\bd_\bd_\br_\be_\bs_\bs and will fail if the connection cannot be
+               established. If the connection is successfully established the
+               values will be sent to the daemon instead of accessing the
+               files directly.
+
+               For a list of accepted formats, see the -\b-l\bl option in the rrd-
+               cached manual.
 
        N\bN|_\bt_\bi_\bm_\be_\bs_\bt_\ba_\bm_\bp:\b:_\bv_\ba_\bl_\bu_\be[:\b:_\bv_\ba_\bl_\bu_\be...]
                The data used for updating the RRD was acquired at a certain
                time. This time can either be defined in seconds since
                1970-01-01 or by using the letter 'N', in which case the update
                time is set to be the current time. Negative time values are
-               subtracted from the current time. An AT_STYLE TIME
-               SPECIFICATION (see the _\br_\br_\bd_\bf_\be_\bt_\bc_\bh documentation) may also be used
-               by delimiting the end of the time specification with the '@'
-               character instead of a ':'. Getting the timing right to the
-               second is especially important when you are working with data-
-               sources of type C\bCO\bOU\bUN\bNT\bTE\bER\bR, D\bDE\bER\bRI\bIV\bVE\bE or A\bAB\bBS\bSO\bOL\bLU\bUT\bTE\bE.
+               subtracted from the current time. An AT_STYLE TIME SPECIFICA-
+               TION (see the _\br_\br_\bd_\bf_\be_\bt_\bc_\bh documentation) may also be used by
+               delimiting the end of the time specification with the '@' char-
+               acter instead of a ':'. Getting the timing right to the second
+               is especially important when you are working with data-sources
+               of type C\bCO\bOU\bUN\bNT\bTE\bER\bR, D\bDE\bER\bRI\bIV\bVE\bE or A\bAB\bBS\bSO\bOL\bLU\bUT\bTE\bE.
+
+               When using negative time values, options and data have to be
+               separated by two dashes (-\b--\b-), else the time value would be
+               parsed as an option.  See below for an example.
+
+               When using negative time values, options and data have to be
+               separated by two dashes (-\b--\b-), else the time value would be
+               parsed as an option.  See below for an example.
 
                The remaining elements of the argument are DS updates. The
                order of this list is the same as the order the data sources
                were defined in the RRA. If there is no data for a certain
                data-source, the letter U\bU (e.g., N:0.1:U:1) can be specified.
 
-               The format of the value acquired from the data source is
-               dependent on the data source type chosen. Normally it will be
+               The format of the value acquired from the data source is depen-
+               dent on the data source type chosen. Normally it will be
                numeric, but the data acquisition modules may impose their very
                own parsing of this parameter as long as the colon (:\b:) remains
                the data source value separator.
 
-E\bEX\bXA\bAM\bMP\bPL\bLE\bE
-       "rrdtool update demo1.rrd N:3.44:3.15:U:23"
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+       The following environment variables may be used to change the behavior
+       of "rrdtool update":
+
+       R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
+           If this environment variable is set it will have the same effect as
+           specifying the "--daemon" option on the command line. If both are
+           present, the command line argument takes precedence.
+
+E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
+       ·   "rrdtool update demo1.rrd N:3.44:3.15:U:23"
+
+           Update the database file demo1.rrd with 3 known and one _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*
+           value. Use the current time as the update time.
+
+       ·   "rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7"
+
+           Update the database file demo2.rrd which expects data from a single
+           data-source, three times. First with an _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* value then with
+           two regular readings. The update interval seems to be around 300
+           seconds.
+
+       ·   "rrdtool update demo3.rrd -- -5:21 N:42"
+
+           Update the database file demo3.rrd two times, using five seconds in
+           the past and the current time as the update times.
+
+       ·   "rrdtool update --cache /var/lib/rrd/demo3.rrd N:42"
 
-       Update the database file demo1.rrd with 3 known and one _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b*
-       value. Use the current time as the update time.
+           Update the file "/var/lib/rrd/demo3.rrd" with a single data source,
+           using the current time. If the caching daemon cannot be reached, do
+           n\bno\bot\bt fall back to direct file access.
 
-       "rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7"
+       ·   "rrdtool update --daemon unix:/tmp/rrdd.sock demo4.rrd N:23"
 
-       Update the database file demo2.rrd which expects data from a single
-       data-source, three times. First with an _\b*_\bU_\bN_\bK_\bN_\bO_\bW_\bN_\b* value then with two
-       regular readings. The update interval seems to be around 300 seconds.
+           Use the UNIX domain socket "/tmp/rrdd.sock" to contact the caching
+           daemon. If the caching daemon is not available, update the file
+           "demo4.rrd" directly.  W\bWA\bAR\bRN\bNI\bIN\bNG\bG:\b: Since a relative path is specified,
+           the following disturbing effect may occur: If the daemon is avail-
+           able, the file relative to the working directory o\bof\bf t\bth\bhe\be d\bda\bae\bem\bmo\bon\bn is
+           used. If the daemon is not available, the file relative to the cur-
+           rent working directory of the invoking process is used.  T\bTh\bhi\bis\bs m\bma\bay\by
+           u\bup\bpd\bda\bat\bte\be t\btw\bwo\bo d\bdi\bif\bff\bfe\ber\bre\ben\bnt\bt f\bfi\bil\ble\bes\bs d\bde\bep\bpe\ben\bnd\bdi\bin\bng\bg o\bon\bn w\bwh\bhe\bet\bth\bhe\ber\br t\bth\bhe\be d\bda\bae\bem\bmo\bon\bn c\bco\bou\bul\bld\bd b\bbe\be
+           r\bre\bea\bac\bch\bhe\bed\bd o\bor\br n\bno\bot\bt.\b. Don't do relative paths, kids!
 
-A\bAU\bUT\bTH\bHO\bOR\bR
-       Tobias Oetiker <tobi@oetiker.ch>
+A\bAU\bUT\bTH\bHO\bOR\bRS\bS
+       Tobias Oetiker <tobi@oetiker.ch>, Florian Forster <octo at ver-
+       plant.org>
 
 
 
-1.3.8                             2008-03-15                      RRDUPDATE(1)
+1.3.99909060808                   2009-06-02                      RRDUPDATE(1)
index 92d4869881d20cfe26ab5e4a039a4b946faa565d..0c4b558d6a5f0cf95e0710fe95b7d582eaa4e02e 100644 (file)
@@ -1,7 +1,15 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
 .de Sp \" Vertical space (when we can't use .PP)
 .if t .sp .5v
 .if n .sp
 ..
 .\" Set up some character translations and predefined strings.  \*(-- will
 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
-.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 .ie n \{\
 .    ds -- \(*W-
 .    ds R" ''
 'br\}
 .\"
-.\" Escape single quotes in literal strings from groff's Unicode transform.
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.ie \nF \{\
+.if \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.el \{\
-.    de IX
-..
-.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "RRDXPORT 1"
-.TH RRDXPORT 1 "2008-03-15" "1.3.8" "rrdtool"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.if n .ad l
-.nh
+.TH RRDXPORT 1 "2008-09-25" "1.3.99909060808" "rrdtool"
 .SH "NAME"
 rrdxport \- Export data in XML format based on data from one or several RRD
 .SH "SYNOPSIS"
@@ -138,6 +139,7 @@ rrdxport \- Export data in XML format based on data from one or several RRD
 [\fB\-e\fR|\fB\-\-end\fR\ \fIseconds\fR]
 [\fB\-m\fR|\fB\-\-maxrows\fR\ \fIrows\fR]
 [\fB\-\-step\fR\ \fIvalue\fR]
+[\fB\-\-daemon\fR\ \fIaddress\fR]
 [\fB\s-1DEF:\s0\fR\fIvname\fR\fB=\fR\fIrrd\fR\fB:\fR\fIds-name\fR\fB:\fR\fI\s-1CF\s0\fR]
 [\fB\s-1CDEF:\s0\fR\fIvname\fR\fB=\fR\fIrpn-expression\fR]
 [\fB\s-1XPORT\s0\fR\fB:\fR\fIvname\fR[\fB:\fR\fIlegend\fR]]
@@ -169,6 +171,16 @@ for details.
 .IP "\fB\-\-step\fR \fIvalue\fR (default automatic)" 4
 .IX Item "--step value (default automatic)"
 See rrdgraph documentation.
+.IP "\fB\-\-daemon\fR \fIaddress\fR" 4
+.IX Item "--daemon address"
+Address of the rrdcached daemon. If specified, a \f(CW\*(C`flush\*(C'\fR command is sent
+to the server before reading the \s-1RRD\s0 files. This allows \fBrrdtool\fR to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual.
+.Sp
+.Vb 1
+\&  rrdtool xport \-\-daemon unix:/var/run/rrdcached.sock ...
+.Ve
 .IP "\fB\-\-enumds\fR" 4
 .IX Item "--enumds"
 The generated xml should contain the data values in enumerated tags.
@@ -224,7 +236,7 @@ The resulting meta data section is (the values will depend on the
 .PP
 The resulting data section is:
 .PP
-.Vb 10
+.Vb 16
 \&  <data>
 \&    <row><t>1020611700</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
 \&    <row><t>1020612000</t><v>3.4000000000e+00</v><v>5.4400000000e+01</v></row>
@@ -260,6 +272,15 @@ The resulting data section is:
 \&          XPORT:out2:"if2 out bytes" \e
 \&          XPORT:sum:"output sum"
 .Ve
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+The following environment variables may be used to change the behavior of
+\&\f(CW\*(C`rrdtool\ xport\*(C'\fR:
+.IP "\fB\s-1RRDCACHED_ADDRESS\s0\fR" 4
+.IX Item "RRDCACHED_ADDRESS"
+If this environment variable is set it will have the same effect as specifying
+the \f(CW\*(C`\-\-daemon\*(C'\fR option on the command line. If both are present, the command
+line argument takes precedence.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 Tobias Oetiker <tobi@oetiker.ch>
index c3c6011be3cc9e145445ada0e98ef5ff35a2d4c6..6e3c5dce97fae4591240efcb44c8fe48f5e0cf74 100644 (file)
@@ -1,18 +1,14 @@
-<?xml version="1.0" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>rrdxport</title>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <link rev="made" href="mailto:root@localhost" />
 </head>
 
 <body style="background-color: white">
 
-
-<!-- INDEX BEGIN -->
-<div name="index">
 <p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
 <!--
 
 <ul>
        <li><a href="#output_format">Output format</a></li>
        <li><a href="#example_1">EXAMPLE 1</a></li>
        <li><a href="#example_2">EXAMPLE 2</a></li>
+       <li><a href="#environment_variables">ENVIRONMENT VARIABLES</a></li>
        <li><a href="#author">AUTHOR</a></li>
 </ul>
-
 -->
-
-
-</div>
 <!-- INDEX END -->
 
 <p>
@@ -45,6 +38,7 @@
 [<strong>-e</strong>|<strong>--end</strong>&nbsp;<em>seconds</em>]
 [<strong>-m</strong>|<strong>--maxrows</strong>&nbsp;<em>rows</em>]
 [<strong>--step</strong>&nbsp;<em>value</em>]
+[<strong>--daemon</strong>&nbsp;<em>address</em>]
 [<strong>DEF:</strong><em>vname</em><strong>=</strong><em>rrd</em><strong>:</strong><em>ds-name</em><strong>:</strong><em>CF</em>]
 [<strong>CDEF:</strong><em>vname</em><strong>=</strong><em>rpn-expression</em>]
 [<strong>XPORT</strong><strong>:</strong><em>vname</em>[<strong>:</strong><em>legend</em>]]</p>
@@ -57,59 +51,81 @@ representation of the data stored in one or several <strong>RRD</strong>s. It
 can also extract numerical reports.</p>
 <p>If no <em>XPORT</em> statements are found, there will be no output.</p>
 <dl>
-<dt><strong><a name="seconds" class="item"><strong>-s</strong>|<strong>--start</strong> <em>seconds</em> (default end-1day)</a></strong></dt>
-
+<dt><strong><a name="item_seconds"><strong>-s</strong>|<strong>--start</strong> <em>seconds</em> (default end-1day)</a></strong><br />
+</dt>
 <dd>
-<p>The time when the exported range should begin. Time in seconds since
+The time when the exported range should begin. Time in seconds since
 epoch (1970-01-01) is required. Negative numbers are relative to the
 current time. By default one day worth of data will be printed.
 See also AT-STYLE TIME SPECIFICATION section in the <em>rrdfetch</em>
-documentation for a detailed explanation on how to specify time.</p>
+documentation for a detailed explanation on how to specify time.
 </dd>
-<dt><strong><strong>-e</strong>|<strong>--end</strong> <em>seconds</em> (default now)</strong></dt>
-
+<p></p>
+<dt><strong><strong>-e</strong>|<strong>--end</strong> <em>seconds</em> (default now)</strong><br />
+</dt>
 <dd>
-<p>The time when the exported range should end. Time in seconds since epoch.
+The time when the exported range should end. Time in seconds since epoch.
 See also AT-STYLE TIME SPECIFICATION section in the <em>rrdfetch</em>
-documentation for a detailed explanation of ways to specify time.</p>
+documentation for a detailed explanation of ways to specify time.
 </dd>
-<dt><strong><a name="rows" class="item"><strong>-m</strong>|<strong>--maxrows</strong> <em>rows</em> (default 400 rows)</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_rows"><strong>-m</strong>|<strong>--maxrows</strong> <em>rows</em> (default 400 rows)</a></strong><br />
+</dt>
 <dd>
-<p>This works like the <strong>-w</strong>|<strong>--width</strong> parameter of <em>rrdgraph</em>.
+This works like the <strong>-w</strong>|<strong>--width</strong> parameter of <em>rrdgraph</em>.
 In fact it is exactly the same, but the parameter was renamed to
 describe its purpose in this module. See <em>rrdgraph</em> documentation
-for details.</p>
+for details.
 </dd>
-<dt><strong><a name="value" class="item"><strong>--step</strong> <em>value</em> (default automatic)</a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_value"><strong>--step</strong> <em>value</em> (default automatic)</a></strong><br />
+</dt>
 <dd>
-<p>See <a href="././rrdgraph.html">the rrdgraph manpage</a> documentation.</p>
+See <a href="././rrdgraph.html">the rrdgraph manpage</a> documentation.
+</dd>
+<p></p>
+<dt><strong><a name="item__2d_2ddaemon_address"><strong>--daemon</strong> <em>address</em></a></strong><br />
+</dt>
+<dd>
+Address of the <a href="././rrdcached.html">the rrdcached manpage</a> daemon. If specified, a <code>flush</code> command is sent
+to the server before reading the RRD files. This allows <strong>rrdtool</strong> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the <strong>-l</strong> option in the <a href="././rrdcached.html">the rrdcached manpage</a> manual.
+</dd>
+<dd>
+<pre>
+  rrdtool xport --daemon unix:/var/run/rrdcached.sock ...</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item__2d_2denumds"><strong>--enumds</strong></a></strong><br />
+</dt>
+<dd>
+The generated xml should contain the data values in enumerated tags.
 </dd>
-<dt><strong><a name="enumds" class="item"><strong>--enumds</strong></a></strong></dt>
-
 <dd>
-<p>The generated xml should contain the data values in enumerated tags.</p>
 <pre>
  &lt;v0&gt;val&lt;/v0&gt;&lt;v1&gt;val&lt;/v1&gt;</pre>
 </dd>
-<dt><strong><a name="def_vname_rrd_ds_name_cf" class="item"><strong>DEF:</strong><em>vname</em><strong>=</strong><em>rrd</em><strong>:</strong><em>ds-name</em><strong>:</strong><em>CF</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_def_3avname_3drrd_3ads_2dname_3acf"><strong>DEF:</strong><em>vname</em><strong>=</strong><em>rrd</em><strong>:</strong><em>ds-name</em><strong>:</strong><em>CF</em></a></strong><br />
+</dt>
 <dd>
-<p>See <em>rrdgraph</em> documentation.</p>
+See <em>rrdgraph</em> documentation.
 </dd>
-<dt><strong><a name="cdef_vname_rpn_expression" class="item"><strong>CDEF:</strong><em>vname</em><strong>=</strong><em>rpn-expression</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_cdef_3avname_3drpn_2dexpression"><strong>CDEF:</strong><em>vname</em><strong>=</strong><em>rpn-expression</em></a></strong><br />
+</dt>
 <dd>
-<p>See <em>rrdgraph</em> documentation.</p>
+See <em>rrdgraph</em> documentation.
 </dd>
-<dt><strong><a name="xport_vname_legend" class="item"><strong>XPORT:</strong><em>vname</em><strong>:</strong><strong>:</strong><em>legend</em></a></strong></dt>
-
+<p></p>
+<dt><strong><a name="item_xport_3avname_3a_3alegend"><strong>XPORT:</strong><em>vname</em><strong>:</strong><strong>:</strong><em>legend</em></a></strong><br />
+</dt>
 <dd>
-<p>At least one <em>XPORT</em> statement should be present. The values
-referenced by <em>vname</em> are printed. Optionally add a legend.</p>
+At least one <em>XPORT</em> statement should be present. The values
+referenced by <em>vname</em> are printed. Optionally add a legend.
 </dd>
-</dl>
+<p></p></dl>
 <p>
 </p>
 <hr />
@@ -182,6 +198,21 @@ RRD characteristics):</p>
 <p>
 </p>
 <hr />
+<h1><a name="environment_variables">ENVIRONMENT VARIABLES</a></h1>
+<p>The following environment variables may be used to change the behavior of
+<code>rrdtoolxport</code>:</p>
+<dl>
+<dt><strong><a name="item_rrdcached_address"><strong>RRDCACHED_ADDRESS</strong></a></strong><br />
+</dt>
+<dd>
+If this environment variable is set it will have the same effect as specifying
+the <code>--daemon</code> option on the command line. If both are present, the command
+line argument takes precedence.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
 <h1><a name="author">AUTHOR</a></h1>
 <p>Tobias Oetiker &lt;<a href="mailto:tobi@oetiker.ch">tobi@oetiker.ch</a>&gt;</p>
 
index a668a20f33434ecaddf514a75e37a80c7e32c07a..d7e6bb34616e9a4c76a75e0b168136e0f76adf04 100644 (file)
@@ -9,6 +9,7 @@ S<[B<-s>|B<--start> I<seconds>]>
 S<[B<-e>|B<--end> I<seconds>]>
 S<[B<-m>|B<--maxrows> I<rows>]>
 S<[B<--step> I<value>]>
+S<[B<--daemon> I<address>]>
 S<[B<DEF:>I<vname>B<=>I<rrd>B<:>I<ds-name>B<:>I<CF>]>
 S<[B<CDEF:>I<vname>B<=>I<rpn-expression>]>
 S<[B<XPORT>B<:>I<vname>[B<:>I<legend>]]>
@@ -48,7 +49,16 @@ for details.
 
 See L<rrdgraph> documentation.
 
-=item B<--enumds> 
+=item B<--daemon> I<address>
+
+Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
+to the server before reading the RRD files. This allows B<rrdtool> to return
+fresh data even if the daemon is configured to cache values for a long time.
+For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
+
+  rrdtool xport --daemon unix:/var/run/rrdcached.sock ...
+
+=item B<--enumds>
 
 The generated xml should contain the data values in enumerated tags.
 
@@ -137,6 +147,20 @@ The resulting data section is:
           XPORT:out2:"if2 out bytes" \
          XPORT:sum:"output sum"
 
+=head1 ENVIRONMENT VARIABLES
+
+The following environment variables may be used to change the behavior of
+C<rrdtoolE<nbsp>xport>:
+
+=over 4
+
+=item B<RRDCACHED_ADDRESS>
+
+If this environment variable is set it will have the same effect as specifying
+the C<--daemon> option on the command line. If both are present, the command
+line argument takes precedence.
+
+=back
 
 =head1 AUTHOR
 
index 2930d1b98fbe0b508d959e23abcbeb3f0569298b..ba2c353ba4e328cc6ab12fc0ae4bf0320756f2ef 100644 (file)
@@ -8,12 +8,13 @@ N\bNA\bAM\bME\bE
 
 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
        r\brr\brd\bdt\bto\boo\bol\bl x\bxp\bpo\bor\brt\bt [-\b-s\bs|-\b--\b-s\bst\bta\bar\brt\bt _\bs_\be_\bc_\bo_\bn_\bd_\bs] [-\b-e\be|-\b--\b-e\ben\bnd\bd _\bs_\be_\bc_\bo_\bn_\bd_\bs]
-       [-\b-m\bm|-\b--\b-m\bma\bax\bxr\bro\bow\bws\bs _\br_\bo_\bw_\bs] [-\b--\b-s\bst\bte\bep\bp _\bv_\ba_\bl_\bu_\be] [D\bDE\bEF\bF:\b:_\bv_\bn_\ba_\bm_\be=\b=_\br_\br_\bd:\b:_\bd_\bs_\b-_\bn_\ba_\bm_\be:\b:_\bC_\bF]
-       [C\bCD\bDE\bEF\bF:\b:_\bv_\bn_\ba_\bm_\be=\b=_\br_\bp_\bn_\b-_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn] [X\bXP\bPO\bOR\bRT\bT:\b:_\bv_\bn_\ba_\bm_\be[:\b:_\bl_\be_\bg_\be_\bn_\bd]]
+       [-\b-m\bm|-\b--\b-m\bma\bax\bxr\bro\bow\bws\bs _\br_\bo_\bw_\bs] [-\b--\b-s\bst\bte\bep\bp _\bv_\ba_\bl_\bu_\be] [-\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs]
+       [D\bDE\bEF\bF:\b:_\bv_\bn_\ba_\bm_\be=\b=_\br_\br_\bd:\b:_\bd_\bs_\b-_\bn_\ba_\bm_\be:\b:_\bC_\bF] [C\bCD\bDE\bEF\bF:\b:_\bv_\bn_\ba_\bm_\be=\b=_\br_\bp_\bn_\b-_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn]
+       [X\bXP\bPO\bOR\bRT\bT:\b:_\bv_\bn_\ba_\bm_\be[:\b:_\bl_\be_\bg_\be_\bn_\bd]]
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-       The x\bxp\bpo\bor\brt\bt function's main purpose is to write an XML formatted
-       representation of the data stored in one or several R\bRR\bRD\bDs. It can also
+       The x\bxp\bpo\bor\brt\bt function's main purpose is to write an XML formatted repre-
+       sentation of the data stored in one or several R\bRR\bRD\bDs. It can also
        extract numerical reports.
 
        If no _\bX_\bP_\bO_\bR_\bT statements are found, there will be no output.
@@ -22,15 +23,15 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
            The time when the exported range should begin. Time in seconds
            since epoch (1970-01-01) is required. Negative numbers are relative
            to the current time. By default one day worth of data will be
-           printed.  See also AT-STYLE TIME SPECIFICATION section in the
-           _\br_\br_\bd_\bf_\be_\bt_\bc_\bh documentation for a detailed explanation on how to specify
+           printed.  See also AT-STYLE TIME SPECIFICATION section in the _\br_\br_\bd_\b-
+           _\bf_\be_\bt_\bc_\bh documentation for a detailed explanation on how to specify
            time.
 
        -\b-e\be|-\b--\b-e\ben\bnd\bd _\bs_\be_\bc_\bo_\bn_\bd_\bs (default now)
            The time when the exported range should end. Time in seconds since
-           epoch.  See also AT-STYLE TIME SPECIFICATION section in the
-           _\br_\br_\bd_\bf_\be_\bt_\bc_\bh documentation for a detailed explanation of ways to
-           specify time.
+           epoch.  See also AT-STYLE TIME SPECIFICATION section in the _\br_\br_\bd_\b-
+           _\bf_\be_\bt_\bc_\bh documentation for a detailed explanation of ways to specify
+           time.
 
        -\b-m\bm|-\b--\b-m\bma\bax\bxr\bro\bow\bws\bs _\br_\bo_\bw_\bs (default 400 rows)
            This works like the -\b-w\bw|-\b--\b-w\bwi\bid\bdt\bth\bh parameter of _\br_\br_\bd_\bg_\br_\ba_\bp_\bh.  In fact it
@@ -40,6 +41,15 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        -\b--\b-s\bst\bte\bep\bp _\bv_\ba_\bl_\bu_\be (default automatic)
            See rrdgraph documentation.
 
+       -\b--\b-d\bda\bae\bem\bmo\bon\bn _\ba_\bd_\bd_\br_\be_\bs_\bs
+           Address of the rrdcached daemon. If specified, a "flush" command is
+           sent to the server before reading the RRD files. This allows r\brr\brd\bd-\b-
+           t\bto\boo\bol\bl to return fresh data even if the daemon is configured to cache
+           values for a long time.  For a list of accepted formats, see the -\b-l\bl
+           option in the rrdcached manual.
+
+             rrdtool xport --daemon unix:/var/run/rrdcached.sock ...
+
        -\b--\b-e\ben\bnu\bum\bmd\bds\bs
            The generated xml should contain the data values in enumerated
            tags.
@@ -53,8 +63,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
            See _\br_\br_\bd_\bg_\br_\ba_\bp_\bh documentation.
 
        X\bXP\bPO\bOR\bRT\bT:\b:_\bv_\bn_\ba_\bm_\be:\b::\b:_\bl_\be_\bg_\be_\bn_\bd
-           At least one _\bX_\bP_\bO_\bR_\bT statement should be present. The values
-           referenced by _\bv_\bn_\ba_\bm_\be are printed. Optionally add a legend.
+           At least one _\bX_\bP_\bO_\bR_\bT statement should be present. The values refer-
+           enced by _\bv_\bn_\ba_\bm_\be are printed. Optionally add a legend.
 
 O\bOu\but\btp\bpu\but\bt f\bfo\bor\brm\bma\bat\bt
        The output is enclosed in an x\bxp\bpo\bor\brt\bt element and contains two blocks. The
@@ -120,9 +130,18 @@ E\bEX\bXA\bAM\bMP\bPL\bLE\bE 2\b2
                  XPORT:out2:"if2 out bytes" \
                  XPORT:sum:"output sum"
 
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+       The following environment variables may be used to change the behavior
+       of "rrdtool xport":
+
+       R\bRR\bRD\bDC\bCA\bAC\bCH\bHE\bED\bD_\b_A\bAD\bDD\bDR\bRE\bES\bSS\bS
+           If this environment variable is set it will have the same effect as
+           specifying the "--daemon" option on the command line. If both are
+           present, the command line argument takes precedence.
+
 A\bAU\bUT\bTH\bHO\bOR\bR
        Tobias Oetiker <tobi@oetiker.ch>
 
 
 
-1.3.8                             2008-03-15                       RRDXPORT(1)
+1.3.99909060808                   2008-09-25                       RRDXPORT(1)
diff --git a/etc/rrdcached-default b/etc/rrdcached-default
new file mode 100644 (file)
index 0000000..d8d4d59
--- /dev/null
@@ -0,0 +1,14 @@
+
+RUN_RRDCACHED=0
+
+RRDCACHED_USER="rrdcached"
+
+OPTS="-w 300 -z 300"
+
+PIDFILE="/var/run/rrdcached/rrdcached.pid"
+
+SOCKFILE="/var/run/rrdcached/rrdcached.sock"
+
+SOCKPERMS=0660
+
+
diff --git a/etc/rrdcached-init b/etc/rrdcached-init
new file mode 100644 (file)
index 0000000..45b5cdf
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# chkconfig: 2345 19 81
+# description: rrdcached startup script
+#
+
+RRDCACHED=/usr/bin/rrdcached
+
+. /etc/rc.d/init.d/functions
+
+. /etc/default/rrdcached
+
+RETVAL=0
+
+case "$1" in
+   start)
+      if [ ${RUN_RRDCACHED} -eq 0 ];
+      then
+        echo "Please enable rrdcached in /etc/default/rrdcached"
+        exit 0
+      fi
+
+      echo -n "Starting rrdcached: "
+      [ -f $RRDCACHED ] || exit 1
+
+      daemon --user=$RRDCACHED_USER \
+        $RRDCACHED $OPTS -p $PIDFILE -l $SOCKFILE
+      RETVAL=$?
+      echo
+      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rrdcached
+      [ $RETVAL -eq 0 ] && chmod $SOCKPERMS "${SOCKFILE}"
+      ;;
+
+  stop)
+      echo -n "Shutting down rrdcached: "
+      killproc rrdcached
+      RETVAL=$?
+      echo
+      [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rrdcached && rm -rf $PIDFILE
+      ;;
+
+  restart|reload)
+      $0 stop
+      $0 start
+      RETVAL=$?
+      ;;
+  status)
+      status rrdcached
+      RETVAL=$?
+      ;;
+  *)
+      echo "Usage: $0 {start|stop|restart|status}"
+      exit 1
+esac
+
+exit $RETVAL
+
index e568965841c1d1f7f797e8f3d4bd309b7e854e32..a91db8cc68e4f75026d1107bf48a273bd2e3cc05 100644 (file)
@@ -4,6 +4,8 @@
 
 #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
 
+SUBDIRS = rrdcached
+
 EXTRA_DIST = cgi-demo.cgi.in
 
 examplesdir = $(pkgdatadir)/examples
index 5b4c3851463106269b4bb617d26ce49985625c91..99831cb37c37b84aa382901a349be6613419a60f 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.11 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -20,8 +21,9 @@
 
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -44,34 +46,120 @@ DIST_COMMON = $(srcdir)/4charts.pl.in $(srcdir)/Makefile.am \
        $(srcdir)/piped-demo.pl.in $(srcdir)/shared-demo.pl.in \
        $(srcdir)/stripes.pl.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
+       $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
+       $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \
+       $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
+       $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
+       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/rrd_config.h
 CONFIG_CLEAN_FILES = shared-demo.pl piped-demo.pl stripes.pl \
        bigtops.pl minmax.pl 4charts.pl perftest.pl
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(examplesdir)"
-examplesSCRIPT_INSTALL = $(INSTALL_SCRIPT)
 SCRIPTS = $(examples_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-dvi-recursive install-exec-recursive \
+       install-html-recursive install-info-recursive \
+       install-pdf-recursive install-ps-recursive install-recursive \
+       installcheck-recursive installdirs-recursive pdf-recursive \
+       ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
 ALL_LIBS = @ALL_LIBS@
-ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-CATALOGS = @CATALOGS@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+COMP_LUA = @COMP_LUA@
 COMP_PERL = @COMP_PERL@
 COMP_PYTHON = @COMP_PYTHON@
 COMP_RUBY = @COMP_RUBY@
@@ -90,37 +178,50 @@ ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
+GENCAT = @GENCAT@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_WPRINTF = @HAVE_WPRINTF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
 LIBVERS = @LIBVERS@
-LIB_LIBINTL = @LIB_LIBINTL@
 LIPO = @LIPO@
 LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
+LUA = @LUA@
+LUA_CFLAGS = @LUA_CFLAGS@
+LUA_DEFINES = @LUA_DEFINES@
+LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@
+LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@
+LUA_LFLAGS = @LUA_LFLAGS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
 MSGMERGE = @MSGMERGE@
 MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@
 MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@
@@ -151,10 +252,7 @@ PERL_VERSION = @PERL_VERSION@
 PKGCONFIG = @PKGCONFIG@
 POD2HTML = @POD2HTML@
 POD2MAN = @POD2MAN@
-POFILES = @POFILES@
 POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -186,8 +284,10 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
 TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
 TCL_VERSION = @TCL_VERSION@
 TROFF = @TROFF@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WERROR = @WERROR@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -250,12 +350,13 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+SUBDIRS = rrdcached
 EXTRA_DIST = cgi-demo.cgi.in
 examplesdir = $(pkgdatadir)/examples
 examples_SCRIPTS = cgi-demo.cgi piped-demo.pl shared-demo.pl \
        stripes.pl bigtops.pl minmax.pl 4charts.pl perftest.pl
 
-all: all-am
+all: all-recursive
 
 .SUFFIXES:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
@@ -267,9 +368,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  examples/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  examples/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnu examples/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -287,6 +388,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 shared-demo.pl: $(top_builddir)/config.status $(srcdir)/shared-demo.pl.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 piped-demo.pl: $(top_builddir)/config.status $(srcdir)/piped-demo.pl.in
@@ -304,34 +406,178 @@ perftest.pl: $(top_builddir)/config.status $(srcdir)/perftest.pl.in
 install-examplesSCRIPTS: $(examples_SCRIPTS)
        @$(NORMAL_INSTALL)
        test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)"
-       @list='$(examples_SCRIPTS)'; for p in $$list; do \
+       @list='$(examples_SCRIPTS)'; test -n "$(examplesdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(examplesSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(examplesdir)/$$f'"; \
-           $(examplesSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(examplesdir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-examplesSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(examples_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(examplesdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(examplesdir)/$$f"; \
-       done
+       @list='$(examples_SCRIPTS)'; test -n "$(examplesdir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(examplesdir)" && rm -f $$files
 
 mostlyclean-libtool:
        -rm -f *.lo
 
 clean-libtool:
        -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
 tags: TAGS
-TAGS:
 
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
 ctags: CTAGS
-CTAGS:
-
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -349,32 +595,65 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
          fi; \
        done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+           $(am__relativize); \
+           new_distdir=$$reldir; \
+           dir1=$$subdir; dir2="$(top_distdir)"; \
+           $(am__relativize); \
+           new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+           ($(am__cd) $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$new_top_distdir" \
+               distdir="$$new_distdir" \
+               am__remove_distdir=: \
+               am__skip_length_check=: \
+               am__skip_mode_fix=: \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
 check-am: all-am
-check: check-am
+check: check-recursive
 all-am: Makefile $(SCRIPTS)
-installdirs:
+installdirs: installdirs-recursive
+installdirs-am:
        for dir in "$(DESTDIR)$(examplesdir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installcheck: installcheck-am
+installcheck: installcheck-recursive
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
@@ -386,82 +665,100 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+clean: clean-recursive
 
 clean-am: clean-generic clean-libtool mostlyclean-am
 
-distclean: distclean-am
+distclean: distclean-recursive
        -rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-generic distclean-tags
 
-dvi: dvi-am
+dvi: dvi-recursive
 
 dvi-am:
 
-html: html-am
+html: html-recursive
+
+html-am:
 
-info: info-am
+info: info-recursive
 
 info-am:
 
 install-data-am: install-examplesSCRIPTS
 
-install-dvi: install-dvi-am
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
 
 install-exec-am:
 
-install-html: install-html-am
+install-html: install-html-recursive
+
+install-html-am:
 
-install-info: install-info-am
+install-info: install-info-recursive
+
+install-info-am:
 
 install-man:
 
-install-pdf: install-pdf-am
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
 
-install-ps: install-ps-am
+install-ps: install-ps-recursive
+
+install-ps-am:
 
 installcheck-am:
 
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
        -rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
 
 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
 
-pdf: pdf-am
+pdf: pdf-recursive
 
 pdf-am:
 
-ps: ps-am
+ps: ps-recursive
 
 ps-am:
 
 uninstall-am: uninstall-examplesSCRIPTS
 
-.MAKE: install-am install-strip
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+       install-am install-strip tags-recursive
 
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-dvi install-dvi-am \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+       all all-am check check-am clean clean-generic clean-libtool \
+       ctags ctags-recursive distclean distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dvi install-dvi-am \
        install-examplesSCRIPTS install-exec install-exec-am \
        install-html install-html-am install-info install-info-am \
        install-man install-pdf install-pdf-am install-ps \
        install-ps-am install-strip installcheck installcheck-am \
-       installdirs maintainer-clean maintainer-clean-generic \
-       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-       ps ps-am uninstall uninstall-am uninstall-examplesSCRIPTS
+       installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am uninstall-examplesSCRIPTS
 
 
 cgi-demo.cgi: @srcdir@/cgi-demo.cgi.in $(top_builddir)/config.status
        sed 's,@''exec_prefix@,$(exec_prefix),' @srcdir@/cgi-demo.cgi.in > $@
        chmod a+x $@
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/examples/rrdcached/Makefile.am b/examples/rrdcached/Makefile.am
new file mode 100644 (file)
index 0000000..51b1037
--- /dev/null
@@ -0,0 +1,10 @@
+## Process this file with automake to produce Makefile.in
+
+#AUTOMAKE_OPTIONS        =  foreign
+
+#ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
+
+examplesdir = $(pkgdatadir)/examples/rrdcached
+examples_SCRIPTS = RRDCached.pm rrdcached-size.pl
+
+EXTRA_DIST = RRDCached.pm rrdcached-size.pl
diff --git a/examples/rrdcached/Makefile.in b/examples/rrdcached/Makefile.in
new file mode 100644 (file)
index 0000000..b14659b
--- /dev/null
@@ -0,0 +1,536 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#AUTOMAKE_OPTIONS        =  foreign
+
+#ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = examples/rrdcached
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
+       $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
+       $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \
+       $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
+       $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
+       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/rrd_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(examplesdir)"
+SCRIPTS = $(examples_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALL_LIBS = @ALL_LIBS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COMP_LUA = @COMP_LUA@
+COMP_PERL = @COMP_PERL@
+COMP_PYTHON = @COMP_PYTHON@
+COMP_RUBY = @COMP_RUBY@
+CORE_LIBS = @CORE_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GENCAT = @GENCAT@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_WPRINTF = @HAVE_WPRINTF@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBVERS = @LIBVERS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+LUA = @LUA@
+LUA_CFLAGS = @LUA_CFLAGS@
+LUA_DEFINES = @LUA_DEFINES@
+LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@
+LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@
+LUA_LFLAGS = @LUA_LFLAGS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@
+MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NROFF = @NROFF@
+NUMVERS = @NUMVERS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PERLCC = @PERLCC@
+PERLCCFLAGS = @PERLCCFLAGS@
+PERLFLAGS = @PERLFLAGS@
+PERLLD = @PERLLD@
+PERLLDFLAGS = @PERLLDFLAGS@
+PERL_CC = @PERL_CC@
+PERL_MAKE_OPTIONS = @PERL_MAKE_OPTIONS@
+PERL_VERSION = @PERL_VERSION@
+PKGCONFIG = @PKGCONFIG@
+POD2HTML = @POD2HTML@
+POD2MAN = @POD2MAN@
+POSUB = @POSUB@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RRDDOCDIR = @RRDDOCDIR@
+RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@
+RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@
+RRD_GETOPT_LONG = @RRD_GETOPT_LONG@
+RUBY = @RUBY@
+RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@
+TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@
+TCL_PACKAGE_DIR = @TCL_PACKAGE_DIR@
+TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
+TCL_PREFIX = @TCL_PREFIX@
+TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
+TCL_SHLIB_LD = @TCL_SHLIB_LD@
+TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
+TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
+TCL_VERSION = @TCL_VERSION@
+TROFF = @TROFF@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WERROR = @WERROR@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+examplesdir = $(pkgdatadir)/examples/rrdcached
+examples_SCRIPTS = RRDCached.pm rrdcached-size.pl
+EXTRA_DIST = RRDCached.pm rrdcached-size.pl
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/rrdcached/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnu examples/rrdcached/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-examplesSCRIPTS: $(examples_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)"
+       @list='$(examples_SCRIPTS)'; test -n "$(examplesdir)" || list=; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \
+            } \
+       ; done
+
+uninstall-examplesSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(examples_SCRIPTS)'; test -n "$(examplesdir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(examplesdir)" && rm -f $$files
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+       for dir in "$(DESTDIR)$(examplesdir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-examplesSCRIPTS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-examplesSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+       distclean distclean-generic distclean-libtool distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-examplesSCRIPTS install-exec install-exec-am \
+       install-html install-html-am install-info install-info-am \
+       install-man install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am uninstall uninstall-am uninstall-examplesSCRIPTS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/examples/rrdcached/RRDCached.pm b/examples/rrdcached/RRDCached.pm
new file mode 100644 (file)
index 0000000..d776e32
--- /dev/null
@@ -0,0 +1,90 @@
+
+use strict;
+use warnings;
+
+package RRDCached;
+
+=head1 RRDCached
+
+This module implements the B<RRDCached> client protocol for bulk updates.
+
+=head1 SYNOPSIS
+
+    my $cache = RRDCached->new('unix:/var/run/rrdcached.sock')
+        or die "Cannot connect to RRDCached";
+
+    $cache->update('file1.rrd', 'N:10:2:78');
+    $cache->update('file2.rrd', '1222973760:30:0:9', 'N:68:1:55');
+    ...
+
+    $cache->done();
+
+=cut
+
+use IO::Socket;
+
+#################################################################
+
+sub new {
+    my ($class, $daemon) = @_;
+    my $this = {};
+
+    $daemon ||= $ENV{RRDCACHED_ADDRESS};
+    defined $daemon or return undef;
+
+    my $sock_family = "INET";
+
+    if ($daemon =~ m{^unix: | ^/ }x)
+    {
+        $sock_family = "UNIX";
+        $daemon =~ s/^unix://;
+    }
+
+    my $sock = "IO::Socket::$sock_family"->new($daemon)
+        or die "Cannot connect to daemon";
+
+    $sock->printflush("BATCH\n");
+
+    my $go = $sock->getline;
+    warn "We didn't get go-ahead from rrdcached" unless $go =~ /^0/;
+
+    $sock->autoflush(0);
+
+    bless { sock => $sock,
+            daemon => $daemon,
+        }, $class;
+}
+
+sub update {
+    my $this = shift;
+    my $file = shift;
+    ## @updates = @_;
+
+    @_ or warn "No updates for $file!";
+
+    ## rrdcached doesn't handle N: timestamps
+    my $now = time();
+    s/^N(?=:)/$now/ for (@_);
+
+    $this->{sock}->print("update $file @_\n");
+}
+
+sub done {
+    my ($this) = @_;
+
+    my $sock = delete $this->{sock};
+
+    $sock->printflush(".\n");
+    my $errs = $sock->getline;
+
+    my ($num_err) = $errs =~ /^(\d+)/;
+    return unless $num_err;
+
+    $sock->getline for (1..$num_err);
+
+    $sock->close;
+}
+
+#################################################################
+
+1;
diff --git a/examples/rrdcached/rrdcached-size.pl b/examples/rrdcached/rrdcached-size.pl
new file mode 100644 (file)
index 0000000..df6aaf6
--- /dev/null
@@ -0,0 +1,153 @@
+#!/usr/bin/perl
+
+=head1 NAME
+
+rrdcached-size.pl - estimate the IO and memory requirements for rrdcached
+
+=head1 SYNOPSIS
+
+B<rrdcached-size.pl>
+[B<-rrds>E<nbsp>I<file_count>]
+[B<-step>E<nbsp>I<seconds>]
+[B<-update>E<nbsp>I<length>]
+[B<-file>E<nbsp>I<length>]
+[B<-io>E<nbsp>I<files/sec>]
+[B<-w>E<nbsp>I<seconds>]
+[B<-f>E<nbsp>I<seconds>]
+[B<-pagesize>E<nbsp>I<bytes>]
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-rrds> I<file_count>
+
+Specify the number of RRDs in the working set.
+
+=item B<-step> I<seconds>
+
+Specify the RRD step value for each file.
+
+=item B<-update> I<length>
+
+Average update string length.  For this calculation, the time value must
+be specified as a C<time_t>, not C<N>.  For example, this update string
+would lead to B<-update>E<nbsp>I<43> :
+
+  1226936851:0:0:101113914:0:0:0:25814373:0:0
+
+=item B<-file> I<length>
+
+Specify the average file name length.  For this calculation, use the full
+path of the file.
+
+=item B<-io> I<files/sec>
+
+Specify the number of RRD files that your system can write per second.
+
+=item B<-w> I<timer>
+
+Specifies the B<-w> timer used with rrdcached.  For more information, see
+the B<rrdcached> documentation.
+
+=item B<-f> I<timer>
+
+Specifies the B<-f> timer used with rrdcached.  For more information, see
+the B<rrdcached> documentation.
+
+=item B<-pagesize> I<bytes>
+
+Manually specify the system page size, in case it is not detected
+properly.
+
+=back
+
+=cut
+
+use strict;
+use warnings;
+
+my $filename_len = 60;
+my $update_len = 128;
+my $rrds = 100;
+my $step = 300;
+my $rrd_per_sec = 200;
+my $rrdc_write = 300;
+my $rrdc_flush = 3600;
+my $pagesize = `pagesize` || 4096;
+
+#################################################################
+
+use Getopt::Long;
+GetOptions('rrds=i' => \$rrds,
+           'step=i' => \$step,
+           'update=i' => \$update_len,
+           'file=i' => \$filename_len,
+           'io=i' => \$rrd_per_sec,
+           'w=i'    => \$rrdc_write,
+           'f=i'    => \$rrdc_flush,
+           'pagesize=i' => \$pagesize,
+           'h' => \&usage,
+           )
+    or die "Options failure";
+
+@ARGV and die "Extra args: @ARGV\n";
+
+#################################################################
+
+my $MEG = 1024*1024;
+
+my $write_time = int($rrds / $rrd_per_sec);
+my $write_busy = int(100 * $write_time / $rrdc_write);
+my $buffered_pdp = $rrdc_write / $step;
+
+my $max_ram
+    = $rrds
+    * ($filename_len
+           + ( $rrdc_write / $step ) * $update_len)
+    / $MEG;
+
+my $journal_size
+    = $rrds
+    * (length("update") + $filename_len + $update_len + 3)
+    * ($rrdc_flush/$step)
+    * 2  # 2 logs
+    / $MEG;
+
+my $journal_rate = (($journal_size*$MEG/2))/$rrdc_flush;
+my $journal_page_rate = $journal_rate / $pagesize;
+
+$_ = sprintf("%.1f", $_)
+    for ($write_time,
+         $write_busy,
+         $buffered_pdp,
+         $max_ram,
+         $journal_size,
+         $journal_rate,
+         $journal_page_rate,
+     );
+
+print <<"EOF";
+RRD files     : $rrds files
+RRD step      : $step seconds
+Update length : $update_len bytes
+IO writes/sec : $rrd_per_sec rrd/sec
+write timer   : $rrdc_write seconds
+flush timer   : $rrdc_flush seconds
+-----------------------------------------------------------------
+
+Time to write all RRDs: $write_time sec ($write_busy\% busy)
+
+$buffered_pdp PDPs will be buffered per file
+
+RAM usage: $max_ram MB
+
+Journal size: $journal_size MB (total size for two journals)
+
+Journal write rate: $journal_page_rate page/sec ($journal_rate byte/sec)
+EOF
+
+sub usage {
+    system("perldoc $0");
+    exit(1);
+}
index a5897de6ea7f74f83fd793474bb4738d32884719..6781b987bdbcbc23efe6bbe1654a1e3637b9af07 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2006-12-25.00
+scriptversion=2009-04-28.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -515,5 +515,6 @@ done
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/intl/ChangeLog b/intl/ChangeLog
new file mode 100644 (file)
index 0000000..acc4005
--- /dev/null
@@ -0,0 +1,4 @@
+2005-04-11  GNU  <bug-gnu-gettext@gnu.org>
+
+       * Version 0.14.4 released.
+
diff --git a/intl/Makefile.in b/intl/Makefile.in
new file mode 100644 (file)
index 0000000..25499c0
--- /dev/null
@@ -0,0 +1,500 @@
+# Makefile for directory with message catalog handling library of GNU gettext
+# Copyright (C) 1995-1998, 2000-2005 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+# USA.
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+VPATH = $(srcdir)
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+transform = @program_transform_name@
+libdir = @libdir@
+includedir = @includedir@
+datadir = @datadir@
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/intl
+aliaspath = $(localedir)
+subdir = intl
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
+
+l = @INTL_LIBTOOL_SUFFIX_PREFIX@
+
+AR = ar
+CC = @CC@
+LIBTOOL = @LIBTOOL@
+RANLIB = @RANLIB@
+YACC = @INTLBISON@ -y -d
+YFLAGS = --name-prefix=__gettext
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
+-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \
+-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
+-Dset_relocation_prefix=libintl_set_relocation_prefix \
+-Drelocate=libintl_relocate \
+-DDEPENDS_ON_LIBICONV=1 @DEFS@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+HEADERS = \
+  gmo.h \
+  gettextP.h \
+  hash-string.h \
+  loadinfo.h \
+  plural-exp.h \
+  eval-plural.h \
+  localcharset.h \
+  relocatable.h \
+  xsize.h \
+  printf-args.h printf-args.c \
+  printf-parse.h wprintf-parse.h printf-parse.c \
+  vasnprintf.h vasnwprintf.h vasnprintf.c \
+  os2compat.h \
+  libgnuintl.h.in
+SOURCES = \
+  bindtextdom.c \
+  dcgettext.c \
+  dgettext.c \
+  gettext.c \
+  finddomain.c \
+  loadmsgcat.c \
+  localealias.c \
+  textdomain.c \
+  l10nflist.c \
+  explodename.c \
+  dcigettext.c \
+  dcngettext.c \
+  dngettext.c \
+  ngettext.c \
+  plural.y \
+  plural-exp.c \
+  localcharset.c \
+  relocatable.c \
+  langprefs.c \
+  localename.c \
+  log.c \
+  printf.c \
+  osdep.c \
+  os2compat.c \
+  intl-compat.c
+OBJECTS = \
+  bindtextdom.$lo \
+  dcgettext.$lo \
+  dgettext.$lo \
+  gettext.$lo \
+  finddomain.$lo \
+  loadmsgcat.$lo \
+  localealias.$lo \
+  textdomain.$lo \
+  l10nflist.$lo \
+  explodename.$lo \
+  dcigettext.$lo \
+  dcngettext.$lo \
+  dngettext.$lo \
+  ngettext.$lo \
+  plural.$lo \
+  plural-exp.$lo \
+  localcharset.$lo \
+  relocatable.$lo \
+  langprefs.$lo \
+  localename.$lo \
+  log.$lo \
+  printf.$lo \
+  osdep.$lo \
+  intl-compat.$lo
+DISTFILES.common = Makefile.in \
+config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
+DISTFILES.generated = plural.c
+DISTFILES.normal = VERSION
+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
+libgnuintl.h_vms Makefile.vms \
+libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
+DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
+
+all: all-@USE_INCLUDED_LIBINTL@
+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
+all-no: all-no-@BUILD_INCLUDED_LIBINTL@
+all-no-yes: libgnuintl.$la
+all-no-no:
+
+libintl.a libgnuintl.a: $(OBJECTS)
+       rm -f $@
+       $(AR) cru $@ $(OBJECTS)
+       $(RANLIB) $@
+
+libintl.la libgnuintl.la: $(OBJECTS)
+       $(LIBTOOL) --mode=link \
+         $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
+         $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) -lc \
+         -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
+         -rpath $(libdir) \
+         -no-undefined
+
+# Libtool's library version information for libintl.
+# Before making a gettext release, the gettext maintainer must change this
+# according to the libtool documentation, section "Library interface versions".
+# Maintainers of other packages that include the intl directory must *not*
+# change these values.
+LTV_CURRENT=7
+LTV_REVISION=3
+LTV_AGE=4
+
+.SUFFIXES:
+.SUFFIXES: .c .y .o .lo .sin .sed
+
+.c.o:
+       $(COMPILE) $<
+
+.y.c:
+       $(YACC) $(YFLAGS) --output $@ $<
+       rm -f $*.h
+
+bindtextdom.lo: $(srcdir)/bindtextdom.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
+dcgettext.lo: $(srcdir)/dcgettext.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
+dgettext.lo: $(srcdir)/dgettext.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
+gettext.lo: $(srcdir)/gettext.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
+finddomain.lo: $(srcdir)/finddomain.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
+loadmsgcat.lo: $(srcdir)/loadmsgcat.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
+localealias.lo: $(srcdir)/localealias.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
+textdomain.lo: $(srcdir)/textdomain.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
+l10nflist.lo: $(srcdir)/l10nflist.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
+explodename.lo: $(srcdir)/explodename.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
+dcigettext.lo: $(srcdir)/dcigettext.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
+dcngettext.lo: $(srcdir)/dcngettext.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
+dngettext.lo: $(srcdir)/dngettext.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
+ngettext.lo: $(srcdir)/ngettext.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
+plural.lo: $(srcdir)/plural.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
+plural-exp.lo: $(srcdir)/plural-exp.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
+localcharset.lo: $(srcdir)/localcharset.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
+relocatable.lo: $(srcdir)/relocatable.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
+langprefs.lo: $(srcdir)/langprefs.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/langprefs.c
+localename.lo: $(srcdir)/localename.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
+log.lo: $(srcdir)/log.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
+printf.lo: $(srcdir)/printf.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c
+osdep.lo: $(srcdir)/osdep.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
+intl-compat.lo: $(srcdir)/intl-compat.c
+       $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
+
+ref-add.sed: $(srcdir)/ref-add.sin
+       sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
+       mv t-ref-add.sed ref-add.sed
+ref-del.sed: $(srcdir)/ref-del.sin
+       sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
+       mv t-ref-del.sed ref-del.sed
+
+INCLUDES = -I. -I$(srcdir) -I..
+
+libgnuintl.h: $(srcdir)/libgnuintl.h.in
+       sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
+           -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
+           -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
+           -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
+         < $(srcdir)/libgnuintl.h.in > libgnuintl.h
+
+libintl.h: libgnuintl.h
+       cp libgnuintl.h libintl.h
+
+charset.alias: $(srcdir)/config.charset
+       $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
+       mv t-$@ $@
+
+check: all
+
+# We must not install the libintl.h/libintl.a files if we are on a
+# system which has the GNU gettext() function in its C library or in a
+# separate library.
+# If you want to use the one which comes with this version of the
+# package, you have to use `configure --with-included-gettext'.
+install: install-exec install-data
+install-exec: all
+       if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
+          && test '@USE_INCLUDED_LIBINTL@' = yes; then \
+         $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+         $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
+         $(LIBTOOL) --mode=install \
+           $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
+         if test "@RELOCATABLE@" = yes; then \
+           dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
+           if test -n "$$dependencies"; then \
+             rm -f $(DESTDIR)$(libdir)/libintl.la; \
+           fi; \
+         fi; \
+       else \
+         : ; \
+       fi
+       if test "$(PACKAGE)" = "gettext-tools" \
+          && test '@USE_INCLUDED_LIBINTL@' = no \
+          && test @GLIBC2@ != no; then \
+         $(mkinstalldirs) $(DESTDIR)$(libdir); \
+         $(LIBTOOL) --mode=install \
+           $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
+         rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
+         $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
+         $(LIBTOOL) --mode=uninstall \
+           rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
+       else \
+         : ; \
+       fi
+       if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+         test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+         temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+         dest=$(DESTDIR)$(libdir)/charset.alias; \
+         if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+           orig=$(DESTDIR)$(libdir)/charset.alias; \
+           sed -f ref-add.sed $$orig > $$temp; \
+           $(INSTALL_DATA) $$temp $$dest; \
+           rm -f $$temp; \
+         else \
+           if test @GLIBC21@ = no; then \
+             orig=charset.alias; \
+             sed -f ref-add.sed $$orig > $$temp; \
+             $(INSTALL_DATA) $$temp $$dest; \
+             rm -f $$temp; \
+           fi; \
+         fi; \
+         $(mkinstalldirs) $(DESTDIR)$(localedir); \
+         test -f $(DESTDIR)$(localedir)/locale.alias \
+           && orig=$(DESTDIR)$(localedir)/locale.alias \
+           || orig=$(srcdir)/locale.alias; \
+         temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+         dest=$(DESTDIR)$(localedir)/locale.alias; \
+         sed -f ref-add.sed $$orig > $$temp; \
+         $(INSTALL_DATA) $$temp $$dest; \
+         rm -f $$temp; \
+       else \
+         : ; \
+       fi
+install-data: all
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+         $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
+         $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
+         dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
+         for file in $$dists; do \
+           $(INSTALL_DATA) $(srcdir)/$$file \
+                           $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+         chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
+         dists="$(DISTFILES.generated)"; \
+         for file in $$dists; do \
+           if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+           $(INSTALL_DATA) $$dir/$$file \
+                           $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+         dists="$(DISTFILES.obsolete)"; \
+         for file in $$dists; do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
+
+install-strip: install
+
+installdirs:
+       if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
+          && test '@USE_INCLUDED_LIBINTL@' = yes; then \
+         $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+       else \
+         : ; \
+       fi
+       if test "$(PACKAGE)" = "gettext-tools" \
+          && test '@USE_INCLUDED_LIBINTL@' = no \
+          && test @GLIBC2@ != no; then \
+         $(mkinstalldirs) $(DESTDIR)$(libdir); \
+       else \
+         : ; \
+       fi
+       if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+         test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+         $(mkinstalldirs) $(DESTDIR)$(localedir); \
+       else \
+         : ; \
+       fi
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+       else \
+         : ; \
+       fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+       if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
+          && test '@USE_INCLUDED_LIBINTL@' = yes; then \
+         rm -f $(DESTDIR)$(includedir)/libintl.h; \
+         $(LIBTOOL) --mode=uninstall \
+           rm -f $(DESTDIR)$(libdir)/libintl.$la; \
+       else \
+         : ; \
+       fi
+       if test "$(PACKAGE)" = "gettext-tools" \
+          && test '@USE_INCLUDED_LIBINTL@' = no \
+          && test @GLIBC2@ != no; then \
+         rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
+       else \
+         : ; \
+       fi
+       if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+         if test -f $(DESTDIR)$(libdir)/charset.alias; then \
+           temp=$(DESTDIR)$(libdir)/t-charset.alias; \
+           dest=$(DESTDIR)$(libdir)/charset.alias; \
+           sed -f ref-del.sed $$dest > $$temp; \
+           if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+             rm -f $$dest; \
+           else \
+             $(INSTALL_DATA) $$temp $$dest; \
+           fi; \
+           rm -f $$temp; \
+         fi; \
+         if test -f $(DESTDIR)$(localedir)/locale.alias; then \
+           temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+           dest=$(DESTDIR)$(localedir)/locale.alias; \
+           sed -f ref-del.sed $$dest > $$temp; \
+           if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+             rm -f $$dest; \
+           else \
+             $(INSTALL_DATA) $$temp $$dest; \
+           fi; \
+           rm -f $$temp; \
+         fi; \
+       else \
+         : ; \
+       fi
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
+
+info dvi ps pdf html:
+
+$(OBJECTS): ../config.h libgnuintl.h
+bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
+dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
+explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
+dcigettext.$lo: $(srcdir)/eval-plural.h
+localcharset.$lo: $(srcdir)/localcharset.h
+localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
+printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c
+
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES)
+       here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
+
+ctags: CTAGS
+
+CTAGS: $(HEADERS) $(SOURCES)
+       here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
+
+id: ID
+
+ID: $(HEADERS) $(SOURCES)
+       here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
+
+
+mostlyclean:
+       rm -f *.a *.la *.o *.obj *.lo core core.*
+       rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
+       rm -f -r .libs _libs
+
+clean: mostlyclean
+
+distclean: clean
+       rm -f Makefile ID TAGS
+       if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
+         rm -f ChangeLog.inst $(DISTFILES.normal); \
+       else \
+         : ; \
+       fi
+
+maintainer-clean: distclean
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+
+# GNU gettext needs not contain the file `VERSION' but contains some
+# other files which should not be distributed in other packages.
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: Makefile
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         : ; \
+       else \
+         if test "$(PACKAGE)" = "gettext-runtime"; then \
+           additional="$(DISTFILES.gettext)"; \
+         else \
+           additional="$(DISTFILES.normal)"; \
+         fi; \
+         $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
+         for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
+           if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+           cp -p $$dir/$$file $(distdir) || test $$file = Makefile.in || exit 1; \
+         done; \
+       fi
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       cd $(top_builddir) && $(SHELL) ./config.status
+# This would be more efficient, but doesn't work any more with autoconf-2.57,
+# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
+#      cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/intl/VERSION b/intl/VERSION
new file mode 100644 (file)
index 0000000..615910c
--- /dev/null
@@ -0,0 +1 @@
+GNU gettext library from gettext-0.14.4
diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c
new file mode 100644 (file)
index 0000000..dcdc400
--- /dev/null
@@ -0,0 +1,363 @@
+/* Implementation of the bindtextdomain(3) function
+   Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications.  */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc.  */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+   names than the internal variables in GNU libc, otherwise programs
+   using libintl.a cannot be linked statically.  */
+#if !defined _LIBC
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
+#endif
+
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>.  */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Contains the default location of the message catalogs.  */
+extern const char _nl_default_dirname[];
+#ifdef _LIBC
+extern const char _nl_default_dirname_internal[] attribute_hidden;
+#else
+# define INTUSE(name) name
+#endif
+
+/* List with bindings of specific domains.  */
+extern struct binding *_nl_domain_bindings;
+
+/* Lock variable to protect the global data in the gettext implementation.  */
+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
+
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define BINDTEXTDOMAIN __bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
+# ifndef strdup
+#  define strdup(str) __strdup (str)
+# endif
+#else
+# define BINDTEXTDOMAIN libintl_bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
+#endif
+
+/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
+   to be used for the DOMAINNAME message catalog.
+   If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
+   modified, only the current value is returned.
+   If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
+   modified nor returned.  */
+static void
+set_binding_values (const char *domainname,
+                   const char **dirnamep, const char **codesetp)
+{
+  struct binding *binding;
+  int modified;
+
+  /* Some sanity checks.  */
+  if (domainname == NULL || domainname[0] == '\0')
+    {
+      if (dirnamep)
+       *dirnamep = NULL;
+      if (codesetp)
+       *codesetp = NULL;
+      return;
+    }
+
+  __libc_rwlock_wrlock (_nl_state_lock);
+
+  modified = 0;
+
+  for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+    {
+      int compare = strcmp (domainname, binding->domainname);
+      if (compare == 0)
+       /* We found it!  */
+       break;
+      if (compare < 0)
+       {
+         /* It is not in the list.  */
+         binding = NULL;
+         break;
+       }
+    }
+
+  if (binding != NULL)
+    {
+      if (dirnamep)
+       {
+         const char *dirname = *dirnamep;
+
+         if (dirname == NULL)
+           /* The current binding has be to returned.  */
+           *dirnamep = binding->dirname;
+         else
+           {
+             /* The domain is already bound.  If the new value and the old
+                one are equal we simply do nothing.  Otherwise replace the
+                old binding.  */
+             char *result = binding->dirname;
+             if (strcmp (dirname, result) != 0)
+               {
+                 if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
+                   result = (char *) INTUSE(_nl_default_dirname);
+                 else
+                   {
+#if defined _LIBC || defined HAVE_STRDUP
+                     result = strdup (dirname);
+#else
+                     size_t len = strlen (dirname) + 1;
+                     result = (char *) malloc (len);
+                     if (__builtin_expect (result != NULL, 1))
+                       memcpy (result, dirname, len);
+#endif
+                   }
+
+                 if (__builtin_expect (result != NULL, 1))
+                   {
+                     if (binding->dirname != INTUSE(_nl_default_dirname))
+                       free (binding->dirname);
+
+                     binding->dirname = result;
+                     modified = 1;
+                   }
+               }
+             *dirnamep = result;
+           }
+       }
+
+      if (codesetp)
+       {
+         const char *codeset = *codesetp;
+
+         if (codeset == NULL)
+           /* The current binding has be to returned.  */
+           *codesetp = binding->codeset;
+         else
+           {
+             /* The domain is already bound.  If the new value and the old
+                one are equal we simply do nothing.  Otherwise replace the
+                old binding.  */
+             char *result = binding->codeset;
+             if (result == NULL || strcmp (codeset, result) != 0)
+               {
+#if defined _LIBC || defined HAVE_STRDUP
+                 result = strdup (codeset);
+#else
+                 size_t len = strlen (codeset) + 1;
+                 result = (char *) malloc (len);
+                 if (__builtin_expect (result != NULL, 1))
+                   memcpy (result, codeset, len);
+#endif
+
+                 if (__builtin_expect (result != NULL, 1))
+                   {
+                     if (binding->codeset != NULL)
+                       free (binding->codeset);
+
+                     binding->codeset = result;
+                     binding->codeset_cntr++;
+                     modified = 1;
+                   }
+               }
+             *codesetp = result;
+           }
+       }
+    }
+  else if ((dirnamep == NULL || *dirnamep == NULL)
+          && (codesetp == NULL || *codesetp == NULL))
+    {
+      /* Simply return the default values.  */
+      if (dirnamep)
+       *dirnamep = INTUSE(_nl_default_dirname);
+      if (codesetp)
+       *codesetp = NULL;
+    }
+  else
+    {
+      /* We have to create a new binding.  */
+      size_t len = strlen (domainname) + 1;
+      struct binding *new_binding =
+       (struct binding *) malloc (offsetof (struct binding, domainname) + len);
+
+      if (__builtin_expect (new_binding == NULL, 0))
+       goto failed;
+
+      memcpy (new_binding->domainname, domainname, len);
+
+      if (dirnamep)
+       {
+         const char *dirname = *dirnamep;
+
+         if (dirname == NULL)
+           /* The default value.  */
+           dirname = INTUSE(_nl_default_dirname);
+         else
+           {
+             if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
+               dirname = INTUSE(_nl_default_dirname);
+             else
+               {
+                 char *result;
+#if defined _LIBC || defined HAVE_STRDUP
+                 result = strdup (dirname);
+                 if (__builtin_expect (result == NULL, 0))
+                   goto failed_dirname;
+#else
+                 size_t len = strlen (dirname) + 1;
+                 result = (char *) malloc (len);
+                 if (__builtin_expect (result == NULL, 0))
+                   goto failed_dirname;
+                 memcpy (result, dirname, len);
+#endif
+                 dirname = result;
+               }
+           }
+         *dirnamep = dirname;
+         new_binding->dirname = (char *) dirname;
+       }
+      else
+       /* The default value.  */
+       new_binding->dirname = (char *) INTUSE(_nl_default_dirname);
+
+      new_binding->codeset_cntr = 0;
+
+      if (codesetp)
+       {
+         const char *codeset = *codesetp;
+
+         if (codeset != NULL)
+           {
+             char *result;
+
+#if defined _LIBC || defined HAVE_STRDUP
+             result = strdup (codeset);
+             if (__builtin_expect (result == NULL, 0))
+               goto failed_codeset;
+#else
+             size_t len = strlen (codeset) + 1;
+             result = (char *) malloc (len);
+             if (__builtin_expect (result == NULL, 0))
+               goto failed_codeset;
+             memcpy (result, codeset, len);
+#endif
+             codeset = result;
+             new_binding->codeset_cntr++;
+           }
+         *codesetp = codeset;
+         new_binding->codeset = (char *) codeset;
+       }
+      else
+       new_binding->codeset = NULL;
+
+      /* Now enqueue it.  */
+      if (_nl_domain_bindings == NULL
+         || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
+       {
+         new_binding->next = _nl_domain_bindings;
+         _nl_domain_bindings = new_binding;
+       }
+      else
+       {
+         binding = _nl_domain_bindings;
+         while (binding->next != NULL
+                && strcmp (domainname, binding->next->domainname) > 0)
+           binding = binding->next;
+
+         new_binding->next = binding->next;
+         binding->next = new_binding;
+       }
+
+      modified = 1;
+
+      /* Here we deal with memory allocation failures.  */
+      if (0)
+       {
+       failed_codeset:
+         if (new_binding->dirname != INTUSE(_nl_default_dirname))
+           free (new_binding->dirname);
+       failed_dirname:
+         free (new_binding);
+       failed:
+         if (dirnamep)
+           *dirnamep = NULL;
+         if (codesetp)
+           *codesetp = NULL;
+       }
+    }
+
+  /* If we modified any binding, we flush the caches.  */
+  if (modified)
+    ++_nl_msg_cat_cntr;
+
+  __libc_rwlock_unlock (_nl_state_lock);
+}
+
+/* Specify that the DOMAINNAME message catalog will be found
+   in DIRNAME rather than in the system locale data base.  */
+char *
+BINDTEXTDOMAIN (const char *domainname, const char *dirname)
+{
+  set_binding_values (domainname, &dirname, NULL);
+  return (char *) dirname;
+}
+
+/* Specify the character encoding in which the messages from the
+   DOMAINNAME message catalog will be returned.  */
+char *
+BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset)
+{
+  set_binding_values (domainname, NULL, &codeset);
+  return (char *) codeset;
+}
+
+#ifdef _LIBC
+/* Aliases for function names in GNU C Library.  */
+weak_alias (__bindtextdomain, bindtextdomain);
+weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
+#endif
diff --git a/intl/config.charset b/intl/config.charset
new file mode 100755 (executable)
index 0000000..5036580
--- /dev/null
@@ -0,0 +1,638 @@
+#! /bin/sh
+# Output a system dependent table of character encoding aliases.
+#
+#   Copyright (C) 2000-2004 Free Software Foundation, Inc.
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU Library General Public License as published
+#   by the Free Software Foundation; either version 2, or (at your option)
+#   any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#   Library General Public License for more details.
+#
+#   You should have received a copy of the GNU Library General Public
+#   License along with this program; if not, write to the Free Software
+#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+#   USA.
+#
+# The table consists of lines of the form
+#    ALIAS  CANONICAL
+#
+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
+# ALIAS is compared in a case sensitive way.
+#
+# CANONICAL is the GNU canonical name for this character encoding.
+# It must be an encoding supported by libiconv. Support by GNU libc is
+# also desirable. CANONICAL is case insensitive. Usually an upper case
+# MIME charset name is preferred.
+# The current list of GNU canonical charset names is as follows.
+#
+#       name              MIME?             used by which systems
+#   ASCII, ANSI_X3.4-1968       glibc solaris freebsd darwin
+#   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd darwin
+#   ISO-8859-2              Y   glibc aix hpux irix osf solaris freebsd darwin
+#   ISO-8859-3              Y   glibc solaris
+#   ISO-8859-4              Y   osf solaris freebsd darwin
+#   ISO-8859-5              Y   glibc aix hpux irix osf solaris freebsd darwin
+#   ISO-8859-6              Y   glibc aix hpux solaris
+#   ISO-8859-7              Y   glibc aix hpux irix osf solaris darwin
+#   ISO-8859-8              Y   glibc aix hpux osf solaris
+#   ISO-8859-9              Y   glibc aix hpux irix osf solaris darwin
+#   ISO-8859-13                 glibc darwin
+#   ISO-8859-14                 glibc
+#   ISO-8859-15                 glibc aix osf solaris freebsd darwin
+#   KOI8-R                  Y   glibc solaris freebsd darwin
+#   KOI8-U                  Y   glibc freebsd darwin
+#   KOI8-T                      glibc
+#   CP437                       dos
+#   CP775                       dos
+#   CP850                       aix osf dos
+#   CP852                       dos
+#   CP855                       dos
+#   CP856                       aix
+#   CP857                       dos
+#   CP861                       dos
+#   CP862                       dos
+#   CP864                       dos
+#   CP865                       dos
+#   CP866                       freebsd darwin dos
+#   CP869                       dos
+#   CP874                       woe32 dos
+#   CP922                       aix
+#   CP932                       aix woe32 dos
+#   CP943                       aix
+#   CP949                       osf woe32 dos
+#   CP950                       woe32 dos
+#   CP1046                      aix
+#   CP1124                      aix
+#   CP1125                      dos
+#   CP1129                      aix
+#   CP1250                      woe32
+#   CP1251                      glibc solaris darwin woe32
+#   CP1252                      aix woe32
+#   CP1253                      woe32
+#   CP1254                      woe32
+#   CP1255                      glibc woe32
+#   CP1256                      woe32
+#   CP1257                      woe32
+#   GB2312                  Y   glibc aix hpux irix solaris freebsd darwin
+#   EUC-JP                  Y   glibc aix hpux irix osf solaris freebsd darwin
+#   EUC-KR                  Y   glibc aix hpux irix osf solaris freebsd darwin
+#   EUC-TW                      glibc aix hpux irix osf solaris
+#   BIG5                    Y   glibc aix hpux osf solaris freebsd darwin
+#   BIG5-HKSCS                  glibc solaris
+#   GBK                         glibc aix osf solaris woe32 dos
+#   GB18030                     glibc solaris
+#   SHIFT_JIS               Y   hpux osf solaris freebsd darwin
+#   JOHAB                       glibc solaris woe32
+#   TIS-620                     glibc aix hpux osf solaris
+#   VISCII                  Y   glibc
+#   TCVN5712-1                  glibc
+#   GEORGIAN-PS                 glibc
+#   HP-ROMAN8                   hpux
+#   HP-ARABIC8                  hpux
+#   HP-GREEK8                   hpux
+#   HP-HEBREW8                  hpux
+#   HP-TURKISH8                 hpux
+#   HP-KANA8                    hpux
+#   DEC-KANJI                   osf
+#   DEC-HANYU                   osf
+#   UTF-8                   Y   glibc aix hpux osf solaris darwin
+#
+# Note: Names which are not marked as being a MIME name should not be used in
+# Internet protocols for information interchange (mail, news, etc.).
+#
+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
+# must understand both names and treat them as equivalent.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+
+host="$1"
+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
+echo "# This file contains a table of character encoding aliases,"
+echo "# suitable for operating system '${os}'."
+echo "# It was automatically generated from config.charset."
+# List of references, updated during installation:
+echo "# Packages using this file: "
+case "$os" in
+    linux-gnulibc1*)
+       # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
+       # localcharset.c falls back to using the full locale name
+       # from the environment variables.
+       echo "C ASCII"
+       echo "POSIX ASCII"
+       for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
+                en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
+                en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
+                es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
+                et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
+                fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
+                it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
+                sv_FI sv_SE; do
+         echo "$l ISO-8859-1"
+         echo "$l.iso-8859-1 ISO-8859-1"
+         echo "$l.iso-8859-15 ISO-8859-15"
+         echo "$l.iso-8859-15@euro ISO-8859-15"
+         echo "$l@euro ISO-8859-15"
+         echo "$l.cp-437 CP437"
+         echo "$l.cp-850 CP850"
+         echo "$l.cp-1252 CP1252"
+         echo "$l.cp-1252@euro CP1252"
+         #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
+         echo "$l.utf-8 UTF-8"
+         echo "$l.utf-8@euro UTF-8"
+       done
+       for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
+                sl_SI sr sr_CS sr_YU; do
+         echo "$l ISO-8859-2"
+         echo "$l.iso-8859-2 ISO-8859-2"
+         echo "$l.cp-852 CP852"
+         echo "$l.cp-1250 CP1250"
+         echo "$l.utf-8 UTF-8"
+       done
+       for l in mk mk_MK ru ru_RU; do
+         echo "$l ISO-8859-5"
+         echo "$l.iso-8859-5 ISO-8859-5"
+         echo "$l.koi8-r KOI8-R"
+         echo "$l.cp-866 CP866"
+         echo "$l.cp-1251 CP1251"
+         echo "$l.utf-8 UTF-8"
+       done
+       for l in ar ar_SA; do
+         echo "$l ISO-8859-6"
+         echo "$l.iso-8859-6 ISO-8859-6"
+         echo "$l.cp-864 CP864"
+         #echo "$l.cp-868 CP868" # not a commonly used encoding
+         echo "$l.cp-1256 CP1256"
+         echo "$l.utf-8 UTF-8"
+       done
+       for l in el el_GR gr gr_GR; do
+         echo "$l ISO-8859-7"
+         echo "$l.iso-8859-7 ISO-8859-7"
+         echo "$l.cp-869 CP869"
+         echo "$l.cp-1253 CP1253"
+         echo "$l.cp-1253@euro CP1253"
+         echo "$l.utf-8 UTF-8"
+         echo "$l.utf-8@euro UTF-8"
+       done
+       for l in he he_IL iw iw_IL; do
+         echo "$l ISO-8859-8"
+         echo "$l.iso-8859-8 ISO-8859-8"
+         echo "$l.cp-862 CP862"
+         echo "$l.cp-1255 CP1255"
+         echo "$l.utf-8 UTF-8"
+       done
+       for l in tr tr_TR; do
+         echo "$l ISO-8859-9"
+         echo "$l.iso-8859-9 ISO-8859-9"
+         echo "$l.cp-857 CP857"
+         echo "$l.cp-1254 CP1254"
+         echo "$l.utf-8 UTF-8"
+       done
+       for l in lt lt_LT lv lv_LV; do
+         #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
+         echo "$l ISO-8859-13"
+       done
+       for l in ru_UA uk uk_UA; do
+         echo "$l KOI8-U"
+       done
+       for l in zh zh_CN; do
+         #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
+         echo "$l GB2312"
+       done
+       for l in ja ja_JP ja_JP.EUC; do
+         echo "$l EUC-JP"
+       done
+       for l in ko ko_KR; do
+         echo "$l EUC-KR"
+       done
+       for l in th th_TH; do
+         echo "$l TIS-620"
+       done
+       for l in fa fa_IR; do
+         #echo "$l ISIRI-3342" # a broken encoding
+         echo "$l.utf-8 UTF-8"
+       done
+       ;;
+    linux* | *-gnu*)
+       # With glibc-2.1 or newer, we don't need any canonicalization,
+       # because glibc has iconv and both glibc and libiconv support all
+       # GNU canonical names directly. Therefore, the Makefile does not
+       # need to install the alias file at all.
+       # The following applies only to glibc-2.0.x and older libcs.
+       echo "ISO_646.IRV:1983 ASCII"
+       ;;
+    aix*)
+       echo "ISO8859-1 ISO-8859-1"
+       echo "ISO8859-2 ISO-8859-2"
+       echo "ISO8859-5 ISO-8859-5"
+       echo "ISO8859-6 ISO-8859-6"
+       echo "ISO8859-7 ISO-8859-7"
+       echo "ISO8859-8 ISO-8859-8"
+       echo "ISO8859-9 ISO-8859-9"
+       echo "ISO8859-15 ISO-8859-15"
+       echo "IBM-850 CP850"
+       echo "IBM-856 CP856"
+       echo "IBM-921 ISO-8859-13"
+       echo "IBM-922 CP922"
+       echo "IBM-932 CP932"
+       echo "IBM-943 CP943"
+       echo "IBM-1046 CP1046"
+       echo "IBM-1124 CP1124"
+       echo "IBM-1129 CP1129"
+       echo "IBM-1252 CP1252"
+       echo "IBM-eucCN GB2312"
+       echo "IBM-eucJP EUC-JP"
+       echo "IBM-eucKR EUC-KR"
+       echo "IBM-eucTW EUC-TW"
+       echo "big5 BIG5"
+       echo "GBK GBK"
+       echo "TIS-620 TIS-620"
+       echo "UTF-8 UTF-8"
+       ;;
+    hpux*)
+       echo "iso88591 ISO-8859-1"
+       echo "iso88592 ISO-8859-2"
+       echo "iso88595 ISO-8859-5"
+       echo "iso88596 ISO-8859-6"
+       echo "iso88597 ISO-8859-7"
+       echo "iso88598 ISO-8859-8"
+       echo "iso88599 ISO-8859-9"
+       echo "iso885915 ISO-8859-15"
+       echo "roman8 HP-ROMAN8"
+       echo "arabic8 HP-ARABIC8"
+       echo "greek8 HP-GREEK8"
+       echo "hebrew8 HP-HEBREW8"
+       echo "turkish8 HP-TURKISH8"
+       echo "kana8 HP-KANA8"
+       echo "tis620 TIS-620"
+       echo "big5 BIG5"
+       echo "eucJP EUC-JP"
+       echo "eucKR EUC-KR"
+       echo "eucTW EUC-TW"
+       echo "hp15CN GB2312"
+       #echo "ccdc ?" # what is this?
+       echo "SJIS SHIFT_JIS"
+       echo "utf8 UTF-8"
+       ;;
+    irix*)
+       echo "ISO8859-1 ISO-8859-1"
+       echo "ISO8859-2 ISO-8859-2"
+       echo "ISO8859-5 ISO-8859-5"
+       echo "ISO8859-7 ISO-8859-7"
+       echo "ISO8859-9 ISO-8859-9"
+       echo "eucCN GB2312"
+       echo "eucJP EUC-JP"
+       echo "eucKR EUC-KR"
+       echo "eucTW EUC-TW"
+       ;;
+    osf*)
+       echo "ISO8859-1 ISO-8859-1"
+       echo "ISO8859-2 ISO-8859-2"
+       echo "ISO8859-4 ISO-8859-4"
+       echo "ISO8859-5 ISO-8859-5"
+       echo "ISO8859-7 ISO-8859-7"
+       echo "ISO8859-8 ISO-8859-8"
+       echo "ISO8859-9 ISO-8859-9"
+       echo "ISO8859-15 ISO-8859-15"
+       echo "cp850 CP850"
+       echo "big5 BIG5"
+       echo "dechanyu DEC-HANYU"
+       echo "dechanzi GB2312"
+       echo "deckanji DEC-KANJI"
+       echo "deckorean EUC-KR"
+       echo "eucJP EUC-JP"
+       echo "eucKR EUC-KR"
+       echo "eucTW EUC-TW"
+       echo "GBK GBK"
+       echo "KSC5601 CP949"
+       echo "sdeckanji EUC-JP"
+       echo "SJIS SHIFT_JIS"
+       echo "TACTIS TIS-620"
+       echo "UTF-8 UTF-8"
+       ;;
+    solaris*)
+       echo "646 ASCII"
+       echo "ISO8859-1 ISO-8859-1"
+       echo "ISO8859-2 ISO-8859-2"
+       echo "ISO8859-3 ISO-8859-3"
+       echo "ISO8859-4 ISO-8859-4"
+       echo "ISO8859-5 ISO-8859-5"
+       echo "ISO8859-6 ISO-8859-6"
+       echo "ISO8859-7 ISO-8859-7"
+       echo "ISO8859-8 ISO-8859-8"
+       echo "ISO8859-9 ISO-8859-9"
+       echo "ISO8859-15 ISO-8859-15"
+       echo "koi8-r KOI8-R"
+       echo "ansi-1251 CP1251"
+       echo "BIG5 BIG5"
+       echo "Big5-HKSCS BIG5-HKSCS"
+       echo "gb2312 GB2312"
+       echo "GBK GBK"
+       echo "GB18030 GB18030"
+       echo "cns11643 EUC-TW"
+       echo "5601 EUC-KR"
+       echo "ko_KR.johap92 JOHAB"
+       echo "eucJP EUC-JP"
+       echo "PCK SHIFT_JIS"
+       echo "TIS620.2533 TIS-620"
+       #echo "sun_eu_greek ?" # what is this?
+       echo "UTF-8 UTF-8"
+       ;;
+    freebsd* | os2*)
+       # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
+       # localcharset.c falls back to using the full locale name
+       # from the environment variables.
+       # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
+       # reuse FreeBSD's locale data for OS/2.
+       echo "C ASCII"
+       echo "US-ASCII ASCII"
+       for l in la_LN lt_LN; do
+         echo "$l.ASCII ASCII"
+       done
+       for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+                fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
+                lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
+         echo "$l.ISO_8859-1 ISO-8859-1"
+         echo "$l.DIS_8859-15 ISO-8859-15"
+       done
+       for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
+         echo "$l.ISO_8859-2 ISO-8859-2"
+       done
+       for l in la_LN lt_LT; do
+         echo "$l.ISO_8859-4 ISO-8859-4"
+       done
+       for l in ru_RU ru_SU; do
+         echo "$l.KOI8-R KOI8-R"
+         echo "$l.ISO_8859-5 ISO-8859-5"
+         echo "$l.CP866 CP866"
+       done
+       echo "uk_UA.KOI8-U KOI8-U"
+       echo "zh_TW.BIG5 BIG5"
+       echo "zh_TW.Big5 BIG5"
+       echo "zh_CN.EUC GB2312"
+       echo "ja_JP.EUC EUC-JP"
+       echo "ja_JP.SJIS SHIFT_JIS"
+       echo "ja_JP.Shift_JIS SHIFT_JIS"
+       echo "ko_KR.EUC EUC-KR"
+       ;;
+    netbsd*)
+       echo "646 ASCII"
+       echo "ISO8859-1 ISO-8859-1"
+       echo "ISO8859-2 ISO-8859-2"
+       echo "ISO8859-4 ISO-8859-4"
+       echo "ISO8859-5 ISO-8859-5"
+       echo "ISO8859-15 ISO-8859-15"
+       echo "eucCN GB2312"
+       echo "eucJP EUC-JP"
+       echo "eucKR EUC-KR"
+       echo "eucTW EUC-TW"
+       echo "BIG5 BIG5"
+       echo "SJIS SHIFT_JIS"
+       ;;
+    darwin[56]*)
+       # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
+       # localcharset.c falls back to using the full locale name
+       # from the environment variables.
+       echo "C ASCII"
+       for l in en_AU en_CA en_GB en_US la_LN; do
+         echo "$l.US-ASCII ASCII"
+       done
+       for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+                fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
+                nl_NL no_NO pt_PT sv_SE; do
+         echo "$l ISO-8859-1"
+         echo "$l.ISO8859-1 ISO-8859-1"
+         echo "$l.ISO8859-15 ISO-8859-15"
+       done
+       for l in la_LN; do
+         echo "$l.ISO8859-1 ISO-8859-1"
+         echo "$l.ISO8859-15 ISO-8859-15"
+       done
+       for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
+         echo "$l.ISO8859-2 ISO-8859-2"
+       done
+       for l in la_LN lt_LT; do
+         echo "$l.ISO8859-4 ISO-8859-4"
+       done
+       for l in ru_RU; do
+         echo "$l.KOI8-R KOI8-R"
+         echo "$l.ISO8859-5 ISO-8859-5"
+         echo "$l.CP866 CP866"
+       done
+       for l in bg_BG; do
+         echo "$l.CP1251 CP1251"
+       done
+       echo "uk_UA.KOI8-U KOI8-U"
+       echo "zh_TW.BIG5 BIG5"
+       echo "zh_TW.Big5 BIG5"
+       echo "zh_CN.EUC GB2312"
+       echo "ja_JP.EUC EUC-JP"
+       echo "ja_JP.SJIS SHIFT_JIS"
+       echo "ko_KR.EUC EUC-KR"
+       ;;
+    darwin*)
+       # Darwin 7.5 has nl_langinfo(CODESET), but it is useless:
+       # - It returns the empty string when LANG is set to a locale of the
+       #   form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
+       #   LC_CTYPE file.
+       # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
+       #   the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
+       # - The documentation says:
+       #     "... all code that calls BSD system routines should ensure
+       #      that the const *char parameters of these routines are in UTF-8
+       #      encoding. All BSD system functions expect their string
+       #      parameters to be in UTF-8 encoding and nothing else."
+       #   It also says
+       #     "An additional caveat is that string parameters for files,
+       #      paths, and other file-system entities must be in canonical
+       #      UTF-8. In a canonical UTF-8 Unicode string, all decomposable
+       #      characters are decomposed ..."
+       #   but this is not true: You can pass non-decomposed UTF-8 strings
+       #   to file system functions, and it is the OS which will convert
+       #   them to decomposed UTF-8 before accessing the file system.
+       # - The Apple Terminal application displays UTF-8 by default.
+       # - However, other applications are free to use different encodings:
+       #   - xterm uses ISO-8859-1 by default.
+       #   - TextEdit uses MacRoman by default.
+       # We prefer UTF-8 over decomposed UTF-8-MAC because one should
+       # minimize the use of decomposed Unicode. Unfortunately, through the
+       # Darwin file system, decomposed UTF-8 strings are leaked into user
+       # space nevertheless.
+       echo "* UTF-8"
+       ;;
+    beos*)
+       # BeOS has a single locale, and it has UTF-8 encoding.
+       echo "* UTF-8"
+       ;;
+    msdosdjgpp*)
+       # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
+       # localcharset.c falls back to using the full locale name
+       # from the environment variables.
+       echo "#"
+       echo "# The encodings given here may not all be correct."
+       echo "# If you find that the encoding given for your language and"
+       echo "# country is not the one your DOS machine actually uses, just"
+       echo "# correct it in this file, and send a mail to"
+       echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
+       echo "# and Bruno Haible <bruno@clisp.org>."
+       echo "#"
+       echo "C ASCII"
+       # ISO-8859-1 languages
+       echo "ca CP850"
+       echo "ca_ES CP850"
+       echo "da CP865"    # not CP850 ??
+       echo "da_DK CP865" # not CP850 ??
+       echo "de CP850"
+       echo "de_AT CP850"
+       echo "de_CH CP850"
+       echo "de_DE CP850"
+       echo "en CP850"
+       echo "en_AU CP850" # not CP437 ??
+       echo "en_CA CP850"
+       echo "en_GB CP850"
+       echo "en_NZ CP437"
+       echo "en_US CP437"
+       echo "en_ZA CP850" # not CP437 ??
+       echo "es CP850"
+       echo "es_AR CP850"
+       echo "es_BO CP850"
+       echo "es_CL CP850"
+       echo "es_CO CP850"
+       echo "es_CR CP850"
+       echo "es_CU CP850"
+       echo "es_DO CP850"
+       echo "es_EC CP850"
+       echo "es_ES CP850"
+       echo "es_GT CP850"
+       echo "es_HN CP850"
+       echo "es_MX CP850"
+       echo "es_NI CP850"
+       echo "es_PA CP850"
+       echo "es_PY CP850"
+       echo "es_PE CP850"
+       echo "es_SV CP850"
+       echo "es_UY CP850"
+       echo "es_VE CP850"
+       echo "et CP850"
+       echo "et_EE CP850"
+       echo "eu CP850"
+       echo "eu_ES CP850"
+       echo "fi CP850"
+       echo "fi_FI CP850"
+       echo "fr CP850"
+       echo "fr_BE CP850"
+       echo "fr_CA CP850"
+       echo "fr_CH CP850"
+       echo "fr_FR CP850"
+       echo "ga CP850"
+       echo "ga_IE CP850"
+       echo "gd CP850"
+       echo "gd_GB CP850"
+       echo "gl CP850"
+       echo "gl_ES CP850"
+       echo "id CP850"    # not CP437 ??
+       echo "id_ID CP850" # not CP437 ??
+       echo "is CP861"    # not CP850 ??
+       echo "is_IS CP861" # not CP850 ??
+       echo "it CP850"
+       echo "it_CH CP850"
+       echo "it_IT CP850"
+       echo "lt CP775"
+       echo "lt_LT CP775"
+       echo "lv CP775"
+       echo "lv_LV CP775"
+       echo "nb CP865"    # not CP850 ??
+       echo "nb_NO CP865" # not CP850 ??
+       echo "nl CP850"
+       echo "nl_BE CP850"
+       echo "nl_NL CP850"
+       echo "nn CP865"    # not CP850 ??
+       echo "nn_NO CP865" # not CP850 ??
+       echo "no CP865"    # not CP850 ??
+       echo "no_NO CP865" # not CP850 ??
+       echo "pt CP850"
+       echo "pt_BR CP850"
+       echo "pt_PT CP850"
+       echo "sv CP850"
+       echo "sv_SE CP850"
+       # ISO-8859-2 languages
+       echo "cs CP852"
+       echo "cs_CZ CP852"
+       echo "hr CP852"
+       echo "hr_HR CP852"
+       echo "hu CP852"
+       echo "hu_HU CP852"
+       echo "pl CP852"
+       echo "pl_PL CP852"
+       echo "ro CP852"
+       echo "ro_RO CP852"
+       echo "sk CP852"
+       echo "sk_SK CP852"
+       echo "sl CP852"
+       echo "sl_SI CP852"
+       echo "sq CP852"
+       echo "sq_AL CP852"
+       echo "sr CP852"    # CP852 or CP866 or CP855 ??
+       echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
+       echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
+       # ISO-8859-3 languages
+       echo "mt CP850"
+       echo "mt_MT CP850"
+       # ISO-8859-5 languages
+       echo "be CP866"
+       echo "be_BE CP866"
+       echo "bg CP866"    # not CP855 ??
+       echo "bg_BG CP866" # not CP855 ??
+       echo "mk CP866"    # not CP855 ??
+       echo "mk_MK CP866" # not CP855 ??
+       echo "ru CP866"
+       echo "ru_RU CP866"
+       echo "uk CP1125"
+       echo "uk_UA CP1125"
+       # ISO-8859-6 languages
+       echo "ar CP864"
+       echo "ar_AE CP864"
+       echo "ar_DZ CP864"
+       echo "ar_EG CP864"
+       echo "ar_IQ CP864"
+       echo "ar_IR CP864"
+       echo "ar_JO CP864"
+       echo "ar_KW CP864"
+       echo "ar_MA CP864"
+       echo "ar_OM CP864"
+       echo "ar_QA CP864"
+       echo "ar_SA CP864"
+       echo "ar_SY CP864"
+       # ISO-8859-7 languages
+       echo "el CP869"
+       echo "el_GR CP869"
+       # ISO-8859-8 languages
+       echo "he CP862"
+       echo "he_IL CP862"
+       # ISO-8859-9 languages
+       echo "tr CP857"
+       echo "tr_TR CP857"
+       # Japanese
+       echo "ja CP932"
+       echo "ja_JP CP932"
+       # Chinese
+       echo "zh_CN GBK"
+       echo "zh_TW CP950" # not CP938 ??
+       # Korean
+       echo "kr CP949"    # not CP934 ??
+       echo "kr_KR CP949" # not CP934 ??
+       # Thai
+       echo "th CP874"
+       echo "th_TH CP874"
+       # Other
+       echo "eo CP850"
+       echo "eo_EO CP850"
+       ;;
+esac
diff --git a/intl/dcgettext.c b/intl/dcgettext.c
new file mode 100644 (file)
index 0000000..850acde
--- /dev/null
@@ -0,0 +1,56 @@
+/* Implementation of the dcgettext(3) function.
+   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DCGETTEXT __dcgettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCGETTEXT libintl_dcgettext
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+   locale.  */
+char *
+DCGETTEXT (const char *domainname, const char *msgid, int category)
+{
+  return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+INTDEF(__dcgettext)
+weak_alias (__dcgettext, dcgettext);
+#endif
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
new file mode 100644 (file)
index 0000000..7f4c12c
--- /dev/null
@@ -0,0 +1,1258 @@
+/* Implementation of the internal dcigettext function.
+   Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE   1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(val) errno = (val)
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include <locale.h>
+
+#ifdef _LIBC
+  /* Guess whether integer division by zero raises signal SIGFPE.
+     Set to 1 only if you know for sure.  In case of doubt, set to 0.  */
+# if defined __alpha__ || defined __arm__ || defined __i386__ \
+     || defined __m68k__ || defined __s390__
+#  define INTDIV0_RAISES_SIGFPE 1
+# else
+#  define INTDIV0_RAISES_SIGFPE 0
+# endif
+#endif
+#if !INTDIV0_RAISES_SIGFPE
+# include <signal.h>
+#endif
+
+#if defined HAVE_SYS_PARAM_H || defined _LIBC
+# include <sys/param.h>
+#endif
+
+#include "gettextP.h"
+#include "plural-exp.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "hash-string.h"
+
+/* Thread safetyness.  */
+#ifdef _LIBC
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc.  */
+# define __libc_lock_define_initialized(CLASS, NAME)
+# define __libc_lock_lock(NAME)
+# define __libc_lock_unlock(NAME)
+# define __libc_rwlock_define_initialized(CLASS, NAME)
+# define __libc_rwlock_rdlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* Alignment of types.  */
+#if defined __GNUC__ && __GNUC__ >= 2
+# define alignof(TYPE) __alignof__ (TYPE)
+#else
+# define alignof(TYPE) \
+    ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+   names than the internal variables in GNU libc, otherwise programs
+   using libintl.a cannot be linked statically.  */
+#if !defined _LIBC
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
+#endif
+
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>.  */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions.  This is required by the standard
+   because some ANSI C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# define getcwd __getcwd
+# ifndef stpcpy
+#  define stpcpy __stpcpy
+# endif
+# define tfind __tfind
+#else
+# if !defined HAVE_GETCWD
+char *getwd ();
+#  define getcwd(buf, max) getwd (buf)
+# else
+#  if VMS
+#   define getcwd(buf, max) (getcwd) (buf, max, 0)
+#  else
+char *getcwd ();
+#  endif
+# endif
+# ifndef HAVE_STPCPY
+static char *stpcpy (char *dest, const char *src);
+# endif
+# ifndef HAVE_MEMPCPY
+static void *mempcpy (void *dest, const void *src, size_t n);
+# endif
+#endif
+
+/* Amount to increase buffer size by in each try.  */
+#define PATH_INCR 32
+
+/* The following is from pathmax.h.  */
+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
+   PATH_MAX but might cause redefinition warnings when sys/param.h is
+   later included (as on MORE/BSD 4.3).  */
+#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
+# include <limits.h>
+#endif
+
+#ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 255
+#endif
+
+#if !defined PATH_MAX && defined _PC_PATH_MAX
+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
+#endif
+
+/* Don't include sys/param.h if it already has been.  */
+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+#endif
+
+#if !defined PATH_MAX && defined MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+#endif
+
+#ifndef PATH_MAX
+# define PATH_MAX _POSIX_PATH_MAX
+#endif
+
+/* Pathname support.
+   ISSLASH(C)           tests whether C is a directory separator character.
+   IS_ABSOLUTE_PATH(P)  tests whether P is an absolute path.  If it is not,
+                        it may be concatenated to a directory pathname.
+   IS_PATH_WITH_DIR(P)  tests whether P contains a directory specification.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, Cygwin, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+    ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+     && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+# define IS_PATH_WITH_DIR(P) \
+    (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
+#else
+  /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
+#endif
+
+/* This is the type used for the search tree where known translations
+   are stored.  */
+struct known_translation_t
+{
+  /* Domain in which to search.  */
+  char *domainname;
+
+  /* The category.  */
+  int category;
+
+  /* State of the catalog counter at the point the string was found.  */
+  int counter;
+
+  /* Catalog where the string was found.  */
+  struct loaded_l10nfile *domain;
+
+  /* And finally the translation.  */
+  const char *translation;
+  size_t translation_length;
+
+  /* Pointer to the string in question.  */
+  char msgid[ZERO];
+};
+
+/* Root of the search tree with known translations.  We can use this
+   only if the system provides the `tsearch' function family.  */
+#if defined HAVE_TSEARCH || defined _LIBC
+# include <search.h>
+
+static void *root;
+
+# ifdef _LIBC
+#  define tsearch __tsearch
+# endif
+
+/* Function to compare two entries in the table of known translations.  */
+static int
+transcmp (const void *p1, const void *p2)
+{
+  const struct known_translation_t *s1;
+  const struct known_translation_t *s2;
+  int result;
+
+  s1 = (const struct known_translation_t *) p1;
+  s2 = (const struct known_translation_t *) p2;
+
+  result = strcmp (s1->msgid, s2->msgid);
+  if (result == 0)
+    {
+      result = strcmp (s1->domainname, s2->domainname);
+      if (result == 0)
+       /* We compare the category last (though this is the cheapest
+          operation) since it is hopefully always the same (namely
+          LC_MESSAGES).  */
+       result = s1->category - s2->category;
+    }
+
+  return result;
+}
+#endif
+
+#ifndef INTVARDEF
+# define INTVARDEF(name)
+#endif
+#ifndef INTUSE
+# define INTUSE(name) name
+#endif
+
+/* Name of the default domain used for gettext(3) prior any call to
+   textdomain(3).  The default value for this is "messages".  */
+const char _nl_default_default_domain[] attribute_hidden = "messages";
+
+/* Value used as the default domain for gettext(3).  */
+const char *_nl_current_default_domain attribute_hidden
+     = _nl_default_default_domain;
+
+/* Contains the default location of the message catalogs.  */
+#if defined __EMX__
+extern const char _nl_default_dirname[];
+#else
+const char _nl_default_dirname[] = LOCALEDIR;
+INTVARDEF (_nl_default_dirname)
+#endif
+
+/* List with bindings of specific domains created by bindtextdomain()
+   calls.  */
+struct binding *_nl_domain_bindings;
+
+/* Prototypes for local functions.  */
+static char *plural_lookup (struct loaded_l10nfile *domain,
+                           unsigned long int n,
+                           const char *translation, size_t translation_len)
+     internal_function;
+static const char *guess_category_value (int category,
+                                        const char *categoryname)
+     internal_function;
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+# define category_to_name(category)    _nl_category_names[category]
+#else
+static const char *category_to_name (int category) internal_function;
+#endif
+
+
+/* For those loosing systems which don't have `alloca' we have to add
+   some additional code emulating it.  */
+#ifdef HAVE_ALLOCA
+/* Nothing has to be done.  */
+# define freea(p) /* nothing */
+# define ADD_BLOCK(list, address) /* nothing */
+# define FREE_BLOCKS(list) /* nothing */
+#else
+struct block_list
+{
+  void *address;
+  struct block_list *next;
+};
+# define ADD_BLOCK(list, addr)                                               \
+  do {                                                                       \
+    struct block_list *newp = (struct block_list *) malloc (sizeof (*newp));  \
+    /* If we cannot get a free block we cannot add the new element to        \
+       the list.  */                                                         \
+    if (newp != NULL) {                                                              \
+      newp->address = (addr);                                                \
+      newp->next = (list);                                                   \
+      (list) = newp;                                                         \
+    }                                                                        \
+  } while (0)
+# define FREE_BLOCKS(list)                                                   \
+  do {                                                                       \
+    while (list != NULL) {                                                   \
+      struct block_list *old = list;                                         \
+      list = list->next;                                                     \
+      free (old->address);                                                   \
+      free (old);                                                            \
+    }                                                                        \
+  } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
+# define freea(p) free (p)
+#endif /* have alloca */
+
+
+#ifdef _LIBC
+/* List of blocks allocated for translations.  */
+typedef struct transmem_list
+{
+  struct transmem_list *next;
+  char data[ZERO];
+} transmem_block_t;
+static struct transmem_list *transmem_list;
+#else
+typedef unsigned char transmem_block_t;
+#endif
+
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DCIGETTEXT __dcigettext
+#else
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation.  */
+#ifdef _LIBC
+__libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
+#endif
+
+/* Checking whether the binaries runs SUID must be done and glibc provides
+   easier methods therefore we make a difference here.  */
+#ifdef _LIBC
+# define ENABLE_SECURE __libc_enable_secure
+# define DETERMINE_SECURE
+#else
+# ifndef HAVE_GETUID
+#  define getuid() 0
+# endif
+# ifndef HAVE_GETGID
+#  define getgid() 0
+# endif
+# ifndef HAVE_GETEUID
+#  define geteuid() getuid()
+# endif
+# ifndef HAVE_GETEGID
+#  define getegid() getgid()
+# endif
+static int enable_secure;
+# define ENABLE_SECURE (enable_secure == 1)
+# define DETERMINE_SECURE \
+  if (enable_secure == 0)                                                    \
+    {                                                                        \
+      if (getuid () != geteuid () || getgid () != getegid ())                \
+       enable_secure = 1;                                                    \
+      else                                                                   \
+       enable_secure = -1;                                                   \
+    }
+#endif
+
+/* Get the function to evaluate the plural expression.  */
+#include "eval-plural.h"
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+   CATEGORY locale and, if PLURAL is nonzero, search over string
+   depending on the plural form determined by N.  */
+char *
+DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
+           int plural, unsigned long int n, int category)
+{
+#ifndef HAVE_ALLOCA
+  struct block_list *block_list = NULL;
+#endif
+  struct loaded_l10nfile *domain;
+  struct binding *binding;
+  const char *categoryname;
+  const char *categoryvalue;
+  char *dirname, *xdomainname;
+  char *single_locale;
+  char *retval;
+  size_t retlen;
+  int saved_errno;
+#if defined HAVE_TSEARCH || defined _LIBC
+  struct known_translation_t *search;
+  struct known_translation_t **foundp = NULL;
+  size_t msgid_len;
+#endif
+  size_t domainname_len;
+
+  /* If no real MSGID is given return NULL.  */
+  if (msgid1 == NULL)
+    return NULL;
+
+#ifdef _LIBC
+  if (category < 0 || category >= __LC_LAST || category == LC_ALL)
+    /* Bogus.  */
+    return (plural == 0
+           ? (char *) msgid1
+           /* Use the Germanic plural rule.  */
+           : n == 1 ? (char *) msgid1 : (char *) msgid2);
+#endif
+
+  __libc_rwlock_rdlock (_nl_state_lock);
+
+  /* If DOMAINNAME is NULL, we are interested in the default domain.  If
+     CATEGORY is not LC_MESSAGES this might not make much sense but the
+     definition left this undefined.  */
+  if (domainname == NULL)
+    domainname = _nl_current_default_domain;
+
+  /* OS/2 specific: backward compatibility with older libintl versions  */
+#ifdef LC_MESSAGES_COMPAT
+  if (category == LC_MESSAGES_COMPAT)
+    category = LC_MESSAGES;
+#endif
+
+#if defined HAVE_TSEARCH || defined _LIBC
+  msgid_len = strlen (msgid1) + 1;
+
+  /* Try to find the translation among those which we found at
+     some time.  */
+  search = (struct known_translation_t *)
+          alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
+  memcpy (search->msgid, msgid1, msgid_len);
+  search->domainname = (char *) domainname;
+  search->category = category;
+
+  foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
+  freea (search);
+  if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
+    {
+      /* Now deal with plural.  */
+      if (plural)
+       retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
+                               (*foundp)->translation_length);
+      else
+       retval = (char *) (*foundp)->translation;
+
+      __libc_rwlock_unlock (_nl_state_lock);
+      return retval;
+    }
+#endif
+
+  /* Preserve the `errno' value.  */
+  saved_errno = errno;
+
+  /* See whether this is a SUID binary or not.  */
+  DETERMINE_SECURE;
+
+  /* First find matching binding.  */
+  for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+    {
+      int compare = strcmp (domainname, binding->domainname);
+      if (compare == 0)
+       /* We found it!  */
+       break;
+      if (compare < 0)
+       {
+         /* It is not in the list.  */
+         binding = NULL;
+         break;
+       }
+    }
+
+  if (binding == NULL)
+    dirname = (char *) INTUSE(_nl_default_dirname);
+  else if (IS_ABSOLUTE_PATH (binding->dirname))
+    dirname = binding->dirname;
+  else
+    {
+      /* We have a relative path.  Make it absolute now.  */
+      size_t dirname_len = strlen (binding->dirname) + 1;
+      size_t path_max;
+      char *ret;
+
+      path_max = (unsigned int) PATH_MAX;
+      path_max += 2;           /* The getcwd docs say to do this.  */
+
+      for (;;)
+       {
+         dirname = (char *) alloca (path_max + dirname_len);
+         ADD_BLOCK (block_list, dirname);
+
+         __set_errno (0);
+         ret = getcwd (dirname, path_max);
+         if (ret != NULL || errno != ERANGE)
+           break;
+
+         path_max += path_max / 2;
+         path_max += PATH_INCR;
+       }
+
+      if (ret == NULL)
+       /* We cannot get the current working directory.  Don't signal an
+          error but simply return the default string.  */
+       goto return_untranslated;
+
+      stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
+    }
+
+  /* Now determine the symbolic name of CATEGORY and its value.  */
+  categoryname = category_to_name (category);
+  categoryvalue = guess_category_value (category, categoryname);
+
+  domainname_len = strlen (domainname);
+  xdomainname = (char *) alloca (strlen (categoryname)
+                                + domainname_len + 5);
+  ADD_BLOCK (block_list, xdomainname);
+
+  stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
+                 domainname, domainname_len),
+         ".mo");
+
+  /* Creating working area.  */
+  single_locale = (char *) alloca (strlen (categoryvalue) + 1);
+  ADD_BLOCK (block_list, single_locale);
+
+
+  /* Search for the given string.  This is a loop because we perhaps
+     got an ordered list of languages to consider for the translation.  */
+  while (1)
+    {
+      /* Make CATEGORYVALUE point to the next element of the list.  */
+      while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
+       ++categoryvalue;
+      if (categoryvalue[0] == '\0')
+       {
+         /* The whole contents of CATEGORYVALUE has been searched but
+            no valid entry has been found.  We solve this situation
+            by implicitly appending a "C" entry, i.e. no translation
+            will take place.  */
+         single_locale[0] = 'C';
+         single_locale[1] = '\0';
+       }
+      else
+       {
+         char *cp = single_locale;
+         while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
+           *cp++ = *categoryvalue++;
+         *cp = '\0';
+
+         /* When this is a SUID binary we must not allow accessing files
+            outside the dedicated directories.  */
+         if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
+           /* Ingore this entry.  */
+           continue;
+       }
+
+      /* If the current locale value is C (or POSIX) we don't load a
+        domain.  Return the MSGID.  */
+      if (strcmp (single_locale, "C") == 0
+         || strcmp (single_locale, "POSIX") == 0)
+       break;
+
+      /* Find structure describing the message catalog matching the
+        DOMAINNAME and CATEGORY.  */
+      domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
+
+      if (domain != NULL)
+       {
+         retval = _nl_find_msg (domain, binding, msgid1, &retlen);
+
+         if (retval == NULL)
+           {
+             int cnt;
+
+             for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
+               {
+                 retval = _nl_find_msg (domain->successor[cnt], binding,
+                                        msgid1, &retlen);
+
+                 if (retval != NULL)
+                   {
+                     domain = domain->successor[cnt];
+                     break;
+                   }
+               }
+           }
+
+         if (retval != NULL)
+           {
+             /* Found the translation of MSGID1 in domain DOMAIN:
+                starting at RETVAL, RETLEN bytes.  */
+             FREE_BLOCKS (block_list);
+#if defined HAVE_TSEARCH || defined _LIBC
+             if (foundp == NULL)
+               {
+                 /* Create a new entry and add it to the search tree.  */
+                 struct known_translation_t *newp;
+
+                 newp = (struct known_translation_t *)
+                   malloc (offsetof (struct known_translation_t, msgid)
+                           + msgid_len + domainname_len + 1);
+                 if (newp != NULL)
+                   {
+                     newp->domainname =
+                       mempcpy (newp->msgid, msgid1, msgid_len);
+                     memcpy (newp->domainname, domainname, domainname_len + 1);
+                     newp->category = category;
+                     newp->counter = _nl_msg_cat_cntr;
+                     newp->domain = domain;
+                     newp->translation = retval;
+                     newp->translation_length = retlen;
+
+                     /* Insert the entry in the search tree.  */
+                     foundp = (struct known_translation_t **)
+                       tsearch (newp, &root, transcmp);
+                     if (foundp == NULL
+                         || __builtin_expect (*foundp != newp, 0))
+                       /* The insert failed.  */
+                       free (newp);
+                   }
+               }
+             else
+               {
+                 /* We can update the existing entry.  */
+                 (*foundp)->counter = _nl_msg_cat_cntr;
+                 (*foundp)->domain = domain;
+                 (*foundp)->translation = retval;
+                 (*foundp)->translation_length = retlen;
+               }
+#endif
+             __set_errno (saved_errno);
+
+             /* Now deal with plural.  */
+             if (plural)
+               retval = plural_lookup (domain, n, retval, retlen);
+
+             __libc_rwlock_unlock (_nl_state_lock);
+             return retval;
+           }
+       }
+    }
+
+ return_untranslated:
+  /* Return the untranslated MSGID.  */
+  FREE_BLOCKS (block_list);
+  __libc_rwlock_unlock (_nl_state_lock);
+#ifndef _LIBC
+  if (!ENABLE_SECURE)
+    {
+      extern void _nl_log_untranslated (const char *logfilename,
+                                       const char *domainname,
+                                       const char *msgid1, const char *msgid2,
+                                       int plural);
+      const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED");
+
+      if (logfilename != NULL && logfilename[0] != '\0')
+       _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural);
+    }
+#endif
+  __set_errno (saved_errno);
+  return (plural == 0
+         ? (char *) msgid1
+         /* Use the Germanic plural rule.  */
+         : n == 1 ? (char *) msgid1 : (char *) msgid2);
+}
+
+
+char *
+internal_function
+_nl_find_msg (struct loaded_l10nfile *domain_file,
+             struct binding *domainbinding, const char *msgid,
+             size_t *lengthp)
+{
+  struct loaded_domain *domain;
+  nls_uint32 nstrings;
+  size_t act;
+  char *result;
+  size_t resultlen;
+
+  if (domain_file->decided == 0)
+    _nl_load_domain (domain_file, domainbinding);
+
+  if (domain_file->data == NULL)
+    return NULL;
+
+  domain = (struct loaded_domain *) domain_file->data;
+
+  nstrings = domain->nstrings;
+
+  /* Locate the MSGID and its translation.  */
+  if (domain->hash_tab != NULL)
+    {
+      /* Use the hashing table.  */
+      nls_uint32 len = strlen (msgid);
+      nls_uint32 hash_val = hash_string (msgid);
+      nls_uint32 idx = hash_val % domain->hash_size;
+      nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+
+      while (1)
+       {
+         nls_uint32 nstr =
+           W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
+
+         if (nstr == 0)
+           /* Hash table entry is empty.  */
+           return NULL;
+
+         nstr--;
+
+         /* Compare msgid with the original string at index nstr.
+            We compare the lengths with >=, not ==, because plural entries
+            are represented by strings with an embedded NUL.  */
+         if (nstr < nstrings
+             ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
+               && (strcmp (msgid,
+                           domain->data + W (domain->must_swap,
+                                             domain->orig_tab[nstr].offset))
+                   == 0)
+             : domain->orig_sysdep_tab[nstr - nstrings].length > len
+               && (strcmp (msgid,
+                           domain->orig_sysdep_tab[nstr - nstrings].pointer)
+                   == 0))
+           {
+             act = nstr;
+             goto found;
+           }
+
+         if (idx >= domain->hash_size - incr)
+           idx -= domain->hash_size - incr;
+         else
+           idx += incr;
+       }
+      /* NOTREACHED */
+    }
+  else
+    {
+      /* Try the default method:  binary search in the sorted array of
+        messages.  */
+      size_t top, bottom;
+
+      bottom = 0;
+      top = nstrings;
+      while (bottom < top)
+       {
+         int cmp_val;
+
+         act = (bottom + top) / 2;
+         cmp_val = strcmp (msgid, (domain->data
+                                   + W (domain->must_swap,
+                                        domain->orig_tab[act].offset)));
+         if (cmp_val < 0)
+           top = act;
+         else if (cmp_val > 0)
+           bottom = act + 1;
+         else
+           goto found;
+       }
+      /* No translation was found.  */
+      return NULL;
+    }
+
+ found:
+  /* The translation was found at index ACT.  If we have to convert the
+     string to use a different character set, this is the time.  */
+  if (act < nstrings)
+    {
+      result = (char *)
+       (domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
+      resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
+    }
+  else
+    {
+      result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
+      resultlen = domain->trans_sysdep_tab[act - nstrings].length;
+    }
+
+#if defined _LIBC || HAVE_ICONV
+  if (domain->codeset_cntr
+      != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
+    {
+      /* The domain's codeset has changed through bind_textdomain_codeset()
+        since the message catalog was initialized or last accessed.  We
+        have to reinitialize the converter.  */
+      _nl_free_domain_conv (domain);
+      _nl_init_domain_conv (domain_file, domain, domainbinding);
+    }
+
+  if (
+# ifdef _LIBC
+      domain->conv != (__gconv_t) -1
+# else
+#  if HAVE_ICONV
+      domain->conv != (iconv_t) -1
+#  endif
+# endif
+      )
+    {
+      /* We are supposed to do a conversion.  First allocate an
+        appropriate table with the same structure as the table
+        of translations in the file, where we can put the pointers
+        to the converted strings in.
+        There is a slight complication with plural entries.  They
+        are represented by consecutive NUL terminated strings.  We
+        handle this case by converting RESULTLEN bytes, including
+        NULs.  */
+
+      if (domain->conv_tab == NULL
+         && ((domain->conv_tab =
+                (char **) calloc (nstrings + domain->n_sysdep_strings,
+                                  sizeof (char *)))
+             == NULL))
+       /* Mark that we didn't succeed allocating a table.  */
+       domain->conv_tab = (char **) -1;
+
+      if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
+       /* Nothing we can do, no more memory.  */
+       goto converted;
+
+      if (domain->conv_tab[act] == NULL)
+       {
+         /* We haven't used this string so far, so it is not
+            translated yet.  Do this now.  */
+         /* We use a bit more efficient memory handling.
+            We allocate always larger blocks which get used over
+            time.  This is faster than many small allocations.   */
+         __libc_lock_define_initialized (static, lock)
+# define INITIAL_BLOCK_SIZE    4080
+         static unsigned char *freemem;
+         static size_t freemem_size;
+
+         const unsigned char *inbuf;
+         unsigned char *outbuf;
+         int malloc_count;
+# ifndef _LIBC
+         transmem_block_t *transmem_list = NULL;
+# endif
+
+         __libc_lock_lock (lock);
+
+         inbuf = (const unsigned char *) result;
+         outbuf = freemem + sizeof (size_t);
+
+         malloc_count = 0;
+         while (1)
+           {
+             transmem_block_t *newmem;
+# ifdef _LIBC
+             size_t non_reversible;
+             int res;
+
+             if (freemem_size < sizeof (size_t))
+               goto resize_freemem;
+
+             res = __gconv (domain->conv,
+                            &inbuf, inbuf + resultlen,
+                            &outbuf,
+                            outbuf + freemem_size - sizeof (size_t),
+                            &non_reversible);
+
+             if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
+               break;
+
+             if (res != __GCONV_FULL_OUTPUT)
+               {
+                 __libc_lock_unlock (lock);
+                 goto converted;
+               }
+
+             inbuf = result;
+# else
+#  if HAVE_ICONV
+             const char *inptr = (const char *) inbuf;
+             size_t inleft = resultlen;
+             char *outptr = (char *) outbuf;
+             size_t outleft;
+
+             if (freemem_size < sizeof (size_t))
+               goto resize_freemem;
+
+             outleft = freemem_size - sizeof (size_t);
+             if (iconv (domain->conv,
+                        (ICONV_CONST char **) &inptr, &inleft,
+                        &outptr, &outleft)
+                 != (size_t) (-1))
+               {
+                 outbuf = (unsigned char *) outptr;
+                 break;
+               }
+             if (errno != E2BIG)
+               {
+                 __libc_lock_unlock (lock);
+                 goto converted;
+               }
+#  endif
+# endif
+
+           resize_freemem:
+             /* We must allocate a new buffer or resize the old one.  */
+             if (malloc_count > 0)
+               {
+                 ++malloc_count;
+                 freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
+                 newmem = (transmem_block_t *) realloc (transmem_list,
+                                                        freemem_size);
+# ifdef _LIBC
+                 if (newmem != NULL)
+                   transmem_list = transmem_list->next;
+                 else
+                   {
+                     struct transmem_list *old = transmem_list;
+
+                     transmem_list = transmem_list->next;
+                     free (old);
+                   }
+# endif
+               }
+             else
+               {
+                 malloc_count = 1;
+                 freemem_size = INITIAL_BLOCK_SIZE;
+                 newmem = (transmem_block_t *) malloc (freemem_size);
+               }
+             if (__builtin_expect (newmem == NULL, 0))
+               {
+                 freemem = NULL;
+                 freemem_size = 0;
+                 __libc_lock_unlock (lock);
+                 goto converted;
+               }
+
+# ifdef _LIBC
+             /* Add the block to the list of blocks we have to free
+                 at some point.  */
+             newmem->next = transmem_list;
+             transmem_list = newmem;
+
+             freemem = newmem->data;
+             freemem_size -= offsetof (struct transmem_list, data);
+# else
+             transmem_list = newmem;
+             freemem = newmem;
+# endif
+
+             outbuf = freemem + sizeof (size_t);
+           }
+
+         /* We have now in our buffer a converted string.  Put this
+            into the table of conversions.  */
+         *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
+         domain->conv_tab[act] = (char *) freemem;
+         /* Shrink freemem, but keep it aligned.  */
+         freemem_size -= outbuf - freemem;
+         freemem = outbuf;
+         freemem += freemem_size & (alignof (size_t) - 1);
+         freemem_size = freemem_size & ~ (alignof (size_t) - 1);
+
+         __libc_lock_unlock (lock);
+       }
+
+      /* Now domain->conv_tab[act] contains the translation of all
+        the plural variants.  */
+      result = domain->conv_tab[act] + sizeof (size_t);
+      resultlen = *(size_t *) domain->conv_tab[act];
+    }
+
+ converted:
+  /* The result string is converted.  */
+
+#endif /* _LIBC || HAVE_ICONV */
+
+  *lengthp = resultlen;
+  return result;
+}
+
+
+/* Look up a plural variant.  */
+static char *
+internal_function
+plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
+              const char *translation, size_t translation_len)
+{
+  struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
+  unsigned long int index;
+  const char *p;
+
+  index = plural_eval (domaindata->plural, n);
+  if (index >= domaindata->nplurals)
+    /* This should never happen.  It means the plural expression and the
+       given maximum value do not match.  */
+    index = 0;
+
+  /* Skip INDEX strings at TRANSLATION.  */
+  p = translation;
+  while (index-- > 0)
+    {
+#ifdef _LIBC
+      p = __rawmemchr (p, '\0');
+#else
+      p = strchr (p, '\0');
+#endif
+      /* And skip over the NUL byte.  */
+      p++;
+
+      if (p >= translation + translation_len)
+       /* This should never happen.  It means the plural expression
+          evaluated to a value larger than the number of variants
+          available for MSGID1.  */
+       return (char *) translation;
+    }
+  return (char *) p;
+}
+
+#ifndef _LIBC
+/* Return string representation of locale CATEGORY.  */
+static const char *
+internal_function
+category_to_name (int category)
+{
+  const char *retval;
+
+  switch (category)
+  {
+#ifdef LC_COLLATE
+  case LC_COLLATE:
+    retval = "LC_COLLATE";
+    break;
+#endif
+#ifdef LC_CTYPE
+  case LC_CTYPE:
+    retval = "LC_CTYPE";
+    break;
+#endif
+#ifdef LC_MONETARY
+  case LC_MONETARY:
+    retval = "LC_MONETARY";
+    break;
+#endif
+#ifdef LC_NUMERIC
+  case LC_NUMERIC:
+    retval = "LC_NUMERIC";
+    break;
+#endif
+#ifdef LC_TIME
+  case LC_TIME:
+    retval = "LC_TIME";
+    break;
+#endif
+#ifdef LC_MESSAGES
+  case LC_MESSAGES:
+    retval = "LC_MESSAGES";
+    break;
+#endif
+#ifdef LC_RESPONSE
+  case LC_RESPONSE:
+    retval = "LC_RESPONSE";
+    break;
+#endif
+#ifdef LC_ALL
+  case LC_ALL:
+    /* This might not make sense but is perhaps better than any other
+       value.  */
+    retval = "LC_ALL";
+    break;
+#endif
+  default:
+    /* If you have a better idea for a default value let me know.  */
+    retval = "LC_XXX";
+  }
+
+  return retval;
+}
+#endif
+
+/* Guess value of current locale from value of the environment variables
+   or system-dependent defaults.  */
+static const char *
+internal_function
+guess_category_value (int category, const char *categoryname)
+{
+  const char *language;
+  const char *locale;
+#ifndef _LIBC
+  const char *language_default;
+  int locale_defaulted;
+#endif
+
+  /* We use the settings in the following order:
+     1. The value of the environment variable 'LANGUAGE'.  This is a GNU
+        extension.  Its value can be a colon-separated list of locale names.
+     2. The value of the environment variable 'LC_ALL', 'LC_xxx', or 'LANG'.
+        More precisely, the first among these that is set to a non-empty value.
+        This is how POSIX specifies it.  The value is a single locale name.
+     3. A system-dependent preference list of languages.  Its value can be a
+        colon-separated list of locale names.
+     4. A system-dependent default locale name.
+     This way:
+       - System-dependent settings can be overridden by environment variables.
+       - If the system provides both a list of languages and a default locale,
+         the former is used.  */
+
+  /* Fetch the locale name, through the POSIX method of looking to `LC_ALL',
+     `LC_xxx', and `LANG'.  On some systems this can be done by the
+     `setlocale' function itself.  */
+#ifdef _LIBC
+  locale = __current_locale_name (category);
+#else
+  locale = _nl_locale_name_posix (category, categoryname);
+  locale_defaulted = 0;
+  if (locale == NULL)
+    {
+      locale = _nl_locale_name_default ();
+      locale_defaulted = 1;
+    }
+#endif
+
+  /* Ignore LANGUAGE and its system-dependent analogon if the locale is set
+     to "C" because
+     1. "C" locale usually uses the ASCII encoding, and most international
+       messages use non-ASCII characters. These characters get displayed
+       as question marks (if using glibc's iconv()) or as invalid 8-bit
+       characters (because other iconv()s refuse to convert most non-ASCII
+       characters to ASCII). In any case, the output is ugly.
+     2. The precise output of some programs in the "C" locale is specified
+       by POSIX and should not depend on environment variables like
+       "LANGUAGE" or system-dependent information.  We allow such programs
+        to use gettext().  */
+  if (strcmp (locale, "C") == 0)
+    return locale;
+
+  /* The highest priority value is the value of the 'LANGUAGE' environment
+     variable.  */
+  language = getenv ("LANGUAGE");
+  if (language != NULL && language[0] != '\0')
+    return language;
+#ifndef _LIBC
+  /* The next priority value is the locale name, if not defaulted.  */
+  if (locale_defaulted)
+    {
+      /* The next priority value is the default language preferences list. */
+      language_default = _nl_language_preferences_default ();
+      if (language_default != NULL)
+        return language_default;
+    }
+  /* The least priority value is the locale name, if defaulted.  */
+#endif
+  return locale;
+}
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library.  So we
+   avoid the non-standard function stpcpy.  In GNU C Library this
+   function is available, though.  Also allow the symbol HAVE_STPCPY
+   to be defined.  */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (char *dest, const char *src)
+{
+  while ((*dest++ = *src++) != '\0')
+    /* Do nothing. */ ;
+  return dest - 1;
+}
+#endif
+
+#if !_LIBC && !HAVE_MEMPCPY
+static void *
+mempcpy (void *dest, const void *src, size_t n)
+{
+  return (void *) ((char *) memcpy (dest, src, n) + n);
+}
+#endif
+
+
+#ifdef _LIBC
+/* If we want to free all resources we have to do some work at
+   program's end.  */
+libc_freeres_fn (free_mem)
+{
+  void *old;
+
+  while (_nl_domain_bindings != NULL)
+    {
+      struct binding *oldp = _nl_domain_bindings;
+      _nl_domain_bindings = _nl_domain_bindings->next;
+      if (oldp->dirname != INTUSE(_nl_default_dirname))
+       /* Yes, this is a pointer comparison.  */
+       free (oldp->dirname);
+      free (oldp->codeset);
+      free (oldp);
+    }
+
+  if (_nl_current_default_domain != _nl_default_default_domain)
+    /* Yes, again a pointer comparison.  */
+    free ((char *) _nl_current_default_domain);
+
+  /* Remove the search tree with the known translations.  */
+  __tdestroy (root, free);
+  root = NULL;
+
+  while (transmem_list != NULL)
+    {
+      old = transmem_list;
+      transmem_list = transmem_list->next;
+      free (old);
+    }
+}
+#endif
diff --git a/intl/dcngettext.c b/intl/dcngettext.c
new file mode 100644 (file)
index 0000000..48a3e09
--- /dev/null
@@ -0,0 +1,57 @@
+/* Implementation of the dcngettext(3) function.
+   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DCNGETTEXT __dcngettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCNGETTEXT libintl_dcngettext
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+   locale.  */
+char *
+DCNGETTEXT (const char *domainname,
+           const char *msgid1, const char *msgid2, unsigned long int n,
+           int category)
+{
+  return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__dcngettext, dcngettext);
+#endif
diff --git a/intl/dgettext.c b/intl/dgettext.c
new file mode 100644 (file)
index 0000000..b64b0f5
--- /dev/null
@@ -0,0 +1,58 @@
+/* Implementation of the dgettext(3) function.
+   Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+
+#include <locale.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DGETTEXT __dgettext
+# define DCGETTEXT INTUSE(__dcgettext)
+#else
+# define DGETTEXT libintl_dgettext
+# define DCGETTEXT libintl_dcgettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+   LC_MESSAGES locale.  */
+char *
+DGETTEXT (const char *domainname, const char *msgid)
+{
+  return DCGETTEXT (domainname, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__dgettext, dgettext);
+#endif
diff --git a/intl/dngettext.c b/intl/dngettext.c
new file mode 100644 (file)
index 0000000..7815637
--- /dev/null
@@ -0,0 +1,59 @@
+/* Implementation of the dngettext(3) function.
+   Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+
+#include <locale.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define DNGETTEXT __dngettext
+# define DCNGETTEXT __dcngettext
+#else
+# define DNGETTEXT libintl_dngettext
+# define DCNGETTEXT libintl_dcngettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+   LC_MESSAGES locale and skip message according to the plural form.  */
+char *
+DNGETTEXT (const char *domainname,
+          const char *msgid1, const char *msgid2, unsigned long int n)
+{
+  return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__dngettext, dngettext);
+#endif
diff --git a/intl/eval-plural.h b/intl/eval-plural.h
new file mode 100644 (file)
index 0000000..01bd5af
--- /dev/null
@@ -0,0 +1,108 @@
+/* Plural expression evaluation.
+   Copyright (C) 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef STATIC
+#define STATIC static
+#endif
+
+/* Evaluate the plural expression and return an index value.  */
+STATIC
+unsigned long int
+internal_function
+plural_eval (struct expression *pexp, unsigned long int n)
+{
+  switch (pexp->nargs)
+    {
+    case 0:
+      switch (pexp->operation)
+       {
+       case var:
+         return n;
+       case num:
+         return pexp->val.num;
+       default:
+         break;
+       }
+      /* NOTREACHED */
+      break;
+    case 1:
+      {
+       /* pexp->operation must be lnot.  */
+       unsigned long int arg = plural_eval (pexp->val.args[0], n);
+       return ! arg;
+      }
+    case 2:
+      {
+       unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
+       if (pexp->operation == lor)
+         return leftarg || plural_eval (pexp->val.args[1], n);
+       else if (pexp->operation == land)
+         return leftarg && plural_eval (pexp->val.args[1], n);
+       else
+         {
+           unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
+
+           switch (pexp->operation)
+             {
+             case mult:
+               return leftarg * rightarg;
+             case divide:
+#if !INTDIV0_RAISES_SIGFPE
+               if (rightarg == 0)
+                 raise (SIGFPE);
+#endif
+               return leftarg / rightarg;
+             case module:
+#if !INTDIV0_RAISES_SIGFPE
+               if (rightarg == 0)
+                 raise (SIGFPE);
+#endif
+               return leftarg % rightarg;
+             case plus:
+               return leftarg + rightarg;
+             case minus:
+               return leftarg - rightarg;
+             case less_than:
+               return leftarg < rightarg;
+             case greater_than:
+               return leftarg > rightarg;
+             case less_or_equal:
+               return leftarg <= rightarg;
+             case greater_or_equal:
+               return leftarg >= rightarg;
+             case equal:
+               return leftarg == rightarg;
+             case not_equal:
+               return leftarg != rightarg;
+             default:
+               break;
+             }
+         }
+       /* NOTREACHED */
+       break;
+      }
+    case 3:
+      {
+       /* pexp->operation must be qmop.  */
+       unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
+       return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
+      }
+    }
+  /* NOTREACHED */
+  return 0;
+}
diff --git a/intl/explodename.c b/intl/explodename.c
new file mode 100644 (file)
index 0000000..52c25e7
--- /dev/null
@@ -0,0 +1,185 @@
+/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found.  Sigh!  */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+#  define NULL ((void *) 0)
+# else
+#  define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+char *
+_nl_find_language (const char *name)
+{
+  while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
+        && name[0] != '+' && name[0] != ',')
+    ++name;
+
+  return (char *) name;
+}
+
+
+int
+_nl_explode_name (char *name,
+                 const char **language, const char **modifier,
+                 const char **territory, const char **codeset,
+                 const char **normalized_codeset, const char **special,
+                 const char **sponsor, const char **revision)
+{
+  enum { undecided, xpg, cen } syntax;
+  char *cp;
+  int mask;
+
+  *modifier = NULL;
+  *territory = NULL;
+  *codeset = NULL;
+  *normalized_codeset = NULL;
+  *special = NULL;
+  *sponsor = NULL;
+  *revision = NULL;
+
+  /* Now we determine the single parts of the locale name.  First
+     look for the language.  Termination symbols are `_' and `@' if
+     we use XPG4 style, and `_', `+', and `,' if we use CEN syntax.  */
+  mask = 0;
+  syntax = undecided;
+  *language = cp = name;
+  cp = _nl_find_language (*language);
+
+  if (*language == cp)
+    /* This does not make sense: language has to be specified.  Use
+       this entry as it is without exploding.  Perhaps it is an alias.  */
+    cp = strchr (*language, '\0');
+  else if (cp[0] == '_')
+    {
+      /* Next is the territory.  */
+      cp[0] = '\0';
+      *territory = ++cp;
+
+      while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
+            && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
+       ++cp;
+
+      mask |= TERRITORY;
+
+      if (cp[0] == '.')
+       {
+         /* Next is the codeset.  */
+         syntax = xpg;
+         cp[0] = '\0';
+         *codeset = ++cp;
+
+         while (cp[0] != '\0' && cp[0] != '@')
+           ++cp;
+
+         mask |= XPG_CODESET;
+
+         if (*codeset != cp && (*codeset)[0] != '\0')
+           {
+             *normalized_codeset = _nl_normalize_codeset (*codeset,
+                                                          cp - *codeset);
+             if (strcmp (*codeset, *normalized_codeset) == 0)
+               free ((char *) *normalized_codeset);
+             else
+               mask |= XPG_NORM_CODESET;
+           }
+       }
+    }
+
+  if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
+    {
+      /* Next is the modifier.  */
+      syntax = cp[0] == '@' ? xpg : cen;
+      cp[0] = '\0';
+      *modifier = ++cp;
+
+      while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
+            && cp[0] != ',' && cp[0] != '_')
+       ++cp;
+
+      mask |= XPG_MODIFIER | CEN_AUDIENCE;
+    }
+
+  if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
+    {
+      syntax = cen;
+
+      if (cp[0] == '+')
+       {
+         /* Next is special application (CEN syntax).  */
+         cp[0] = '\0';
+         *special = ++cp;
+
+         while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
+           ++cp;
+
+         mask |= CEN_SPECIAL;
+       }
+
+      if (cp[0] == ',')
+       {
+         /* Next is sponsor (CEN syntax).  */
+         cp[0] = '\0';
+         *sponsor = ++cp;
+
+         while (cp[0] != '\0' && cp[0] != '_')
+           ++cp;
+
+         mask |= CEN_SPONSOR;
+       }
+
+      if (cp[0] == '_')
+       {
+         /* Next is revision (CEN syntax).  */
+         cp[0] = '\0';
+         *revision = ++cp;
+
+         mask |= CEN_REVISION;
+       }
+    }
+
+  /* For CEN syntax values it might be important to have the
+     separator character in the file name, not for XPG syntax.  */
+  if (syntax == xpg)
+    {
+      if (*territory != NULL && (*territory)[0] == '\0')
+       mask &= ~TERRITORY;
+
+      if (*codeset != NULL && (*codeset)[0] == '\0')
+       mask &= ~XPG_CODESET;
+
+      if (*modifier != NULL && (*modifier)[0] == '\0')
+       mask &= ~XPG_MODIFIER;
+    }
+
+  return mask;
+}
diff --git a/intl/finddomain.c b/intl/finddomain.c
new file mode 100644 (file)
index 0000000..4992a8c
--- /dev/null
@@ -0,0 +1,192 @@
+/* Handle list of needed message catalogs
+   Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@gnu.org>, 1995.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+/* List of already loaded domains.  */
+static struct loaded_l10nfile *_nl_loaded_domains;
+
+
+/* Return a data structure describing the message catalog described by
+   the DOMAINNAME and CATEGORY parameters with respect to the currently
+   established bindings.  */
+struct loaded_l10nfile *
+internal_function
+_nl_find_domain (const char *dirname, char *locale,
+                const char *domainname, struct binding *domainbinding)
+{
+  struct loaded_l10nfile *retval;
+  const char *language;
+  const char *modifier;
+  const char *territory;
+  const char *codeset;
+  const char *normalized_codeset;
+  const char *special;
+  const char *sponsor;
+  const char *revision;
+  const char *alias_value;
+  int mask;
+
+  /* LOCALE can consist of up to four recognized parts for the XPG syntax:
+
+               language[_territory[.codeset]][@modifier]
+
+     and six parts for the CEN syntax:
+
+       language[_territory][+audience][+special][,[sponsor][_revision]]
+
+     Beside the first part all of them are allowed to be missing.  If
+     the full specified locale is not found, the less specific one are
+     looked for.  The various parts will be stripped off according to
+     the following order:
+               (1) revision
+               (2) sponsor
+               (3) special
+               (4) codeset
+               (5) normalized codeset
+               (6) territory
+               (7) audience/modifier
+   */
+
+  /* If we have already tested for this locale entry there has to
+     be one data set in the list of loaded domains.  */
+  retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+                              strlen (dirname) + 1, 0, locale, NULL, NULL,
+                              NULL, NULL, NULL, NULL, NULL, domainname, 0);
+  if (retval != NULL)
+    {
+      /* We know something about this locale.  */
+      int cnt;
+
+      if (retval->decided == 0)
+       _nl_load_domain (retval, domainbinding);
+
+      if (retval->data != NULL)
+       return retval;
+
+      for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+       {
+         if (retval->successor[cnt]->decided == 0)
+           _nl_load_domain (retval->successor[cnt], domainbinding);
+
+         if (retval->successor[cnt]->data != NULL)
+           break;
+       }
+      return cnt >= 0 ? retval : NULL;
+      /* NOTREACHED */
+    }
+
+  /* See whether the locale value is an alias.  If yes its value
+     *overwrites* the alias name.  No test for the original value is
+     done.  */
+  alias_value = _nl_expand_alias (locale);
+  if (alias_value != NULL)
+    {
+#if defined _LIBC || defined HAVE_STRDUP
+      locale = strdup (alias_value);
+      if (locale == NULL)
+       return NULL;
+#else
+      size_t len = strlen (alias_value) + 1;
+      locale = (char *) malloc (len);
+      if (locale == NULL)
+       return NULL;
+
+      memcpy (locale, alias_value, len);
+#endif
+    }
+
+  /* Now we determine the single parts of the locale name.  First
+     look for the language.  Termination symbols are `_' and `@' if
+     we use XPG4 style, and `_', `+', and `,' if we use CEN syntax.  */
+  mask = _nl_explode_name (locale, &language, &modifier, &territory,
+                          &codeset, &normalized_codeset, &special,
+                          &sponsor, &revision);
+
+  /* Create all possible locale entries which might be interested in
+     generalization.  */
+  retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+                              strlen (dirname) + 1, mask, language, territory,
+                              codeset, normalized_codeset, modifier, special,
+                              sponsor, revision, domainname, 1);
+  if (retval == NULL)
+    /* This means we are out of core.  */
+    return NULL;
+
+  if (retval->decided == 0)
+    _nl_load_domain (retval, domainbinding);
+  if (retval->data == NULL)
+    {
+      int cnt;
+      for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+       {
+         if (retval->successor[cnt]->decided == 0)
+           _nl_load_domain (retval->successor[cnt], domainbinding);
+         if (retval->successor[cnt]->data != NULL)
+           break;
+       }
+    }
+
+  /* The room for an alias was dynamically allocated.  Free it now.  */
+  if (alias_value != NULL)
+    free (locale);
+
+  /* The space for normalized_codeset is dynamically allocated.  Free it.  */
+  if (mask & XPG_NORM_CODESET)
+    free ((void *) normalized_codeset);
+
+  return retval;
+}
+
+
+#ifdef _LIBC
+libc_freeres_fn (free_mem)
+{
+  struct loaded_l10nfile *runp = _nl_loaded_domains;
+
+  while (runp != NULL)
+    {
+      struct loaded_l10nfile *here = runp;
+      if (runp->data != NULL)
+       _nl_unload_domain ((struct loaded_domain *) runp->data);
+      runp = runp->next;
+      free ((char *) here->filename);
+      free (here);
+    }
+}
+#endif
diff --git a/intl/gettext.c b/intl/gettext.c
new file mode 100644 (file)
index 0000000..92c42fa
--- /dev/null
@@ -0,0 +1,63 @@
+/* Implementation of gettext(3) function.
+   Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h>           /* Just for NULL.  */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define GETTEXT __gettext
+# define DCGETTEXT INTUSE(__dcgettext)
+#else
+# define GETTEXT libintl_gettext
+# define DCGETTEXT libintl_dcgettext
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
+   text).  */
+char *
+GETTEXT (const char *msgid)
+{
+  return DCGETTEXT (NULL, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__gettext, gettext);
+#endif
diff --git a/intl/gettextP.h b/intl/gettextP.h
new file mode 100644 (file)
index 0000000..d73b3e1
--- /dev/null
@@ -0,0 +1,218 @@
+/* Header describing internals of libintl library.
+   Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _GETTEXTP_H
+#define _GETTEXTP_H
+
+#include <stddef.h>            /* Get size_t.  */
+
+#ifdef _LIBC
+# include "../iconv/gconv_int.h"
+#else
+# if HAVE_ICONV
+#  include <iconv.h>
+# endif
+#endif
+
+#include "loadinfo.h"
+
+#include "gmo.h"               /* Get nls_uint32.  */
+
+/* @@ end of prolog @@ */
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+   almost always true or almost always false.  */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+#ifndef W
+# define W(flag, data) ((flag) ? SWAP (data) : (data))
+#endif
+
+
+#ifdef _LIBC
+# include <byteswap.h>
+# define SWAP(i) bswap_32 (i)
+#else
+static inline nls_uint32
+SWAP (i)
+     nls_uint32 i;
+{
+  return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
+}
+#endif
+
+
+/* In-memory representation of system dependent string.  */
+struct sysdep_string_desc
+{
+  /* Length of addressed string, including the trailing NUL.  */
+  size_t length;
+  /* Pointer to addressed string.  */
+  const char *pointer;
+};
+
+/* The representation of an opened message catalog.  */
+struct loaded_domain
+{
+  /* Pointer to memory containing the .mo file.  */
+  const char *data;
+  /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed.  */
+  int use_mmap;
+  /* Size of mmap()ed memory.  */
+  size_t mmap_size;
+  /* 1 if the .mo file uses a different endianness than this machine.  */
+  int must_swap;
+  /* Pointer to additional malloc()ed memory.  */
+  void *malloced;
+
+  /* Number of static strings pairs.  */
+  nls_uint32 nstrings;
+  /* Pointer to descriptors of original strings in the file.  */
+  const struct string_desc *orig_tab;
+  /* Pointer to descriptors of translated strings in the file.  */
+  const struct string_desc *trans_tab;
+
+  /* Number of system dependent strings pairs.  */
+  nls_uint32 n_sysdep_strings;
+  /* Pointer to descriptors of original sysdep strings.  */
+  const struct sysdep_string_desc *orig_sysdep_tab;
+  /* Pointer to descriptors of translated sysdep strings.  */
+  const struct sysdep_string_desc *trans_sysdep_tab;
+
+  /* Size of hash table.  */
+  nls_uint32 hash_size;
+  /* Pointer to hash table.  */
+  const nls_uint32 *hash_tab;
+  /* 1 if the hash table uses a different endianness than this machine.  */
+  int must_swap_hash_tab;
+
+  int codeset_cntr;
+#ifdef _LIBC
+  __gconv_t conv;
+#else
+# if HAVE_ICONV
+  iconv_t conv;
+# endif
+#endif
+  char **conv_tab;
+
+  struct expression *plural;
+  unsigned long int nplurals;
+};
+
+/* We want to allocate a string at the end of the struct.  But ISO C
+   doesn't allow zero sized arrays.  */
+#ifdef __GNUC__
+# define ZERO 0
+#else
+# define ZERO 1
+#endif
+
+/* A set of settings bound to a message domain.  Used to store settings
+   from bindtextdomain() and bind_textdomain_codeset().  */
+struct binding
+{
+  struct binding *next;
+  char *dirname;
+  int codeset_cntr;    /* Incremented each time codeset changes.  */
+  char *codeset;
+  char domainname[ZERO];
+};
+
+/* A counter which is incremented each time some previous translations
+   become invalid.
+   This variable is part of the external ABI of the GNU libintl.  */
+extern int _nl_msg_cat_cntr;
+
+#ifndef _LIBC
+const char *_nl_language_preferences_default (void);
+const char *_nl_locale_name_posix (int category, const char *categoryname);
+const char *_nl_locale_name_default (void);
+const char *_nl_locale_name (int category, const char *categoryname);
+#endif
+
+struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale,
+                                        const char *__domainname,
+                                        struct binding *__domainbinding)
+     internal_function;
+void _nl_load_domain (struct loaded_l10nfile *__domain,
+                     struct binding *__domainbinding)
+     internal_function;
+void _nl_unload_domain (struct loaded_domain *__domain)
+     internal_function;
+const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file,
+                                 struct loaded_domain *__domain,
+                                 struct binding *__domainbinding)
+     internal_function;
+void _nl_free_domain_conv (struct loaded_domain *__domain)
+     internal_function;
+
+char *_nl_find_msg (struct loaded_l10nfile *domain_file,
+                   struct binding *domainbinding, const char *msgid,
+                   size_t *lengthp)
+     internal_function;
+
+#ifdef _LIBC
+extern char *__gettext (const char *__msgid);
+extern char *__dgettext (const char *__domainname, const char *__msgid);
+extern char *__dcgettext (const char *__domainname, const char *__msgid,
+                         int __category);
+extern char *__ngettext (const char *__msgid1, const char *__msgid2,
+                        unsigned long int __n);
+extern char *__dngettext (const char *__domainname,
+                         const char *__msgid1, const char *__msgid2,
+                         unsigned long int n);
+extern char *__dcngettext (const char *__domainname,
+                          const char *__msgid1, const char *__msgid2,
+                          unsigned long int __n, int __category);
+extern char *__dcigettext (const char *__domainname,
+                          const char *__msgid1, const char *__msgid2,
+                          int __plural, unsigned long int __n,
+                          int __category);
+extern char *__textdomain (const char *__domainname);
+extern char *__bindtextdomain (const char *__domainname,
+                              const char *__dirname);
+extern char *__bind_textdomain_codeset (const char *__domainname,
+                                       const char *__codeset);
+#else
+/* Declare the exported libintl_* functions, in a way that allows us to
+   call them under their real name.  */
+# undef _INTL_REDIRECT_INLINE
+# undef _INTL_REDIRECT_MACROS
+# define _INTL_REDIRECT_MACROS
+# include "libgnuintl.h"
+extern char *libintl_dcigettext (const char *__domainname,
+                                const char *__msgid1, const char *__msgid2,
+                                int __plural, unsigned long int __n,
+                                int __category);
+#endif
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettextP.h  */
diff --git a/intl/gmo.h b/intl/gmo.h
new file mode 100644 (file)
index 0000000..e7c9cc1
--- /dev/null
@@ -0,0 +1,149 @@
+/* Description of GNU message catalog format: general file layout.
+   Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _GETTEXT_H
+#define _GETTEXT_H 1
+
+#include <limits.h>
+
+/* @@ end of prolog @@ */
+
+/* The magic number of the GNU message catalog format.  */
+#define _MAGIC 0x950412de
+#define _MAGIC_SWAPPED 0xde120495
+
+/* Revision number of the currently used .mo (binary) file format.  */
+#define MO_REVISION_NUMBER 0
+#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1
+
+/* The following contortions are an attempt to use the C preprocessor
+   to determine an unsigned integral type that is 32 bits wide.  An
+   alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
+   as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
+   when cross-compiling.  */
+
+#if __STDC__
+# define UINT_MAX_32_BITS 4294967295U
+#else
+# define UINT_MAX_32_BITS 0xFFFFFFFF
+#endif
+
+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
+   This should be valid for all systems GNU cares about because
+   that doesn't include 16-bit systems, and only modern systems
+   (that certainly have <limits.h>) have 64+-bit integral types.  */
+
+#ifndef UINT_MAX
+# define UINT_MAX UINT_MAX_32_BITS
+#endif
+
+#if UINT_MAX == UINT_MAX_32_BITS
+typedef unsigned nls_uint32;
+#else
+# if USHRT_MAX == UINT_MAX_32_BITS
+typedef unsigned short nls_uint32;
+# else
+#  if ULONG_MAX == UINT_MAX_32_BITS
+typedef unsigned long nls_uint32;
+#  else
+  /* The following line is intended to throw an error.  Using #error is
+     not portable enough.  */
+  "Cannot determine unsigned 32-bit data type."
+#  endif
+# endif
+#endif
+
+
+/* Header for binary .mo file format.  */
+struct mo_file_header
+{
+  /* The magic number.  */
+  nls_uint32 magic;
+  /* The revision number of the file format.  */
+  nls_uint32 revision;
+
+  /* The following are only used in .mo files with major revision 0 or 1.  */
+
+  /* The number of strings pairs.  */
+  nls_uint32 nstrings;
+  /* Offset of table with start offsets of original strings.  */
+  nls_uint32 orig_tab_offset;
+  /* Offset of table with start offsets of translated strings.  */
+  nls_uint32 trans_tab_offset;
+  /* Size of hash table.  */
+  nls_uint32 hash_tab_size;
+  /* Offset of first hash table entry.  */
+  nls_uint32 hash_tab_offset;
+
+  /* The following are only used in .mo files with minor revision >= 1.  */
+
+  /* The number of system dependent segments.  */
+  nls_uint32 n_sysdep_segments;
+  /* Offset of table describing system dependent segments.  */
+  nls_uint32 sysdep_segments_offset;
+  /* The number of system dependent strings pairs.  */
+  nls_uint32 n_sysdep_strings;
+  /* Offset of table with start offsets of original sysdep strings.  */
+  nls_uint32 orig_sysdep_tab_offset;
+  /* Offset of table with start offsets of translated sysdep strings.  */
+  nls_uint32 trans_sysdep_tab_offset;
+};
+
+/* Descriptor for static string contained in the binary .mo file.  */
+struct string_desc
+{
+  /* Length of addressed string, not including the trailing NUL.  */
+  nls_uint32 length;
+  /* Offset of string in file.  */
+  nls_uint32 offset;
+};
+
+/* The following are only used in .mo files with minor revision >= 1.  */
+
+/* Descriptor for system dependent string segment.  */
+struct sysdep_segment
+{
+  /* Length of addressed string, including the trailing NUL.  */
+  nls_uint32 length;
+  /* Offset of string in file.  */
+  nls_uint32 offset;
+};
+
+/* Descriptor for system dependent string.  */
+struct sysdep_string
+{
+  /* Offset of static string segments in file.  */
+  nls_uint32 offset;
+  /* Alternating sequence of static and system dependent segments.
+     The last segment is a static segment, including the trailing NUL.  */
+  struct segment_pair
+  {
+    /* Size of static segment.  */
+    nls_uint32 segsize;
+    /* Reference to system dependent string segment, or ~0 at the end.  */
+    nls_uint32 sysdepref;
+  } segments[1];
+};
+
+/* Marker for the end of the segments[] array.  This has the value 0xFFFFFFFF,
+   regardless whether 'int' is 16 bit, 32 bit, or 64 bit.  */
+#define SEGMENTS_END ((nls_uint32) ~0)
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettext.h  */
diff --git a/intl/hash-string.h b/intl/hash-string.h
new file mode 100644 (file)
index 0000000..093e3b1
--- /dev/null
@@ -0,0 +1,48 @@
+/* Description of GNU message catalog format: string hashing function.
+   Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* @@ end of prolog @@ */
+
+/* We assume to have `unsigned long int' value with at least 32 bits.  */
+#define HASHWORDBITS 32
+
+
+/* Defines the so called `hashpjw' function by P.J. Weinberger
+   [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
+   1986, 1987 Bell Telephone Laboratories, Inc.]  */
+static inline unsigned long int
+hash_string (const char *str_param)
+{
+  unsigned long int hval, g;
+  const char *str = str_param;
+
+  /* Compute the hash value for the given string.  */
+  hval = 0;
+  while (*str != '\0')
+    {
+      hval <<= 4;
+      hval += (unsigned char) *str++;
+      g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
+      if (g != 0)
+       {
+         hval ^= g >> (HASHWORDBITS - 8);
+         hval ^= g;
+       }
+    }
+  return hval;
+}
diff --git a/intl/intl-compat.c b/intl/intl-compat.c
new file mode 100644 (file)
index 0000000..96f9d95
--- /dev/null
@@ -0,0 +1,131 @@
+/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
+   Library.
+   Copyright (C) 1995, 2000-2003 Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+/* This file redirects the gettext functions (without prefix) to those
+   defined in the included GNU libintl library (with "libintl_" prefix).
+   It is compiled into libintl in order to make the AM_GNU_GETTEXT test
+   of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
+   has the redirections primarily in the <libintl.h> include file.
+   It is also compiled into libgnuintl so that libgnuintl.so can be used
+   as LD_PRELOADable library on glibc systems, to provide the extra
+   features that the functions in the libc don't have (namely, logging).  */
+
+
+#undef gettext
+#undef dgettext
+#undef dcgettext
+#undef ngettext
+#undef dngettext
+#undef dcngettext
+#undef textdomain
+#undef bindtextdomain
+#undef bind_textdomain_codeset
+
+
+/* When building a DLL, we must export some functions.  Note that because
+   the functions are only defined for binary backward compatibility, we
+   don't need to use __declspec(dllimport) in any case.  */
+#if defined _MSC_VER && BUILDING_DLL
+# define DLL_EXPORTED __declspec(dllexport)
+#else
+# define DLL_EXPORTED
+#endif
+
+
+DLL_EXPORTED
+char *
+gettext (const char *msgid)
+{
+  return libintl_gettext (msgid);
+}
+
+
+DLL_EXPORTED
+char *
+dgettext (const char *domainname, const char *msgid)
+{
+  return libintl_dgettext (domainname, msgid);
+}
+
+
+DLL_EXPORTED
+char *
+dcgettext (const char *domainname, const char *msgid, int category)
+{
+  return libintl_dcgettext (domainname, msgid, category);
+}
+
+
+DLL_EXPORTED
+char *
+ngettext (const char *msgid1, const char *msgid2, unsigned long int n)
+{
+  return libintl_ngettext (msgid1, msgid2, n);
+}
+
+
+DLL_EXPORTED
+char *
+dngettext (const char *domainname,
+          const char *msgid1, const char *msgid2, unsigned long int n)
+{
+  return libintl_dngettext (domainname, msgid1, msgid2, n);
+}
+
+
+DLL_EXPORTED
+char *
+dcngettext (const char *domainname,
+           const char *msgid1, const char *msgid2, unsigned long int n,
+           int category)
+{
+  return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
+}
+
+
+DLL_EXPORTED
+char *
+textdomain (const char *domainname)
+{
+  return libintl_textdomain (domainname);
+}
+
+
+DLL_EXPORTED
+char *
+bindtextdomain (const char *domainname, const char *dirname)
+{
+  return libintl_bindtextdomain (domainname, dirname);
+}
+
+
+DLL_EXPORTED
+char *
+bind_textdomain_codeset (const char *domainname, const char *codeset)
+{
+  return libintl_bind_textdomain_codeset (domainname, codeset);
+}
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
new file mode 100644 (file)
index 0000000..5124d73
--- /dev/null
@@ -0,0 +1,421 @@
+/* Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE   1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#if defined _LIBC || defined HAVE_ARGZ_H
+# include <argz.h>
+#endif
+#include <ctype.h>
+#include <sys/types.h>
+#include <stdlib.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found.  Sigh!  */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+#  define NULL ((void *) 0)
+# else
+#  define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions.  This is required by the standard
+   because some ANSI C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# ifndef stpcpy
+#  define stpcpy(dest, src) __stpcpy(dest, src)
+# endif
+#else
+# ifndef HAVE_STPCPY
+static char *stpcpy (char *dest, const char *src);
+# endif
+#endif
+
+/* Pathname support.
+   ISSLASH(C)           tests whether C is a directory separator character.
+   IS_ABSOLUTE_PATH(P)  tests whether P is an absolute path.  If it is not,
+                        it may be concatenated to a directory pathname.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, Cygwin, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+    ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+     && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+#else
+  /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+#endif
+
+/* Define function which are usually not available.  */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
+/* Returns the number of strings in ARGZ.  */
+static size_t
+argz_count__ (const char *argz, size_t len)
+{
+  size_t count = 0;
+  while (len > 0)
+    {
+      size_t part_len = strlen (argz);
+      argz += part_len + 1;
+      len -= part_len + 1;
+      count++;
+    }
+  return count;
+}
+# undef __argz_count
+# define __argz_count(argz, len) argz_count__ (argz, len)
+#else
+# ifdef _LIBC
+#  define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
+# endif
+#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
+/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
+   except the last into the character SEP.  */
+static void
+argz_stringify__ (char *argz, size_t len, int sep)
+{
+  while (len > 0)
+    {
+      size_t part_len = strlen (argz);
+      argz += part_len;
+      len -= part_len + 1;
+      if (len > 0)
+       *argz++ = sep;
+    }
+}
+# undef __argz_stringify
+# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
+#else
+# ifdef _LIBC
+#  define __argz_stringify(argz, len, sep) \
+  INTUSE(__argz_stringify) (argz, len, sep)
+# endif
+#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
+static char *
+argz_next__ (char *argz, size_t argz_len, const char *entry)
+{
+  if (entry)
+    {
+      if (entry < argz + argz_len)
+        entry = strchr (entry, '\0') + 1;
+
+      return entry >= argz + argz_len ? NULL : (char *) entry;
+    }
+  else
+    if (argz_len > 0)
+      return argz;
+    else
+      return 0;
+}
+# undef __argz_next
+# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
+#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
+
+
+/* Return number of bits set in X.  */
+static inline int
+pop (int x)
+{
+  /* We assume that no more than 16 bits are used.  */
+  x = ((x & ~0x5555) >> 1) + (x & 0x5555);
+  x = ((x & ~0x3333) >> 2) + (x & 0x3333);
+  x = ((x >> 4) + x) & 0x0f0f;
+  x = ((x >> 8) + x) & 0xff;
+
+  return x;
+}
+
+\f
+struct loaded_l10nfile *
+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
+                   const char *dirlist, size_t dirlist_len,
+                   int mask, const char *language, const char *territory,
+                   const char *codeset, const char *normalized_codeset,
+                   const char *modifier, const char *special,
+                   const char *sponsor, const char *revision,
+                   const char *filename, int do_allocate)
+{
+  char *abs_filename;
+  struct loaded_l10nfile **lastp;
+  struct loaded_l10nfile *retval;
+  char *cp;
+  size_t dirlist_count;
+  size_t entries;
+  int cnt;
+
+  /* If LANGUAGE contains an absolute directory specification, we ignore
+     DIRLIST.  */
+  if (IS_ABSOLUTE_PATH (language))
+    dirlist_len = 0;
+
+  /* Allocate room for the full file name.  */
+  abs_filename = (char *) malloc (dirlist_len
+                                 + strlen (language)
+                                 + ((mask & TERRITORY) != 0
+                                    ? strlen (territory) + 1 : 0)
+                                 + ((mask & XPG_CODESET) != 0
+                                    ? strlen (codeset) + 1 : 0)
+                                 + ((mask & XPG_NORM_CODESET) != 0
+                                    ? strlen (normalized_codeset) + 1 : 0)
+                                 + (((mask & XPG_MODIFIER) != 0
+                                     || (mask & CEN_AUDIENCE) != 0)
+                                    ? strlen (modifier) + 1 : 0)
+                                 + ((mask & CEN_SPECIAL) != 0
+                                    ? strlen (special) + 1 : 0)
+                                 + (((mask & CEN_SPONSOR) != 0
+                                     || (mask & CEN_REVISION) != 0)
+                                    ? (1 + ((mask & CEN_SPONSOR) != 0
+                                            ? strlen (sponsor) : 0)
+                                       + ((mask & CEN_REVISION) != 0
+                                          ? strlen (revision) + 1 : 0)) : 0)
+                                 + 1 + strlen (filename) + 1);
+
+  if (abs_filename == NULL)
+    return NULL;
+
+  /* Construct file name.  */
+  cp = abs_filename;
+  if (dirlist_len > 0)
+    {
+      memcpy (cp, dirlist, dirlist_len);
+      __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
+      cp += dirlist_len;
+      cp[-1] = '/';
+    }
+
+  cp = stpcpy (cp, language);
+
+  if ((mask & TERRITORY) != 0)
+    {
+      *cp++ = '_';
+      cp = stpcpy (cp, territory);
+    }
+  if ((mask & XPG_CODESET) != 0)
+    {
+      *cp++ = '.';
+      cp = stpcpy (cp, codeset);
+    }
+  if ((mask & XPG_NORM_CODESET) != 0)
+    {
+      *cp++ = '.';
+      cp = stpcpy (cp, normalized_codeset);
+    }
+  if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
+    {
+      /* This component can be part of both syntaces but has different
+        leading characters.  For CEN we use `+', else `@'.  */
+      *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
+      cp = stpcpy (cp, modifier);
+    }
+  if ((mask & CEN_SPECIAL) != 0)
+    {
+      *cp++ = '+';
+      cp = stpcpy (cp, special);
+    }
+  if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
+    {
+      *cp++ = ',';
+      if ((mask & CEN_SPONSOR) != 0)
+       cp = stpcpy (cp, sponsor);
+      if ((mask & CEN_REVISION) != 0)
+       {
+         *cp++ = '_';
+         cp = stpcpy (cp, revision);
+       }
+    }
+
+  *cp++ = '/';
+  stpcpy (cp, filename);
+
+  /* Look in list of already loaded domains whether it is already
+     available.  */
+  lastp = l10nfile_list;
+  for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
+    if (retval->filename != NULL)
+      {
+       int compare = strcmp (retval->filename, abs_filename);
+       if (compare == 0)
+         /* We found it!  */
+         break;
+       if (compare < 0)
+         {
+           /* It's not in the list.  */
+           retval = NULL;
+           break;
+         }
+
+       lastp = &retval->next;
+      }
+
+  if (retval != NULL || do_allocate == 0)
+    {
+      free (abs_filename);
+      return retval;
+    }
+
+  dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
+
+  /* Allocate a new loaded_l10nfile.  */
+  retval =
+    (struct loaded_l10nfile *)
+    malloc (sizeof (*retval)
+           + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
+              * sizeof (struct loaded_l10nfile *)));
+  if (retval == NULL)
+    return NULL;
+
+  retval->filename = abs_filename;
+
+  /* We set retval->data to NULL here; it is filled in later.
+     Setting retval->decided to 1 here means that retval does not
+     correspond to a real file (dirlist_count > 1) or is not worth
+     looking up (if an unnormalized codeset was specified).  */
+  retval->decided = (dirlist_count > 1
+                    || ((mask & XPG_CODESET) != 0
+                        && (mask & XPG_NORM_CODESET) != 0));
+  retval->data = NULL;
+
+  retval->next = *lastp;
+  *lastp = retval;
+
+  entries = 0;
+  /* Recurse to fill the inheritance list of RETVAL.
+     If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
+     entry does not correspond to a real file; retval->filename contains
+     colons.  In this case we loop across all elements of DIRLIST and
+     across all bit patterns dominated by MASK.
+     If the DIRLIST is a single directory or entirely redundant (i.e.
+     DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
+     MASK, excluding MASK itself.
+     In either case, we loop down from MASK to 0.  This has the effect
+     that the extra bits in the locale name are dropped in this order:
+     first the modifier, then the territory, then the codeset, then the
+     normalized_codeset.  */
+  for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
+    if ((cnt & ~mask) == 0
+       && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
+       && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
+      {
+       if (dirlist_count > 1)
+         {
+           /* Iterate over all elements of the DIRLIST.  */
+           char *dir = NULL;
+
+           while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
+                  != NULL)
+             retval->successor[entries++]
+               = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
+                                     cnt, language, territory, codeset,
+                                     normalized_codeset, modifier, special,
+                                     sponsor, revision, filename, 1);
+         }
+       else
+         retval->successor[entries++]
+           = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
+                                 cnt, language, territory, codeset,
+                                 normalized_codeset, modifier, special,
+                                 sponsor, revision, filename, 1);
+      }
+  retval->successor[entries] = NULL;
+
+  return retval;
+}
+\f
+/* Normalize codeset name.  There is no standard for the codeset
+   names.  Normalization allows the user to use any of the common
+   names.  The return value is dynamically allocated and has to be
+   freed by the caller.  */
+const char *
+_nl_normalize_codeset (const char *codeset, size_t name_len)
+{
+  int len = 0;
+  int only_digit = 1;
+  char *retval;
+  char *wp;
+  size_t cnt;
+
+  for (cnt = 0; cnt < name_len; ++cnt)
+    if (isalnum ((unsigned char) codeset[cnt]))
+      {
+       ++len;
+
+       if (isalpha ((unsigned char) codeset[cnt]))
+         only_digit = 0;
+      }
+
+  retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
+
+  if (retval != NULL)
+    {
+      if (only_digit)
+       wp = stpcpy (retval, "iso");
+      else
+       wp = retval;
+
+      for (cnt = 0; cnt < name_len; ++cnt)
+       if (isalpha ((unsigned char) codeset[cnt]))
+         *wp++ = tolower ((unsigned char) codeset[cnt]);
+       else if (isdigit ((unsigned char) codeset[cnt]))
+         *wp++ = codeset[cnt];
+
+      *wp = '\0';
+    }
+
+  return (const char *) retval;
+}
+
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library.  So we
+   avoid the non-standard function stpcpy.  In GNU C Library this
+   function is available, though.  Also allow the symbol HAVE_STPCPY
+   to be defined.  */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (char *dest, const char *src)
+{
+  while ((*dest++ = *src++) != '\0')
+    /* Do nothing. */ ;
+  return dest - 1;
+}
+#endif
diff --git a/intl/langprefs.c b/intl/langprefs.c
new file mode 100644 (file)
index 0000000..416398d
--- /dev/null
@@ -0,0 +1,130 @@
+/* Determine the user's language preferences.
+   Copyright (C) 2004-2005 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#if HAVE_CFPREFERENCESCOPYAPPVALUE
+# include <string.h>
+# include <CFPreferences.h>
+# include <CFPropertyList.h>
+# include <CFArray.h>
+# include <CFString.h>
+extern void _nl_locale_name_canonicalize (char *name);
+#endif
+
+/* Determine the user's language preferences, as a colon separated list of
+   locale names in XPG syntax
+     language[_territory[.codeset]][@modifier]
+   The result must not be freed; it is statically allocated.
+   The LANGUAGE environment variable does not need to be considered; it is
+   already taken into account by the caller.  */
+
+const char *
+_nl_language_preferences_default (void)
+{
+#if HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */
+  {
+    /* Cache the preferences list, since CoreFoundation calls are expensive.  */
+    static const char *cached_languages;
+    static int cache_initialized;
+
+    if (!cache_initialized)
+      {
+       CFTypeRef preferences =
+         CFPreferencesCopyAppValue (CFSTR ("AppleLanguages"),
+                                    kCFPreferencesCurrentApplication);
+       if (preferences != NULL
+           && CFGetTypeID (preferences) == CFArrayGetTypeID ())
+         {
+           CFArrayRef prefArray = (CFArrayRef)preferences;
+           int n = CFArrayGetCount (prefArray);
+           char buf[256];
+           size_t size = 0;
+           int i;
+
+           for (i = 0; i < n; i++)
+             {
+               CFTypeRef element = CFArrayGetValueAtIndex (prefArray, i);
+               if (element != NULL
+                   && CFGetTypeID (element) == CFStringGetTypeID ()
+                   && CFStringGetCString ((CFStringRef)element,
+                                          buf, sizeof (buf),
+                                          kCFStringEncodingASCII))
+                 {
+                   _nl_locale_name_canonicalize (buf);
+                   size += strlen (buf) + 1;
+                   /* Most GNU programs use msgids in English and don't ship
+                      an en.mo message catalog.  Therefore when we see "en"
+                      in the preferences list, arrange for gettext() to
+                      return the msgid, and ignore all further elements of
+                      the preferences list.  */
+                   if (strcmp (buf, "en") == 0)
+                     break;
+                 }
+               else
+                 break;
+             }
+           if (size > 0)
+             {
+               char *languages = (char *) malloc (size);
+
+               if (languages != NULL)
+                 {
+                   char *p = languages;
+
+                   for (i = 0; i < n; i++)
+                     {
+                       CFTypeRef element =
+                         CFArrayGetValueAtIndex (prefArray, i);
+                       if (element != NULL
+                           && CFGetTypeID (element) == CFStringGetTypeID ()
+                           && CFStringGetCString ((CFStringRef)element,
+                                                  buf, sizeof (buf),
+                                                  kCFStringEncodingASCII))
+                         {
+                           _nl_locale_name_canonicalize (buf);
+                           strcpy (p, buf);
+                           p += strlen (buf);
+                           *p++ = ':';
+                           if (strcmp (buf, "en") == 0)
+                             break;
+                         }
+                       else
+                         break;
+                     }
+                   *--p = '\0';
+
+                   cached_languages = languages;
+                 }
+             }
+         }
+       cache_initialized = 1;
+      }
+    if (cached_languages != NULL)
+      return cached_languages;
+  }
+#endif
+
+  return NULL;
+}
diff --git a/intl/libgnuintl.h.in b/intl/libgnuintl.h.in
new file mode 100644 (file)
index 0000000..afc21da
--- /dev/null
@@ -0,0 +1,383 @@
+/* Message catalogs for internationalization.
+   Copyright (C) 1995-1997, 2000-2004 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _LIBINTL_H
+#define _LIBINTL_H     1
+
+#include <locale.h>
+
+/* The LC_MESSAGES locale category is the category used by the functions
+   gettext() and dgettext().  It is specified in POSIX, but not in ANSI C.
+   On systems that don't define it, use an arbitrary value instead.
+   On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
+   then includes <libintl.h> (i.e. this file!) and then only defines
+   LC_MESSAGES.  To avoid a redefinition warning, don't define LC_MESSAGES
+   in this case.  */
+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
+# define LC_MESSAGES 1729
+#endif
+
+/* We define an additional symbol to signal that we use the GNU
+   implementation of gettext.  */
+#define __USE_GNU_GETTEXT 1
+
+/* Provide information about the supported file formats.  Returns the
+   maximum minor revision number supported for a given major revision.  */
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
+  ((major) == 0 || (major) == 1 ? 1 : -1)
+
+/* Resolve a platform specific conflict on DJGPP.  GNU gettext takes
+   precedence over _conio_gettext.  */
+#ifdef __DJGPP__
+# undef gettext
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* We redirect the functions to those prefixed with "libintl_".  This is
+   necessary, because some systems define gettext/textdomain/... in the C
+   library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
+   If we used the unprefixed names, there would be cases where the
+   definition in the C library would override the one in the libintl.so
+   shared library.  Recall that on ELF systems, the symbols are looked
+   up in the following order:
+     1. in the executable,
+     2. in the shared libraries specified on the link command line, in order,
+     3. in the dependencies of the shared libraries specified on the link
+        command line,
+     4. in the dlopen()ed shared libraries, in the order in which they were
+        dlopen()ed.
+   The definition in the C library would override the one in libintl.so if
+   either
+     * -lc is given on the link command line and -lintl isn't, or
+     * -lc is given on the link command line before -lintl, or
+     * libintl.so is a dependency of a dlopen()ed shared library but not
+       linked to the executable at link time.
+   Since Solaris gettext() behaves differently than GNU gettext(), this
+   would be unacceptable.
+
+   The redirection happens by default through macros in C, so that &gettext
+   is independent of the compilation unit, but through inline functions in
+   C++, in order not to interfere with the name mangling of class fields or
+   class methods called 'gettext'.  */
+
+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
+   If he doesn't, we choose the method.  A third possible method is
+   _INTL_REDIRECT_ASM, supported only by GCC.  */
+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
+#  define _INTL_REDIRECT_ASM
+# else
+#  ifdef __cplusplus
+#   define _INTL_REDIRECT_INLINE
+#  else
+#   define _INTL_REDIRECT_MACROS
+#  endif
+# endif
+#endif
+/* Auxiliary macros.  */
+#ifdef _INTL_REDIRECT_ASM
+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
+# define _INTL_STRINGIFY(prefix) #prefix
+#else
+# define _INTL_ASM(cname)
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
+   text).  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_gettext (const char *__msgid);
+static inline char *gettext (const char *__msgid)
+{
+  return libintl_gettext (__msgid);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define gettext libintl_gettext
+#endif
+extern char *gettext (const char *__msgid)
+       _INTL_ASM (libintl_gettext);
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+   LC_MESSAGES locale.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
+static inline char *dgettext (const char *__domainname, const char *__msgid)
+{
+  return libintl_dgettext (__domainname, __msgid);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dgettext libintl_dgettext
+#endif
+extern char *dgettext (const char *__domainname, const char *__msgid)
+       _INTL_ASM (libintl_dgettext);
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+   locale.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
+                               int __category);
+static inline char *dcgettext (const char *__domainname, const char *__msgid,
+                              int __category)
+{
+  return libintl_dcgettext (__domainname, __msgid, __category);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dcgettext libintl_dcgettext
+#endif
+extern char *dcgettext (const char *__domainname, const char *__msgid,
+                       int __category)
+       _INTL_ASM (libintl_dcgettext);
+#endif
+
+
+/* Similar to `gettext' but select the plural form corresponding to the
+   number N.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
+                              unsigned long int __n);
+static inline char *ngettext (const char *__msgid1, const char *__msgid2,
+                             unsigned long int __n)
+{
+  return libintl_ngettext (__msgid1, __msgid2, __n);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define ngettext libintl_ngettext
+#endif
+extern char *ngettext (const char *__msgid1, const char *__msgid2,
+                      unsigned long int __n)
+       _INTL_ASM (libintl_ngettext);
+#endif
+
+/* Similar to `dgettext' but select the plural form corresponding to the
+   number N.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
+                               const char *__msgid2, unsigned long int __n);
+static inline char *dngettext (const char *__domainname, const char *__msgid1,
+                              const char *__msgid2, unsigned long int __n)
+{
+  return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dngettext libintl_dngettext
+#endif
+extern char *dngettext (const char *__domainname,
+                       const char *__msgid1, const char *__msgid2,
+                       unsigned long int __n)
+       _INTL_ASM (libintl_dngettext);
+#endif
+
+/* Similar to `dcgettext' but select the plural form corresponding to the
+   number N.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dcngettext (const char *__domainname,
+                                const char *__msgid1, const char *__msgid2,
+                                unsigned long int __n, int __category);
+static inline char *dcngettext (const char *__domainname,
+                               const char *__msgid1, const char *__msgid2,
+                               unsigned long int __n, int __category)
+{
+  return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dcngettext libintl_dcngettext
+#endif
+extern char *dcngettext (const char *__domainname,
+                        const char *__msgid1, const char *__msgid2,
+                        unsigned long int __n, int __category)
+       _INTL_ASM (libintl_dcngettext);
+#endif
+
+
+/* Set the current default message catalog to DOMAINNAME.
+   If DOMAINNAME is null, return the current default.
+   If DOMAINNAME is "", reset to the default of "messages".  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_textdomain (const char *__domainname);
+static inline char *textdomain (const char *__domainname)
+{
+  return libintl_textdomain (__domainname);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define textdomain libintl_textdomain
+#endif
+extern char *textdomain (const char *__domainname)
+       _INTL_ASM (libintl_textdomain);
+#endif
+
+/* Specify that the DOMAINNAME message catalog will be found
+   in DIRNAME rather than in the system locale data base.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_bindtextdomain (const char *__domainname,
+                                    const char *__dirname);
+static inline char *bindtextdomain (const char *__domainname,
+                                   const char *__dirname)
+{
+  return libintl_bindtextdomain (__domainname, __dirname);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define bindtextdomain libintl_bindtextdomain
+#endif
+extern char *bindtextdomain (const char *__domainname, const char *__dirname)
+       _INTL_ASM (libintl_bindtextdomain);
+#endif
+
+/* Specify the character encoding in which the messages from the
+   DOMAINNAME message catalog will be returned.  */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_bind_textdomain_codeset (const char *__domainname,
+                                             const char *__codeset);
+static inline char *bind_textdomain_codeset (const char *__domainname,
+                                            const char *__codeset)
+{
+  return libintl_bind_textdomain_codeset (__domainname, __codeset);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define bind_textdomain_codeset libintl_bind_textdomain_codeset
+#endif
+extern char *bind_textdomain_codeset (const char *__domainname,
+                                     const char *__codeset)
+       _INTL_ASM (libintl_bind_textdomain_codeset);
+#endif
+
+
+/* Support for format strings with positions in *printf(), following the
+   POSIX/XSI specification.
+   Note: These replacements for the *printf() functions are visible only
+   in source files that #include <libintl.h> or #include "gettext.h".
+   Packages that use *printf() in source files that don't refer to _()
+   or gettext() but for which the format string could be the return value
+   of _() or gettext() need to add this #include.  Oh well.  */
+
+#if !@HAVE_POSIX_PRINTF@
+
+#include <stdio.h>
+#include <stddef.h>
+
+/* Get va_list.  */
+#if __STDC__ || defined __cplusplus || defined _MSC_VER
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
+#undef fprintf
+#define fprintf libintl_fprintf
+extern int fprintf (FILE *, const char *, ...);
+#undef vfprintf
+#define vfprintf libintl_vfprintf
+extern int vfprintf (FILE *, const char *, va_list);
+
+#undef printf
+#define printf libintl_printf
+extern int printf (const char *, ...);
+#undef vprintf
+#define vprintf libintl_vprintf
+extern int vprintf (const char *, va_list);
+
+#undef sprintf
+#define sprintf libintl_sprintf
+extern int sprintf (char *, const char *, ...);
+#undef vsprintf
+#define vsprintf libintl_vsprintf
+extern int vsprintf (char *, const char *, va_list);
+
+#if @HAVE_SNPRINTF@
+
+#undef snprintf
+#define snprintf libintl_snprintf
+extern int snprintf (char *, size_t, const char *, ...);
+#undef vsnprintf
+#define vsnprintf libintl_vsnprintf
+extern int vsnprintf (char *, size_t, const char *, va_list);
+
+#endif
+
+#if @HAVE_ASPRINTF@
+
+#undef asprintf
+#define asprintf libintl_asprintf
+extern int asprintf (char **, const char *, ...);
+#undef vasprintf
+#define vasprintf libintl_vasprintf
+extern int vasprintf (char **, const char *, va_list);
+
+#endif
+
+#if @HAVE_WPRINTF@
+
+#undef fwprintf
+#define fwprintf libintl_fwprintf
+extern int fwprintf (FILE *, const wchar_t *, ...);
+#undef vfwprintf
+#define vfwprintf libintl_vfwprintf
+extern int vfwprintf (FILE *, const wchar_t *, va_list);
+
+#undef wprintf
+#define wprintf libintl_wprintf
+extern int wprintf (const wchar_t *, ...);
+#undef vwprintf
+#define vwprintf libintl_vwprintf
+extern int vwprintf (const wchar_t *, va_list);
+
+#undef swprintf
+#define swprintf libintl_swprintf
+extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
+#undef vswprintf
+#define vswprintf libintl_vswprintf
+extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
+
+#endif
+
+#endif
+
+
+/* Support for relocatable packages.  */
+
+/* Sets the original and the current installation prefix of the package.
+   Relocation simply replaces a pathname starting with the original prefix
+   by the corresponding pathname with the current prefix instead.  Both
+   prefixes should be directory names without trailing slash (i.e. use ""
+   instead of "/").  */
+#define libintl_set_relocation_prefix libintl_set_relocation_prefix
+extern void
+       libintl_set_relocation_prefix (const char *orig_prefix,
+                                     const char *curr_prefix);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* libintl.h */
diff --git a/intl/loadinfo.h b/intl/loadinfo.h
new file mode 100644 (file)
index 0000000..65e5ebd
--- /dev/null
@@ -0,0 +1,145 @@
+/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _LOADINFO_H
+#define _LOADINFO_H    1
+
+/* Declarations of locale dependent catalog lookup functions.
+   Implemented in
+
+     localealias.c    Possibly replace a locale name by another.
+     explodename.c    Split a locale name into its various fields.
+     l10nflist.c      Generate a list of filenames of possible message catalogs.
+     finddomain.c     Find and open the relevant message catalogs.
+
+   The main function _nl_find_domain() in finddomain.c is declared
+   in gettextP.h.
+ */
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+   almost always true or almost always false.  */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+/* Separator in PATH like lists of pathnames.  */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, OS/2, DOS */
+# define PATH_SEPARATOR ';'
+#else
+  /* Unix */
+# define PATH_SEPARATOR ':'
+#endif
+
+/* Encoding of locale name parts.  */
+#define CEN_REVISION           1
+#define CEN_SPONSOR            2
+#define CEN_SPECIAL            4
+#define XPG_NORM_CODESET       8
+#define XPG_CODESET            16
+#define TERRITORY              32
+#define CEN_AUDIENCE           64
+#define XPG_MODIFIER           128
+
+#define CEN_SPECIFIC   (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
+#define XPG_SPECIFIC   (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
+
+
+struct loaded_l10nfile
+{
+  const char *filename;
+  int decided;
+
+  const void *data;
+
+  struct loaded_l10nfile *next;
+  struct loaded_l10nfile *successor[1];
+};
+
+
+/* Normalize codeset name.  There is no standard for the codeset
+   names.  Normalization allows the user to use any of the common
+   names.  The return value is dynamically allocated and has to be
+   freed by the caller.  */
+extern const char *_nl_normalize_codeset (const char *codeset,
+                                         size_t name_len);
+
+/* Lookup a locale dependent file.
+   *L10NFILE_LIST denotes a pool of lookup results of locale dependent
+   files of the same kind, sorted in decreasing order of ->filename.
+   DIRLIST and DIRLIST_LEN are an argz list of directories in which to
+   look, containing at least one directory (i.e. DIRLIST_LEN > 0).
+   MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
+   SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
+   produced by _nl_explode_name().  FILENAME is the filename suffix.
+   The return value is the lookup result, either found in *L10NFILE_LIST,
+   or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
+   If the return value is non-NULL, it is added to *L10NFILE_LIST, and
+   its ->next field denotes the chaining inside *L10NFILE_LIST, and
+   furthermore its ->successor[] field contains a list of other lookup
+   results from which this lookup result inherits.  */
+extern struct loaded_l10nfile *
+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
+                   const char *dirlist, size_t dirlist_len, int mask,
+                   const char *language, const char *territory,
+                   const char *codeset, const char *normalized_codeset,
+                   const char *modifier, const char *special,
+                   const char *sponsor, const char *revision,
+                   const char *filename, int do_allocate);
+
+/* Lookup the real locale name for a locale alias NAME, or NULL if
+   NAME is not a locale alias (but possibly a real locale name).
+   The return value is statically allocated and must not be freed.  */
+extern const char *_nl_expand_alias (const char *name);
+
+/* Split a locale name NAME into its pieces: language, modifier,
+   territory, codeset, special, sponsor, revision.
+   NAME gets destructively modified: NUL bytes are inserted here and
+   there.  *LANGUAGE gets assigned NAME.  Each of *MODIFIER, *TERRITORY,
+   *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
+   pointer into the old NAME string, or NULL.  *NORMALIZED_CODESET
+   gets assigned the expanded *CODESET, if it is different from *CODESET;
+   this one is dynamically allocated and has to be freed by the caller.
+   The return value is a bitmask, where each bit corresponds to one
+   filled-in value:
+     XPG_MODIFIER, CEN_AUDIENCE  for *MODIFIER,
+     TERRITORY                   for *TERRITORY,
+     XPG_CODESET                 for *CODESET,
+     XPG_NORM_CODESET            for *NORMALIZED_CODESET,
+     CEN_SPECIAL                 for *SPECIAL,
+     CEN_SPONSOR                 for *SPONSOR,
+     CEN_REVISION                for *REVISION.
+ */
+extern int _nl_explode_name (char *name, const char **language,
+                            const char **modifier, const char **territory,
+                            const char **codeset,
+                            const char **normalized_codeset,
+                            const char **special, const char **sponsor,
+                            const char **revision);
+
+/* Split a locale name NAME into a leading language part and all the
+   rest.  Return a pointer to the first character after the language,
+   i.e. to the first byte of the rest.  */
+extern char *_nl_find_language (const char *name);
+
+#endif /* loadinfo.h */
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
new file mode 100644 (file)
index 0000000..99c51b4
--- /dev/null
@@ -0,0 +1,1420 @@
+/* Load needed message catalogs.
+   Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE    1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef __GNUC__
+# undef  alloca
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#ifdef _LIBC
+# include <langinfo.h>
+# include <locale.h>
+#endif
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+    || (defined _LIBC && defined _POSIX_MAPPED_FILES)
+# include <sys/mman.h>
+# undef HAVE_MMAP
+# define HAVE_MMAP     1
+#else
+# undef HAVE_MMAP
+#endif
+
+#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
+# include <stdint.h>
+#endif
+#if defined HAVE_INTTYPES_H || defined _LIBC
+# include <inttypes.h>
+#endif
+
+#include "gmo.h"
+#include "gettextP.h"
+#include "hash-string.h"
+#include "plural-exp.h"
+
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+#endif
+
+/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
+   Note that our fallback values need not be literal strings, because we don't
+   use them with preprocessor string concatenation.  */
+#if !defined PRId8 || PRI_MACROS_BROKEN
+# undef PRId8
+# define PRId8 "d"
+#endif
+#if !defined PRIi8 || PRI_MACROS_BROKEN
+# undef PRIi8
+# define PRIi8 "i"
+#endif
+#if !defined PRIo8 || PRI_MACROS_BROKEN
+# undef PRIo8
+# define PRIo8 "o"
+#endif
+#if !defined PRIu8 || PRI_MACROS_BROKEN
+# undef PRIu8
+# define PRIu8 "u"
+#endif
+#if !defined PRIx8 || PRI_MACROS_BROKEN
+# undef PRIx8
+# define PRIx8 "x"
+#endif
+#if !defined PRIX8 || PRI_MACROS_BROKEN
+# undef PRIX8
+# define PRIX8 "X"
+#endif
+#if !defined PRId16 || PRI_MACROS_BROKEN
+# undef PRId16
+# define PRId16 "d"
+#endif
+#if !defined PRIi16 || PRI_MACROS_BROKEN
+# undef PRIi16
+# define PRIi16 "i"
+#endif
+#if !defined PRIo16 || PRI_MACROS_BROKEN
+# undef PRIo16
+# define PRIo16 "o"
+#endif
+#if !defined PRIu16 || PRI_MACROS_BROKEN
+# undef PRIu16
+# define PRIu16 "u"
+#endif
+#if !defined PRIx16 || PRI_MACROS_BROKEN
+# undef PRIx16
+# define PRIx16 "x"
+#endif
+#if !defined PRIX16 || PRI_MACROS_BROKEN
+# undef PRIX16
+# define PRIX16 "X"
+#endif
+#if !defined PRId32 || PRI_MACROS_BROKEN
+# undef PRId32
+# define PRId32 "d"
+#endif
+#if !defined PRIi32 || PRI_MACROS_BROKEN
+# undef PRIi32
+# define PRIi32 "i"
+#endif
+#if !defined PRIo32 || PRI_MACROS_BROKEN
+# undef PRIo32
+# define PRIo32 "o"
+#endif
+#if !defined PRIu32 || PRI_MACROS_BROKEN
+# undef PRIu32
+# define PRIu32 "u"
+#endif
+#if !defined PRIx32 || PRI_MACROS_BROKEN
+# undef PRIx32
+# define PRIx32 "x"
+#endif
+#if !defined PRIX32 || PRI_MACROS_BROKEN
+# undef PRIX32
+# define PRIX32 "X"
+#endif
+#if !defined PRId64 || PRI_MACROS_BROKEN
+# undef PRId64
+# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
+#endif
+#if !defined PRIi64 || PRI_MACROS_BROKEN
+# undef PRIi64
+# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
+#endif
+#if !defined PRIo64 || PRI_MACROS_BROKEN
+# undef PRIo64
+# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
+#endif
+#if !defined PRIu64 || PRI_MACROS_BROKEN
+# undef PRIu64
+# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
+#endif
+#if !defined PRIx64 || PRI_MACROS_BROKEN
+# undef PRIx64
+# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
+#endif
+#if !defined PRIX64 || PRI_MACROS_BROKEN
+# undef PRIX64
+# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
+#endif
+#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
+# undef PRIdLEAST8
+# define PRIdLEAST8 "d"
+#endif
+#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
+# undef PRIiLEAST8
+# define PRIiLEAST8 "i"
+#endif
+#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
+# undef PRIoLEAST8
+# define PRIoLEAST8 "o"
+#endif
+#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
+# undef PRIuLEAST8
+# define PRIuLEAST8 "u"
+#endif
+#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
+# undef PRIxLEAST8
+# define PRIxLEAST8 "x"
+#endif
+#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
+# undef PRIXLEAST8
+# define PRIXLEAST8 "X"
+#endif
+#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
+# undef PRIdLEAST16
+# define PRIdLEAST16 "d"
+#endif
+#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
+# undef PRIiLEAST16
+# define PRIiLEAST16 "i"
+#endif
+#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
+# undef PRIoLEAST16
+# define PRIoLEAST16 "o"
+#endif
+#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
+# undef PRIuLEAST16
+# define PRIuLEAST16 "u"
+#endif
+#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
+# undef PRIxLEAST16
+# define PRIxLEAST16 "x"
+#endif
+#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
+# undef PRIXLEAST16
+# define PRIXLEAST16 "X"
+#endif
+#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
+# undef PRIdLEAST32
+# define PRIdLEAST32 "d"
+#endif
+#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
+# undef PRIiLEAST32
+# define PRIiLEAST32 "i"
+#endif
+#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
+# undef PRIoLEAST32
+# define PRIoLEAST32 "o"
+#endif
+#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
+# undef PRIuLEAST32
+# define PRIuLEAST32 "u"
+#endif
+#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
+# undef PRIxLEAST32
+# define PRIxLEAST32 "x"
+#endif
+#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
+# undef PRIXLEAST32
+# define PRIXLEAST32 "X"
+#endif
+#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
+# undef PRIdLEAST64
+# define PRIdLEAST64 PRId64
+#endif
+#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
+# undef PRIiLEAST64
+# define PRIiLEAST64 PRIi64
+#endif
+#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
+# undef PRIoLEAST64
+# define PRIoLEAST64 PRIo64
+#endif
+#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
+# undef PRIuLEAST64
+# define PRIuLEAST64 PRIu64
+#endif
+#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
+# undef PRIxLEAST64
+# define PRIxLEAST64 PRIx64
+#endif
+#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
+# undef PRIXLEAST64
+# define PRIXLEAST64 PRIX64
+#endif
+#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
+# undef PRIdFAST8
+# define PRIdFAST8 "d"
+#endif
+#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
+# undef PRIiFAST8
+# define PRIiFAST8 "i"
+#endif
+#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
+# undef PRIoFAST8
+# define PRIoFAST8 "o"
+#endif
+#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
+# undef PRIuFAST8
+# define PRIuFAST8 "u"
+#endif
+#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
+# undef PRIxFAST8
+# define PRIxFAST8 "x"
+#endif
+#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
+# undef PRIXFAST8
+# define PRIXFAST8 "X"
+#endif
+#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
+# undef PRIdFAST16
+# define PRIdFAST16 "d"
+#endif
+#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
+# undef PRIiFAST16
+# define PRIiFAST16 "i"
+#endif
+#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
+# undef PRIoFAST16
+# define PRIoFAST16 "o"
+#endif
+#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
+# undef PRIuFAST16
+# define PRIuFAST16 "u"
+#endif
+#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
+# undef PRIxFAST16
+# define PRIxFAST16 "x"
+#endif
+#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
+# undef PRIXFAST16
+# define PRIXFAST16 "X"
+#endif
+#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
+# undef PRIdFAST32
+# define PRIdFAST32 "d"
+#endif
+#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
+# undef PRIiFAST32
+# define PRIiFAST32 "i"
+#endif
+#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
+# undef PRIoFAST32
+# define PRIoFAST32 "o"
+#endif
+#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
+# undef PRIuFAST32
+# define PRIuFAST32 "u"
+#endif
+#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
+# undef PRIxFAST32
+# define PRIxFAST32 "x"
+#endif
+#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
+# undef PRIXFAST32
+# define PRIXFAST32 "X"
+#endif
+#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
+# undef PRIdFAST64
+# define PRIdFAST64 PRId64
+#endif
+#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
+# undef PRIiFAST64
+# define PRIiFAST64 PRIi64
+#endif
+#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
+# undef PRIoFAST64
+# define PRIoFAST64 PRIo64
+#endif
+#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
+# undef PRIuFAST64
+# define PRIuFAST64 PRIu64
+#endif
+#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
+# undef PRIxFAST64
+# define PRIxFAST64 PRIx64
+#endif
+#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
+# undef PRIXFAST64
+# define PRIXFAST64 PRIX64
+#endif
+#if !defined PRIdMAX || PRI_MACROS_BROKEN
+# undef PRIdMAX
+# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
+#endif
+#if !defined PRIiMAX || PRI_MACROS_BROKEN
+# undef PRIiMAX
+# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
+#endif
+#if !defined PRIoMAX || PRI_MACROS_BROKEN
+# undef PRIoMAX
+# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
+#endif
+#if !defined PRIuMAX || PRI_MACROS_BROKEN
+# undef PRIuMAX
+# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
+#endif
+#if !defined PRIxMAX || PRI_MACROS_BROKEN
+# undef PRIxMAX
+# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
+#endif
+#if !defined PRIXMAX || PRI_MACROS_BROKEN
+# undef PRIXMAX
+# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
+#endif
+#if !defined PRIdPTR || PRI_MACROS_BROKEN
+# undef PRIdPTR
+# define PRIdPTR \
+  (sizeof (void *) == sizeof (long) ? "ld" : \
+   sizeof (void *) == sizeof (int) ? "d" : \
+   "lld")
+#endif
+#if !defined PRIiPTR || PRI_MACROS_BROKEN
+# undef PRIiPTR
+# define PRIiPTR \
+  (sizeof (void *) == sizeof (long) ? "li" : \
+   sizeof (void *) == sizeof (int) ? "i" : \
+   "lli")
+#endif
+#if !defined PRIoPTR || PRI_MACROS_BROKEN
+# undef PRIoPTR
+# define PRIoPTR \
+  (sizeof (void *) == sizeof (long) ? "lo" : \
+   sizeof (void *) == sizeof (int) ? "o" : \
+   "llo")
+#endif
+#if !defined PRIuPTR || PRI_MACROS_BROKEN
+# undef PRIuPTR
+# define PRIuPTR \
+  (sizeof (void *) == sizeof (long) ? "lu" : \
+   sizeof (void *) == sizeof (int) ? "u" : \
+   "llu")
+#endif
+#if !defined PRIxPTR || PRI_MACROS_BROKEN
+# undef PRIxPTR
+# define PRIxPTR \
+  (sizeof (void *) == sizeof (long) ? "lx" : \
+   sizeof (void *) == sizeof (int) ? "x" : \
+   "llx")
+#endif
+#if !defined PRIXPTR || PRI_MACROS_BROKEN
+# undef PRIXPTR
+# define PRIXPTR \
+  (sizeof (void *) == sizeof (long) ? "lX" : \
+   sizeof (void *) == sizeof (int) ? "X" : \
+   "llX")
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ISO C functions.  This is required by the standard
+   because some ISO C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# define open   __open
+# define close  __close
+# define read   __read
+# define mmap   __mmap
+# define munmap __munmap
+#endif
+
+/* For those losing systems which don't have `alloca' we have to add
+   some additional code emulating it.  */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
+/* For systems that distinguish between text and binary I/O.
+   O_BINARY is usually declared in <fcntl.h>. */
+#if !defined O_BINARY && defined _O_BINARY
+  /* For MSC-compatible compilers.  */
+# define O_BINARY _O_BINARY
+# define O_TEXT _O_TEXT
+#endif
+#ifdef __BEOS__
+  /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect.  */
+# undef O_BINARY
+# undef O_TEXT
+#endif
+/* On reasonable systems, binary I/O is the default.  */
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
+
+/* We need a sign, whether a new catalog was loaded, which can be associated
+   with all translations.  This is important if the translations are
+   cached by one of GCC's features.  */
+int _nl_msg_cat_cntr;
+
+
+/* Expand a system dependent string segment.  Return NULL if unsupported.  */
+static const char *
+get_sysdep_segment_value (const char *name)
+{
+  /* Test for an ISO C 99 section 7.8.1 format string directive.
+     Syntax:
+     P R I { d | i | o | u | x | X }
+     { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR }  */
+  /* We don't use a table of 14 times 6 'const char *' strings here, because
+     data relocations cost startup time.  */
+  if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
+    {
+      if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
+         || name[3] == 'x' || name[3] == 'X')
+       {
+         if (name[4] == '8' && name[5] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRId8;
+             if (name[3] == 'i')
+               return PRIi8;
+             if (name[3] == 'o')
+               return PRIo8;
+             if (name[3] == 'u')
+               return PRIu8;
+             if (name[3] == 'x')
+               return PRIx8;
+             if (name[3] == 'X')
+               return PRIX8;
+             abort ();
+           }
+         if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRId16;
+             if (name[3] == 'i')
+               return PRIi16;
+             if (name[3] == 'o')
+               return PRIo16;
+             if (name[3] == 'u')
+               return PRIu16;
+             if (name[3] == 'x')
+               return PRIx16;
+             if (name[3] == 'X')
+               return PRIX16;
+             abort ();
+           }
+         if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRId32;
+             if (name[3] == 'i')
+               return PRIi32;
+             if (name[3] == 'o')
+               return PRIo32;
+             if (name[3] == 'u')
+               return PRIu32;
+             if (name[3] == 'x')
+               return PRIx32;
+             if (name[3] == 'X')
+               return PRIX32;
+             abort ();
+           }
+         if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRId64;
+             if (name[3] == 'i')
+               return PRIi64;
+             if (name[3] == 'o')
+               return PRIo64;
+             if (name[3] == 'u')
+               return PRIu64;
+             if (name[3] == 'x')
+               return PRIx64;
+             if (name[3] == 'X')
+               return PRIX64;
+             abort ();
+           }
+         if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
+             && name[7] == 'S' && name[8] == 'T')
+           {
+             if (name[9] == '8' && name[10] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdLEAST8;
+                 if (name[3] == 'i')
+                   return PRIiLEAST8;
+                 if (name[3] == 'o')
+                   return PRIoLEAST8;
+                 if (name[3] == 'u')
+                   return PRIuLEAST8;
+                 if (name[3] == 'x')
+                   return PRIxLEAST8;
+                 if (name[3] == 'X')
+                   return PRIXLEAST8;
+                 abort ();
+               }
+             if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdLEAST16;
+                 if (name[3] == 'i')
+                   return PRIiLEAST16;
+                 if (name[3] == 'o')
+                   return PRIoLEAST16;
+                 if (name[3] == 'u')
+                   return PRIuLEAST16;
+                 if (name[3] == 'x')
+                   return PRIxLEAST16;
+                 if (name[3] == 'X')
+                   return PRIXLEAST16;
+                 abort ();
+               }
+             if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdLEAST32;
+                 if (name[3] == 'i')
+                   return PRIiLEAST32;
+                 if (name[3] == 'o')
+                   return PRIoLEAST32;
+                 if (name[3] == 'u')
+                   return PRIuLEAST32;
+                 if (name[3] == 'x')
+                   return PRIxLEAST32;
+                 if (name[3] == 'X')
+                   return PRIXLEAST32;
+                 abort ();
+               }
+             if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdLEAST64;
+                 if (name[3] == 'i')
+                   return PRIiLEAST64;
+                 if (name[3] == 'o')
+                   return PRIoLEAST64;
+                 if (name[3] == 'u')
+                   return PRIuLEAST64;
+                 if (name[3] == 'x')
+                   return PRIxLEAST64;
+                 if (name[3] == 'X')
+                   return PRIXLEAST64;
+                 abort ();
+               }
+           }
+         if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
+             && name[7] == 'T')
+           {
+             if (name[8] == '8' && name[9] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdFAST8;
+                 if (name[3] == 'i')
+                   return PRIiFAST8;
+                 if (name[3] == 'o')
+                   return PRIoFAST8;
+                 if (name[3] == 'u')
+                   return PRIuFAST8;
+                 if (name[3] == 'x')
+                   return PRIxFAST8;
+                 if (name[3] == 'X')
+                   return PRIXFAST8;
+                 abort ();
+               }
+             if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdFAST16;
+                 if (name[3] == 'i')
+                   return PRIiFAST16;
+                 if (name[3] == 'o')
+                   return PRIoFAST16;
+                 if (name[3] == 'u')
+                   return PRIuFAST16;
+                 if (name[3] == 'x')
+                   return PRIxFAST16;
+                 if (name[3] == 'X')
+                   return PRIXFAST16;
+                 abort ();
+               }
+             if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdFAST32;
+                 if (name[3] == 'i')
+                   return PRIiFAST32;
+                 if (name[3] == 'o')
+                   return PRIoFAST32;
+                 if (name[3] == 'u')
+                   return PRIuFAST32;
+                 if (name[3] == 'x')
+                   return PRIxFAST32;
+                 if (name[3] == 'X')
+                   return PRIXFAST32;
+                 abort ();
+               }
+             if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
+               {
+                 if (name[3] == 'd')
+                   return PRIdFAST64;
+                 if (name[3] == 'i')
+                   return PRIiFAST64;
+                 if (name[3] == 'o')
+                   return PRIoFAST64;
+                 if (name[3] == 'u')
+                   return PRIuFAST64;
+                 if (name[3] == 'x')
+                   return PRIxFAST64;
+                 if (name[3] == 'X')
+                   return PRIXFAST64;
+                 abort ();
+               }
+           }
+         if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
+             && name[7] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRIdMAX;
+             if (name[3] == 'i')
+               return PRIiMAX;
+             if (name[3] == 'o')
+               return PRIoMAX;
+             if (name[3] == 'u')
+               return PRIuMAX;
+             if (name[3] == 'x')
+               return PRIxMAX;
+             if (name[3] == 'X')
+               return PRIXMAX;
+             abort ();
+           }
+         if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
+             && name[7] == '\0')
+           {
+             if (name[3] == 'd')
+               return PRIdPTR;
+             if (name[3] == 'i')
+               return PRIiPTR;
+             if (name[3] == 'o')
+               return PRIoPTR;
+             if (name[3] == 'u')
+               return PRIuPTR;
+             if (name[3] == 'x')
+               return PRIxPTR;
+             if (name[3] == 'X')
+               return PRIXPTR;
+             abort ();
+           }
+       }
+    }
+  /* Test for a glibc specific printf() format directive flag.  */
+  if (name[0] == 'I' && name[1] == '\0')
+    {
+#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+      /* The 'I' flag, in numeric format directives, replaces ASCII digits
+        with the 'outdigits' defined in the LC_CTYPE locale facet.  This is
+        used for Farsi (Persian) and maybe Arabic.  */
+      return "I";
+#else
+      return "";
+#endif
+    }
+  /* Other system dependent strings are not valid.  */
+  return NULL;
+}
+
+/* Initialize the codeset dependent parts of an opened message catalog.
+   Return the header entry.  */
+const char *
+internal_function
+_nl_init_domain_conv (struct loaded_l10nfile *domain_file,
+                     struct loaded_domain *domain,
+                     struct binding *domainbinding)
+{
+  /* Find out about the character set the file is encoded with.
+     This can be found (in textual form) in the entry "".  If this
+     entry does not exist or if this does not contain the `charset='
+     information, we will assume the charset matches the one the
+     current locale and we don't have to perform any conversion.  */
+  char *nullentry;
+  size_t nullentrylen;
+
+  /* Preinitialize fields, to avoid recursion during _nl_find_msg.  */
+  domain->codeset_cntr =
+    (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
+#ifdef _LIBC
+  domain->conv = (__gconv_t) -1;
+#else
+# if HAVE_ICONV
+  domain->conv = (iconv_t) -1;
+# endif
+#endif
+  domain->conv_tab = NULL;
+
+  /* Get the header entry.  */
+  nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
+
+  if (nullentry != NULL)
+    {
+#if defined _LIBC || HAVE_ICONV
+      const char *charsetstr;
+
+      charsetstr = strstr (nullentry, "charset=");
+      if (charsetstr != NULL)
+       {
+         size_t len;
+         char *charset;
+         const char *outcharset;
+
+         charsetstr += strlen ("charset=");
+         len = strcspn (charsetstr, " \t\n");
+
+         charset = (char *) alloca (len + 1);
+# if defined _LIBC || HAVE_MEMPCPY
+         *((char *) mempcpy (charset, charsetstr, len)) = '\0';
+# else
+         memcpy (charset, charsetstr, len);
+         charset[len] = '\0';
+# endif
+
+         /* The output charset should normally be determined by the
+            locale.  But sometimes the locale is not used or not correctly
+            set up, so we provide a possibility for the user to override
+            this.  Moreover, the value specified through
+            bind_textdomain_codeset overrides both.  */
+         if (domainbinding != NULL && domainbinding->codeset != NULL)
+           outcharset = domainbinding->codeset;
+         else
+           {
+             outcharset = getenv ("OUTPUT_CHARSET");
+             if (outcharset == NULL || outcharset[0] == '\0')
+               {
+# ifdef _LIBC
+                 outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
+# else
+#  if HAVE_ICONV
+                 extern const char *locale_charset (void);
+                 outcharset = locale_charset ();
+#  endif
+# endif
+               }
+           }
+
+# ifdef _LIBC
+         /* We always want to use transliteration.  */
+         outcharset = norm_add_slashes (outcharset, "TRANSLIT");
+         charset = norm_add_slashes (charset, NULL);
+         if (__gconv_open (outcharset, charset, &domain->conv,
+                           GCONV_AVOID_NOCONV)
+             != __GCONV_OK)
+           domain->conv = (__gconv_t) -1;
+# else
+#  if HAVE_ICONV
+         /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
+            we want to use transliteration.  */
+#   if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
+       || _LIBICONV_VERSION >= 0x0105
+         if (strchr (outcharset, '/') == NULL)
+           {
+             char *tmp;
+
+             len = strlen (outcharset);
+             tmp = (char *) alloca (len + 10 + 1);
+             memcpy (tmp, outcharset, len);
+             memcpy (tmp + len, "//TRANSLIT", 10 + 1);
+             outcharset = tmp;
+
+             domain->conv = iconv_open (outcharset, charset);
+
+             freea (outcharset);
+           }
+         else
+#   endif
+           domain->conv = iconv_open (outcharset, charset);
+#  endif
+# endif
+
+         freea (charset);
+       }
+#endif /* _LIBC || HAVE_ICONV */
+    }
+
+  return nullentry;
+}
+
+/* Frees the codeset dependent parts of an opened message catalog.  */
+void
+internal_function
+_nl_free_domain_conv (struct loaded_domain *domain)
+{
+  if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
+    free (domain->conv_tab);
+
+#ifdef _LIBC
+  if (domain->conv != (__gconv_t) -1)
+    __gconv_close (domain->conv);
+#else
+# if HAVE_ICONV
+  if (domain->conv != (iconv_t) -1)
+    iconv_close (domain->conv);
+# endif
+#endif
+}
+
+/* Load the message catalogs specified by FILENAME.  If it is no valid
+   message catalog do nothing.  */
+void
+internal_function
+_nl_load_domain (struct loaded_l10nfile *domain_file,
+                struct binding *domainbinding)
+{
+  int fd;
+  size_t size;
+#ifdef _LIBC
+  struct stat64 st;
+#else
+  struct stat st;
+#endif
+  struct mo_file_header *data = (struct mo_file_header *) -1;
+  int use_mmap = 0;
+  struct loaded_domain *domain;
+  int revision;
+  const char *nullentry;
+
+  domain_file->decided = 1;
+  domain_file->data = NULL;
+
+  /* Note that it would be useless to store domainbinding in domain_file
+     because domainbinding might be == NULL now but != NULL later (after
+     a call to bind_textdomain_codeset).  */
+
+  /* If the record does not represent a valid locale the FILENAME
+     might be NULL.  This can happen when according to the given
+     specification the locale file name is different for XPG and CEN
+     syntax.  */
+  if (domain_file->filename == NULL)
+    return;
+
+  /* Try to open the addressed file.  */
+  fd = open (domain_file->filename, O_RDONLY | O_BINARY);
+  if (fd == -1)
+    return;
+
+  /* We must know about the size of the file.  */
+  if (
+#ifdef _LIBC
+      __builtin_expect (fstat64 (fd, &st) != 0, 0)
+#else
+      __builtin_expect (fstat (fd, &st) != 0, 0)
+#endif
+      || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
+      || __builtin_expect (size < sizeof (struct mo_file_header), 0))
+    {
+      /* Something went wrong.  */
+      close (fd);
+      return;
+    }
+
+#ifdef HAVE_MMAP
+  /* Now we are ready to load the file.  If mmap() is available we try
+     this first.  If not available or it failed we try to load it.  */
+  data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
+                                        MAP_PRIVATE, fd, 0);
+
+  if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
+    {
+      /* mmap() call was successful.  */
+      close (fd);
+      use_mmap = 1;
+    }
+#endif
+
+  /* If the data is not yet available (i.e. mmap'ed) we try to load
+     it manually.  */
+  if (data == (struct mo_file_header *) -1)
+    {
+      size_t to_read;
+      char *read_ptr;
+
+      data = (struct mo_file_header *) malloc (size);
+      if (data == NULL)
+       return;
+
+      to_read = size;
+      read_ptr = (char *) data;
+      do
+       {
+         long int nb = (long int) read (fd, read_ptr, to_read);
+         if (nb <= 0)
+           {
+#ifdef EINTR
+             if (nb == -1 && errno == EINTR)
+               continue;
+#endif
+             close (fd);
+             return;
+           }
+         read_ptr += nb;
+         to_read -= nb;
+       }
+      while (to_read > 0);
+
+      close (fd);
+    }
+
+  /* Using the magic number we can test whether it really is a message
+     catalog file.  */
+  if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
+                       0))
+    {
+      /* The magic number is wrong: not a message catalog file.  */
+#ifdef HAVE_MMAP
+      if (use_mmap)
+       munmap ((caddr_t) data, size);
+      else
+#endif
+       free (data);
+      return;
+    }
+
+  domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
+  if (domain == NULL)
+    return;
+  domain_file->data = domain;
+
+  domain->data = (char *) data;
+  domain->use_mmap = use_mmap;
+  domain->mmap_size = size;
+  domain->must_swap = data->magic != _MAGIC;
+  domain->malloced = NULL;
+
+  /* Fill in the information about the available tables.  */
+  revision = W (domain->must_swap, data->revision);
+  /* We support only the major revisions 0 and 1.  */
+  switch (revision >> 16)
+    {
+    case 0:
+    case 1:
+      domain->nstrings = W (domain->must_swap, data->nstrings);
+      domain->orig_tab = (const struct string_desc *)
+       ((char *) data + W (domain->must_swap, data->orig_tab_offset));
+      domain->trans_tab = (const struct string_desc *)
+       ((char *) data + W (domain->must_swap, data->trans_tab_offset));
+      domain->hash_size = W (domain->must_swap, data->hash_tab_size);
+      domain->hash_tab =
+       (domain->hash_size > 2
+        ? (const nls_uint32 *)
+          ((char *) data + W (domain->must_swap, data->hash_tab_offset))
+        : NULL);
+      domain->must_swap_hash_tab = domain->must_swap;
+
+      /* Now dispatch on the minor revision.  */
+      switch (revision & 0xffff)
+       {
+       case 0:
+         domain->n_sysdep_strings = 0;
+         domain->orig_sysdep_tab = NULL;
+         domain->trans_sysdep_tab = NULL;
+         break;
+       case 1:
+       default:
+         {
+           nls_uint32 n_sysdep_strings;
+
+           if (domain->hash_tab == NULL)
+             /* This is invalid.  These minor revisions need a hash table.  */
+             goto invalid;
+
+           n_sysdep_strings =
+             W (domain->must_swap, data->n_sysdep_strings);
+           if (n_sysdep_strings > 0)
+             {
+               nls_uint32 n_sysdep_segments;
+               const struct sysdep_segment *sysdep_segments;
+               const char **sysdep_segment_values;
+               const nls_uint32 *orig_sysdep_tab;
+               const nls_uint32 *trans_sysdep_tab;
+               nls_uint32 n_inmem_sysdep_strings;
+               size_t memneed;
+               char *mem;
+               struct sysdep_string_desc *inmem_orig_sysdep_tab;
+               struct sysdep_string_desc *inmem_trans_sysdep_tab;
+               nls_uint32 *inmem_hash_tab;
+               unsigned int i, j;
+
+               /* Get the values of the system dependent segments.  */
+               n_sysdep_segments =
+                 W (domain->must_swap, data->n_sysdep_segments);
+               sysdep_segments = (const struct sysdep_segment *)
+                 ((char *) data
+                  + W (domain->must_swap, data->sysdep_segments_offset));
+               sysdep_segment_values =
+                 alloca (n_sysdep_segments * sizeof (const char *));
+               for (i = 0; i < n_sysdep_segments; i++)
+                 {
+                   const char *name =
+                     (char *) data
+                     + W (domain->must_swap, sysdep_segments[i].offset);
+                   nls_uint32 namelen =
+                     W (domain->must_swap, sysdep_segments[i].length);
+
+                   if (!(namelen > 0 && name[namelen - 1] == '\0'))
+                     {
+                       freea (sysdep_segment_values);
+                       goto invalid;
+                     }
+
+                   sysdep_segment_values[i] = get_sysdep_segment_value (name);
+                 }
+
+               orig_sysdep_tab = (const nls_uint32 *)
+                 ((char *) data
+                  + W (domain->must_swap, data->orig_sysdep_tab_offset));
+               trans_sysdep_tab = (const nls_uint32 *)
+                 ((char *) data
+                  + W (domain->must_swap, data->trans_sysdep_tab_offset));
+
+               /* Compute the amount of additional memory needed for the
+                  system dependent strings and the augmented hash table.
+                  At the same time, also drop string pairs which refer to
+                  an undefined system dependent segment.  */
+               n_inmem_sysdep_strings = 0;
+               memneed = domain->hash_size * sizeof (nls_uint32);
+               for (i = 0; i < n_sysdep_strings; i++)
+                 {
+                   int valid = 1;
+                   size_t needs[2];
+
+                   for (j = 0; j < 2; j++)
+                     {
+                       const struct sysdep_string *sysdep_string =
+                         (const struct sysdep_string *)
+                         ((char *) data
+                          + W (domain->must_swap,
+                               j == 0
+                               ? orig_sysdep_tab[i]
+                               : trans_sysdep_tab[i]));
+                       size_t need = 0;
+                       const struct segment_pair *p = sysdep_string->segments;
+
+                       if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
+                         for (p = sysdep_string->segments;; p++)
+                           {
+                             nls_uint32 sysdepref;
+
+                             need += W (domain->must_swap, p->segsize);
+
+                             sysdepref = W (domain->must_swap, p->sysdepref);
+                             if (sysdepref == SEGMENTS_END)
+                               break;
+
+                             if (sysdepref >= n_sysdep_segments)
+                               {
+                                 /* Invalid.  */
+                                 freea (sysdep_segment_values);
+                                 goto invalid;
+                               }
+
+                             if (sysdep_segment_values[sysdepref] == NULL)
+                               {
+                                 /* This particular string pair is invalid.  */
+                                 valid = 0;
+                                 break;
+                               }
+
+                             need += strlen (sysdep_segment_values[sysdepref]);
+                           }
+
+                       needs[j] = need;
+                       if (!valid)
+                         break;
+                     }
+
+                   if (valid)
+                     {
+                       n_inmem_sysdep_strings++;
+                       memneed += needs[0] + needs[1];
+                     }
+                 }
+               memneed += 2 * n_inmem_sysdep_strings
+                          * sizeof (struct sysdep_string_desc);
+
+               if (n_inmem_sysdep_strings > 0)
+                 {
+                   unsigned int k;
+
+                   /* Allocate additional memory.  */
+                   mem = (char *) malloc (memneed);
+                   if (mem == NULL)
+                     goto invalid;
+
+                   domain->malloced = mem;
+                   inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
+                   mem += n_inmem_sysdep_strings
+                          * sizeof (struct sysdep_string_desc);
+                   inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
+                   mem += n_inmem_sysdep_strings
+                          * sizeof (struct sysdep_string_desc);
+                   inmem_hash_tab = (nls_uint32 *) mem;
+                   mem += domain->hash_size * sizeof (nls_uint32);
+
+                   /* Compute the system dependent strings.  */
+                   k = 0;
+                   for (i = 0; i < n_sysdep_strings; i++)
+                     {
+                       int valid = 1;
+
+                       for (j = 0; j < 2; j++)
+                         {
+                           const struct sysdep_string *sysdep_string =
+                             (const struct sysdep_string *)
+                             ((char *) data
+                              + W (domain->must_swap,
+                                   j == 0
+                                   ? orig_sysdep_tab[i]
+                                   : trans_sysdep_tab[i]));
+                           const struct segment_pair *p =
+                             sysdep_string->segments;
+
+                           if (W (domain->must_swap, p->sysdepref)
+                               != SEGMENTS_END)
+                             for (p = sysdep_string->segments;; p++)
+                               {
+                                 nls_uint32 sysdepref;
+
+                                 sysdepref =
+                                   W (domain->must_swap, p->sysdepref);
+                                 if (sysdepref == SEGMENTS_END)
+                                   break;
+
+                                 if (sysdep_segment_values[sysdepref] == NULL)
+                                   {
+                                     /* This particular string pair is
+                                        invalid.  */
+                                     valid = 0;
+                                     break;
+                                   }
+                               }
+
+                           if (!valid)
+                             break;
+                         }
+
+                       if (valid)
+                         {
+                           for (j = 0; j < 2; j++)
+                             {
+                               const struct sysdep_string *sysdep_string =
+                                 (const struct sysdep_string *)
+                                 ((char *) data
+                                  + W (domain->must_swap,
+                                       j == 0
+                                       ? orig_sysdep_tab[i]
+                                       : trans_sysdep_tab[i]));
+                               const char *static_segments =
+                                 (char *) data
+                                 + W (domain->must_swap, sysdep_string->offset);
+                               const struct segment_pair *p =
+                                 sysdep_string->segments;
+
+                               /* Concatenate the segments, and fill
+                                  inmem_orig_sysdep_tab[k] (for j == 0) and
+                                  inmem_trans_sysdep_tab[k] (for j == 1).  */
+
+                               struct sysdep_string_desc *inmem_tab_entry =
+                                 (j == 0
+                                  ? inmem_orig_sysdep_tab
+                                  : inmem_trans_sysdep_tab)
+                                 + k;
+
+                               if (W (domain->must_swap, p->sysdepref)
+                                   == SEGMENTS_END)
+                                 {
+                                   /* Only one static segment.  */
+                                   inmem_tab_entry->length =
+                                     W (domain->must_swap, p->segsize);
+                                   inmem_tab_entry->pointer = static_segments;
+                                 }
+                               else
+                                 {
+                                   inmem_tab_entry->pointer = mem;
+
+                                   for (p = sysdep_string->segments;; p++)
+                                     {
+                                       nls_uint32 segsize =
+                                         W (domain->must_swap, p->segsize);
+                                       nls_uint32 sysdepref =
+                                         W (domain->must_swap, p->sysdepref);
+                                       size_t n;
+
+                                       if (segsize > 0)
+                                         {
+                                           memcpy (mem, static_segments, segsize);
+                                           mem += segsize;
+                                           static_segments += segsize;
+                                         }
+
+                                       if (sysdepref == SEGMENTS_END)
+                                         break;
+
+                                       n = strlen (sysdep_segment_values[sysdepref]);
+                                       memcpy (mem, sysdep_segment_values[sysdepref], n);
+                                       mem += n;
+                                     }
+
+                                   inmem_tab_entry->length =
+                                     mem - inmem_tab_entry->pointer;
+                                 }
+                             }
+
+                           k++;
+                         }
+                     }
+                   if (k != n_inmem_sysdep_strings)
+                     abort ();
+
+                   /* Compute the augmented hash table.  */
+                   for (i = 0; i < domain->hash_size; i++)
+                     inmem_hash_tab[i] =
+                       W (domain->must_swap_hash_tab, domain->hash_tab[i]);
+                   for (i = 0; i < n_inmem_sysdep_strings; i++)
+                     {
+                       const char *msgid = inmem_orig_sysdep_tab[i].pointer;
+                       nls_uint32 hash_val = hash_string (msgid);
+                       nls_uint32 idx = hash_val % domain->hash_size;
+                       nls_uint32 incr =
+                         1 + (hash_val % (domain->hash_size - 2));
+
+                       for (;;)
+                         {
+                           if (inmem_hash_tab[idx] == 0)
+                             {
+                               /* Hash table entry is empty.  Use it.  */
+                               inmem_hash_tab[idx] = 1 + domain->nstrings + i;
+                               break;
+                             }
+
+                           if (idx >= domain->hash_size - incr)
+                             idx -= domain->hash_size - incr;
+                           else
+                             idx += incr;
+                         }
+                     }
+
+                   domain->n_sysdep_strings = n_inmem_sysdep_strings;
+                   domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
+                   domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
+
+                   domain->hash_tab = inmem_hash_tab;
+                   domain->must_swap_hash_tab = 0;
+                 }
+               else
+                 {
+                   domain->n_sysdep_strings = 0;
+                   domain->orig_sysdep_tab = NULL;
+                   domain->trans_sysdep_tab = NULL;
+                 }
+
+               freea (sysdep_segment_values);
+             }
+           else
+             {
+               domain->n_sysdep_strings = 0;
+               domain->orig_sysdep_tab = NULL;
+               domain->trans_sysdep_tab = NULL;
+             }
+         }
+         break;
+       }
+      break;
+    default:
+      /* This is an invalid revision.  */
+    invalid:
+      /* This is an invalid .mo file.  */
+      if (domain->malloced)
+       free (domain->malloced);
+#ifdef HAVE_MMAP
+      if (use_mmap)
+       munmap ((caddr_t) data, size);
+      else
+#endif
+       free (data);
+      free (domain);
+      domain_file->data = NULL;
+      return;
+    }
+
+  /* Now initialize the character set converter from the character set
+     the file is encoded with (found in the header entry) to the domain's
+     specified character set or the locale's character set.  */
+  nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
+
+  /* Also look for a plural specification.  */
+  EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
+}
+
+
+#ifdef _LIBC
+void
+internal_function
+_nl_unload_domain (struct loaded_domain *domain)
+{
+  if (domain->plural != &__gettext_germanic_plural)
+    __gettext_free_exp (domain->plural);
+
+  _nl_free_domain_conv (domain);
+
+  if (domain->malloced)
+    free (domain->malloced);
+
+# ifdef _POSIX_MAPPED_FILES
+  if (domain->use_mmap)
+    munmap ((caddr_t) domain->data, domain->mmap_size);
+  else
+# endif        /* _POSIX_MAPPED_FILES */
+    free ((void *) domain->data);
+
+  free (domain);
+}
+#endif
diff --git a/intl/localcharset.c b/intl/localcharset.c
new file mode 100644 (file)
index 0000000..a3e52ef
--- /dev/null
@@ -0,0 +1,409 @@
+/* Determine a canonical name for the current locale's character encoding.
+
+   Copyright (C) 2000-2004 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification.  */
+#include "localcharset.h"
+
+#if HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+
+#include <stdio.h>
+#if HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# undef WIN32   /* avoid warning on mingw32 */
+# define WIN32
+#endif
+
+#if defined __EMX__
+/* Assume EMX program runs on OS/2, even if compiled under DOS.  */
+# define OS2
+#endif
+
+#if !defined WIN32
+# if HAVE_LANGINFO_CODESET
+#  include <langinfo.h>
+# else
+#  if HAVE_SETLOCALE
+#   include <locale.h>
+#  endif
+# endif
+#elif defined WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+#if defined OS2
+# define INCL_DOS
+# include <os2.h>
+#endif
+
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, Cygwin, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#endif
+
+#ifndef DIRECTORY_SEPARATOR
+# define DIRECTORY_SEPARATOR '/'
+#endif
+
+#ifndef ISSLASH
+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
+#endif
+
+#if HAVE_DECL_GETC_UNLOCKED
+# undef getc
+# define getc getc_unlocked
+#endif
+
+/* The following static variable is declared 'volatile' to avoid a
+   possible multithread problem in the function get_charset_aliases. If we
+   are running in a threaded environment, and if two threads initialize
+   'charset_aliases' simultaneously, both will produce the same value,
+   and everything will be ok if the two assignments to 'charset_aliases'
+   are atomic. But I don't know what will happen if the two assignments mix.  */
+#if __STDC__ != 1
+# define volatile /* empty */
+#endif
+/* Pointer to the contents of the charset.alias file, if it has already been
+   read, else NULL.  Its format is:
+   ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0'  */
+static const char * volatile charset_aliases;
+
+/* Return a pointer to the contents of the charset.alias file.  */
+static const char *
+get_charset_aliases ()
+{
+  const char *cp;
+
+  cp = charset_aliases;
+  if (cp == NULL)
+    {
+#if !(defined VMS || defined WIN32)
+      FILE *fp;
+      const char *dir;
+      const char *base = "charset.alias";
+      char *file_name;
+
+      /* Make it possible to override the charset.alias location.  This is
+        necessary for running the testsuite before "make install".  */
+      dir = getenv ("CHARSETALIASDIR");
+      if (dir == NULL || dir[0] == '\0')
+       dir = relocate (LIBDIR);
+
+      /* Concatenate dir and base into freshly allocated file_name.  */
+      {
+       size_t dir_len = strlen (dir);
+       size_t base_len = strlen (base);
+       int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
+       file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
+       if (file_name != NULL)
+         {
+           memcpy (file_name, dir, dir_len);
+           if (add_slash)
+             file_name[dir_len] = DIRECTORY_SEPARATOR;
+           memcpy (file_name + dir_len + add_slash, base, base_len + 1);
+         }
+      }
+
+      if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
+       /* Out of memory or file not found, treat it as empty.  */
+       cp = "";
+      else
+       {
+         /* Parse the file's contents.  */
+         char *res_ptr = NULL;
+         size_t res_size = 0;
+
+         for (;;)
+           {
+             int c;
+             char buf1[50+1];
+             char buf2[50+1];
+             size_t l1, l2;
+             char *old_res_ptr;
+
+             c = getc (fp);
+             if (c == EOF)
+               break;
+             if (c == '\n' || c == ' ' || c == '\t')
+               continue;
+             if (c == '#')
+               {
+                 /* Skip comment, to end of line.  */
+                 do
+                   c = getc (fp);
+                 while (!(c == EOF || c == '\n'));
+                 if (c == EOF)
+                   break;
+                 continue;
+               }
+             ungetc (c, fp);
+             if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
+               break;
+             l1 = strlen (buf1);
+             l2 = strlen (buf2);
+             old_res_ptr = res_ptr;
+             if (res_size == 0)
+               {
+                 res_size = l1 + 1 + l2 + 1;
+                 res_ptr = (char *) malloc (res_size + 1);
+               }
+             else
+               {
+                 res_size += l1 + 1 + l2 + 1;
+                 res_ptr = (char *) realloc (res_ptr, res_size + 1);
+               }
+             if (res_ptr == NULL)
+               {
+                 /* Out of memory. */
+                 res_size = 0;
+                 if (old_res_ptr != NULL)
+                   free (old_res_ptr);
+                 break;
+               }
+             strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
+             strcpy (res_ptr + res_size - (l2 + 1), buf2);
+           }
+         fclose (fp);
+         if (res_size == 0)
+           cp = "";
+         else
+           {
+             *(res_ptr + res_size) = '\0';
+             cp = res_ptr;
+           }
+       }
+
+      if (file_name != NULL)
+       free (file_name);
+
+#else
+
+# if defined VMS
+      /* To avoid the troubles of an extra file charset.alias_vms in the
+        sources of many GNU packages, simply inline the aliases here.  */
+      /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
+        "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
+        section 10.7 "Handling Different Character Sets".  */
+      cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+          "ISO8859-2" "\0" "ISO-8859-2" "\0"
+          "ISO8859-5" "\0" "ISO-8859-5" "\0"
+          "ISO8859-7" "\0" "ISO-8859-7" "\0"
+          "ISO8859-8" "\0" "ISO-8859-8" "\0"
+          "ISO8859-9" "\0" "ISO-8859-9" "\0"
+          /* Japanese */
+          "eucJP" "\0" "EUC-JP" "\0"
+          "SJIS" "\0" "SHIFT_JIS" "\0"
+          "DECKANJI" "\0" "DEC-KANJI" "\0"
+          "SDECKANJI" "\0" "EUC-JP" "\0"
+          /* Chinese */
+          "eucTW" "\0" "EUC-TW" "\0"
+          "DECHANYU" "\0" "DEC-HANYU" "\0"
+          "DECHANZI" "\0" "GB2312" "\0"
+          /* Korean */
+          "DECKOREAN" "\0" "EUC-KR" "\0";
+# endif
+
+# if defined WIN32
+      /* To avoid the troubles of installing a separate file in the same
+        directory as the DLL and of retrieving the DLL's directory at
+        runtime, simply inline the aliases here.  */
+
+      cp = "CP936" "\0" "GBK" "\0"
+          "CP1361" "\0" "JOHAB" "\0"
+          "CP20127" "\0" "ASCII" "\0"
+          "CP20866" "\0" "KOI8-R" "\0"
+          "CP21866" "\0" "KOI8-RU" "\0"
+          "CP28591" "\0" "ISO-8859-1" "\0"
+          "CP28592" "\0" "ISO-8859-2" "\0"
+          "CP28593" "\0" "ISO-8859-3" "\0"
+          "CP28594" "\0" "ISO-8859-4" "\0"
+          "CP28595" "\0" "ISO-8859-5" "\0"
+          "CP28596" "\0" "ISO-8859-6" "\0"
+          "CP28597" "\0" "ISO-8859-7" "\0"
+          "CP28598" "\0" "ISO-8859-8" "\0"
+          "CP28599" "\0" "ISO-8859-9" "\0"
+          "CP28605" "\0" "ISO-8859-15" "\0";
+# endif
+#endif
+
+      charset_aliases = cp;
+    }
+
+  return cp;
+}
+
+/* Determine the current locale's character encoding, and canonicalize it
+   into one of the canonical names listed in config.charset.
+   The result must not be freed; it is statically allocated.
+   If the canonical name cannot be determined, the result is a non-canonical
+   name.  */
+
+#ifdef STATIC
+STATIC
+#endif
+const char *
+locale_charset ()
+{
+  const char *codeset;
+  const char *aliases;
+
+#if !(defined WIN32 || defined OS2)
+
+# if HAVE_LANGINFO_CODESET
+
+  /* Most systems support nl_langinfo (CODESET) nowadays.  */
+  codeset = nl_langinfo (CODESET);
+
+# else
+
+  /* On old systems which lack it, use setlocale or getenv.  */
+  const char *locale = NULL;
+
+  /* But most old systems don't have a complete set of locales.  Some
+     (like SunOS 4 or DJGPP) have only the C locale.  Therefore we don't
+     use setlocale here; it would return "C" when it doesn't support the
+     locale name the user has set.  */
+#  if HAVE_SETLOCALE && 0
+  locale = setlocale (LC_CTYPE, NULL);
+#  endif
+  if (locale == NULL || locale[0] == '\0')
+    {
+      locale = getenv ("LC_ALL");
+      if (locale == NULL || locale[0] == '\0')
+       {
+         locale = getenv ("LC_CTYPE");
+         if (locale == NULL || locale[0] == '\0')
+           locale = getenv ("LANG");
+       }
+    }
+
+  /* On some old systems, one used to set locale = "iso8859_1". On others,
+     you set it to "language_COUNTRY.charset". In any case, we resolve it
+     through the charset.alias file.  */
+  codeset = locale;
+
+# endif
+
+#elif defined WIN32
+
+  static char buf[2 + 10 + 1];
+
+  /* Woe32 has a function returning the locale's codepage as a number.  */
+  sprintf (buf, "CP%u", GetACP ());
+  codeset = buf;
+
+#elif defined OS2
+
+  const char *locale;
+  static char buf[2 + 10 + 1];
+  ULONG cp[3];
+  ULONG cplen;
+
+  /* Allow user to override the codeset, as set in the operating system,
+     with standard language environment variables.  */
+  locale = getenv ("LC_ALL");
+  if (locale == NULL || locale[0] == '\0')
+    {
+      locale = getenv ("LC_CTYPE");
+      if (locale == NULL || locale[0] == '\0')
+       locale = getenv ("LANG");
+    }
+  if (locale != NULL && locale[0] != '\0')
+    {
+      /* If the locale name contains an encoding after the dot, return it.  */
+      const char *dot = strchr (locale, '.');
+
+      if (dot != NULL)
+       {
+         const char *modifier;
+
+         dot++;
+         /* Look for the possible @... trailer and remove it, if any.  */
+         modifier = strchr (dot, '@');
+         if (modifier == NULL)
+           return dot;
+         if (modifier - dot < sizeof (buf))
+           {
+             memcpy (buf, dot, modifier - dot);
+             buf [modifier - dot] = '\0';
+             return buf;
+           }
+       }
+
+      /* Resolve through the charset.alias file.  */
+      codeset = locale;
+    }
+  else
+    {
+      /* OS/2 has a function returning the locale's codepage as a number.  */
+      if (DosQueryCp (sizeof (cp), cp, &cplen))
+       codeset = "";
+      else
+       {
+         sprintf (buf, "CP%u", cp[0]);
+         codeset = buf;
+       }
+    }
+
+#endif
+
+  if (codeset == NULL)
+    /* The canonical name cannot be determined.  */
+    codeset = "";
+
+  /* Resolve alias. */
+  for (aliases = get_charset_aliases ();
+       *aliases != '\0';
+       aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
+    if (strcmp (codeset, aliases) == 0
+       || (aliases[0] == '*' && aliases[1] == '\0'))
+      {
+       codeset = aliases + strlen (aliases) + 1;
+       break;
+      }
+
+  /* Don't return an empty string.  GNU libc and GNU libiconv interpret
+     the empty string as denoting "the locale's character encoding",
+     thus GNU libiconv would call this function a second time.  */
+  if (codeset[0] == '\0')
+    codeset = "ASCII";
+
+  return codeset;
+}
diff --git a/intl/localcharset.h b/intl/localcharset.h
new file mode 100644 (file)
index 0000000..3b137e7
--- /dev/null
@@ -0,0 +1,42 @@
+/* Determine a canonical name for the current locale's character encoding.
+   Copyright (C) 2000-2003 Free Software Foundation, Inc.
+   This file is part of the GNU CHARSET Library.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _LOCALCHARSET_H
+#define _LOCALCHARSET_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Determine the current locale's character encoding, and canonicalize it
+   into one of the canonical names listed in config.charset.
+   The result must not be freed; it is statically allocated.
+   If the canonical name cannot be determined, the result is a non-canonical
+   name.  */
+extern const char * locale_charset (void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _LOCALCHARSET_H */
diff --git a/intl/locale.alias b/intl/locale.alias
new file mode 100644 (file)
index 0000000..bd6bb25
--- /dev/null
@@ -0,0 +1,78 @@
+# Locale name alias data base.
+# Copyright (C) 1996-2001,2003 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+# USA.
+
+# The format of this file is the same as for the corresponding file of
+# the X Window System, which normally can be found in
+#      /usr/lib/X11/locale/locale.alias
+# A single line contains two fields: an alias and a substitution value.
+# All entries are case independent.
+
+# Note: This file is far from being complete.  If you have a value for
+# your own site which you think might be useful for others too, share
+# it with the rest of us.  Send it using the `glibcbug' script to
+# bugs@gnu.org.
+
+# Packages using this file: 
+
+bokmal         nb_NO.ISO-8859-1
+bokmål         nb_NO.ISO-8859-1
+catalan                ca_ES.ISO-8859-1
+croatian       hr_HR.ISO-8859-2
+czech          cs_CZ.ISO-8859-2
+danish          da_DK.ISO-8859-1
+dansk          da_DK.ISO-8859-1
+deutsch                de_DE.ISO-8859-1
+dutch          nl_NL.ISO-8859-1
+eesti          et_EE.ISO-8859-1
+estonian       et_EE.ISO-8859-1
+finnish         fi_FI.ISO-8859-1
+français       fr_FR.ISO-8859-1
+french         fr_FR.ISO-8859-1
+galego         gl_ES.ISO-8859-1
+galician       gl_ES.ISO-8859-1
+german         de_DE.ISO-8859-1
+greek           el_GR.ISO-8859-7
+hebrew          he_IL.ISO-8859-8
+hrvatski       hr_HR.ISO-8859-2
+hungarian       hu_HU.ISO-8859-2
+icelandic       is_IS.ISO-8859-1
+italian         it_IT.ISO-8859-1
+japanese       ja_JP.eucJP
+japanese.euc   ja_JP.eucJP
+ja_JP          ja_JP.eucJP
+ja_JP.ujis     ja_JP.eucJP
+japanese.sjis  ja_JP.SJIS
+korean         ko_KR.eucKR
+korean.euc     ko_KR.eucKR
+ko_KR          ko_KR.eucKR
+lithuanian      lt_LT.ISO-8859-13
+no_NO          nb_NO.ISO-8859-1
+no_NO.ISO-8859-1 nb_NO.ISO-8859-1
+norwegian       nb_NO.ISO-8859-1
+nynorsk                nn_NO.ISO-8859-1
+polish          pl_PL.ISO-8859-2
+portuguese      pt_PT.ISO-8859-1
+romanian        ro_RO.ISO-8859-2
+russian         ru_RU.ISO-8859-5
+slovak          sk_SK.ISO-8859-2
+slovene         sl_SI.ISO-8859-2
+slovenian       sl_SI.ISO-8859-2
+spanish         es_ES.ISO-8859-1
+swedish         sv_SE.ISO-8859-1
+thai           th_TH.TIS-620
+turkish         tr_TR.ISO-8859-9
diff --git a/intl/localealias.c b/intl/localealias.c
new file mode 100644 (file)
index 0000000..2eaf881
--- /dev/null
@@ -0,0 +1,414 @@
+/* Handle aliases for locale names.
+   Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE    1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#if defined _LIBC || defined HAVE___FSETLOCKING
+# include <stdio_ext.h>
+#endif
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# undef alloca
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "gettextP.h"
+
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions.  This is required by the standard
+   because some ANSI C functions will require linking with this object
+   file and the name space must not be polluted.  */
+# define strcasecmp __strcasecmp
+
+# ifndef mempcpy
+#  define mempcpy __mempcpy
+# endif
+# define HAVE_MEMPCPY  1
+# define HAVE___FSETLOCKING    1
+
+/* We need locking here since we can be called from different places.  */
+# include <bits/libc-lock.h>
+
+__libc_lock_define_initialized (static, lock);
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Some optimizations for glibc.  */
+#ifdef _LIBC
+# define FEOF(fp)              feof_unlocked (fp)
+# define FGETS(buf, n, fp)     fgets_unlocked (buf, n, fp)
+#else
+# define FEOF(fp)              feof (fp)
+# define FGETS(buf, n, fp)     fgets (buf, n, fp)
+#endif
+
+/* For those losing systems which don't have `alloca' we have to add
+   some additional code emulating it.  */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
+#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED
+# undef fgets
+# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
+#endif
+#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED
+# undef feof
+# define feof(s) feof_unlocked (s)
+#endif
+
+
+struct alias_map
+{
+  const char *alias;
+  const char *value;
+};
+
+
+#ifndef _LIBC
+# define libc_freeres_ptr(decl) decl
+#endif
+
+libc_freeres_ptr (static char *string_space);
+static size_t string_space_act;
+static size_t string_space_max;
+libc_freeres_ptr (static struct alias_map *map);
+static size_t nmap;
+static size_t maxmap;
+
+
+/* Prototypes for local functions.  */
+static size_t read_alias_file (const char *fname, int fname_len)
+     internal_function;
+static int extend_alias_table (void);
+static int alias_compare (const struct alias_map *map1,
+                         const struct alias_map *map2);
+
+
+const char *
+_nl_expand_alias (const char *name)
+{
+  static const char *locale_alias_path;
+  struct alias_map *retval;
+  const char *result = NULL;
+  size_t added;
+
+#ifdef _LIBC
+  __libc_lock_lock (lock);
+#endif
+
+  if (locale_alias_path == NULL)
+    locale_alias_path = LOCALE_ALIAS_PATH;
+
+  do
+    {
+      struct alias_map item;
+
+      item.alias = name;
+
+      if (nmap > 0)
+       retval = (struct alias_map *) bsearch (&item, map, nmap,
+                                              sizeof (struct alias_map),
+                                              (int (*) (const void *,
+                                                        const void *)
+                                               ) alias_compare);
+      else
+       retval = NULL;
+
+      /* We really found an alias.  Return the value.  */
+      if (retval != NULL)
+       {
+         result = retval->value;
+         break;
+       }
+
+      /* Perhaps we can find another alias file.  */
+      added = 0;
+      while (added == 0 && locale_alias_path[0] != '\0')
+       {
+         const char *start;
+
+         while (locale_alias_path[0] == PATH_SEPARATOR)
+           ++locale_alias_path;
+         start = locale_alias_path;
+
+         while (locale_alias_path[0] != '\0'
+                && locale_alias_path[0] != PATH_SEPARATOR)
+           ++locale_alias_path;
+
+         if (start < locale_alias_path)
+           added = read_alias_file (start, locale_alias_path - start);
+       }
+    }
+  while (added != 0);
+
+#ifdef _LIBC
+  __libc_lock_unlock (lock);
+#endif
+
+  return result;
+}
+
+
+static size_t
+internal_function
+read_alias_file (const char *fname, int fname_len)
+{
+  FILE *fp;
+  char *full_fname;
+  size_t added;
+  static const char aliasfile[] = "/locale.alias";
+
+  full_fname = (char *) alloca (fname_len + sizeof aliasfile);
+#ifdef HAVE_MEMPCPY
+  mempcpy (mempcpy (full_fname, fname, fname_len),
+          aliasfile, sizeof aliasfile);
+#else
+  memcpy (full_fname, fname, fname_len);
+  memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
+#endif
+
+  fp = fopen (relocate (full_fname), "r");
+  freea (full_fname);
+  if (fp == NULL)
+    return 0;
+
+#ifdef HAVE___FSETLOCKING
+  /* No threads present.  */
+  __fsetlocking (fp, FSETLOCKING_BYCALLER);
+#endif
+
+  added = 0;
+  while (!FEOF (fp))
+    {
+      /* It is a reasonable approach to use a fix buffer here because
+        a) we are only interested in the first two fields
+        b) these fields must be usable as file names and so must not
+           be that long
+        We avoid a multi-kilobyte buffer here since this would use up
+        stack space which we might not have if the program ran out of
+        memory.  */
+      char buf[400];
+      char *alias;
+      char *value;
+      char *cp;
+
+      if (FGETS (buf, sizeof buf, fp) == NULL)
+       /* EOF reached.  */
+       break;
+
+      cp = buf;
+      /* Ignore leading white space.  */
+      while (isspace ((unsigned char) cp[0]))
+       ++cp;
+
+      /* A leading '#' signals a comment line.  */
+      if (cp[0] != '\0' && cp[0] != '#')
+       {
+         alias = cp++;
+         while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
+           ++cp;
+         /* Terminate alias name.  */
+         if (cp[0] != '\0')
+           *cp++ = '\0';
+
+         /* Now look for the beginning of the value.  */
+         while (isspace ((unsigned char) cp[0]))
+           ++cp;
+
+         if (cp[0] != '\0')
+           {
+             size_t alias_len;
+             size_t value_len;
+
+             value = cp++;
+             while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
+               ++cp;
+             /* Terminate value.  */
+             if (cp[0] == '\n')
+               {
+                 /* This has to be done to make the following test
+                    for the end of line possible.  We are looking for
+                    the terminating '\n' which do not overwrite here.  */
+                 *cp++ = '\0';
+                 *cp = '\n';
+               }
+             else if (cp[0] != '\0')
+               *cp++ = '\0';
+
+             if (nmap >= maxmap)
+               if (__builtin_expect (extend_alias_table (), 0))
+                 return added;
+
+             alias_len = strlen (alias) + 1;
+             value_len = strlen (value) + 1;
+
+             if (string_space_act + alias_len + value_len > string_space_max)
+               {
+                 /* Increase size of memory pool.  */
+                 size_t new_size = (string_space_max
+                                    + (alias_len + value_len > 1024
+                                       ? alias_len + value_len : 1024));
+                 char *new_pool = (char *) realloc (string_space, new_size);
+                 if (new_pool == NULL)
+                   return added;
+
+                 if (__builtin_expect (string_space != new_pool, 0))
+                   {
+                     size_t i;
+
+                     for (i = 0; i < nmap; i++)
+                       {
+                         map[i].alias += new_pool - string_space;
+                         map[i].value += new_pool - string_space;
+                       }
+                   }
+
+                 string_space = new_pool;
+                 string_space_max = new_size;
+               }
+
+             map[nmap].alias = memcpy (&string_space[string_space_act],
+                                       alias, alias_len);
+             string_space_act += alias_len;
+
+             map[nmap].value = memcpy (&string_space[string_space_act],
+                                       value, value_len);
+             string_space_act += value_len;
+
+             ++nmap;
+             ++added;
+           }
+       }
+
+      /* Possibly not the whole line fits into the buffer.  Ignore
+        the rest of the line.  */
+      while (strchr (buf, '\n') == NULL)
+       if (FGETS (buf, sizeof buf, fp) == NULL)
+         /* Make sure the inner loop will be left.  The outer loop
+            will exit at the `feof' test.  */
+         break;
+    }
+
+  /* Should we test for ferror()?  I think we have to silently ignore
+     errors.  --drepper  */
+  fclose (fp);
+
+  if (added > 0)
+    qsort (map, nmap, sizeof (struct alias_map),
+          (int (*) (const void *, const void *)) alias_compare);
+
+  return added;
+}
+
+
+static int
+extend_alias_table ()
+{
+  size_t new_size;
+  struct alias_map *new_map;
+
+  new_size = maxmap == 0 ? 100 : 2 * maxmap;
+  new_map = (struct alias_map *) realloc (map, (new_size
+                                               * sizeof (struct alias_map)));
+  if (new_map == NULL)
+    /* Simply don't extend: we don't have any more core.  */
+    return -1;
+
+  map = new_map;
+  maxmap = new_size;
+  return 0;
+}
+
+
+static int
+alias_compare (const struct alias_map *map1, const struct alias_map *map2)
+{
+#if defined _LIBC || defined HAVE_STRCASECMP
+  return strcasecmp (map1->alias, map2->alias);
+#else
+  const unsigned char *p1 = (const unsigned char *) map1->alias;
+  const unsigned char *p2 = (const unsigned char *) map2->alias;
+  unsigned char c1, c2;
+
+  if (p1 == p2)
+    return 0;
+
+  do
+    {
+      /* I know this seems to be odd but the tolower() function in
+        some systems libc cannot handle nonalpha characters.  */
+      c1 = isupper (*p1) ? tolower (*p1) : *p1;
+      c2 = isupper (*p2) ? tolower (*p2) : *p2;
+      if (c1 == '\0')
+       break;
+      ++p1;
+      ++p2;
+    }
+  while (c1 == c2);
+
+  return c1 - c2;
+#endif
+}
diff --git a/intl/localename.c b/intl/localename.c
new file mode 100644 (file)
index 0000000..323c732
--- /dev/null
@@ -0,0 +1,1500 @@
+/* Determine the current selected locale.
+   Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Written by Ulrich Drepper <drepper@gnu.org>, 1995.  */
+/* Win32 code written by Tor Lillqvist <tml@iki.fi>.  */
+/* MacOS X code written by Bruno Haible <bruno@clisp.org>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <locale.h>
+
+#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+# include <string.h>
+# include <CFString.h>
+# if HAVE_CFLOCALECOPYCURRENT
+#  include <CFLocale.h>
+# elif HAVE_CFPREFERENCESCOPYAPPVALUE
+#  include <CFPreferences.h>
+# endif
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# undef WIN32   /* avoid warning on mingw32 */
+# define WIN32
+#endif
+
+#ifdef WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+/* List of language codes, sorted by value:
+   0x01 LANG_ARABIC
+   0x02 LANG_BULGARIAN
+   0x03 LANG_CATALAN
+   0x04 LANG_CHINESE
+   0x05 LANG_CZECH
+   0x06 LANG_DANISH
+   0x07 LANG_GERMAN
+   0x08 LANG_GREEK
+   0x09 LANG_ENGLISH
+   0x0a LANG_SPANISH
+   0x0b LANG_FINNISH
+   0x0c LANG_FRENCH
+   0x0d LANG_HEBREW
+   0x0e LANG_HUNGARIAN
+   0x0f LANG_ICELANDIC
+   0x10 LANG_ITALIAN
+   0x11 LANG_JAPANESE
+   0x12 LANG_KOREAN
+   0x13 LANG_DUTCH
+   0x14 LANG_NORWEGIAN
+   0x15 LANG_POLISH
+   0x16 LANG_PORTUGUESE
+   0x17 LANG_RHAETO_ROMANCE
+   0x18 LANG_ROMANIAN
+   0x19 LANG_RUSSIAN
+   0x1a LANG_CROATIAN == LANG_SERBIAN
+   0x1b LANG_SLOVAK
+   0x1c LANG_ALBANIAN
+   0x1d LANG_SWEDISH
+   0x1e LANG_THAI
+   0x1f LANG_TURKISH
+   0x20 LANG_URDU
+   0x21 LANG_INDONESIAN
+   0x22 LANG_UKRAINIAN
+   0x23 LANG_BELARUSIAN
+   0x24 LANG_SLOVENIAN
+   0x25 LANG_ESTONIAN
+   0x26 LANG_LATVIAN
+   0x27 LANG_LITHUANIAN
+   0x28 LANG_TAJIK
+   0x29 LANG_FARSI
+   0x2a LANG_VIETNAMESE
+   0x2b LANG_ARMENIAN
+   0x2c LANG_AZERI
+   0x2d LANG_BASQUE
+   0x2e LANG_SORBIAN
+   0x2f LANG_MACEDONIAN
+   0x30 LANG_SUTU
+   0x31 LANG_TSONGA
+   0x32 LANG_TSWANA
+   0x33 LANG_VENDA
+   0x34 LANG_XHOSA
+   0x35 LANG_ZULU
+   0x36 LANG_AFRIKAANS
+   0x37 LANG_GEORGIAN
+   0x38 LANG_FAEROESE
+   0x39 LANG_HINDI
+   0x3a LANG_MALTESE
+   0x3b LANG_SAAMI
+   0x3c LANG_GAELIC
+   0x3d LANG_YIDDISH
+   0x3e LANG_MALAY
+   0x3f LANG_KAZAK
+   0x40 LANG_KYRGYZ
+   0x41 LANG_SWAHILI
+   0x42 LANG_TURKMEN
+   0x43 LANG_UZBEK
+   0x44 LANG_TATAR
+   0x45 LANG_BENGALI
+   0x46 LANG_PUNJABI
+   0x47 LANG_GUJARATI
+   0x48 LANG_ORIYA
+   0x49 LANG_TAMIL
+   0x4a LANG_TELUGU
+   0x4b LANG_KANNADA
+   0x4c LANG_MALAYALAM
+   0x4d LANG_ASSAMESE
+   0x4e LANG_MARATHI
+   0x4f LANG_SANSKRIT
+   0x50 LANG_MONGOLIAN
+   0x51 LANG_TIBETAN
+   0x52 LANG_WELSH
+   0x53 LANG_CAMBODIAN
+   0x54 LANG_LAO
+   0x55 LANG_BURMESE
+   0x56 LANG_GALICIAN
+   0x57 LANG_KONKANI
+   0x58 LANG_MANIPURI
+   0x59 LANG_SINDHI
+   0x5a LANG_SYRIAC
+   0x5b LANG_SINHALESE
+   0x5c LANG_CHEROKEE
+   0x5d LANG_INUKTITUT
+   0x5e LANG_AMHARIC
+   0x5f LANG_TAMAZIGHT
+   0x60 LANG_KASHMIRI
+   0x61 LANG_NEPALI
+   0x62 LANG_FRISIAN
+   0x63 LANG_PASHTO
+   0x64 LANG_TAGALOG
+   0x65 LANG_DIVEHI
+   0x66 LANG_EDO
+   0x67 LANG_FULFULDE
+   0x68 LANG_HAUSA
+   0x69 LANG_IBIBIO
+   0x6a LANG_YORUBA
+   0x70 LANG_IGBO
+   0x71 LANG_KANURI
+   0x72 LANG_OROMO
+   0x73 LANG_TIGRINYA
+   0x74 LANG_GUARANI
+   0x75 LANG_HAWAIIAN
+   0x76 LANG_LATIN
+   0x77 LANG_SOMALI
+   0x78 LANG_YI
+   0x79 LANG_PAPIAMENTU
+*/
+/* Mingw headers don't have latest language and sublanguage codes.  */
+# ifndef LANG_AFRIKAANS
+# define LANG_AFRIKAANS 0x36
+# endif
+# ifndef LANG_ALBANIAN
+# define LANG_ALBANIAN 0x1c
+# endif
+# ifndef LANG_AMHARIC
+# define LANG_AMHARIC 0x5e
+# endif
+# ifndef LANG_ARABIC
+# define LANG_ARABIC 0x01
+# endif
+# ifndef LANG_ARMENIAN
+# define LANG_ARMENIAN 0x2b
+# endif
+# ifndef LANG_ASSAMESE
+# define LANG_ASSAMESE 0x4d
+# endif
+# ifndef LANG_AZERI
+# define LANG_AZERI 0x2c
+# endif
+# ifndef LANG_BASQUE
+# define LANG_BASQUE 0x2d
+# endif
+# ifndef LANG_BELARUSIAN
+# define LANG_BELARUSIAN 0x23
+# endif
+# ifndef LANG_BENGALI
+# define LANG_BENGALI 0x45
+# endif
+# ifndef LANG_BURMESE
+# define LANG_BURMESE 0x55
+# endif
+# ifndef LANG_CAMBODIAN
+# define LANG_CAMBODIAN 0x53
+# endif
+# ifndef LANG_CATALAN
+# define LANG_CATALAN 0x03
+# endif
+# ifndef LANG_CHEROKEE
+# define LANG_CHEROKEE 0x5c
+# endif
+# ifndef LANG_DIVEHI
+# define LANG_DIVEHI 0x65
+# endif
+# ifndef LANG_EDO
+# define LANG_EDO 0x66
+# endif
+# ifndef LANG_ESTONIAN
+# define LANG_ESTONIAN 0x25
+# endif
+# ifndef LANG_FAEROESE
+# define LANG_FAEROESE 0x38
+# endif
+# ifndef LANG_FARSI
+# define LANG_FARSI 0x29
+# endif
+# ifndef LANG_FRISIAN
+# define LANG_FRISIAN 0x62
+# endif
+# ifndef LANG_FULFULDE
+# define LANG_FULFULDE 0x67
+# endif
+# ifndef LANG_GAELIC
+# define LANG_GAELIC 0x3c
+# endif
+# ifndef LANG_GALICIAN
+# define LANG_GALICIAN 0x56
+# endif
+# ifndef LANG_GEORGIAN
+# define LANG_GEORGIAN 0x37
+# endif
+# ifndef LANG_GUARANI
+# define LANG_GUARANI 0x74
+# endif
+# ifndef LANG_GUJARATI
+# define LANG_GUJARATI 0x47
+# endif
+# ifndef LANG_HAUSA
+# define LANG_HAUSA 0x68
+# endif
+# ifndef LANG_HAWAIIAN
+# define LANG_HAWAIIAN 0x75
+# endif
+# ifndef LANG_HEBREW
+# define LANG_HEBREW 0x0d
+# endif
+# ifndef LANG_HINDI
+# define LANG_HINDI 0x39
+# endif
+# ifndef LANG_IBIBIO
+# define LANG_IBIBIO 0x69
+# endif
+# ifndef LANG_IGBO
+# define LANG_IGBO 0x70
+# endif
+# ifndef LANG_INDONESIAN
+# define LANG_INDONESIAN 0x21
+# endif
+# ifndef LANG_INUKTITUT
+# define LANG_INUKTITUT 0x5d
+# endif
+# ifndef LANG_KANNADA
+# define LANG_KANNADA 0x4b
+# endif
+# ifndef LANG_KANURI
+# define LANG_KANURI 0x71
+# endif
+# ifndef LANG_KASHMIRI
+# define LANG_KASHMIRI 0x60
+# endif
+# ifndef LANG_KAZAK
+# define LANG_KAZAK 0x3f
+# endif
+# ifndef LANG_KONKANI
+# define LANG_KONKANI 0x57
+# endif
+# ifndef LANG_KYRGYZ
+# define LANG_KYRGYZ 0x40
+# endif
+# ifndef LANG_LAO
+# define LANG_LAO 0x54
+# endif
+# ifndef LANG_LATIN
+# define LANG_LATIN 0x76
+# endif
+# ifndef LANG_LATVIAN
+# define LANG_LATVIAN 0x26
+# endif
+# ifndef LANG_LITHUANIAN
+# define LANG_LITHUANIAN 0x27
+# endif
+# ifndef LANG_MACEDONIAN
+# define LANG_MACEDONIAN 0x2f
+# endif
+# ifndef LANG_MALAY
+# define LANG_MALAY 0x3e
+# endif
+# ifndef LANG_MALAYALAM
+# define LANG_MALAYALAM 0x4c
+# endif
+# ifndef LANG_MALTESE
+# define LANG_MALTESE 0x3a
+# endif
+# ifndef LANG_MANIPURI
+# define LANG_MANIPURI 0x58
+# endif
+# ifndef LANG_MARATHI
+# define LANG_MARATHI 0x4e
+# endif
+# ifndef LANG_MONGOLIAN
+# define LANG_MONGOLIAN 0x50
+# endif
+# ifndef LANG_NEPALI
+# define LANG_NEPALI 0x61
+# endif
+# ifndef LANG_ORIYA
+# define LANG_ORIYA 0x48
+# endif
+# ifndef LANG_OROMO
+# define LANG_OROMO 0x72
+# endif
+# ifndef LANG_PAPIAMENTU
+# define LANG_PAPIAMENTU 0x79
+# endif
+# ifndef LANG_PASHTO
+# define LANG_PASHTO 0x63
+# endif
+# ifndef LANG_PUNJABI
+# define LANG_PUNJABI 0x46
+# endif
+# ifndef LANG_RHAETO_ROMANCE
+# define LANG_RHAETO_ROMANCE 0x17
+# endif
+# ifndef LANG_SAAMI
+# define LANG_SAAMI 0x3b
+# endif
+# ifndef LANG_SANSKRIT
+# define LANG_SANSKRIT 0x4f
+# endif
+# ifndef LANG_SERBIAN
+# define LANG_SERBIAN 0x1a
+# endif
+# ifndef LANG_SINDHI
+# define LANG_SINDHI 0x59
+# endif
+# ifndef LANG_SINHALESE
+# define LANG_SINHALESE 0x5b
+# endif
+# ifndef LANG_SLOVAK
+# define LANG_SLOVAK 0x1b
+# endif
+# ifndef LANG_SOMALI
+# define LANG_SOMALI 0x77
+# endif
+# ifndef LANG_SORBIAN
+# define LANG_SORBIAN 0x2e
+# endif
+# ifndef LANG_SUTU
+# define LANG_SUTU 0x30
+# endif
+# ifndef LANG_SWAHILI
+# define LANG_SWAHILI 0x41
+# endif
+# ifndef LANG_SYRIAC
+# define LANG_SYRIAC 0x5a
+# endif
+# ifndef LANG_TAGALOG
+# define LANG_TAGALOG 0x64
+# endif
+# ifndef LANG_TAJIK
+# define LANG_TAJIK 0x28
+# endif
+# ifndef LANG_TAMAZIGHT
+# define LANG_TAMAZIGHT 0x5f
+# endif
+# ifndef LANG_TAMIL
+# define LANG_TAMIL 0x49
+# endif
+# ifndef LANG_TATAR
+# define LANG_TATAR 0x44
+# endif
+# ifndef LANG_TELUGU
+# define LANG_TELUGU 0x4a
+# endif
+# ifndef LANG_THAI
+# define LANG_THAI 0x1e
+# endif
+# ifndef LANG_TIBETAN
+# define LANG_TIBETAN 0x51
+# endif
+# ifndef LANG_TIGRINYA
+# define LANG_TIGRINYA 0x73
+# endif
+# ifndef LANG_TSONGA
+# define LANG_TSONGA 0x31
+# endif
+# ifndef LANG_TSWANA
+# define LANG_TSWANA 0x32
+# endif
+# ifndef LANG_TURKMEN
+# define LANG_TURKMEN 0x42
+# endif
+# ifndef LANG_UKRAINIAN
+# define LANG_UKRAINIAN 0x22
+# endif
+# ifndef LANG_URDU
+# define LANG_URDU 0x20
+# endif
+# ifndef LANG_UZBEK
+# define LANG_UZBEK 0x43
+# endif
+# ifndef LANG_VENDA
+# define LANG_VENDA 0x33
+# endif
+# ifndef LANG_VIETNAMESE
+# define LANG_VIETNAMESE 0x2a
+# endif
+# ifndef LANG_WELSH
+# define LANG_WELSH 0x52
+# endif
+# ifndef LANG_XHOSA
+# define LANG_XHOSA 0x34
+# endif
+# ifndef LANG_YI
+# define LANG_YI 0x78
+# endif
+# ifndef LANG_YIDDISH
+# define LANG_YIDDISH 0x3d
+# endif
+# ifndef LANG_YORUBA
+# define LANG_YORUBA 0x6a
+# endif
+# ifndef LANG_ZULU
+# define LANG_ZULU 0x35
+# endif
+# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
+# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
+# endif
+# ifndef SUBLANG_ARABIC_IRAQ
+# define SUBLANG_ARABIC_IRAQ 0x02
+# endif
+# ifndef SUBLANG_ARABIC_EGYPT
+# define SUBLANG_ARABIC_EGYPT 0x03
+# endif
+# ifndef SUBLANG_ARABIC_LIBYA
+# define SUBLANG_ARABIC_LIBYA 0x04
+# endif
+# ifndef SUBLANG_ARABIC_ALGERIA
+# define SUBLANG_ARABIC_ALGERIA 0x05
+# endif
+# ifndef SUBLANG_ARABIC_MOROCCO
+# define SUBLANG_ARABIC_MOROCCO 0x06
+# endif
+# ifndef SUBLANG_ARABIC_TUNISIA
+# define SUBLANG_ARABIC_TUNISIA 0x07
+# endif
+# ifndef SUBLANG_ARABIC_OMAN
+# define SUBLANG_ARABIC_OMAN 0x08
+# endif
+# ifndef SUBLANG_ARABIC_YEMEN
+# define SUBLANG_ARABIC_YEMEN 0x09
+# endif
+# ifndef SUBLANG_ARABIC_SYRIA
+# define SUBLANG_ARABIC_SYRIA 0x0a
+# endif
+# ifndef SUBLANG_ARABIC_JORDAN
+# define SUBLANG_ARABIC_JORDAN 0x0b
+# endif
+# ifndef SUBLANG_ARABIC_LEBANON
+# define SUBLANG_ARABIC_LEBANON 0x0c
+# endif
+# ifndef SUBLANG_ARABIC_KUWAIT
+# define SUBLANG_ARABIC_KUWAIT 0x0d
+# endif
+# ifndef SUBLANG_ARABIC_UAE
+# define SUBLANG_ARABIC_UAE 0x0e
+# endif
+# ifndef SUBLANG_ARABIC_BAHRAIN
+# define SUBLANG_ARABIC_BAHRAIN 0x0f
+# endif
+# ifndef SUBLANG_ARABIC_QATAR
+# define SUBLANG_ARABIC_QATAR 0x10
+# endif
+# ifndef SUBLANG_AZERI_LATIN
+# define SUBLANG_AZERI_LATIN 0x01
+# endif
+# ifndef SUBLANG_AZERI_CYRILLIC
+# define SUBLANG_AZERI_CYRILLIC 0x02
+# endif
+# ifndef SUBLANG_BENGALI_INDIA
+# define SUBLANG_BENGALI_INDIA 0x00
+# endif
+# ifndef SUBLANG_BENGALI_BANGLADESH
+# define SUBLANG_BENGALI_BANGLADESH 0x01
+# endif
+# ifndef SUBLANG_CHINESE_MACAU
+# define SUBLANG_CHINESE_MACAU 0x05
+# endif
+# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
+# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
+# endif
+# ifndef SUBLANG_ENGLISH_JAMAICA
+# define SUBLANG_ENGLISH_JAMAICA 0x08
+# endif
+# ifndef SUBLANG_ENGLISH_CARIBBEAN
+# define SUBLANG_ENGLISH_CARIBBEAN 0x09
+# endif
+# ifndef SUBLANG_ENGLISH_BELIZE
+# define SUBLANG_ENGLISH_BELIZE 0x0a
+# endif
+# ifndef SUBLANG_ENGLISH_TRINIDAD
+# define SUBLANG_ENGLISH_TRINIDAD 0x0b
+# endif
+# ifndef SUBLANG_ENGLISH_ZIMBABWE
+# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
+# endif
+# ifndef SUBLANG_ENGLISH_PHILIPPINES
+# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
+# endif
+# ifndef SUBLANG_ENGLISH_INDONESIA
+# define SUBLANG_ENGLISH_INDONESIA 0x0e
+# endif
+# ifndef SUBLANG_ENGLISH_HONGKONG
+# define SUBLANG_ENGLISH_HONGKONG 0x0f
+# endif
+# ifndef SUBLANG_ENGLISH_INDIA
+# define SUBLANG_ENGLISH_INDIA 0x10
+# endif
+# ifndef SUBLANG_ENGLISH_MALAYSIA
+# define SUBLANG_ENGLISH_MALAYSIA 0x11
+# endif
+# ifndef SUBLANG_ENGLISH_SINGAPORE
+# define SUBLANG_ENGLISH_SINGAPORE 0x12
+# endif
+# ifndef SUBLANG_FRENCH_LUXEMBOURG
+# define SUBLANG_FRENCH_LUXEMBOURG 0x05
+# endif
+# ifndef SUBLANG_FRENCH_MONACO
+# define SUBLANG_FRENCH_MONACO 0x06
+# endif
+# ifndef SUBLANG_FRENCH_WESTINDIES
+# define SUBLANG_FRENCH_WESTINDIES 0x07
+# endif
+# ifndef SUBLANG_FRENCH_REUNION
+# define SUBLANG_FRENCH_REUNION 0x08
+# endif
+# ifndef SUBLANG_FRENCH_CONGO
+# define SUBLANG_FRENCH_CONGO 0x09
+# endif
+# ifndef SUBLANG_FRENCH_SENEGAL
+# define SUBLANG_FRENCH_SENEGAL 0x0a
+# endif
+# ifndef SUBLANG_FRENCH_CAMEROON
+# define SUBLANG_FRENCH_CAMEROON 0x0b
+# endif
+# ifndef SUBLANG_FRENCH_COTEDIVOIRE
+# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
+# endif
+# ifndef SUBLANG_FRENCH_MALI
+# define SUBLANG_FRENCH_MALI 0x0d
+# endif
+# ifndef SUBLANG_FRENCH_MOROCCO
+# define SUBLANG_FRENCH_MOROCCO 0x0e
+# endif
+# ifndef SUBLANG_FRENCH_HAITI
+# define SUBLANG_FRENCH_HAITI 0x0f
+# endif
+# ifndef SUBLANG_GERMAN_LUXEMBOURG
+# define SUBLANG_GERMAN_LUXEMBOURG 0x04
+# endif
+# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
+# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
+# endif
+# ifndef SUBLANG_KASHMIRI_INDIA
+# define SUBLANG_KASHMIRI_INDIA 0x02
+# endif
+# ifndef SUBLANG_MALAY_MALAYSIA
+# define SUBLANG_MALAY_MALAYSIA 0x01
+# endif
+# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
+# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
+# endif
+# ifndef SUBLANG_NEPALI_INDIA
+# define SUBLANG_NEPALI_INDIA 0x02
+# endif
+# ifndef SUBLANG_PUNJABI_INDIA
+# define SUBLANG_PUNJABI_INDIA 0x00
+# endif
+# ifndef SUBLANG_PUNJABI_PAKISTAN
+# define SUBLANG_PUNJABI_PAKISTAN 0x01
+# endif
+# ifndef SUBLANG_ROMANIAN_ROMANIA
+# define SUBLANG_ROMANIAN_ROMANIA 0x00
+# endif
+# ifndef SUBLANG_ROMANIAN_MOLDOVA
+# define SUBLANG_ROMANIAN_MOLDOVA 0x01
+# endif
+# ifndef SUBLANG_SERBIAN_LATIN
+# define SUBLANG_SERBIAN_LATIN 0x02
+# endif
+# ifndef SUBLANG_SERBIAN_CYRILLIC
+# define SUBLANG_SERBIAN_CYRILLIC 0x03
+# endif
+# ifndef SUBLANG_SINDHI_INDIA
+# define SUBLANG_SINDHI_INDIA 0x00
+# endif
+# ifndef SUBLANG_SINDHI_PAKISTAN
+# define SUBLANG_SINDHI_PAKISTAN 0x01
+# endif
+# ifndef SUBLANG_SPANISH_GUATEMALA
+# define SUBLANG_SPANISH_GUATEMALA 0x04
+# endif
+# ifndef SUBLANG_SPANISH_COSTA_RICA
+# define SUBLANG_SPANISH_COSTA_RICA 0x05
+# endif
+# ifndef SUBLANG_SPANISH_PANAMA
+# define SUBLANG_SPANISH_PANAMA 0x06
+# endif
+# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
+# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
+# endif
+# ifndef SUBLANG_SPANISH_VENEZUELA
+# define SUBLANG_SPANISH_VENEZUELA 0x08
+# endif
+# ifndef SUBLANG_SPANISH_COLOMBIA
+# define SUBLANG_SPANISH_COLOMBIA 0x09
+# endif
+# ifndef SUBLANG_SPANISH_PERU
+# define SUBLANG_SPANISH_PERU 0x0a
+# endif
+# ifndef SUBLANG_SPANISH_ARGENTINA
+# define SUBLANG_SPANISH_ARGENTINA 0x0b
+# endif
+# ifndef SUBLANG_SPANISH_ECUADOR
+# define SUBLANG_SPANISH_ECUADOR 0x0c
+# endif
+# ifndef SUBLANG_SPANISH_CHILE
+# define SUBLANG_SPANISH_CHILE 0x0d
+# endif
+# ifndef SUBLANG_SPANISH_URUGUAY
+# define SUBLANG_SPANISH_URUGUAY 0x0e
+# endif
+# ifndef SUBLANG_SPANISH_PARAGUAY
+# define SUBLANG_SPANISH_PARAGUAY 0x0f
+# endif
+# ifndef SUBLANG_SPANISH_BOLIVIA
+# define SUBLANG_SPANISH_BOLIVIA 0x10
+# endif
+# ifndef SUBLANG_SPANISH_EL_SALVADOR
+# define SUBLANG_SPANISH_EL_SALVADOR 0x11
+# endif
+# ifndef SUBLANG_SPANISH_HONDURAS
+# define SUBLANG_SPANISH_HONDURAS 0x12
+# endif
+# ifndef SUBLANG_SPANISH_NICARAGUA
+# define SUBLANG_SPANISH_NICARAGUA 0x13
+# endif
+# ifndef SUBLANG_SPANISH_PUERTO_RICO
+# define SUBLANG_SPANISH_PUERTO_RICO 0x14
+# endif
+# ifndef SUBLANG_SWEDISH_FINLAND
+# define SUBLANG_SWEDISH_FINLAND 0x02
+# endif
+# ifndef SUBLANG_TAMAZIGHT_ARABIC
+# define SUBLANG_TAMAZIGHT_ARABIC 0x01
+# endif
+# ifndef SUBLANG_TAMAZIGHT_LATIN
+# define SUBLANG_TAMAZIGHT_LATIN 0x02
+# endif
+# ifndef SUBLANG_TIGRINYA_ETHIOPIA
+# define SUBLANG_TIGRINYA_ETHIOPIA 0x00
+# endif
+# ifndef SUBLANG_TIGRINYA_ERITREA
+# define SUBLANG_TIGRINYA_ERITREA 0x01
+# endif
+# ifndef SUBLANG_URDU_PAKISTAN
+# define SUBLANG_URDU_PAKISTAN 0x01
+# endif
+# ifndef SUBLANG_URDU_INDIA
+# define SUBLANG_URDU_INDIA 0x02
+# endif
+# ifndef SUBLANG_UZBEK_LATIN
+# define SUBLANG_UZBEK_LATIN 0x01
+# endif
+# ifndef SUBLANG_UZBEK_CYRILLIC
+# define SUBLANG_UZBEK_CYRILLIC 0x02
+# endif
+#endif
+
+# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+/* MacOS X 10.2 or newer */
+
+/* Canonicalize a MacOS X locale name to a Unix locale name.
+   NAME is a sufficiently large buffer.
+   On input, it contains the MacOS X locale name.
+   On output, it contains the Unix locale name.  */
+void
+_nl_locale_name_canonicalize (char *name)
+{
+  /* This conversion is based on a posting by
+     Deborah GoldSmith <goldsmit@apple.com> on 2005-03-08,
+     http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */
+
+  /* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and
+     ISO 3166) names.  Prior to MacOS X 10.3, there is no API for doing this.
+     Therefore we do it ourselves, using a table based on the results of the
+     MacOS X 10.3.8 function
+     CFLocaleCreateCanonicalLocaleIdentifierFromString().  */
+  typedef struct { const char legacy[21+1]; const char unixy[5+1]; }
+         legacy_entry;
+  static const legacy_entry legacy_table[] = {
+    { "Afrikaans",             "af" },
+    { "Albanian",              "sq" },
+    { "Amharic",               "am" },
+    { "Arabic",                "ar" },
+    { "Armenian",              "hy" },
+    { "Assamese",              "as" },
+    { "Aymara",                "ay" },
+    { "Azerbaijani",           "az" },
+    { "Basque",                "eu" },
+    { "Belarusian",            "be" },
+    { "Belorussian",           "be" },
+    { "Bengali",               "bn" },
+    { "Brazilian Portugese",   "pt_BR" },
+    { "Brazilian Portuguese",  "pt_BR" },
+    { "Breton",                "br" },
+    { "Bulgarian",             "bg" },
+    { "Burmese",               "my" },
+    { "Byelorussian",          "be" },
+    { "Catalan",               "ca" },
+    { "Chewa",                 "ny" },
+    { "Chichewa",              "ny" },
+    { "Chinese",               "zh" },
+    { "Chinese, Simplified",   "zh_CN" },
+    { "Chinese, Traditional",  "zh_TW" },
+    { "Chinese, Tradtional",   "zh_TW" },
+    { "Croatian",              "hr" },
+    { "Czech",                 "cs" },
+    { "Danish",                "da" },
+    { "Dutch",                 "nl" },
+    { "Dzongkha",              "dz" },
+    { "English",               "en" },
+    { "Esperanto",             "eo" },
+    { "Estonian",              "et" },
+    { "Faroese",               "fo" },
+    { "Farsi",                 "fa" },
+    { "Finnish",               "fi" },
+    { "Flemish",               "nl_BE" },
+    { "French",                "fr" },
+    { "Galician",              "gl" },
+    { "Gallegan",              "gl" },
+    { "Georgian",              "ka" },
+    { "German",                "de" },
+    { "Greek",                 "el" },
+    { "Greenlandic",           "kl" },
+    { "Guarani",               "gn" },
+    { "Gujarati",              "gu" },
+    { "Hawaiian",              "haw" }, /* Yes, "haw", not "cpe".  */
+    { "Hebrew",                "he" },
+    { "Hindi",                 "hi" },
+    { "Hungarian",             "hu" },
+    { "Icelandic",             "is" },
+    { "Indonesian",            "id" },
+    { "Inuktitut",             "iu" },
+    { "Irish",                 "ga" },
+    { "Italian",               "it" },
+    { "Japanese",              "ja" },
+    { "Javanese",              "jv" },
+    { "Kalaallisut",           "kl" },
+    { "Kannada",               "kn" },
+    { "Kashmiri",              "ks" },
+    { "Kazakh",                "kk" },
+    { "Khmer",                 "km" },
+    { "Kinyarwanda",           "rw" },
+    { "Kirghiz",               "ky" },
+    { "Korean",                "ko" },
+    { "Kurdish",               "ku" },
+    { "Latin",                 "la" },
+    { "Latvian",               "lv" },
+    { "Lithuanian",            "lt" },
+    { "Macedonian",            "mk" },
+    { "Malagasy",              "mg" },
+    { "Malay",                 "ms" },
+    { "Malayalam",             "ml" },
+    { "Maltese",               "mt" },
+    { "Manx",                  "gv" },
+    { "Marathi",               "mr" },
+    { "Moldavian",             "mo" },
+    { "Mongolian",             "mn" },
+    { "Nepali",                "ne" },
+    { "Norwegian",             "nb" }, /* Yes, "nb", not the obsolete "no".  */
+    { "Nyanja",                "ny" },
+    { "Nynorsk",               "nn" },
+    { "Oriya",                 "or" },
+    { "Oromo",                 "om" },
+    { "Panjabi",               "pa" },
+    { "Pashto",                "ps" },
+    { "Persian",               "fa" },
+    { "Polish",                "pl" },
+    { "Portuguese",            "pt" },
+    { "Portuguese, Brazilian", "pt_BR" },
+    { "Punjabi",               "pa" },
+    { "Pushto",                "ps" },
+    { "Quechua",               "qu" },
+    { "Romanian",              "ro" },
+    { "Ruanda",                "rw" },
+    { "Rundi",                 "rn" },
+    { "Russian",               "ru" },
+    { "Sami",                  "se_NO" }, /* Not just "se".  */
+    { "Sanskrit",              "sa" },
+    { "Scottish",              "gd" },
+    { "Serbian",               "sr" },
+    { "Simplified Chinese",    "zh_CN" },
+    { "Sindhi",                "sd" },
+    { "Sinhalese",             "si" },
+    { "Slovak",                "sk" },
+    { "Slovenian",             "sl" },
+    { "Somali",                "so" },
+    { "Spanish",               "es" },
+    { "Sundanese",             "su" },
+    { "Swahili",               "sw" },
+    { "Swedish",               "sv" },
+    { "Tagalog",               "tl" },
+    { "Tajik",                 "tg" },
+    { "Tajiki",                "tg" },
+    { "Tamil",                 "ta" },
+    { "Tatar",                 "tt" },
+    { "Telugu",                "te" },
+    { "Thai",                  "th" },
+    { "Tibetan",               "bo" },
+    { "Tigrinya",              "ti" },
+    { "Tongan",                "to" },
+    { "Traditional Chinese",   "zh_TW" },
+    { "Turkish",               "tr" },
+    { "Turkmen",               "tk" },
+    { "Uighur",                "ug" },
+    { "Ukrainian",             "uk" },
+    { "Urdu",                  "ur" },
+    { "Uzbek",                 "uz" },
+    { "Vietnamese",            "vi" },
+    { "Welsh",                 "cy" },
+    { "Yiddish",               "yi" }
+  };
+
+  /* Convert new-style locale names with language tags (ISO 639 and ISO 15924)
+     to Unix (ISO 639 and ISO 3166) names.  */
+  typedef struct { const char langtag[7+1]; const char unixy[12+1]; }
+         langtag_entry;
+  static const langtag_entry langtag_table[] = {
+    /* MacOS X has "az-Arab", "az-Cyrl", "az-Latn".
+       The default script for az on Unix is Latin.  */
+    { "az-Latn", "az" },
+    /* MacOS X has "ga-dots".  Does not yet exist on Unix.  */
+    { "ga-dots", "ga" },
+    /* MacOS X has "kk-Cyrl".  Does not yet exist on Unix.  */
+    /* MacOS X has "mn-Cyrl", "mn-Mong".
+       The default script for mn on Unix is Cyrillic.  */
+    { "mn-Cyrl", "mn" },
+    /* MacOS X has "ms-Arab", "ms-Latn".
+       The default script for ms on Unix is Latin.  */
+    { "ms-Latn", "ms" },
+    /* MacOS X has "tg-Cyrl".
+       The default script for tg on Unix is Cyrillic.  */
+    { "tg-Cyrl", "tg" },
+    /* MacOS X has "tk-Cyrl".  Does not yet exist on Unix.  */
+    /* MacOS X has "tt-Cyrl".
+       The default script for tt on Unix is Cyrillic.  */
+    { "tt-Cyrl", "tt" },
+    /* MacOS X has "zh-Hans", "zh-Hant".
+       Country codes are used to distinguish these on Unix.  */
+    { "zh-Hans", "zh_CN" },
+    { "zh-Hant", "zh_TW" }
+  };
+
+  /* Convert script names (ISO 15924) to Unix conventions.
+     See http://www.unicode.org/iso15924/iso15924-codes.html  */
+  typedef struct { const char script[4+1]; const char unixy[9+1]; }
+         script_entry;
+  static const script_entry script_table[] = {
+    { "Arab", "arabic" },
+    { "Cyrl", "cyrillic" },
+    { "Mong", "mongolian" }
+  };
+
+  /* Step 1: Convert using legacy_table.  */
+  if (name[0] >= 'A' && name[0] <= 'Z')
+    {
+      unsigned int i1, i2;
+      i1 = 0;
+      i2 = sizeof (legacy_table) / sizeof (legacy_entry);
+      while (i2 - i1 > 1)
+       {
+         /* At this point we know that if name occurs in legacy_table,
+            its index must be >= i1 and < i2.  */
+         unsigned int i = (i1 + i2) >> 1;
+         const legacy_entry *p = &legacy_table[i];
+         if (strcmp (name, p->legacy) < 0)
+           i2 = i;
+         else
+           i1 = i;
+       }
+      if (strcmp (name, legacy_table[i1].legacy) == 0)
+       {
+         strcpy (name, legacy_table[i1].unixy);
+         return;
+       }
+    }
+
+  /* Step 2: Convert using langtag_table and script_table.  */
+  if (strlen (name) == 7 && name[2] == '-')
+    {
+      unsigned int i1, i2;
+      i1 = 0;
+      i2 = sizeof (langtag_table) / sizeof (langtag_entry);
+      while (i2 - i1 > 1)
+       {
+         /* At this point we know that if name occurs in langtag_table,
+            its index must be >= i1 and < i2.  */
+         unsigned int i = (i1 + i2) >> 1;
+         const langtag_entry *p = &langtag_table[i];
+         if (strcmp (name, p->langtag) < 0)
+           i2 = i;
+         else
+           i1 = i;
+       }
+      if (strcmp (name, langtag_table[i1].langtag) == 0)
+       {
+         strcpy (name, langtag_table[i1].unixy);
+         return;
+       }
+
+      i1 = 0;
+      i2 = sizeof (script_table) / sizeof (script_entry);
+      while (i2 - i1 > 1)
+       {
+         /* At this point we know that if (name + 3) occurs in script_table,
+            its index must be >= i1 and < i2.  */
+         unsigned int i = (i1 + i2) >> 1;
+         const script_entry *p = &script_table[i];
+         if (strcmp (name + 3, p->script) < 0)
+           i2 = i;
+         else
+           i1 = i;
+       }
+      if (strcmp (name + 3, script_table[i1].script) == 0)
+       {
+         name[2] = '@';
+         strcpy (name + 3, script_table[i1].unixy);
+         return;
+       }
+    }
+
+  /* Step 3: Convert new-style dash to Unix underscore. */
+  {
+    char *p;
+    for (p = name; *p != '\0'; p++)
+      if (*p == '-')
+       *p = '_';
+  }
+}
+
+#endif
+
+/* XPG3 defines the result of 'setlocale (category, NULL)' as:
+   "Directs 'setlocale()' to query 'category' and return the current
+    setting of 'local'."
+   However it does not specify the exact format.  Neither do SUSV2 and
+   ISO C 99.  So we can use this feature only on selected systems (e.g.
+   those using GNU C Library).  */
+#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
+# define HAVE_LOCALE_NULL
+#endif
+
+/* Determine the current locale's name, and canonicalize it into XPG syntax
+     language[_territory[.codeset]][@modifier]
+   The codeset part in the result is not reliable; the locale_charset()
+   should be used for codeset information instead.
+   The result must not be freed; it is statically allocated.  */
+
+const char *
+_nl_locale_name_posix (int category, const char *categoryname)
+{
+  /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
+     On some systems this can be done by the 'setlocale' function itself.  */
+#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+  return setlocale (category, NULL);
+#else
+  const char *retval;
+
+  /* Setting of LC_ALL overrides all other.  */
+  retval = getenv ("LC_ALL");
+  if (retval != NULL && retval[0] != '\0')
+    return retval;
+  /* Next comes the name of the desired category.  */
+  retval = getenv (categoryname);
+  if (retval != NULL && retval[0] != '\0')
+    return retval;
+  /* Last possibility is the LANG environment variable.  */
+  retval = getenv ("LANG");
+  if (retval != NULL && retval[0] != '\0')
+    return retval;
+
+  return NULL;
+#endif
+}
+
+const char *
+_nl_locale_name_default (void)
+{
+  /* POSIX:2001 says:
+     "All implementations shall define a locale as the default locale, to be
+      invoked when no environment variables are set, or set to the empty
+      string.  This default locale can be the POSIX locale or any other
+      implementation-defined locale.  Some implementations may provide
+      facilities for local installation administrators to set the default
+      locale, customizing it for each location.  POSIX:2001 does not require
+      such a facility.  */
+
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined(WIN32))
+
+  /* The system does not have a way of setting the locale, other than the
+     POSIX specified environment variables.  We use C as default locale.  */
+  return "C";
+
+#else
+
+  /* Return an XPG style locale name language[_territory][@modifier].
+     Don't even bother determining the codeset; it's not useful in this
+     context, because message catalogs are not specific to a single
+     codeset.  */
+
+# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+  /* MacOS X 10.2 or newer */
+  {
+    /* Cache the locale name, since CoreFoundation calls are expensive.  */
+    static const char *cached_localename;
+
+    if (cached_localename == NULL)
+      {
+       char namebuf[256];
+#  if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */
+       CFLocaleRef locale = CFLocaleCopyCurrent ();
+       CFStringRef name = CFLocaleGetIdentifier (locale);
+
+       if (CFStringGetCString (name, namebuf, sizeof(namebuf),
+                               kCFStringEncodingASCII))
+         {
+           _nl_locale_name_canonicalize (namebuf);
+           cached_localename = strdup (namebuf);
+         }
+       CFRelease (locale);
+#  elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */
+       CFTypeRef value =
+         CFPreferencesCopyAppValue (CFSTR ("AppleLocale"),
+                                    kCFPreferencesCurrentApplication);
+       if (value != NULL
+           && CFGetTypeID (value) == CFStringGetTypeID ()
+           && CFStringGetCString ((CFStringRef)value, namebuf, sizeof(namebuf),
+                                  kCFStringEncodingASCII))
+         {
+           _nl_locale_name_canonicalize (namebuf);
+           cached_localename = strdup (namebuf);
+         }
+#  endif
+       if (cached_localename == NULL)
+         cached_localename = "C";
+      }
+    return cached_localename;
+  }
+
+# endif
+
+# if defined(WIN32) /* WIN32 */
+  {
+    LCID lcid;
+    LANGID langid;
+    int primary, sub;
+
+    /* Use native Win32 API locale ID.  */
+    lcid = GetThreadLocale ();
+
+    /* Strip off the sorting rules, keep only the language part.  */
+    langid = LANGIDFROMLCID (lcid);
+
+    /* Split into language and territory part.  */
+    primary = PRIMARYLANGID (langid);
+    sub = SUBLANGID (langid);
+
+    /* Dispatch on language.
+       See also http://www.unicode.org/unicode/onlinedat/languages.html .
+       For details about languages, see http://www.ethnologue.com/ .  */
+    switch (primary)
+      {
+      case LANG_AFRIKAANS: return "af_ZA";
+      case LANG_ALBANIAN: return "sq_AL";
+      case LANG_AMHARIC: return "am_ET";
+      case LANG_ARABIC:
+       switch (sub)
+         {
+         case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
+         case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
+         case SUBLANG_ARABIC_EGYPT: return "ar_EG";
+         case SUBLANG_ARABIC_LIBYA: return "ar_LY";
+         case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
+         case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
+         case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
+         case SUBLANG_ARABIC_OMAN: return "ar_OM";
+         case SUBLANG_ARABIC_YEMEN: return "ar_YE";
+         case SUBLANG_ARABIC_SYRIA: return "ar_SY";
+         case SUBLANG_ARABIC_JORDAN: return "ar_JO";
+         case SUBLANG_ARABIC_LEBANON: return "ar_LB";
+         case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
+         case SUBLANG_ARABIC_UAE: return "ar_AE";
+         case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
+         case SUBLANG_ARABIC_QATAR: return "ar_QA";
+         }
+       return "ar";
+      case LANG_ARMENIAN: return "hy_AM";
+      case LANG_ASSAMESE: return "as_IN";
+      case LANG_AZERI:
+       switch (sub)
+         {
+         /* FIXME: Adjust this when Azerbaijani locales appear on Unix.  */
+         case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
+         case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
+         }
+       return "az";
+      case LANG_BASQUE:
+       switch (sub)
+         {
+         case SUBLANG_DEFAULT: return "eu_ES";
+         }
+       return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR".  */
+      case LANG_BELARUSIAN: return "be_BY";
+      case LANG_BENGALI:
+       switch (sub)
+         {
+         case SUBLANG_BENGALI_INDIA: return "bn_IN";
+         case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
+         }
+       return "bn";
+      case LANG_BULGARIAN: return "bg_BG";
+      case LANG_BURMESE: return "my_MM";
+      case LANG_CAMBODIAN: return "km_KH";
+      case LANG_CATALAN: return "ca_ES";
+      case LANG_CHEROKEE: return "chr_US";
+      case LANG_CHINESE:
+       switch (sub)
+         {
+         case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
+         case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
+         case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
+         case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
+         case SUBLANG_CHINESE_MACAU: return "zh_MO";
+         }
+       return "zh";
+      case LANG_CROATIAN:       /* LANG_CROATIAN == LANG_SERBIAN
+                                * What used to be called Serbo-Croatian
+                                * should really now be two separate
+                                * languages because of political reasons.
+                                * (Says tml, who knows nothing about Serbian
+                                * or Croatian.)
+                                * (I can feel those flames coming already.)
+                                */
+       switch (sub)
+         {
+         case SUBLANG_DEFAULT: return "hr_HR";
+         case SUBLANG_SERBIAN_LATIN: return "sr_CS";
+         case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
+         }
+       return "hr";
+      case LANG_CZECH: return "cs_CZ";
+      case LANG_DANISH: return "da_DK";
+      case LANG_DIVEHI: return "dv_MV";
+      case LANG_DUTCH:
+       switch (sub)
+         {
+         case SUBLANG_DUTCH: return "nl_NL";
+         case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
+         }
+       return "nl";
+      case LANG_EDO: return "bin_NG";
+      case LANG_ENGLISH:
+       switch (sub)
+         {
+         /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
+          * English was the language spoken in England.
+          * Oh well.
+          */
+         case SUBLANG_ENGLISH_US: return "en_US";
+         case SUBLANG_ENGLISH_UK: return "en_GB";
+         case SUBLANG_ENGLISH_AUS: return "en_AU";
+         case SUBLANG_ENGLISH_CAN: return "en_CA";
+         case SUBLANG_ENGLISH_NZ: return "en_NZ";
+         case SUBLANG_ENGLISH_EIRE: return "en_IE";
+         case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
+         case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
+         case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
+         case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
+         case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
+         case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
+         case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
+         case SUBLANG_ENGLISH_INDONESIA: return "en_ID";
+         case SUBLANG_ENGLISH_HONGKONG: return "en_HK";
+         case SUBLANG_ENGLISH_INDIA: return "en_IN";
+         case SUBLANG_ENGLISH_MALAYSIA: return "en_MY";
+         case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
+         }
+       return "en";
+      case LANG_ESTONIAN: return "et_EE";
+      case LANG_FAEROESE: return "fo_FO";
+      case LANG_FARSI: return "fa_IR";
+      case LANG_FINNISH: return "fi_FI";
+      case LANG_FRENCH:
+       switch (sub)
+         {
+         case SUBLANG_FRENCH: return "fr_FR";
+         case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
+         case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
+         case SUBLANG_FRENCH_SWISS: return "fr_CH";
+         case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
+         case SUBLANG_FRENCH_MONACO: return "fr_MC";
+         case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */
+         case SUBLANG_FRENCH_REUNION: return "fr_RE";
+         case SUBLANG_FRENCH_CONGO: return "fr_CG";
+         case SUBLANG_FRENCH_SENEGAL: return "fr_SN";
+         case SUBLANG_FRENCH_CAMEROON: return "fr_CM";
+         case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI";
+         case SUBLANG_FRENCH_MALI: return "fr_ML";
+         case SUBLANG_FRENCH_MOROCCO: return "fr_MA";
+         case SUBLANG_FRENCH_HAITI: return "fr_HT";
+         }
+       return "fr";
+      case LANG_FRISIAN: return "fy_NL";
+      case LANG_FULFULDE:
+       /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin.  */
+       return "ff_NG";
+      case LANG_GAELIC:
+       switch (sub)
+         {
+         case 0x01: /* SCOTTISH */ return "gd_GB";
+         case 0x02: /* IRISH */ return "ga_IE";
+         }
+       return "C";
+      case LANG_GALICIAN: return "gl_ES";
+      case LANG_GEORGIAN: return "ka_GE";
+      case LANG_GERMAN:
+       switch (sub)
+         {
+         case SUBLANG_GERMAN: return "de_DE";
+         case SUBLANG_GERMAN_SWISS: return "de_CH";
+         case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
+         case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
+         case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
+         }
+       return "de";
+      case LANG_GREEK: return "el_GR";
+      case LANG_GUARANI: return "gn_PY";
+      case LANG_GUJARATI: return "gu_IN";
+      case LANG_HAUSA: return "ha_NG";
+      case LANG_HAWAIIAN:
+       /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
+          or Hawaii Creole English ("cpe_US", 600000 speakers)?  */
+       return "cpe_US";
+      case LANG_HEBREW: return "he_IL";
+      case LANG_HINDI: return "hi_IN";
+      case LANG_HUNGARIAN: return "hu_HU";
+      case LANG_IBIBIO: return "nic_NG";
+      case LANG_ICELANDIC: return "is_IS";
+      case LANG_IGBO: return "ig_NG";
+      case LANG_INDONESIAN: return "id_ID";
+      case LANG_INUKTITUT: return "iu_CA";
+      case LANG_ITALIAN:
+       switch (sub)
+         {
+         case SUBLANG_ITALIAN: return "it_IT";
+         case SUBLANG_ITALIAN_SWISS: return "it_CH";
+         }
+       return "it";
+      case LANG_JAPANESE: return "ja_JP";
+      case LANG_KANNADA: return "kn_IN";
+      case LANG_KANURI: return "kr_NG";
+      case LANG_KASHMIRI:
+       switch (sub)
+         {
+         case SUBLANG_DEFAULT: return "ks_PK";
+         case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
+         }
+       return "ks";
+      case LANG_KAZAK: return "kk_KZ";
+      case LANG_KONKANI:
+       /* FIXME: Adjust this when such locales appear on Unix.  */
+       return "kok_IN";
+      case LANG_KOREAN: return "ko_KR";
+      case LANG_KYRGYZ: return "ky_KG";
+      case LANG_LAO: return "lo_LA";
+      case LANG_LATIN: return "la_VA";
+      case LANG_LATVIAN: return "lv_LV";
+      case LANG_LITHUANIAN: return "lt_LT";
+      case LANG_MACEDONIAN: return "mk_MK";
+      case LANG_MALAY:
+       switch (sub)
+         {
+         case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
+         case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
+         }
+       return "ms";
+      case LANG_MALAYALAM: return "ml_IN";
+      case LANG_MALTESE: return "mt_MT";
+      case LANG_MANIPURI:
+       /* FIXME: Adjust this when such locales appear on Unix.  */
+       return "mni_IN";
+      case LANG_MARATHI: return "mr_IN";
+      case LANG_MONGOLIAN:
+       switch (sub)
+         {
+         case SUBLANG_DEFAULT: return "mn_MN";
+         }
+       return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN".  */
+      case LANG_NEPALI:
+       switch (sub)
+         {
+         case SUBLANG_DEFAULT: return "ne_NP";
+         case SUBLANG_NEPALI_INDIA: return "ne_IN";
+         }
+       return "ne";
+      case LANG_NORWEGIAN:
+       switch (sub)
+         {
+         case SUBLANG_NORWEGIAN_BOKMAL: return "nb_NO";
+         case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
+         }
+       return "no";
+      case LANG_ORIYA: return "or_IN";
+      case LANG_OROMO: return "om_ET";
+      case LANG_PAPIAMENTU: return "pap_AN";
+      case LANG_PASHTO:
+       return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF".  */
+      case LANG_POLISH: return "pl_PL";
+      case LANG_PORTUGUESE:
+       switch (sub)
+         {
+         case SUBLANG_PORTUGUESE: return "pt_PT";
+         /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
+            Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
+         case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
+         }
+       return "pt";
+      case LANG_PUNJABI:
+       switch (sub)
+         {
+         case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
+         case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
+         }
+       return "pa";
+      case LANG_RHAETO_ROMANCE: return "rm_CH";
+      case LANG_ROMANIAN:
+       switch (sub)
+         {
+         case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
+         case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
+         }
+       return "ro";
+      case LANG_RUSSIAN:
+       switch (sub)
+         {
+         case SUBLANG_DEFAULT: return "ru_RU";
+         }
+       return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD".  */
+      case LANG_SAAMI: /* actually Northern Sami */ return "se_NO";
+      case LANG_SANSKRIT: return "sa_IN";
+      case LANG_SINDHI:
+       switch (sub)
+         {
+         case SUBLANG_SINDHI_INDIA: return "sd_IN";
+         case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
+         }
+       return "sd";
+      case LANG_SINHALESE: return "si_LK";
+      case LANG_SLOVAK: return "sk_SK";
+      case LANG_SLOVENIAN: return "sl_SI";
+      case LANG_SOMALI: return "so_SO";
+      case LANG_SORBIAN:
+       /* FIXME: Adjust this when such locales appear on Unix.  */
+       return "wen_DE";
+      case LANG_SPANISH:
+       switch (sub)
+         {
+         case SUBLANG_SPANISH: return "es_ES";
+         case SUBLANG_SPANISH_MEXICAN: return "es_MX";
+         case SUBLANG_SPANISH_MODERN:
+           return "es_ES@modern";      /* not seen on Unix */
+         case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
+         case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
+         case SUBLANG_SPANISH_PANAMA: return "es_PA";
+         case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
+         case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
+         case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
+         case SUBLANG_SPANISH_PERU: return "es_PE";
+         case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
+         case SUBLANG_SPANISH_ECUADOR: return "es_EC";
+         case SUBLANG_SPANISH_CHILE: return "es_CL";
+         case SUBLANG_SPANISH_URUGUAY: return "es_UY";
+         case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
+         case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
+         case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
+         case SUBLANG_SPANISH_HONDURAS: return "es_HN";
+         case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
+         case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
+         }
+       return "es";
+      case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
+      case LANG_SWAHILI: return "sw_KE";
+      case LANG_SWEDISH:
+       switch (sub)
+         {
+         case SUBLANG_DEFAULT: return "sv_SE";
+         case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
+         }
+       return "sv";
+      case LANG_SYRIAC: return "syr_TR"; /* An extinct language.  */
+      case LANG_TAGALOG: return "tl_PH";
+      case LANG_TAJIK: return "tg_TJ";
+      case LANG_TAMAZIGHT:
+       switch (sub)
+         {
+         /* FIXME: Adjust this when Tamazight locales appear on Unix.  */
+         case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
+         case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin";
+         }
+       return "ber_MA";
+      case LANG_TAMIL:
+       switch (sub)
+         {
+         case SUBLANG_DEFAULT: return "ta_IN";
+         }
+       return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG".  */
+      case LANG_TATAR: return "tt_RU";
+      case LANG_TELUGU: return "te_IN";
+      case LANG_THAI: return "th_TH";
+      case LANG_TIBETAN: return "bo_CN";
+      case LANG_TIGRINYA:
+       switch (sub)
+         {
+         case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET";
+         case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
+         }
+       return "ti";
+      case LANG_TSONGA: return "ts_ZA";
+      case LANG_TSWANA: return "tn_BW";
+      case LANG_TURKISH: return "tr_TR";
+      case LANG_TURKMEN: return "tk_TM";
+      case LANG_UKRAINIAN: return "uk_UA";
+      case LANG_URDU:
+       switch (sub)
+         {
+         case SUBLANG_URDU_PAKISTAN: return "ur_PK";
+         case SUBLANG_URDU_INDIA: return "ur_IN";
+         }
+       return "ur";
+      case LANG_UZBEK:
+       switch (sub)
+         {
+         case SUBLANG_UZBEK_LATIN: return "uz_UZ";
+         case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
+         }
+       return "uz";
+      case LANG_VENDA: return "ve_ZA";
+      case LANG_VIETNAMESE: return "vi_VN";
+      case LANG_WELSH: return "cy_GB";
+      case LANG_XHOSA: return "xh_ZA";
+      case LANG_YI: return "sit_CN";
+      case LANG_YIDDISH: return "yi_IL";
+      case LANG_YORUBA: return "yo_NG";
+      case LANG_ZULU: return "zu_ZA";
+      default: return "C";
+      }
+  }
+# endif
+#endif
+}
+
+const char *
+_nl_locale_name (int category, const char *categoryname)
+{
+  const char *retval;
+
+  retval = _nl_locale_name_posix (category, categoryname);
+  if (retval != NULL)
+    return retval;
+
+  return _nl_locale_name_default ();
+}
diff --git a/intl/log.c b/intl/log.c
new file mode 100644 (file)
index 0000000..cb6076e
--- /dev/null
@@ -0,0 +1,98 @@
+/* Log file output.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Print an ASCII string with quotes and escape sequences where needed.  */
+static void
+print_escaped (FILE *stream, const char *str)
+{
+  putc ('"', stream);
+  for (; *str != '\0'; str++)
+    if (*str == '\n')
+      {
+       fputs ("\\n\"", stream);
+       if (str[1] == '\0')
+         return;
+       fputs ("\n\"", stream);
+      }
+    else
+      {
+       if (*str == '"' || *str == '\\')
+         putc ('\\', stream);
+       putc (*str, stream);
+      }
+  putc ('"', stream);
+}
+
+/* Add to the log file an entry denoting a failed translation.  */
+void
+_nl_log_untranslated (const char *logfilename, const char *domainname,
+                     const char *msgid1, const char *msgid2, int plural)
+{
+  static char *last_logfilename = NULL;
+  static FILE *last_logfile = NULL;
+  FILE *logfile;
+
+  /* Can we reuse the last opened logfile?  */
+  if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
+    {
+      /* Close the last used logfile.  */
+      if (last_logfilename != NULL)
+       {
+         if (last_logfile != NULL)
+           {
+             fclose (last_logfile);
+             last_logfile = NULL;
+           }
+         free (last_logfilename);
+         last_logfilename = NULL;
+       }
+      /* Open the logfile.  */
+      last_logfilename = (char *) malloc (strlen (logfilename) + 1);
+      if (last_logfilename == NULL)
+       return;
+      strcpy (last_logfilename, logfilename);
+      last_logfile = fopen (logfilename, "a");
+      if (last_logfile == NULL)
+       return;
+    }
+  logfile = last_logfile;
+
+  fprintf (logfile, "domain ");
+  print_escaped (logfile, domainname);
+  fprintf (logfile, "\nmsgid ");
+  print_escaped (logfile, msgid1);
+  if (plural)
+    {
+      fprintf (logfile, "\nmsgid_plural ");
+      print_escaped (logfile, msgid2);
+      fprintf (logfile, "\nmsgstr[0] \"\"\n");
+    }
+  else
+    fprintf (logfile, "\nmsgstr \"\"\n");
+  putc ('\n', logfile);
+}
diff --git a/intl/ngettext.c b/intl/ngettext.c
new file mode 100644 (file)
index 0000000..e73e00c
--- /dev/null
@@ -0,0 +1,65 @@
+/* Implementation of ngettext(3) function.
+   Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h>           /* Just for NULL.  */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+#include <locale.h>
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define NGETTEXT __ngettext
+# define DCNGETTEXT __dcngettext
+#else
+# define NGETTEXT libintl_ngettext
+# define DCNGETTEXT libintl_dcngettext
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
+   text).  */
+char *
+NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n)
+{
+  return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__ngettext, ngettext);
+#endif
diff --git a/intl/os2compat.c b/intl/os2compat.c
new file mode 100644 (file)
index 0000000..c8dc33e
--- /dev/null
@@ -0,0 +1,98 @@
+/* OS/2 compatibility functions.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#define OS2_AWARE
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/param.h>
+
+/* A version of getenv() that works from DLLs */
+extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
+
+char *
+_nl_getenv (const char *name)
+{
+  unsigned char *value;
+  if (DosScanEnv (name, &value))
+    return NULL;
+  else
+    return value;
+}
+
+/* A fixed size buffer.  */
+char libintl_nl_default_dirname[MAXPATHLEN+1];
+
+char *_nlos2_libdir = NULL;
+char *_nlos2_localealiaspath = NULL;
+char *_nlos2_localedir = NULL;
+
+static __attribute__((constructor)) void
+nlos2_initialize ()
+{
+  char *root = getenv ("UNIXROOT");
+  char *gnulocaledir = getenv ("GNULOCALEDIR");
+
+  _nlos2_libdir = gnulocaledir;
+  if (!_nlos2_libdir)
+    {
+      if (root)
+        {
+          size_t sl = strlen (root);
+          _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
+          memcpy (_nlos2_libdir, root, sl);
+          memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
+        }
+      else
+        _nlos2_libdir = LIBDIR;
+    }
+
+  _nlos2_localealiaspath = gnulocaledir;
+  if (!_nlos2_localealiaspath)
+    {
+      if (root)
+        {
+          size_t sl = strlen (root);
+          _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
+          memcpy (_nlos2_localealiaspath, root, sl);
+          memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
+        }
+     else
+        _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
+    }
+
+  _nlos2_localedir = gnulocaledir;
+  if (!_nlos2_localedir)
+    {
+      if (root)
+        {
+          size_t sl = strlen (root);
+          _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
+          memcpy (_nlos2_localedir, root, sl);
+          memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
+        }
+      else
+        _nlos2_localedir = LOCALEDIR;
+    }
+
+  if (strlen (_nlos2_localedir) <= MAXPATHLEN)
+    strcpy (libintl_nl_default_dirname, _nlos2_localedir);
+}
diff --git a/intl/os2compat.h b/intl/os2compat.h
new file mode 100644 (file)
index 0000000..4f74e8c
--- /dev/null
@@ -0,0 +1,46 @@
+/* OS/2 compatibility defines.
+   This file is intended to be included from config.h
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* When included from os2compat.h we need all the original definitions */
+#ifndef OS2_AWARE
+
+#undef LIBDIR
+#define LIBDIR                 _nlos2_libdir
+extern char *_nlos2_libdir;
+
+#undef LOCALEDIR
+#define LOCALEDIR              _nlos2_localedir
+extern char *_nlos2_localedir;
+
+#undef LOCALE_ALIAS_PATH
+#define LOCALE_ALIAS_PATH      _nlos2_localealiaspath
+extern char *_nlos2_localealiaspath;
+
+#endif
+
+#undef HAVE_STRCASECMP
+#define HAVE_STRCASECMP 1
+#define strcasecmp stricmp
+#define strncasecmp strnicmp
+
+/* We have our own getenv() which works even if library is compiled as DLL */
+#define getenv _nl_getenv
+
+/* Older versions of gettext used -1 as the value of LC_MESSAGES */
+#define LC_MESSAGES_COMPAT (-1)
diff --git a/intl/osdep.c b/intl/osdep.c
new file mode 100644 (file)
index 0000000..b372598
--- /dev/null
@@ -0,0 +1,24 @@
+/* OS dependent parts of libintl.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#if defined __EMX__
+# include "os2compat.c"
+#else
+/* Avoid AIX compiler warning.  */
+typedef int dummy;
+#endif
diff --git a/intl/plural-exp.c b/intl/plural-exp.c
new file mode 100644 (file)
index 0000000..8c04e64
--- /dev/null
@@ -0,0 +1,154 @@
+/* Expression parsing for plural form selection.
+   Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "plural-exp.h"
+
+#if (defined __GNUC__ && !defined __APPLE_CC__) \
+    || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+
+/* These structs are the constant expression for the germanic plural
+   form determination.  It represents the expression  "n != 1".  */
+static const struct expression plvar =
+{
+  .nargs = 0,
+  .operation = var,
+};
+static const struct expression plone =
+{
+  .nargs = 0,
+  .operation = num,
+  .val =
+  {
+    .num = 1
+  }
+};
+struct expression GERMANIC_PLURAL =
+{
+  .nargs = 2,
+  .operation = not_equal,
+  .val =
+  {
+    .args =
+    {
+      [0] = (struct expression *) &plvar,
+      [1] = (struct expression *) &plone
+    }
+  }
+};
+
+# define INIT_GERMANIC_PLURAL()
+
+#else
+
+/* For compilers without support for ISO C 99 struct/union initializers:
+   Initialization at run-time.  */
+
+static struct expression plvar;
+static struct expression plone;
+struct expression GERMANIC_PLURAL;
+
+static void
+init_germanic_plural ()
+{
+  if (plone.val.num == 0)
+    {
+      plvar.nargs = 0;
+      plvar.operation = var;
+
+      plone.nargs = 0;
+      plone.operation = num;
+      plone.val.num = 1;
+
+      GERMANIC_PLURAL.nargs = 2;
+      GERMANIC_PLURAL.operation = not_equal;
+      GERMANIC_PLURAL.val.args[0] = &plvar;
+      GERMANIC_PLURAL.val.args[1] = &plone;
+    }
+}
+
+# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
+
+#endif
+
+void
+internal_function
+EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp,
+                          unsigned long int *npluralsp)
+{
+  if (nullentry != NULL)
+    {
+      const char *plural;
+      const char *nplurals;
+
+      plural = strstr (nullentry, "plural=");
+      nplurals = strstr (nullentry, "nplurals=");
+      if (plural == NULL || nplurals == NULL)
+       goto no_plural;
+      else
+       {
+         char *endp;
+         unsigned long int n;
+         struct parse_args args;
+
+         /* First get the number.  */
+         nplurals += 9;
+         while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
+           ++nplurals;
+         if (!(*nplurals >= '0' && *nplurals <= '9'))
+           goto no_plural;
+#if defined HAVE_STRTOUL || defined _LIBC
+         n = strtoul (nplurals, &endp, 10);
+#else
+         for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
+           n = n * 10 + (*endp - '0');
+#endif
+         if (nplurals == endp)
+           goto no_plural;
+         *npluralsp = n;
+
+         /* Due to the restrictions bison imposes onto the interface of the
+            scanner function we have to put the input string and the result
+            passed up from the parser into the same structure which address
+            is passed down to the parser.  */
+         plural += 7;
+         args.cp = plural;
+         if (PLURAL_PARSE (&args) != 0)
+           goto no_plural;
+         *pluralp = args.res;
+       }
+    }
+  else
+    {
+      /* By default we are using the Germanic form: singular form only
+         for `one', the plural form otherwise.  Yes, this is also what
+         English is using since English is a Germanic language.  */
+    no_plural:
+      INIT_GERMANIC_PLURAL ();
+      *pluralp = &GERMANIC_PLURAL;
+      *npluralsp = 2;
+    }
+}
diff --git a/intl/plural-exp.h b/intl/plural-exp.h
new file mode 100644 (file)
index 0000000..49e2c5b
--- /dev/null
@@ -0,0 +1,118 @@
+/* Expression parsing and evaluation for plural form selection.
+   Copyright (C) 2000-2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _PLURAL_EXP_H
+#define _PLURAL_EXP_H
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+
+/* This is the representation of the expressions to determine the
+   plural form.  */
+struct expression
+{
+  int nargs;                   /* Number of arguments.  */
+  enum operator
+  {
+    /* Without arguments:  */
+    var,                       /* The variable "n".  */
+    num,                       /* Decimal number.  */
+    /* Unary operators:  */
+    lnot,                      /* Logical NOT.  */
+    /* Binary operators:  */
+    mult,                      /* Multiplication.  */
+    divide,                    /* Division.  */
+    module,                    /* Modulo operation.  */
+    plus,                      /* Addition.  */
+    minus,                     /* Subtraction.  */
+    less_than,                 /* Comparison.  */
+    greater_than,              /* Comparison.  */
+    less_or_equal,             /* Comparison.  */
+    greater_or_equal,          /* Comparison.  */
+    equal,                     /* Comparison for equality.  */
+    not_equal,                 /* Comparison for inequality.  */
+    land,                      /* Logical AND.  */
+    lor,                       /* Logical OR.  */
+    /* Ternary operators:  */
+    qmop                       /* Question mark operator.  */
+  } operation;
+  union
+  {
+    unsigned long int num;     /* Number value for `num'.  */
+    struct expression *args[3];        /* Up to three arguments.  */
+  } val;
+};
+
+/* This is the data structure to pass information to the parser and get
+   the result in a thread-safe way.  */
+struct parse_args
+{
+  const char *cp;
+  struct expression *res;
+};
+
+
+/* Names for the libintl functions are a problem.  This source code is used
+   1. in the GNU C Library library,
+   2. in the GNU libintl library,
+   3. in the GNU gettext tools.
+   The function names in each situation must be different, to allow for
+   binary incompatible changes in 'struct expression'.  Furthermore,
+   1. in the GNU C Library library, the names have a __ prefix,
+   2.+3. in the GNU libintl library and in the GNU gettext tools, the names
+         must follow ANSI C and not start with __.
+   So we have to distinguish the three cases.  */
+#ifdef _LIBC
+# define FREE_EXPRESSION __gettext_free_exp
+# define PLURAL_PARSE __gettextparse
+# define GERMANIC_PLURAL __gettext_germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
+#elif defined (IN_LIBINTL)
+# define FREE_EXPRESSION libintl_gettext_free_exp
+# define PLURAL_PARSE libintl_gettextparse
+# define GERMANIC_PLURAL libintl_gettext_germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
+#else
+# define FREE_EXPRESSION free_plural_expression
+# define PLURAL_PARSE parse_plural_expression
+# define GERMANIC_PLURAL germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
+#endif
+
+extern void FREE_EXPRESSION (struct expression *exp)
+     internal_function;
+extern int PLURAL_PARSE (void *arg);
+extern struct expression GERMANIC_PLURAL attribute_hidden;
+extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
+                                      struct expression **pluralp,
+                                      unsigned long int *npluralsp)
+     internal_function;
+
+#if !defined (_LIBC) && !defined (IN_LIBINTL)
+extern unsigned long int plural_eval (struct expression *pexp,
+                                     unsigned long int n);
+#endif
+
+#endif /* _PLURAL_EXP_H */
diff --git a/intl/plural.c b/intl/plural.c
new file mode 100644 (file)
index 0000000..72494f9
--- /dev/null
@@ -0,0 +1,1490 @@
+/* A Bison parser, made from plural.y
+   by GNU bison 1.35.  */
+
+#define YYBISON 1  /* Identify Bison output.  */
+
+#define yyparse __gettextparse
+#define yylex __gettextlex
+#define yyerror __gettexterror
+#define yylval __gettextlval
+#define yychar __gettextchar
+#define yydebug __gettextdebug
+#define yynerrs __gettextnerrs
+# define       EQUOP2  257
+# define       CMPOP2  258
+# define       ADDOP2  259
+# define       MULOP2  260
+# define       NUMBER  261
+
+#line 1 "plural.y"
+
+/* Expression parsing for plural form selection.
+   Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* The bison generated parser uses alloca.  AIX 3 forces us to put this
+   declaration at the beginning of the file.  The declaration in bison's
+   skeleton file comes too late.  This must come before <config.h>
+   because <config.h> may include arbitrary system headers.  */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include "plural-exp.h"
+
+/* The main function generated by the parser is called __gettextparse,
+   but we want it to be called PLURAL_PARSE.  */
+#ifndef _LIBC
+# define __gettextparse PLURAL_PARSE
+#endif
+
+#define YYLEX_PARAM    &((struct parse_args *) arg)->cp
+#define YYPARSE_PARAM  arg
+
+#line 49 "plural.y"
+#ifndef YYSTYPE
+typedef union {
+  unsigned long int num;
+  enum operator op;
+  struct expression *exp;
+} yystype;
+# define YYSTYPE yystype
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+#line 55 "plural.y"
+
+/* Prototypes for local functions.  */
+static int yylex (YYSTYPE *lval, const char **pexp);
+static void yyerror (const char *str);
+
+/* Allocation of expressions.  */
+
+static struct expression *
+new_exp (int nargs, enum operator op, struct expression * const *args)
+{
+  int i;
+  struct expression *newp;
+
+  /* If any of the argument could not be malloc'ed, just return NULL.  */
+  for (i = nargs - 1; i >= 0; i--)
+    if (args[i] == NULL)
+      goto fail;
+
+  /* Allocate a new expression.  */
+  newp = (struct expression *) malloc (sizeof (*newp));
+  if (newp != NULL)
+    {
+      newp->nargs = nargs;
+      newp->operation = op;
+      for (i = nargs - 1; i >= 0; i--)
+       newp->val.args[i] = args[i];
+      return newp;
+    }
+
+ fail:
+  for (i = nargs - 1; i >= 0; i--)
+    FREE_EXPRESSION (args[i]);
+
+  return NULL;
+}
+
+static inline struct expression *
+new_exp_0 (enum operator op)
+{
+  return new_exp (0, op, NULL);
+}
+
+static inline struct expression *
+new_exp_1 (enum operator op, struct expression *right)
+{
+  struct expression *args[1];
+
+  args[0] = right;
+  return new_exp (1, op, args);
+}
+
+static struct expression *
+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
+{
+  struct expression *args[2];
+
+  args[0] = left;
+  args[1] = right;
+  return new_exp (2, op, args);
+}
+
+static inline struct expression *
+new_exp_3 (enum operator op, struct expression *bexp,
+          struct expression *tbranch, struct expression *fbranch)
+{
+  struct expression *args[3];
+
+  args[0] = bexp;
+  args[1] = tbranch;
+  args[2] = fbranch;
+  return new_exp (3, op, args);
+}
+
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+
+
+#define        YYFINAL         27
+#define        YYFLAG          -32768
+#define        YYNTBASE        16
+
+/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
+#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
+
+/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
+static const char yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,    10,     2,     2,     2,     2,     5,     2,
+      14,    15,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    12,     2,
+       2,     2,     2,     3,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+      13,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     4,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     6,     7,     8,
+       9,    11
+};
+
+#if YYDEBUG
+static const short yyprhs[] =
+{
+       0,     0,     2,     8,    12,    16,    20,    24,    28,    32,
+      35,    37,    39
+};
+static const short yyrhs[] =
+{
+      17,     0,    17,     3,    17,    12,    17,     0,    17,     4,
+      17,     0,    17,     5,    17,     0,    17,     6,    17,     0,
+      17,     7,    17,     0,    17,     8,    17,     0,    17,     9,
+      17,     0,    10,    17,     0,    13,     0,    11,     0,    14,
+      17,    15,     0
+};
+
+#endif
+
+#if YYDEBUG
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const short yyrline[] =
+{
+       0,   150,   158,   162,   166,   170,   174,   178,   182,   186,
+     190,   194,   199
+};
+#endif
+
+
+#if (YYDEBUG) || defined YYERROR_VERBOSE
+
+/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
+static const char *const yytname[] =
+{
+  "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2", 
+  "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'", 
+  "start", "exp", 0
+};
+#endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const short yyr1[] =
+{
+       0,    16,    17,    17,    17,    17,    17,    17,    17,    17,
+      17,    17,    17
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const short yyr2[] =
+{
+       0,     1,     5,     3,     3,     3,     3,     3,     3,     2,
+       1,     1,     3
+};
+
+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
+   doesn't specify something else to do.  Zero means the default is an
+   error. */
+static const short yydefact[] =
+{
+       0,     0,    11,    10,     0,     1,     9,     0,     0,     0,
+       0,     0,     0,     0,     0,    12,     0,     3,     4,     5,
+       6,     7,     8,     0,     2,     0,     0,     0
+};
+
+static const short yydefgoto[] =
+{
+      25,     5
+};
+
+static const short yypact[] =
+{
+      -9,    -9,-32768,-32768,    -9,    34,-32768,    11,    -9,    -9,
+      -9,    -9,    -9,    -9,    -9,-32768,    24,    39,    43,    16,
+      26,    -3,-32768,    -9,    34,    21,    53,-32768
+};
+
+static const short yypgoto[] =
+{
+  -32768,    -1
+};
+
+
+#define        YYLAST          53
+
+
+static const short yytable[] =
+{
+       6,     1,     2,     7,     3,     4,    14,    16,    17,    18,
+      19,    20,    21,    22,     8,     9,    10,    11,    12,    13,
+      14,    26,    24,    12,    13,    14,    15,     8,     9,    10,
+      11,    12,    13,    14,    13,    14,    23,     8,     9,    10,
+      11,    12,    13,    14,    10,    11,    12,    13,    14,    11,
+      12,    13,    14,    27
+};
+
+static const short yycheck[] =
+{
+       1,    10,    11,     4,    13,    14,     9,     8,     9,    10,
+      11,    12,    13,    14,     3,     4,     5,     6,     7,     8,
+       9,     0,    23,     7,     8,     9,    15,     3,     4,     5,
+       6,     7,     8,     9,     8,     9,    12,     3,     4,     5,
+       6,     7,     8,     9,     5,     6,     7,     8,     9,     6,
+       7,     8,     9,     0
+};
+#define YYPURE 1
+
+/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
+#line 3 "/usr/local/share/bison/bison.simple"
+
+/* Skeleton output parser for bison,
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
+   Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* This is the parser code that is written into each bison parser when
+   the %semantic_parser declaration is not specified in the grammar.
+   It was written by Richard Stallman by simplifying the hairy parser
+   used when %semantic_parser is specified.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# if YYSTACK_USE_ALLOCA
+#  define YYSTACK_ALLOC alloca
+# else
+#  ifndef YYSTACK_USE_ALLOCA
+#   if defined (alloca) || defined (_ALLOCA_H)
+#    define YYSTACK_ALLOC alloca
+#   else
+#    ifdef __GNUC__
+#     define YYSTACK_ALLOC __builtin_alloca
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning. */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+#  if defined (__STDC__) || defined (__cplusplus)
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   define YYSIZE_T size_t
+#  endif
+#  define YYSTACK_ALLOC malloc
+#  define YYSTACK_FREE free
+# endif
+#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
+
+
+#if (! defined (yyoverflow) \
+     && (! defined (__cplusplus) \
+        || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  short yyss;
+  YYSTYPE yyvs;
+# if YYLSP_NEEDED
+  YYLTYPE yyls;
+# endif
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# if YYLSP_NEEDED
+#  define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))     \
+      + 2 * YYSTACK_GAP_MAX)
+# else
+#  define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (short) + sizeof (YYSTYPE))                                \
+      + YYSTACK_GAP_MAX)
+# endif
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)             \
+      do                                       \
+       {                                       \
+         register YYSIZE_T yyi;                \
+         for (yyi = 0; yyi < (Count); yyi++)   \
+           (To)[yyi] = (From)[yyi];            \
+       }                                       \
+      while (0)
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)                                       \
+    do                                                                 \
+      {                                                                        \
+       YYSIZE_T yynewbytes;                                            \
+       YYCOPY (&yyptr->Stack, Stack, yysize);                          \
+       Stack = &yyptr->Stack;                                          \
+       yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;   \
+       yyptr += yynewbytes / sizeof (*yyptr);                          \
+      }                                                                        \
+    while (0)
+
+#endif
+
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok                (yyerrstatus = 0)
+#define yyclearin      (yychar = YYEMPTY)
+#define YYEMPTY                -2
+#define YYEOF          0
+#define YYACCEPT       goto yyacceptlab
+#define YYABORT        goto yyabortlab
+#define YYERROR                goto yyerrlab1
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+#define YYFAIL         goto yyerrlab
+#define YYRECOVERING()  (!!yyerrstatus)
+#define YYBACKUP(Token, Value)                                 \
+do                                                             \
+  if (yychar == YYEMPTY && yylen == 1)                         \
+    {                                                          \
+      yychar = (Token);                                                \
+      yylval = (Value);                                                \
+      yychar1 = YYTRANSLATE (yychar);                          \
+      YYPOPSTACK;                                              \
+      goto yybackup;                                           \
+    }                                                          \
+  else                                                         \
+    {                                                          \
+      yyerror ("syntax error: cannot back up");                        \
+      YYERROR;                                                 \
+    }                                                          \
+while (0)
+
+#define YYTERROR       1
+#define YYERRCODE      256
+
+
+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
+   are run).
+
+   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
+   first token.  By default, to implement support for ranges, extend
+   its range to the last symbol.  */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)               \
+   Current.last_line   = Rhs[N].last_line;     \
+   Current.last_column = Rhs[N].last_column;
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#if YYPURE
+# if YYLSP_NEEDED
+#  ifdef YYLEX_PARAM
+#   define YYLEX               yylex (&yylval, &yylloc, YYLEX_PARAM)
+#  else
+#   define YYLEX               yylex (&yylval, &yylloc)
+#  endif
+# else /* !YYLSP_NEEDED */
+#  ifdef YYLEX_PARAM
+#   define YYLEX               yylex (&yylval, YYLEX_PARAM)
+#  else
+#   define YYLEX               yylex (&yylval)
+#  endif
+# endif /* !YYLSP_NEEDED */
+#else /* !YYPURE */
+# define YYLEX                 yylex ()
+#endif /* !YYPURE */
+
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)                       \
+do {                                           \
+  if (yydebug)                                 \
+    YYFPRINTF Args;                            \
+} while (0)
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+#endif /* !YYDEBUG */
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef        YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#if YYMAXDEPTH == 0
+# undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+\f
+#ifdef YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined (__GLIBC__) && defined (_STRING_H)
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+static YYSIZE_T
+#   if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+#   else
+yystrlen (yystr)
+     const char *yystr;
+#   endif
+{
+  register const char *yys = yystr;
+
+  while (*yys++ != '\0')
+    continue;
+
+  return yys - yystr - 1;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+static char *
+#   if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+#   else
+yystpcpy (yydest, yysrc)
+     char *yydest;
+     const char *yysrc;
+#   endif
+{
+  register char *yyd = yydest;
+  register const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+#endif
+\f
+#line 315 "/usr/local/share/bison/bison.simple"
+
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+   into yyparse.  The argument should have type void *.
+   It should actually point to an object.
+   Grammar actions can access the variable by casting it
+   to the proper pointer type.  */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#  define YYPARSE_PARAM_DECL
+# else
+#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+# endif
+#else /* !YYPARSE_PARAM */
+# define YYPARSE_PARAM_ARG
+# define YYPARSE_PARAM_DECL
+#endif /* !YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes.  */
+#ifdef __GNUC__
+# ifdef YYPARSE_PARAM
+int yyparse (void *);
+# else
+int yyparse (void);
+# endif
+#endif
+
+/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
+   variables are global, or local to YYPARSE.  */
+
+#define YY_DECL_NON_LSP_VARIABLES                      \
+/* The lookahead symbol.  */                           \
+int yychar;                                            \
+                                                       \
+/* The semantic value of the lookahead symbol. */      \
+YYSTYPE yylval;                                                \
+                                                       \
+/* Number of parse errors so far.  */                  \
+int yynerrs;
+
+#if YYLSP_NEEDED
+# define YY_DECL_VARIABLES                     \
+YY_DECL_NON_LSP_VARIABLES                      \
+                                               \
+/* Location data for the lookahead symbol.  */ \
+YYLTYPE yylloc;
+#else
+# define YY_DECL_VARIABLES                     \
+YY_DECL_NON_LSP_VARIABLES
+#endif
+
+
+/* If nonreentrant, generate the variables here. */
+
+#if !YYPURE
+YY_DECL_VARIABLES
+#endif  /* !YYPURE */
+
+int
+yyparse (YYPARSE_PARAM_ARG)
+     YYPARSE_PARAM_DECL
+{
+  /* If reentrant, generate the variables here. */
+#if YYPURE
+  YY_DECL_VARIABLES
+#endif  /* !YYPURE */
+
+  register int yystate;
+  register int yyn;
+  int yyresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int yyerrstatus;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yychar1 = 0;
+
+  /* Three stacks and their tools:
+     `yyss': related to states,
+     `yyvs': related to semantic values,
+     `yyls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow yyoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack. */
+  short        yyssa[YYINITDEPTH];
+  short *yyss = yyssa;
+  register short *yyssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE yyvsa[YYINITDEPTH];
+  YYSTYPE *yyvs = yyvsa;
+  register YYSTYPE *yyvsp;
+
+#if YYLSP_NEEDED
+  /* The location stack.  */
+  YYLTYPE yylsa[YYINITDEPTH];
+  YYLTYPE *yyls = yylsa;
+  YYLTYPE *yylsp;
+#endif
+
+#if YYLSP_NEEDED
+# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
+#else
+# define YYPOPSTACK   (yyvsp--, yyssp--)
+#endif
+
+  YYSIZE_T yystacksize = YYINITDEPTH;
+
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+#if YYLSP_NEEDED
+  YYLTYPE yyloc;
+#endif
+
+  /* When reducing, the number of symbols on the RHS of the reduced
+     rule. */
+  int yylen;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;            /* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss;
+  yyvsp = yyvs;
+#if YYLSP_NEEDED
+  yylsp = yyls;
+#endif
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed. so pushing a state here evens the stacks.
+     */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyssp >= yyss + yystacksize - 1)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+       /* Give user a chance to reallocate the stack. Use copies of
+          these so that the &'s don't force the real ones into
+          memory.  */
+       YYSTYPE *yyvs1 = yyvs;
+       short *yyss1 = yyss;
+
+       /* Each stack pointer address is followed by the size of the
+          data in use in that stack, in bytes.  */
+# if YYLSP_NEEDED
+       YYLTYPE *yyls1 = yyls;
+       /* This used to be a conditional around just the two extra args,
+          but that might be undefined if yyoverflow is a macro.  */
+       yyoverflow ("parser stack overflow",
+                   &yyss1, yysize * sizeof (*yyssp),
+                   &yyvs1, yysize * sizeof (*yyvsp),
+                   &yyls1, yysize * sizeof (*yylsp),
+                   &yystacksize);
+       yyls = yyls1;
+# else
+       yyoverflow ("parser stack overflow",
+                   &yyss1, yysize * sizeof (*yyssp),
+                   &yyvs1, yysize * sizeof (*yyvsp),
+                   &yystacksize);
+# endif
+       yyss = yyss1;
+       yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyoverflowlab;
+# else
+      /* Extend the stack our own way.  */
+      if (yystacksize >= YYMAXDEPTH)
+       goto yyoverflowlab;
+      yystacksize *= 2;
+      if (yystacksize > YYMAXDEPTH)
+       yystacksize = YYMAXDEPTH;
+
+      {
+       short *yyss1 = yyss;
+       union yyalloc *yyptr =
+         (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+       if (! yyptr)
+         goto yyoverflowlab;
+       YYSTACK_RELOCATE (yyss);
+       YYSTACK_RELOCATE (yyvs);
+# if YYLSP_NEEDED
+       YYSTACK_RELOCATE (yyls);
+# endif
+# undef YYSTACK_RELOCATE
+       if (yyss1 != yyssa)
+         YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+#if YYLSP_NEEDED
+      yylsp = yyls + yysize - 1;
+#endif
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+                 (unsigned long int) yystacksize));
+
+      if (yyssp >= yyss + yystacksize - 1)
+       YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  goto yybackup;
+
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state.  */
+/* Read a lookahead token if we need one and don't already have one.  */
+/* yyresume: */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* yychar is either YYEMPTY or YYEOF
+     or a valid token in external form.  */
+
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  /* Convert token to internal form (in yychar1) for indexing tables with */
+
+  if (yychar <= 0)             /* This means end of input. */
+    {
+      yychar1 = 0;
+      yychar = YYEOF;          /* Don't call YYLEX any more */
+
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yychar1 = YYTRANSLATE (yychar);
+
+#if YYDEBUG
+     /* We have to keep this `#if YYDEBUG', since we use variables
+       which are defined only if `YYDEBUG' is set.  */
+      if (yydebug)
+       {
+         YYFPRINTF (stderr, "Next token is %d (%s",
+                    yychar, yytname[yychar1]);
+         /* Give the individual parser a way to print the precise
+            meaning of a token, for further debugging info.  */
+# ifdef YYPRINT
+         YYPRINT (stderr, yychar, yylval);
+# endif
+         YYFPRINTF (stderr, ")\n");
+       }
+#endif
+    }
+
+  yyn += yychar1;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+    goto yydefault;
+
+  yyn = yytable[yyn];
+
+  /* yyn is what to do for this token type in this state.
+     Negative => reduce, -yyn is rule number.
+     Positive => shift, yyn is new state.
+       New state is final state => don't bother to shift,
+       just return success.
+     0, or most negative number => error.  */
+
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+       goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrlab;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Shift the lookahead token.  */
+  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
+             yychar, yytname[yychar1]));
+
+  /* Discard the token being shifted unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  *++yyvsp = yylval;
+#if YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to the semantic value of
+     the lookahead token.  This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+#if YYLSP_NEEDED
+  /* Similarly for the default location.  Let the user run additional
+     commands if for instance locations are ranges.  */
+  yyloc = yylsp[1-yylen];
+  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
+#endif
+
+#if YYDEBUG
+  /* We have to keep this `#if YYDEBUG', since we use variables which
+     are defined only if `YYDEBUG' is set.  */
+  if (yydebug)
+    {
+      int yyi;
+
+      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
+                yyn, yyrline[yyn]);
+
+      /* Print the symbols being reduced, and their result.  */
+      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
+       YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+    }
+#endif
+
+  switch (yyn) {
+
+case 1:
+#line 151 "plural.y"
+{
+           if (yyvsp[0].exp == NULL)
+             YYABORT;
+           ((struct parse_args *) arg)->res = yyvsp[0].exp;
+         }
+    break;
+case 2:
+#line 159 "plural.y"
+{
+           yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
+         }
+    break;
+case 3:
+#line 163 "plural.y"
+{
+           yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
+         }
+    break;
+case 4:
+#line 167 "plural.y"
+{
+           yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
+         }
+    break;
+case 5:
+#line 171 "plural.y"
+{
+           yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+         }
+    break;
+case 6:
+#line 175 "plural.y"
+{
+           yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+         }
+    break;
+case 7:
+#line 179 "plural.y"
+{
+           yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+         }
+    break;
+case 8:
+#line 183 "plural.y"
+{
+           yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
+         }
+    break;
+case 9:
+#line 187 "plural.y"
+{
+           yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
+         }
+    break;
+case 10:
+#line 191 "plural.y"
+{
+           yyval.exp = new_exp_0 (var);
+         }
+    break;
+case 11:
+#line 195 "plural.y"
+{
+           if ((yyval.exp = new_exp_0 (num)) != NULL)
+             yyval.exp->val.num = yyvsp[0].num;
+         }
+    break;
+case 12:
+#line 200 "plural.y"
+{
+           yyval.exp = yyvsp[-1].exp;
+         }
+    break;
+}
+
+#line 705 "/usr/local/share/bison/bison.simple"
+
+\f
+  yyvsp -= yylen;
+  yyssp -= yylen;
+#if YYLSP_NEEDED
+  yylsp -= yylen;
+#endif
+
+#if YYDEBUG
+  if (yydebug)
+    {
+      short *yyssp1 = yyss - 1;
+      YYFPRINTF (stderr, "state stack now");
+      while (yyssp1 != yyssp)
+       YYFPRINTF (stderr, " %d", *++yyssp1);
+      YYFPRINTF (stderr, "\n");
+    }
+#endif
+
+  *++yyvsp = yyval;
+#if YYLSP_NEEDED
+  *++yylsp = yyloc;
+#endif
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTBASE];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+      yyn = yypact[yystate];
+
+      if (yyn > YYFLAG && yyn < YYLAST)
+       {
+         YYSIZE_T yysize = 0;
+         char *yymsg;
+         int yyx, yycount;
+
+         yycount = 0;
+         /* Start YYX at -YYN if negative to avoid negative indexes in
+            YYCHECK.  */
+         for (yyx = yyn < 0 ? -yyn : 0;
+              yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
+           if (yycheck[yyx + yyn] == yyx)
+             yysize += yystrlen (yytname[yyx]) + 15, yycount++;
+         yysize += yystrlen ("parse error, unexpected ") + 1;
+         yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
+         yymsg = (char *) YYSTACK_ALLOC (yysize);
+         if (yymsg != 0)
+           {
+             char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
+             yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
+
+             if (yycount < 5)
+               {
+                 yycount = 0;
+                 for (yyx = yyn < 0 ? -yyn : 0;
+                      yyx < (int) (sizeof (yytname) / sizeof (char *));
+                      yyx++)
+                   if (yycheck[yyx + yyn] == yyx)
+                     {
+                       const char *yyq = ! yycount ? ", expecting " : " or ";
+                       yyp = yystpcpy (yyp, yyq);
+                       yyp = yystpcpy (yyp, yytname[yyx]);
+                       yycount++;
+                     }
+               }
+             yyerror (yymsg);
+             YYSTACK_FREE (yymsg);
+           }
+         else
+           yyerror ("parse error; also virtual memory exhausted");
+       }
+      else
+#endif /* defined (YYERROR_VERBOSE) */
+       yyerror ("parse error");
+    }
+  goto yyerrlab1;
+
+
+/*--------------------------------------------------.
+| yyerrlab1 -- error raised explicitly by an action |
+`--------------------------------------------------*/
+yyerrlab1:
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+        error, discard it.  */
+
+      /* return failure if at end of input */
+      if (yychar == YYEOF)
+       YYABORT;
+      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
+                 yychar, yytname[yychar1]));
+      yychar = YYEMPTY;
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+
+  yyerrstatus = 3;             /* Each real token shifted decrements this */
+
+  goto yyerrhandle;
+
+
+/*-------------------------------------------------------------------.
+| yyerrdefault -- current state does not do anything special for the |
+| error token.                                                       |
+`-------------------------------------------------------------------*/
+yyerrdefault:
+#if 0
+  /* This is wrong; only states that explicitly want error tokens
+     should shift them.  */
+
+  /* If its default is to accept any token, ok.  Otherwise pop it.  */
+  yyn = yydefact[yystate];
+  if (yyn)
+    goto yydefault;
+#endif
+
+
+/*---------------------------------------------------------------.
+| yyerrpop -- pop the current state because it cannot handle the |
+| error token                                                    |
+`---------------------------------------------------------------*/
+yyerrpop:
+  if (yyssp == yyss)
+    YYABORT;
+  yyvsp--;
+  yystate = *--yyssp;
+#if YYLSP_NEEDED
+  yylsp--;
+#endif
+
+#if YYDEBUG
+  if (yydebug)
+    {
+      short *yyssp1 = yyss - 1;
+      YYFPRINTF (stderr, "Error: state stack now");
+      while (yyssp1 != yyssp)
+       YYFPRINTF (stderr, " %d", *++yyssp1);
+      YYFPRINTF (stderr, "\n");
+    }
+#endif
+
+/*--------------.
+| yyerrhandle.  |
+`--------------*/
+yyerrhandle:
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yyerrdefault;
+
+  yyn += YYTERROR;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+    goto yyerrdefault;
+
+  yyn = yytable[yyn];
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+       goto yyerrpop;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrpop;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  YYDPRINTF ((stderr, "Shifting error token, "));
+
+  *++yyvsp = yylval;
+#if YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+/*---------------------------------------------.
+| yyoverflowab -- parser overflow comes here.  |
+`---------------------------------------------*/
+yyoverflowlab:
+  yyerror ("parser stack overflow");
+  yyresult = 2;
+  /* Fall through.  */
+
+yyreturn:
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+  return yyresult;
+}
+#line 205 "plural.y"
+
+
+void
+internal_function
+FREE_EXPRESSION (struct expression *exp)
+{
+  if (exp == NULL)
+    return;
+
+  /* Handle the recursive case.  */
+  switch (exp->nargs)
+    {
+    case 3:
+      FREE_EXPRESSION (exp->val.args[2]);
+      /* FALLTHROUGH */
+    case 2:
+      FREE_EXPRESSION (exp->val.args[1]);
+      /* FALLTHROUGH */
+    case 1:
+      FREE_EXPRESSION (exp->val.args[0]);
+      /* FALLTHROUGH */
+    default:
+      break;
+    }
+
+  free (exp);
+}
+
+
+static int
+yylex (YYSTYPE *lval, const char **pexp)
+{
+  const char *exp = *pexp;
+  int result;
+
+  while (1)
+    {
+      if (exp[0] == '\0')
+       {
+         *pexp = exp;
+         return YYEOF;
+       }
+
+      if (exp[0] != ' ' && exp[0] != '\t')
+       break;
+
+      ++exp;
+    }
+
+  result = *exp++;
+  switch (result)
+    {
+    case '0': case '1': case '2': case '3': case '4':
+    case '5': case '6': case '7': case '8': case '9':
+      {
+       unsigned long int n = result - '0';
+       while (exp[0] >= '0' && exp[0] <= '9')
+         {
+           n *= 10;
+           n += exp[0] - '0';
+           ++exp;
+         }
+       lval->num = n;
+       result = NUMBER;
+      }
+      break;
+
+    case '=':
+      if (exp[0] == '=')
+       {
+         ++exp;
+         lval->op = equal;
+         result = EQUOP2;
+       }
+      else
+       result = YYERRCODE;
+      break;
+
+    case '!':
+      if (exp[0] == '=')
+       {
+         ++exp;
+         lval->op = not_equal;
+         result = EQUOP2;
+       }
+      break;
+
+    case '&':
+    case '|':
+      if (exp[0] == result)
+       ++exp;
+      else
+       result = YYERRCODE;
+      break;
+
+    case '<':
+      if (exp[0] == '=')
+       {
+         ++exp;
+         lval->op = less_or_equal;
+       }
+      else
+       lval->op = less_than;
+      result = CMPOP2;
+      break;
+
+    case '>':
+      if (exp[0] == '=')
+       {
+         ++exp;
+         lval->op = greater_or_equal;
+       }
+      else
+       lval->op = greater_than;
+      result = CMPOP2;
+      break;
+
+    case '*':
+      lval->op = mult;
+      result = MULOP2;
+      break;
+
+    case '/':
+      lval->op = divide;
+      result = MULOP2;
+      break;
+
+    case '%':
+      lval->op = module;
+      result = MULOP2;
+      break;
+
+    case '+':
+      lval->op = plus;
+      result = ADDOP2;
+      break;
+
+    case '-':
+      lval->op = minus;
+      result = ADDOP2;
+      break;
+
+    case 'n':
+    case '?':
+    case ':':
+    case '(':
+    case ')':
+      /* Nothing, just return the character.  */
+      break;
+
+    case ';':
+    case '\n':
+    case '\0':
+      /* Be safe and let the user call this function again.  */
+      --exp;
+      result = YYEOF;
+      break;
+
+    default:
+      result = YYERRCODE;
+#if YYDEBUG != 0
+      --exp;
+#endif
+      break;
+    }
+
+  *pexp = exp;
+
+  return result;
+}
+
+
+static void
+yyerror (const char *str)
+{
+  /* Do nothing.  We don't print error messages here.  */
+}
diff --git a/intl/plural.y b/intl/plural.y
new file mode 100644 (file)
index 0000000..4d33bd7
--- /dev/null
@@ -0,0 +1,381 @@
+%{
+/* Expression parsing for plural form selection.
+   Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
+   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* The bison generated parser uses alloca.  AIX 3 forces us to put this
+   declaration at the beginning of the file.  The declaration in bison's
+   skeleton file comes too late.  This must come before <config.h>
+   because <config.h> may include arbitrary system headers.  */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include "plural-exp.h"
+
+/* The main function generated by the parser is called __gettextparse,
+   but we want it to be called PLURAL_PARSE.  */
+#ifndef _LIBC
+# define __gettextparse PLURAL_PARSE
+#endif
+
+#define YYLEX_PARAM    &((struct parse_args *) arg)->cp
+#define YYPARSE_PARAM  arg
+%}
+%pure_parser
+%expect 7
+
+%union {
+  unsigned long int num;
+  enum operator op;
+  struct expression *exp;
+}
+
+%{
+/* Prototypes for local functions.  */
+static int yylex (YYSTYPE *lval, const char **pexp);
+static void yyerror (const char *str);
+
+/* Allocation of expressions.  */
+
+static struct expression *
+new_exp (int nargs, enum operator op, struct expression * const *args)
+{
+  int i;
+  struct expression *newp;
+
+  /* If any of the argument could not be malloc'ed, just return NULL.  */
+  for (i = nargs - 1; i >= 0; i--)
+    if (args[i] == NULL)
+      goto fail;
+
+  /* Allocate a new expression.  */
+  newp = (struct expression *) malloc (sizeof (*newp));
+  if (newp != NULL)
+    {
+      newp->nargs = nargs;
+      newp->operation = op;
+      for (i = nargs - 1; i >= 0; i--)
+       newp->val.args[i] = args[i];
+      return newp;
+    }
+
+ fail:
+  for (i = nargs - 1; i >= 0; i--)
+    FREE_EXPRESSION (args[i]);
+
+  return NULL;
+}
+
+static inline struct expression *
+new_exp_0 (enum operator op)
+{
+  return new_exp (0, op, NULL);
+}
+
+static inline struct expression *
+new_exp_1 (enum operator op, struct expression *right)
+{
+  struct expression *args[1];
+
+  args[0] = right;
+  return new_exp (1, op, args);
+}
+
+static struct expression *
+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
+{
+  struct expression *args[2];
+
+  args[0] = left;
+  args[1] = right;
+  return new_exp (2, op, args);
+}
+
+static inline struct expression *
+new_exp_3 (enum operator op, struct expression *bexp,
+          struct expression *tbranch, struct expression *fbranch)
+{
+  struct expression *args[3];
+
+  args[0] = bexp;
+  args[1] = tbranch;
+  args[2] = fbranch;
+  return new_exp (3, op, args);
+}
+
+%}
+
+/* This declares that all operators have the same associativity and the
+   precedence order as in C.  See [Harbison, Steele: C, A Reference Manual].
+   There is no unary minus and no bitwise operators.
+   Operators with the same syntactic behaviour have been merged into a single
+   token, to save space in the array generated by bison.  */
+%right '?'             /*   ?          */
+%left '|'              /*   ||         */
+%left '&'              /*   &&         */
+%left EQUOP2           /*   == !=      */
+%left CMPOP2           /*   < > <= >=  */
+%left ADDOP2           /*   + -        */
+%left MULOP2           /*   * / %      */
+%right '!'             /*   !          */
+
+%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
+%token <num> NUMBER
+%type <exp> exp
+
+%%
+
+start:   exp
+         {
+           if ($1 == NULL)
+             YYABORT;
+           ((struct parse_args *) arg)->res = $1;
+         }
+       ;
+
+exp:     exp '?' exp ':' exp
+         {
+           $$ = new_exp_3 (qmop, $1, $3, $5);
+         }
+       | exp '|' exp
+         {
+           $$ = new_exp_2 (lor, $1, $3);
+         }
+       | exp '&' exp
+         {
+           $$ = new_exp_2 (land, $1, $3);
+         }
+       | exp EQUOP2 exp
+         {
+           $$ = new_exp_2 ($2, $1, $3);
+         }
+       | exp CMPOP2 exp
+         {
+           $$ = new_exp_2 ($2, $1, $3);
+         }
+       | exp ADDOP2 exp
+         {
+           $$ = new_exp_2 ($2, $1, $3);
+         }
+       | exp MULOP2 exp
+         {
+           $$ = new_exp_2 ($2, $1, $3);
+         }
+       | '!' exp
+         {
+           $$ = new_exp_1 (lnot, $2);
+         }
+       | 'n'
+         {
+           $$ = new_exp_0 (var);
+         }
+       | NUMBER
+         {
+           if (($$ = new_exp_0 (num)) != NULL)
+             $$->val.num = $1;
+         }
+       | '(' exp ')'
+         {
+           $$ = $2;
+         }
+       ;
+
+%%
+
+void
+internal_function
+FREE_EXPRESSION (struct expression *exp)
+{
+  if (exp == NULL)
+    return;
+
+  /* Handle the recursive case.  */
+  switch (exp->nargs)
+    {
+    case 3:
+      FREE_EXPRESSION (exp->val.args[2]);
+      /* FALLTHROUGH */
+    case 2:
+      FREE_EXPRESSION (exp->val.args[1]);
+      /* FALLTHROUGH */
+    case 1:
+      FREE_EXPRESSION (exp->val.args[0]);
+      /* FALLTHROUGH */
+    default:
+      break;
+    }
+
+  free (exp);
+}
+
+
+static int
+yylex (YYSTYPE *lval, const char **pexp)
+{
+  const char *exp = *pexp;
+  int result;
+
+  while (1)
+    {
+      if (exp[0] == '\0')
+       {
+         *pexp = exp;
+         return YYEOF;
+       }
+
+      if (exp[0] != ' ' && exp[0] != '\t')
+       break;
+
+      ++exp;
+    }
+
+  result = *exp++;
+  switch (result)
+    {
+    case '0': case '1': case '2': case '3': case '4':
+    case '5': case '6': case '7': case '8': case '9':
+      {
+       unsigned long int n = result - '0';
+       while (exp[0] >= '0' && exp[0] <= '9')
+         {
+           n *= 10;
+           n += exp[0] - '0';
+           ++exp;
+         }
+       lval->num = n;
+       result = NUMBER;
+      }
+      break;
+
+    case '=':
+      if (exp[0] == '=')
+       {
+         ++exp;
+         lval->op = equal;
+         result = EQUOP2;
+       }
+      else
+       result = YYERRCODE;
+      break;
+
+    case '!':
+      if (exp[0] == '=')
+       {
+         ++exp;
+         lval->op = not_equal;
+         result = EQUOP2;
+       }
+      break;
+
+    case '&':
+    case '|':
+      if (exp[0] == result)
+       ++exp;
+      else
+       result = YYERRCODE;
+      break;
+
+    case '<':
+      if (exp[0] == '=')
+       {
+         ++exp;
+         lval->op = less_or_equal;
+       }
+      else
+       lval->op = less_than;
+      result = CMPOP2;
+      break;
+
+    case '>':
+      if (exp[0] == '=')
+       {
+         ++exp;
+         lval->op = greater_or_equal;
+       }
+      else
+       lval->op = greater_than;
+      result = CMPOP2;
+      break;
+
+    case '*':
+      lval->op = mult;
+      result = MULOP2;
+      break;
+
+    case '/':
+      lval->op = divide;
+      result = MULOP2;
+      break;
+
+    case '%':
+      lval->op = module;
+      result = MULOP2;
+      break;
+
+    case '+':
+      lval->op = plus;
+      result = ADDOP2;
+      break;
+
+    case '-':
+      lval->op = minus;
+      result = ADDOP2;
+      break;
+
+    case 'n':
+    case '?':
+    case ':':
+    case '(':
+    case ')':
+      /* Nothing, just return the character.  */
+      break;
+
+    case ';':
+    case '\n':
+    case '\0':
+      /* Be safe and let the user call this function again.  */
+      --exp;
+      result = YYEOF;
+      break;
+
+    default:
+      result = YYERRCODE;
+#if YYDEBUG != 0
+      --exp;
+#endif
+      break;
+    }
+
+  *pexp = exp;
+
+  return result;
+}
+
+
+static void
+yyerror (const char *str)
+{
+  /* Do nothing.  We don't print error messages here.  */
+}
diff --git a/intl/printf-args.c b/intl/printf-args.c
new file mode 100644 (file)
index 0000000..f6f3219
--- /dev/null
@@ -0,0 +1,119 @@
+/* Decomposed printf argument list.
+   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification.  */
+#include "printf-args.h"
+
+#ifdef STATIC
+STATIC
+#endif
+int
+printf_fetchargs (va_list args, arguments *a)
+{
+  size_t i;
+  argument *ap;
+
+  for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
+    switch (ap->type)
+      {
+      case TYPE_SCHAR:
+       ap->a.a_schar = va_arg (args, /*signed char*/ int);
+       break;
+      case TYPE_UCHAR:
+       ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
+       break;
+      case TYPE_SHORT:
+       ap->a.a_short = va_arg (args, /*short*/ int);
+       break;
+      case TYPE_USHORT:
+       ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
+       break;
+      case TYPE_INT:
+       ap->a.a_int = va_arg (args, int);
+       break;
+      case TYPE_UINT:
+       ap->a.a_uint = va_arg (args, unsigned int);
+       break;
+      case TYPE_LONGINT:
+       ap->a.a_longint = va_arg (args, long int);
+       break;
+      case TYPE_ULONGINT:
+       ap->a.a_ulongint = va_arg (args, unsigned long int);
+       break;
+#ifdef HAVE_LONG_LONG
+      case TYPE_LONGLONGINT:
+       ap->a.a_longlongint = va_arg (args, long long int);
+       break;
+      case TYPE_ULONGLONGINT:
+       ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
+       break;
+#endif
+      case TYPE_DOUBLE:
+       ap->a.a_double = va_arg (args, double);
+       break;
+#ifdef HAVE_LONG_DOUBLE
+      case TYPE_LONGDOUBLE:
+       ap->a.a_longdouble = va_arg (args, long double);
+       break;
+#endif
+      case TYPE_CHAR:
+       ap->a.a_char = va_arg (args, int);
+       break;
+#ifdef HAVE_WINT_T
+      case TYPE_WIDE_CHAR:
+       ap->a.a_wide_char = va_arg (args, wint_t);
+       break;
+#endif
+      case TYPE_STRING:
+       ap->a.a_string = va_arg (args, const char *);
+       break;
+#ifdef HAVE_WCHAR_T
+      case TYPE_WIDE_STRING:
+       ap->a.a_wide_string = va_arg (args, const wchar_t *);
+       break;
+#endif
+      case TYPE_POINTER:
+       ap->a.a_pointer = va_arg (args, void *);
+       break;
+      case TYPE_COUNT_SCHAR_POINTER:
+       ap->a.a_count_schar_pointer = va_arg (args, signed char *);
+       break;
+      case TYPE_COUNT_SHORT_POINTER:
+       ap->a.a_count_short_pointer = va_arg (args, short *);
+       break;
+      case TYPE_COUNT_INT_POINTER:
+       ap->a.a_count_int_pointer = va_arg (args, int *);
+       break;
+      case TYPE_COUNT_LONGINT_POINTER:
+       ap->a.a_count_longint_pointer = va_arg (args, long int *);
+       break;
+#ifdef HAVE_LONG_LONG
+      case TYPE_COUNT_LONGLONGINT_POINTER:
+       ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
+       break;
+#endif
+      default:
+       /* Unknown type.  */
+       return -1;
+      }
+  return 0;
+}
diff --git a/intl/printf-args.h b/intl/printf-args.h
new file mode 100644 (file)
index 0000000..f11e64c
--- /dev/null
@@ -0,0 +1,137 @@
+/* Decomposed printf argument list.
+   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _PRINTF_ARGS_H
+#define _PRINTF_ARGS_H
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Get wchar_t.  */
+#ifdef HAVE_WCHAR_T
+# include <stddef.h>
+#endif
+
+/* Get wint_t.  */
+#ifdef HAVE_WINT_T
+# include <wchar.h>
+#endif
+
+/* Get va_list.  */
+#include <stdarg.h>
+
+
+/* Argument types */
+typedef enum
+{
+  TYPE_NONE,
+  TYPE_SCHAR,
+  TYPE_UCHAR,
+  TYPE_SHORT,
+  TYPE_USHORT,
+  TYPE_INT,
+  TYPE_UINT,
+  TYPE_LONGINT,
+  TYPE_ULONGINT,
+#ifdef HAVE_LONG_LONG
+  TYPE_LONGLONGINT,
+  TYPE_ULONGLONGINT,
+#endif
+  TYPE_DOUBLE,
+#ifdef HAVE_LONG_DOUBLE
+  TYPE_LONGDOUBLE,
+#endif
+  TYPE_CHAR,
+#ifdef HAVE_WINT_T
+  TYPE_WIDE_CHAR,
+#endif
+  TYPE_STRING,
+#ifdef HAVE_WCHAR_T
+  TYPE_WIDE_STRING,
+#endif
+  TYPE_POINTER,
+  TYPE_COUNT_SCHAR_POINTER,
+  TYPE_COUNT_SHORT_POINTER,
+  TYPE_COUNT_INT_POINTER,
+  TYPE_COUNT_LONGINT_POINTER
+#ifdef HAVE_LONG_LONG
+, TYPE_COUNT_LONGLONGINT_POINTER
+#endif
+} arg_type;
+
+/* Polymorphic argument */
+typedef struct
+{
+  arg_type type;
+  union
+  {
+    signed char                        a_schar;
+    unsigned char              a_uchar;
+    short                      a_short;
+    unsigned short             a_ushort;
+    int                                a_int;
+    unsigned int               a_uint;
+    long int                   a_longint;
+    unsigned long int          a_ulongint;
+#ifdef HAVE_LONG_LONG
+    long long int              a_longlongint;
+    unsigned long long int     a_ulonglongint;
+#endif
+    float                      a_float;
+    double                     a_double;
+#ifdef HAVE_LONG_DOUBLE
+    long double                        a_longdouble;
+#endif
+    int                                a_char;
+#ifdef HAVE_WINT_T
+    wint_t                     a_wide_char;
+#endif
+    const char*                        a_string;
+#ifdef HAVE_WCHAR_T
+    const wchar_t*             a_wide_string;
+#endif
+    void*                      a_pointer;
+    signed char *              a_count_schar_pointer;
+    short *                    a_count_short_pointer;
+    int *                      a_count_int_pointer;
+    long int *                 a_count_longint_pointer;
+#ifdef HAVE_LONG_LONG
+    long long int *            a_count_longlongint_pointer;
+#endif
+  }
+  a;
+}
+argument;
+
+typedef struct
+{
+  size_t count;
+  argument *arg;
+}
+arguments;
+
+
+/* Fetch the arguments, putting them into a. */
+#ifdef STATIC
+STATIC
+#else
+extern
+#endif
+int printf_fetchargs (va_list args, arguments *a);
+
+#endif /* _PRINTF_ARGS_H */
diff --git a/intl/printf-parse.c b/intl/printf-parse.c
new file mode 100644 (file)
index 0000000..d19f903
--- /dev/null
@@ -0,0 +1,537 @@
+/* Formatted output to strings.
+   Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification.  */
+#if WIDE_CHAR_VERSION
+# include "wprintf-parse.h"
+#else
+# include "printf-parse.h"
+#endif
+
+/* Get size_t, NULL.  */
+#include <stddef.h>
+
+/* Get intmax_t.  */
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+
+/* malloc(), realloc(), free().  */
+#include <stdlib.h>
+
+/* Checked size_t computations.  */
+#include "xsize.h"
+
+#if WIDE_CHAR_VERSION
+# define PRINTF_PARSE wprintf_parse
+# define CHAR_T wchar_t
+# define DIRECTIVE wchar_t_directive
+# define DIRECTIVES wchar_t_directives
+#else
+# define PRINTF_PARSE printf_parse
+# define CHAR_T char
+# define DIRECTIVE char_directive
+# define DIRECTIVES char_directives
+#endif
+
+#ifdef STATIC
+STATIC
+#endif
+int
+PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
+{
+  const CHAR_T *cp = format;           /* pointer into format */
+  size_t arg_posn = 0;         /* number of regular arguments consumed */
+  size_t d_allocated;                  /* allocated elements of d->dir */
+  size_t a_allocated;                  /* allocated elements of a->arg */
+  size_t max_width_length = 0;
+  size_t max_precision_length = 0;
+
+  d->count = 0;
+  d_allocated = 1;
+  d->dir = malloc (d_allocated * sizeof (DIRECTIVE));
+  if (d->dir == NULL)
+    /* Out of memory.  */
+    return -1;
+
+  a->count = 0;
+  a_allocated = 0;
+  a->arg = NULL;
+
+#define REGISTER_ARG(_index_,_type_) \
+  {                                                                    \
+    size_t n = (_index_);                                              \
+    if (n >= a_allocated)                                              \
+      {                                                                        \
+       size_t memory_size;                                             \
+       argument *memory;                                               \
+                                                                       \
+       a_allocated = xtimes (a_allocated, 2);                          \
+       if (a_allocated <= n)                                           \
+         a_allocated = xsum (n, 1);                                    \
+       memory_size = xtimes (a_allocated, sizeof (argument));          \
+       if (size_overflow_p (memory_size))                              \
+         /* Overflow, would lead to out of memory.  */                 \
+         goto error;                                                   \
+       memory = (a->arg                                                \
+                 ? realloc (a->arg, memory_size)                       \
+                 : malloc (memory_size));                              \
+       if (memory == NULL)                                             \
+         /* Out of memory.  */                                         \
+         goto error;                                                   \
+       a->arg = memory;                                                \
+      }                                                                        \
+    while (a->count <= n)                                              \
+      a->arg[a->count++].type = TYPE_NONE;                             \
+    if (a->arg[n].type == TYPE_NONE)                                   \
+      a->arg[n].type = (_type_);                                       \
+    else if (a->arg[n].type != (_type_))                               \
+      /* Ambiguous type for positional argument.  */                   \
+      goto error;                                                      \
+  }
+
+  while (*cp != '\0')
+    {
+      CHAR_T c = *cp++;
+      if (c == '%')
+       {
+         size_t arg_index = ARG_NONE;
+         DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */
+
+         /* Initialize the next directive.  */
+         dp->dir_start = cp - 1;
+         dp->flags = 0;
+         dp->width_start = NULL;
+         dp->width_end = NULL;
+         dp->width_arg_index = ARG_NONE;
+         dp->precision_start = NULL;
+         dp->precision_end = NULL;
+         dp->precision_arg_index = ARG_NONE;
+         dp->arg_index = ARG_NONE;
+
+         /* Test for positional argument.  */
+         if (*cp >= '0' && *cp <= '9')
+           {
+             const CHAR_T *np;
+
+             for (np = cp; *np >= '0' && *np <= '9'; np++)
+               ;
+             if (*np == '$')
+               {
+                 size_t n = 0;
+
+                 for (np = cp; *np >= '0' && *np <= '9'; np++)
+                   n = xsum (xtimes (n, 10), *np - '0');
+                 if (n == 0)
+                   /* Positional argument 0.  */
+                   goto error;
+                 if (size_overflow_p (n))
+                   /* n too large, would lead to out of memory later.  */
+                   goto error;
+                 arg_index = n - 1;
+                 cp = np + 1;
+               }
+           }
+
+         /* Read the flags.  */
+         for (;;)
+           {
+             if (*cp == '\'')
+               {
+                 dp->flags |= FLAG_GROUP;
+                 cp++;
+               }
+             else if (*cp == '-')
+               {
+                 dp->flags |= FLAG_LEFT;
+                 cp++;
+               }
+             else if (*cp == '+')
+               {
+                 dp->flags |= FLAG_SHOWSIGN;
+                 cp++;
+               }
+             else if (*cp == ' ')
+               {
+                 dp->flags |= FLAG_SPACE;
+                 cp++;
+               }
+             else if (*cp == '#')
+               {
+                 dp->flags |= FLAG_ALT;
+                 cp++;
+               }
+             else if (*cp == '0')
+               {
+                 dp->flags |= FLAG_ZERO;
+                 cp++;
+               }
+             else
+               break;
+           }
+
+         /* Parse the field width.  */
+         if (*cp == '*')
+           {
+             dp->width_start = cp;
+             cp++;
+             dp->width_end = cp;
+             if (max_width_length < 1)
+               max_width_length = 1;
+
+             /* Test for positional argument.  */
+             if (*cp >= '0' && *cp <= '9')
+               {
+                 const CHAR_T *np;
+
+                 for (np = cp; *np >= '0' && *np <= '9'; np++)
+                   ;
+                 if (*np == '$')
+                   {
+                     size_t n = 0;
+
+                     for (np = cp; *np >= '0' && *np <= '9'; np++)
+                       n = xsum (xtimes (n, 10), *np - '0');
+                     if (n == 0)
+                       /* Positional argument 0.  */
+                       goto error;
+                     if (size_overflow_p (n))
+                       /* n too large, would lead to out of memory later.  */
+                       goto error;
+                     dp->width_arg_index = n - 1;
+                     cp = np + 1;
+                   }
+               }
+             if (dp->width_arg_index == ARG_NONE)
+               {
+                 dp->width_arg_index = arg_posn++;
+                 if (dp->width_arg_index == ARG_NONE)
+                   /* arg_posn wrapped around.  */
+                   goto error;
+               }
+             REGISTER_ARG (dp->width_arg_index, TYPE_INT);
+           }
+         else if (*cp >= '0' && *cp <= '9')
+           {
+             size_t width_length;
+
+             dp->width_start = cp;
+             for (; *cp >= '0' && *cp <= '9'; cp++)
+               ;
+             dp->width_end = cp;
+             width_length = dp->width_end - dp->width_start;
+             if (max_width_length < width_length)
+               max_width_length = width_length;
+           }
+
+         /* Parse the precision.  */
+         if (*cp == '.')
+           {
+             cp++;
+             if (*cp == '*')
+               {
+                 dp->precision_start = cp - 1;
+                 cp++;
+                 dp->precision_end = cp;
+                 if (max_precision_length < 2)
+                   max_precision_length = 2;
+
+                 /* Test for positional argument.  */
+                 if (*cp >= '0' && *cp <= '9')
+                   {
+                     const CHAR_T *np;
+
+                     for (np = cp; *np >= '0' && *np <= '9'; np++)
+                       ;
+                     if (*np == '$')
+                       {
+                         size_t n = 0;
+
+                         for (np = cp; *np >= '0' && *np <= '9'; np++)
+                           n = xsum (xtimes (n, 10), *np - '0');
+                         if (n == 0)
+                           /* Positional argument 0.  */
+                           goto error;
+                         if (size_overflow_p (n))
+                           /* n too large, would lead to out of memory
+                              later.  */
+                           goto error;
+                         dp->precision_arg_index = n - 1;
+                         cp = np + 1;
+                       }
+                   }
+                 if (dp->precision_arg_index == ARG_NONE)
+                   {
+                     dp->precision_arg_index = arg_posn++;
+                     if (dp->precision_arg_index == ARG_NONE)
+                       /* arg_posn wrapped around.  */
+                       goto error;
+                   }
+                 REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
+               }
+             else
+               {
+                 size_t precision_length;
+
+                 dp->precision_start = cp - 1;
+                 for (; *cp >= '0' && *cp <= '9'; cp++)
+                   ;
+                 dp->precision_end = cp;
+                 precision_length = dp->precision_end - dp->precision_start;
+                 if (max_precision_length < precision_length)
+                   max_precision_length = precision_length;
+               }
+           }
+
+         {
+           arg_type type;
+
+           /* Parse argument type/size specifiers.  */
+           {
+             int flags = 0;
+
+             for (;;)
+               {
+                 if (*cp == 'h')
+                   {
+                     flags |= (1 << (flags & 1));
+                     cp++;
+                   }
+                 else if (*cp == 'L')
+                   {
+                     flags |= 4;
+                     cp++;
+                   }
+                 else if (*cp == 'l')
+                   {
+                     flags += 8;
+                     cp++;
+                   }
+#ifdef HAVE_INTMAX_T
+                 else if (*cp == 'j')
+                   {
+                     if (sizeof (intmax_t) > sizeof (long))
+                       {
+                         /* intmax_t = long long */
+                         flags += 16;
+                       }
+                     else if (sizeof (intmax_t) > sizeof (int))
+                       {
+                         /* intmax_t = long */
+                         flags += 8;
+                       }
+                     cp++;
+                   }
+#endif
+                 else if (*cp == 'z' || *cp == 'Z')
+                   {
+                     /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
+                        because the warning facility in gcc-2.95.2 understands
+                        only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784).  */
+                     if (sizeof (size_t) > sizeof (long))
+                       {
+                         /* size_t = long long */
+                         flags += 16;
+                       }
+                     else if (sizeof (size_t) > sizeof (int))
+                       {
+                         /* size_t = long */
+                         flags += 8;
+                       }
+                     cp++;
+                   }
+                 else if (*cp == 't')
+                   {
+                     if (sizeof (ptrdiff_t) > sizeof (long))
+                       {
+                         /* ptrdiff_t = long long */
+                         flags += 16;
+                       }
+                     else if (sizeof (ptrdiff_t) > sizeof (int))
+                       {
+                         /* ptrdiff_t = long */
+                         flags += 8;
+                       }
+                     cp++;
+                   }
+                 else
+                   break;
+               }
+
+             /* Read the conversion character.  */
+             c = *cp++;
+             switch (c)
+               {
+               case 'd': case 'i':
+#ifdef HAVE_LONG_LONG
+                 if (flags >= 16 || (flags & 4))
+                   type = TYPE_LONGLONGINT;
+                 else
+#endif
+                 if (flags >= 8)
+                   type = TYPE_LONGINT;
+                 else if (flags & 2)
+                   type = TYPE_SCHAR;
+                 else if (flags & 1)
+                   type = TYPE_SHORT;
+                 else
+                   type = TYPE_INT;
+                 break;
+               case 'o': case 'u': case 'x': case 'X':
+#ifdef HAVE_LONG_LONG
+                 if (flags >= 16 || (flags & 4))
+                   type = TYPE_ULONGLONGINT;
+                 else
+#endif
+                 if (flags >= 8)
+                   type = TYPE_ULONGINT;
+                 else if (flags & 2)
+                   type = TYPE_UCHAR;
+                 else if (flags & 1)
+                   type = TYPE_USHORT;
+                 else
+                   type = TYPE_UINT;
+                 break;
+               case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+               case 'a': case 'A':
+#ifdef HAVE_LONG_DOUBLE
+                 if (flags >= 16 || (flags & 4))
+                   type = TYPE_LONGDOUBLE;
+                 else
+#endif
+                 type = TYPE_DOUBLE;
+                 break;
+               case 'c':
+                 if (flags >= 8)
+#ifdef HAVE_WINT_T
+                   type = TYPE_WIDE_CHAR;
+#else
+                   goto error;
+#endif
+                 else
+                   type = TYPE_CHAR;
+                 break;
+#ifdef HAVE_WINT_T
+               case 'C':
+                 type = TYPE_WIDE_CHAR;
+                 c = 'c';
+                 break;
+#endif
+               case 's':
+                 if (flags >= 8)
+#ifdef HAVE_WCHAR_T
+                   type = TYPE_WIDE_STRING;
+#else
+                   goto error;
+#endif
+                 else
+                   type = TYPE_STRING;
+                 break;
+#ifdef HAVE_WCHAR_T
+               case 'S':
+                 type = TYPE_WIDE_STRING;
+                 c = 's';
+                 break;
+#endif
+               case 'p':
+                 type = TYPE_POINTER;
+                 break;
+               case 'n':
+#ifdef HAVE_LONG_LONG
+                 if (flags >= 16 || (flags & 4))
+                   type = TYPE_COUNT_LONGLONGINT_POINTER;
+                 else
+#endif
+                 if (flags >= 8)
+                   type = TYPE_COUNT_LONGINT_POINTER;
+                 else if (flags & 2)
+                   type = TYPE_COUNT_SCHAR_POINTER;
+                 else if (flags & 1)
+                   type = TYPE_COUNT_SHORT_POINTER;
+                 else
+                   type = TYPE_COUNT_INT_POINTER;
+                 break;
+               case '%':
+                 type = TYPE_NONE;
+                 break;
+               default:
+                 /* Unknown conversion character.  */
+                 goto error;
+               }
+           }
+
+           if (type != TYPE_NONE)
+             {
+               dp->arg_index = arg_index;
+               if (dp->arg_index == ARG_NONE)
+                 {
+                   dp->arg_index = arg_posn++;
+                   if (dp->arg_index == ARG_NONE)
+                     /* arg_posn wrapped around.  */
+                     goto error;
+                 }
+               REGISTER_ARG (dp->arg_index, type);
+             }
+           dp->conversion = c;
+           dp->dir_end = cp;
+         }
+
+         d->count++;
+         if (d->count >= d_allocated)
+           {
+             size_t memory_size;
+             DIRECTIVE *memory;
+
+             d_allocated = xtimes (d_allocated, 2);
+             memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
+             if (size_overflow_p (memory_size))
+               /* Overflow, would lead to out of memory.  */
+               goto error;
+             memory = realloc (d->dir, memory_size);
+             if (memory == NULL)
+               /* Out of memory.  */
+               goto error;
+             d->dir = memory;
+           }
+       }
+    }
+  d->dir[d->count].dir_start = cp;
+
+  d->max_width_length = max_width_length;
+  d->max_precision_length = max_precision_length;
+  return 0;
+
+error:
+  if (a->arg)
+    free (a->arg);
+  if (d->dir)
+    free (d->dir);
+  return -1;
+}
+
+#undef DIRECTIVES
+#undef DIRECTIVE
+#undef CHAR_T
+#undef PRINTF_PARSE
diff --git a/intl/printf-parse.h b/intl/printf-parse.h
new file mode 100644 (file)
index 0000000..8aec50e
--- /dev/null
@@ -0,0 +1,75 @@
+/* Parse printf format string.
+   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _PRINTF_PARSE_H
+#define _PRINTF_PARSE_H
+
+#include "printf-args.h"
+
+
+/* Flags */
+#define FLAG_GROUP      1      /* ' flag */
+#define FLAG_LEFT       2      /* - flag */
+#define FLAG_SHOWSIGN   4      /* + flag */
+#define FLAG_SPACE      8      /* space flag */
+#define FLAG_ALT       16      /* # flag */
+#define FLAG_ZERO      32
+
+/* arg_index value indicating that no argument is consumed.  */
+#define ARG_NONE       (~(size_t)0)
+
+/* A parsed directive.  */
+typedef struct
+{
+  const char* dir_start;
+  const char* dir_end;
+  int flags;
+  const char* width_start;
+  const char* width_end;
+  size_t width_arg_index;
+  const char* precision_start;
+  const char* precision_end;
+  size_t precision_arg_index;
+  char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
+  size_t arg_index;
+}
+char_directive;
+
+/* A parsed format string.  */
+typedef struct
+{
+  size_t count;
+  char_directive *dir;
+  size_t max_width_length;
+  size_t max_precision_length;
+}
+char_directives;
+
+
+/* Parses the format string.  Fills in the number N of directives, and fills
+   in directives[0], ..., directives[N-1], and sets directives[N].dir_start
+   to the end of the format string.  Also fills in the arg_type fields of the
+   arguments and the needed count of arguments.  */
+#ifdef STATIC
+STATIC
+#else
+extern
+#endif
+int printf_parse (const char *format, char_directives *d, arguments *a);
+
+#endif /* _PRINTF_PARSE_H */
diff --git a/intl/printf.c b/intl/printf.c
new file mode 100644 (file)
index 0000000..878646c
--- /dev/null
@@ -0,0 +1,371 @@
+/* Formatted output to strings, using POSIX/XSI format strings with positions.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if defined HAVE_ALLOCA_H || defined _LIBC
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+#include <stdio.h>
+
+#if !HAVE_POSIX_PRINTF
+
+#include <stdlib.h>
+#include <string.h>
+
+/* When building a DLL, we must export some functions.  Note that because
+   the functions are only defined for binary backward compatibility, we
+   don't need to use __declspec(dllimport) in any case.  */
+#if defined _MSC_VER && BUILDING_DLL
+# define DLL_EXPORTED __declspec(dllexport)
+#else
+# define DLL_EXPORTED
+#endif
+
+#define STATIC static
+
+/* Define auxiliary functions declared in "printf-args.h".  */
+#include "printf-args.c"
+
+/* Define auxiliary functions declared in "printf-parse.h".  */
+#include "printf-parse.c"
+
+/* Define functions declared in "vasnprintf.h".  */
+#define vasnprintf libintl_vasnprintf
+#include "vasnprintf.c"
+#if 0 /* not needed */
+#define asnprintf libintl_asnprintf
+#include "asnprintf.c"
+#endif
+
+DLL_EXPORTED
+int
+libintl_vfprintf (FILE *stream, const char *format, va_list args)
+{
+  if (strchr (format, '$') == NULL)
+    return vfprintf (stream, format, args);
+  else
+    {
+      size_t length;
+      char *result = libintl_vasnprintf (NULL, &length, format, args);
+      int retval = -1;
+      if (result != NULL)
+       {
+         if (fwrite (result, 1, length, stream) == length)
+           retval = length;
+         free (result);
+       }
+      return retval;
+    }
+}
+
+DLL_EXPORTED
+int
+libintl_fprintf (FILE *stream, const char *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vfprintf (stream, format, args);
+  va_end (args);
+  return retval;
+}
+
+DLL_EXPORTED
+int
+libintl_vprintf (const char *format, va_list args)
+{
+  return libintl_vfprintf (stdout, format, args);
+}
+
+DLL_EXPORTED
+int
+libintl_printf (const char *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vprintf (format, args);
+  va_end (args);
+  return retval;
+}
+
+DLL_EXPORTED
+int
+libintl_vsprintf (char *resultbuf, const char *format, va_list args)
+{
+  if (strchr (format, '$') == NULL)
+    return vsprintf (resultbuf, format, args);
+  else
+    {
+      size_t length = (size_t) ~0 / (4 * sizeof (char));
+      char *result = libintl_vasnprintf (resultbuf, &length, format, args);
+      if (result != resultbuf)
+       {
+         free (result);
+         return -1;
+       }
+      else
+       return length;
+    }
+}
+
+DLL_EXPORTED
+int
+libintl_sprintf (char *resultbuf, const char *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vsprintf (resultbuf, format, args);
+  va_end (args);
+  return retval;
+}
+
+#if HAVE_SNPRINTF
+
+# if HAVE_DECL__SNPRINTF
+   /* Windows.  */
+#  define system_vsnprintf _vsnprintf
+# else
+   /* Unix.  */
+#  define system_vsnprintf vsnprintf
+# endif
+
+DLL_EXPORTED
+int
+libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args)
+{
+  if (strchr (format, '$') == NULL)
+    return system_vsnprintf (resultbuf, length, format, args);
+  else
+    {
+      size_t maxlength = length;
+      char *result = libintl_vasnprintf (resultbuf, &length, format, args);
+      if (result != resultbuf)
+       {
+         if (maxlength > 0)
+           {
+             if (length < maxlength)
+               abort ();
+             memcpy (resultbuf, result, maxlength - 1);
+             resultbuf[maxlength - 1] = '\0';
+           }
+         free (result);
+         return -1;
+       }
+      else
+       return length;
+    }
+}
+
+DLL_EXPORTED
+int
+libintl_snprintf (char *resultbuf, size_t length, const char *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vsnprintf (resultbuf, length, format, args);
+  va_end (args);
+  return retval;
+}
+
+#endif
+
+#if HAVE_ASPRINTF
+
+DLL_EXPORTED
+int
+libintl_vasprintf (char **resultp, const char *format, va_list args)
+{
+  size_t length;
+  char *result = libintl_vasnprintf (NULL, &length, format, args);
+  if (result == NULL)
+    return -1;
+  *resultp = result;
+  return length;
+}
+
+DLL_EXPORTED
+int
+libintl_asprintf (char **resultp, const char *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vasprintf (resultp, format, args);
+  va_end (args);
+  return retval;
+}
+
+#endif
+
+#if HAVE_FWPRINTF
+
+#include <wchar.h>
+
+#define WIDE_CHAR_VERSION 1
+
+/* Define auxiliary functions declared in "wprintf-parse.h".  */
+#include "printf-parse.c"
+
+/* Define functions declared in "vasnprintf.h".  */
+#define vasnwprintf libintl_vasnwprintf
+#include "vasnprintf.c"
+#if 0 /* not needed */
+#define asnwprintf libintl_asnwprintf
+#include "asnprintf.c"
+#endif
+
+# if HAVE_DECL__SNWPRINTF
+   /* Windows.  */
+#  define system_vswprintf _vsnwprintf
+# else
+   /* Unix.  */
+#  define system_vswprintf vswprintf
+# endif
+
+DLL_EXPORTED
+int
+libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args)
+{
+  if (wcschr (format, '$') == NULL)
+    return vfwprintf (stream, format, args);
+  else
+    {
+      size_t length;
+      wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args);
+      int retval = -1;
+      if (result != NULL)
+       {
+         size_t i;
+         for (i = 0; i < length; i++)
+           if (fputwc (result[i], stream) == WEOF)
+             break;
+         if (i == length)
+           retval = length;
+         free (result);
+       }
+      return retval;
+    }
+}
+
+DLL_EXPORTED
+int
+libintl_fwprintf (FILE *stream, const wchar_t *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vfwprintf (stream, format, args);
+  va_end (args);
+  return retval;
+}
+
+DLL_EXPORTED
+int
+libintl_vwprintf (const wchar_t *format, va_list args)
+{
+  return libintl_vfwprintf (stdout, format, args);
+}
+
+DLL_EXPORTED
+int
+libintl_wprintf (const wchar_t *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vwprintf (format, args);
+  va_end (args);
+  return retval;
+}
+
+DLL_EXPORTED
+int
+libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args)
+{
+  if (wcschr (format, '$') == NULL)
+    return system_vswprintf (resultbuf, length, format, args);
+  else
+    {
+      size_t maxlength = length;
+      wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args);
+      if (result != resultbuf)
+       {
+         if (maxlength > 0)
+           {
+             if (length < maxlength)
+               abort ();
+             memcpy (resultbuf, result, (maxlength - 1) * sizeof (wchar_t));
+             resultbuf[maxlength - 1] = 0;
+           }
+         free (result);
+         return -1;
+       }
+      else
+       return length;
+    }
+}
+
+DLL_EXPORTED
+int
+libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...)
+{
+  va_list args;
+  int retval;
+
+  va_start (args, format);
+  retval = libintl_vswprintf (resultbuf, length, format, args);
+  va_end (args);
+  return retval;
+}
+
+#endif
+
+#endif
diff --git a/intl/ref-add.sin b/intl/ref-add.sin
new file mode 100644 (file)
index 0000000..167374e
--- /dev/null
@@ -0,0 +1,31 @@
+# Add this package to a list of references stored in a text file.
+#
+#   Copyright (C) 2000 Free Software Foundation, Inc.
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU Library General Public License as published
+#   by the Free Software Foundation; either version 2, or (at your option)
+#   any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#   Library General Public License for more details.
+#
+#   You should have received a copy of the GNU Library General Public
+#   License along with this program; if not, write to the Free Software
+#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+#   USA.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+  s/# Packages using this file://
+  ta
+  :a
+  s/ @PACKAGE@ / @PACKAGE@ /
+  tb
+  s/ $/ @PACKAGE@ /
+  :b
+  s/^/# Packages using this file:/
+}
diff --git a/intl/ref-del.sin b/intl/ref-del.sin
new file mode 100644 (file)
index 0000000..613cf37
--- /dev/null
@@ -0,0 +1,26 @@
+# Remove this package from a list of references stored in a text file.
+#
+#   Copyright (C) 2000 Free Software Foundation, Inc.
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU Library General Public License as published
+#   by the Free Software Foundation; either version 2, or (at your option)
+#   any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#   Library General Public License for more details.
+#
+#   You should have received a copy of the GNU Library General Public
+#   License along with this program; if not, write to the Free Software
+#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+#   USA.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+  s/# Packages using this file://
+  s/ @PACKAGE@ / /
+  s/^/# Packages using this file:/
+}
diff --git a/intl/relocatable.c b/intl/relocatable.c
new file mode 100644 (file)
index 0000000..2683ace
--- /dev/null
@@ -0,0 +1,449 @@
+/* Provide relocatable packages.
+   Copyright (C) 2003-2004 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+
+/* Tell glibc's <stdio.h> to provide a prototype for getline().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE   1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+/* Specification.  */
+#include "relocatable.h"
+
+#if ENABLE_RELOCATABLE
+
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef NO_XMALLOC
+# define xmalloc malloc
+#else
+# include "xalloc.h"
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#if DEPENDS_ON_LIBCHARSET
+# include <libcharset.h>
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV
+# include <iconv.h>
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS
+# include <libintl.h>
+#endif
+
+/* Faked cheap 'bool'.  */
+#undef bool
+#undef false
+#undef true
+#define bool int
+#define false 0
+#define true 1
+
+/* Pathname support.
+   ISSLASH(C)           tests whether C is a directory separator character.
+   IS_PATH_WITH_DIR(P)  tests whether P contains a directory specification.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, Cygwin, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+    ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+     && (P)[1] == ':')
+# define IS_PATH_WITH_DIR(P) \
+    (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
+# define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
+#else
+  /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
+# define FILE_SYSTEM_PREFIX_LEN(P) 0
+#endif
+
+/* Original installation prefix.  */
+static char *orig_prefix;
+static size_t orig_prefix_len;
+/* Current installation prefix.  */
+static char *curr_prefix;
+static size_t curr_prefix_len;
+/* These prefixes do not end in a slash.  Anything that will be concatenated
+   to them must start with a slash.  */
+
+/* Sets the original and the current installation prefix of this module.
+   Relocation simply replaces a pathname starting with the original prefix
+   by the corresponding pathname with the current prefix instead.  Both
+   prefixes should be directory names without trailing slash (i.e. use ""
+   instead of "/").  */
+static void
+set_this_relocation_prefix (const char *orig_prefix_arg,
+                           const char *curr_prefix_arg)
+{
+  if (orig_prefix_arg != NULL && curr_prefix_arg != NULL
+      /* Optimization: if orig_prefix and curr_prefix are equal, the
+        relocation is a nop.  */
+      && strcmp (orig_prefix_arg, curr_prefix_arg) != 0)
+    {
+      /* Duplicate the argument strings.  */
+      char *memory;
+
+      orig_prefix_len = strlen (orig_prefix_arg);
+      curr_prefix_len = strlen (curr_prefix_arg);
+      memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1);
+#ifdef NO_XMALLOC
+      if (memory != NULL)
+#endif
+       {
+         memcpy (memory, orig_prefix_arg, orig_prefix_len + 1);
+         orig_prefix = memory;
+         memory += orig_prefix_len + 1;
+         memcpy (memory, curr_prefix_arg, curr_prefix_len + 1);
+         curr_prefix = memory;
+         return;
+       }
+    }
+  orig_prefix = NULL;
+  curr_prefix = NULL;
+  /* Don't worry about wasted memory here - this function is usually only
+     called once.  */
+}
+
+/* Sets the original and the current installation prefix of the package.
+   Relocation simply replaces a pathname starting with the original prefix
+   by the corresponding pathname with the current prefix instead.  Both
+   prefixes should be directory names without trailing slash (i.e. use ""
+   instead of "/").  */
+void
+set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
+{
+  set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+
+  /* Now notify all dependent libraries.  */
+#if DEPENDS_ON_LIBCHARSET
+  libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
+  libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
+  libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+}
+
+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
+
+/* Convenience function:
+   Computes the current installation prefix, based on the original
+   installation prefix, the original installation directory of a particular
+   file, and the current pathname of this file.  Returns NULL upon failure.  */
+#ifdef IN_LIBRARY
+#define compute_curr_prefix local_compute_curr_prefix
+static
+#endif
+const char *
+compute_curr_prefix (const char *orig_installprefix,
+                    const char *orig_installdir,
+                    const char *curr_pathname)
+{
+  const char *curr_installdir;
+  const char *rel_installdir;
+
+  if (curr_pathname == NULL)
+    return NULL;
+
+  /* Determine the relative installation directory, relative to the prefix.
+     This is simply the difference between orig_installprefix and
+     orig_installdir.  */
+  if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix))
+      != 0)
+    /* Shouldn't happen - nothing should be installed outside $(prefix).  */
+    return NULL;
+  rel_installdir = orig_installdir + strlen (orig_installprefix);
+
+  /* Determine the current installation directory.  */
+  {
+    const char *p_base = curr_pathname + FILE_SYSTEM_PREFIX_LEN (curr_pathname);
+    const char *p = curr_pathname + strlen (curr_pathname);
+    char *q;
+
+    while (p > p_base)
+      {
+       p--;
+       if (ISSLASH (*p))
+         break;
+      }
+
+    q = (char *) xmalloc (p - curr_pathname + 1);
+#ifdef NO_XMALLOC
+    if (q == NULL)
+      return NULL;
+#endif
+    memcpy (q, curr_pathname, p - curr_pathname);
+    q[p - curr_pathname] = '\0';
+    curr_installdir = q;
+  }
+
+  /* Compute the current installation prefix by removing the trailing
+     rel_installdir from it.  */
+  {
+    const char *rp = rel_installdir + strlen (rel_installdir);
+    const char *cp = curr_installdir + strlen (curr_installdir);
+    const char *cp_base =
+      curr_installdir + FILE_SYSTEM_PREFIX_LEN (curr_installdir);
+
+    while (rp > rel_installdir && cp > cp_base)
+      {
+       bool same = false;
+       const char *rpi = rp;
+       const char *cpi = cp;
+
+       while (rpi > rel_installdir && cpi > cp_base)
+         {
+           rpi--;
+           cpi--;
+           if (ISSLASH (*rpi) || ISSLASH (*cpi))
+             {
+               if (ISSLASH (*rpi) && ISSLASH (*cpi))
+                 same = true;
+               break;
+             }
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+           /* Win32, Cygwin, OS/2, DOS - case insignificant filesystem */
+           if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
+               != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
+             break;
+#else
+           if (*rpi != *cpi)
+             break;
+#endif
+         }
+       if (!same)
+         break;
+       /* The last pathname component was the same.  opi and cpi now point
+          to the slash before it.  */
+       rp = rpi;
+       cp = cpi;
+      }
+
+    if (rp > rel_installdir)
+      /* Unexpected: The curr_installdir does not end with rel_installdir.  */
+      return NULL;
+
+    {
+      size_t curr_prefix_len = cp - curr_installdir;
+      char *curr_prefix;
+
+      curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
+#ifdef NO_XMALLOC
+      if (curr_prefix == NULL)
+       return NULL;
+#endif
+      memcpy (curr_prefix, curr_installdir, curr_prefix_len);
+      curr_prefix[curr_prefix_len] = '\0';
+
+      return curr_prefix;
+    }
+  }
+}
+
+#endif /* !IN_LIBRARY || PIC */
+
+#if defined PIC && defined INSTALLDIR
+
+/* Full pathname of shared library, or NULL.  */
+static char *shared_library_fullname;
+
+#if defined _WIN32 || defined __WIN32__
+
+/* Determine the full pathname of the shared library when it is loaded.  */
+
+BOOL WINAPI
+DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
+{
+  (void) reserved;
+
+  if (event == DLL_PROCESS_ATTACH)
+    {
+      /* The DLL is being loaded into an application's address range.  */
+      static char location[MAX_PATH];
+
+      if (!GetModuleFileName (module_handle, location, sizeof (location)))
+       /* Shouldn't happen.  */
+       return FALSE;
+
+      if (!IS_PATH_WITH_DIR (location))
+       /* Shouldn't happen.  */
+       return FALSE;
+
+      shared_library_fullname = strdup (location);
+    }
+
+  return TRUE;
+}
+
+#else /* Unix */
+
+static void
+find_shared_library_fullname ()
+{
+#if defined __linux__ && __GLIBC__ >= 2
+  /* Linux has /proc/self/maps. glibc 2 has the getline() function.  */
+  FILE *fp;
+
+  /* Open the current process' maps file.  It describes one VMA per line.  */
+  fp = fopen ("/proc/self/maps", "r");
+  if (fp)
+    {
+      unsigned long address = (unsigned long) &find_shared_library_fullname;
+      for (;;)
+       {
+         unsigned long start, end;
+         int c;
+
+         if (fscanf (fp, "%lx-%lx", &start, &end) != 2)
+           break;
+         if (address >= start && address <= end - 1)
+           {
+             /* Found it.  Now see if this line contains a filename.  */
+             while (c = getc (fp), c != EOF && c != '\n' && c != '/')
+               continue;
+             if (c == '/')
+               {
+                 size_t size;
+                 int len;
+
+                 ungetc (c, fp);
+                 shared_library_fullname = NULL; size = 0;
+                 len = getline (&shared_library_fullname, &size, fp);
+                 if (len >= 0)
+                   {
+                     /* Success: filled shared_library_fullname.  */
+                     if (len > 0 && shared_library_fullname[len - 1] == '\n')
+                       shared_library_fullname[len - 1] = '\0';
+                   }
+               }
+             break;
+           }
+         while (c = getc (fp), c != EOF && c != '\n')
+           continue;
+       }
+      fclose (fp);
+    }
+#endif
+}
+
+#endif /* WIN32 / Unix */
+
+/* Return the full pathname of the current shared library.
+   Return NULL if unknown.
+   Guaranteed to work only on Linux and Woe32.  */
+static char *
+get_shared_library_fullname ()
+{
+#if !(defined _WIN32 || defined __WIN32__)
+  static bool tried_find_shared_library_fullname;
+  if (!tried_find_shared_library_fullname)
+    {
+      find_shared_library_fullname ();
+      tried_find_shared_library_fullname = true;
+    }
+#endif
+  return shared_library_fullname;
+}
+
+#endif /* PIC */
+
+/* Returns the pathname, relocated according to the current installation
+   directory.  */
+const char *
+relocate (const char *pathname)
+{
+#if defined PIC && defined INSTALLDIR
+  static int initialized;
+
+  /* Initialization code for a shared library.  */
+  if (!initialized)
+    {
+      /* At this point, orig_prefix and curr_prefix likely have already been
+        set through the main program's set_program_name_and_installdir
+        function.  This is sufficient in the case that the library has
+        initially been installed in the same orig_prefix.  But we can do
+        better, to also cover the cases that 1. it has been installed
+        in a different prefix before being moved to orig_prefix and (later)
+        to curr_prefix, 2. unlike the program, it has not moved away from
+        orig_prefix.  */
+      const char *orig_installprefix = INSTALLPREFIX;
+      const char *orig_installdir = INSTALLDIR;
+      const char *curr_prefix_better;
+
+      curr_prefix_better =
+       compute_curr_prefix (orig_installprefix, orig_installdir,
+                            get_shared_library_fullname ());
+      if (curr_prefix_better == NULL)
+       curr_prefix_better = curr_prefix;
+
+      set_relocation_prefix (orig_installprefix, curr_prefix_better);
+
+      initialized = 1;
+    }
+#endif
+
+  /* Note: It is not necessary to perform case insensitive comparison here,
+     even for DOS-like filesystems, because the pathname argument was
+     typically created from the same Makefile variable as orig_prefix came
+     from.  */
+  if (orig_prefix != NULL && curr_prefix != NULL
+      && strncmp (pathname, orig_prefix, orig_prefix_len) == 0)
+    {
+      if (pathname[orig_prefix_len] == '\0')
+       /* pathname equals orig_prefix.  */
+       return curr_prefix;
+      if (ISSLASH (pathname[orig_prefix_len]))
+       {
+         /* pathname starts with orig_prefix.  */
+         const char *pathname_tail = &pathname[orig_prefix_len];
+         char *result =
+           (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1);
+
+#ifdef NO_XMALLOC
+         if (result != NULL)
+#endif
+           {
+             memcpy (result, curr_prefix, curr_prefix_len);
+             strcpy (result + curr_prefix_len, pathname_tail);
+             return result;
+           }
+       }
+    }
+  /* Nothing to relocate.  */
+  return pathname;
+}
+
+#endif
diff --git a/intl/relocatable.h b/intl/relocatable.h
new file mode 100644 (file)
index 0000000..48c5b71
--- /dev/null
@@ -0,0 +1,77 @@
+/* Provide relocatable packages.
+   Copyright (C) 2003 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _RELOCATABLE_H
+#define _RELOCATABLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* This can be enabled through the configure --enable-relocatable option.  */
+#if ENABLE_RELOCATABLE
+
+/* When building a DLL, we must export some functions.  Note that because
+   this is a private .h file, we don't need to use __declspec(dllimport)
+   in any case.  */
+#if defined _MSC_VER && BUILDING_DLL
+# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
+#else
+# define RELOCATABLE_DLL_EXPORTED
+#endif
+
+/* Sets the original and the current installation prefix of the package.
+   Relocation simply replaces a pathname starting with the original prefix
+   by the corresponding pathname with the current prefix instead.  Both
+   prefixes should be directory names without trailing slash (i.e. use ""
+   instead of "/").  */
+extern RELOCATABLE_DLL_EXPORTED void
+       set_relocation_prefix (const char *orig_prefix,
+                             const char *curr_prefix);
+
+/* Returns the pathname, relocated according to the current installation
+   directory.  */
+extern const char * relocate (const char *pathname);
+
+/* Memory management: relocate() leaks memory, because it has to construct
+   a fresh pathname.  If this is a problem because your program calls
+   relocate() frequently, think about caching the result.  */
+
+/* Convenience function:
+   Computes the current installation prefix, based on the original
+   installation prefix, the original installation directory of a particular
+   file, and the current pathname of this file.  Returns NULL upon failure.  */
+extern const char * compute_curr_prefix (const char *orig_installprefix,
+                                        const char *orig_installdir,
+                                        const char *curr_pathname);
+
+#else
+
+/* By default, we use the hardwired pathnames.  */
+#define relocate(pathname) (pathname)
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RELOCATABLE_H */
diff --git a/intl/textdomain.c b/intl/textdomain.c
new file mode 100644 (file)
index 0000000..8745a84
--- /dev/null
@@ -0,0 +1,141 @@
+/* Implementation of the textdomain(3) function.
+   Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications.  */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc.  */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+   names than the internal variables in GNU libc, otherwise programs
+   using libintl.a cannot be linked statically.  */
+#if !defined _LIBC
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Name of the default text domain.  */
+extern const char _nl_default_default_domain[] attribute_hidden;
+
+/* Default text domain in which entries for gettext(3) are to be found.  */
+extern const char *_nl_current_default_domain attribute_hidden;
+
+
+/* Names for the libintl functions are a problem.  They must not clash
+   with existing names and they should follow ANSI C.  But this source
+   code is also used in GNU C Library where the names have a __
+   prefix.  So we have to make a difference here.  */
+#ifdef _LIBC
+# define TEXTDOMAIN __textdomain
+# ifndef strdup
+#  define strdup(str) __strdup (str)
+# endif
+#else
+# define TEXTDOMAIN libintl_textdomain
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation.  */
+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
+
+/* Set the current default message catalog to DOMAINNAME.
+   If DOMAINNAME is null, return the current default.
+   If DOMAINNAME is "", reset to the default of "messages".  */
+char *
+TEXTDOMAIN (const char *domainname)
+{
+  char *new_domain;
+  char *old_domain;
+
+  /* A NULL pointer requests the current setting.  */
+  if (domainname == NULL)
+    return (char *) _nl_current_default_domain;
+
+  __libc_rwlock_wrlock (_nl_state_lock);
+
+  old_domain = (char *) _nl_current_default_domain;
+
+  /* If domain name is the null string set to default domain "messages".  */
+  if (domainname[0] == '\0'
+      || strcmp (domainname, _nl_default_default_domain) == 0)
+    {
+      _nl_current_default_domain = _nl_default_default_domain;
+      new_domain = (char *) _nl_current_default_domain;
+    }
+  else if (strcmp (domainname, old_domain) == 0)
+    /* This can happen and people will use it to signal that some
+       environment variable changed.  */
+    new_domain = old_domain;
+  else
+    {
+      /* If the following malloc fails `_nl_current_default_domain'
+        will be NULL.  This value will be returned and so signals we
+        are out of core.  */
+#if defined _LIBC || defined HAVE_STRDUP
+      new_domain = strdup (domainname);
+#else
+      size_t len = strlen (domainname) + 1;
+      new_domain = (char *) malloc (len);
+      if (new_domain != NULL)
+       memcpy (new_domain, domainname, len);
+#endif
+
+      if (new_domain != NULL)
+       _nl_current_default_domain = new_domain;
+    }
+
+  /* We use this possibility to signal a change of the loaded catalogs
+     since this is most likely the case and there is no other easy we
+     to do it.  Do it only when the call was successful.  */
+  if (new_domain != NULL)
+    {
+      ++_nl_msg_cat_cntr;
+
+      if (old_domain != new_domain && old_domain != _nl_default_default_domain)
+       free (old_domain);
+    }
+
+  __libc_rwlock_unlock (_nl_state_lock);
+
+  return new_domain;
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library.  */
+weak_alias (__textdomain, textdomain);
+#endif
diff --git a/intl/vasnprintf.c b/intl/vasnprintf.c
new file mode 100644 (file)
index 0000000..ad0a067
--- /dev/null
@@ -0,0 +1,902 @@
+/* vsprintf with automatic memory allocation.
+   Copyright (C) 1999, 2002-2005 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
+   This must come before <config.h> because <config.h> may include
+   <features.h>, and once <features.h> has been included, it's too late.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE    1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#ifndef IN_LIBINTL
+# include <alloca.h>
+#endif
+
+/* Specification.  */
+#if WIDE_CHAR_VERSION
+# include "vasnwprintf.h"
+#else
+# include "vasnprintf.h"
+#endif
+
+#include <stdio.h>     /* snprintf(), sprintf() */
+#include <stdlib.h>    /* abort(), malloc(), realloc(), free() */
+#include <string.h>    /* memcpy(), strlen() */
+#include <errno.h>     /* errno */
+#include <limits.h>    /* CHAR_BIT, INT_MAX */
+#include <float.h>     /* DBL_MAX_EXP, LDBL_MAX_EXP */
+#if WIDE_CHAR_VERSION
+# include "wprintf-parse.h"
+#else
+# include "printf-parse.h"
+#endif
+
+/* Checked size_t computations.  */
+#include "xsize.h"
+
+/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW.  */
+#ifndef EOVERFLOW
+# define EOVERFLOW E2BIG
+#endif
+
+#ifdef HAVE_WCHAR_T
+# ifdef HAVE_WCSLEN
+#  define local_wcslen wcslen
+# else
+   /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
+      a dependency towards this library, here is a local substitute.
+      Define this substitute only once, even if this file is included
+      twice in the same compilation unit.  */
+#  ifndef local_wcslen_defined
+#   define local_wcslen_defined 1
+static size_t
+local_wcslen (const wchar_t *s)
+{
+  const wchar_t *ptr;
+
+  for (ptr = s; *ptr != (wchar_t) 0; ptr++)
+    ;
+  return ptr - s;
+}
+#  endif
+# endif
+#endif
+
+#if WIDE_CHAR_VERSION
+# define VASNPRINTF vasnwprintf
+# define CHAR_T wchar_t
+# define DIRECTIVE wchar_t_directive
+# define DIRECTIVES wchar_t_directives
+# define PRINTF_PARSE wprintf_parse
+# define USE_SNPRINTF 1
+# if HAVE_DECL__SNWPRINTF
+   /* On Windows, the function swprintf() has a different signature than
+      on Unix; we use the _snwprintf() function instead.  */
+#  define SNPRINTF _snwprintf
+# else
+   /* Unix.  */
+#  define SNPRINTF swprintf
+# endif
+#else
+# define VASNPRINTF vasnprintf
+# define CHAR_T char
+# define DIRECTIVE char_directive
+# define DIRECTIVES char_directives
+# define PRINTF_PARSE printf_parse
+# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF)
+# if HAVE_DECL__SNPRINTF
+   /* Windows.  */
+#  define SNPRINTF _snprintf
+# else
+   /* Unix.  */
+#  define SNPRINTF snprintf
+# endif
+#endif
+
+CHAR_T *
+VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args)
+{
+  DIRECTIVES d;
+  arguments a;
+
+  if (PRINTF_PARSE (format, &d, &a) < 0)
+    {
+      errno = EINVAL;
+      return NULL;
+    }
+
+#define CLEANUP() \
+  free (d.dir);                                                                \
+  if (a.arg)                                                           \
+    free (a.arg);
+
+  if (printf_fetchargs (args, &a) < 0)
+    {
+      CLEANUP ();
+      errno = EINVAL;
+      return NULL;
+    }
+
+  {
+    size_t buf_neededlength;
+    CHAR_T *buf;
+    CHAR_T *buf_malloced;
+    const CHAR_T *cp;
+    size_t i;
+    DIRECTIVE *dp;
+    /* Output string accumulator.  */
+    CHAR_T *result;
+    size_t allocated;
+    size_t length;
+
+    /* Allocate a small buffer that will hold a directive passed to
+       sprintf or snprintf.  */
+    buf_neededlength =
+      xsum4 (7, d.max_width_length, d.max_precision_length, 6);
+#if HAVE_ALLOCA
+    if (buf_neededlength < 4000 / sizeof (CHAR_T))
+      {
+       buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T));
+       buf_malloced = NULL;
+      }
+    else
+#endif
+      {
+       size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T));
+       if (size_overflow_p (buf_memsize))
+         goto out_of_memory_1;
+       buf = (CHAR_T *) malloc (buf_memsize);
+       if (buf == NULL)
+         goto out_of_memory_1;
+       buf_malloced = buf;
+      }
+
+    if (resultbuf != NULL)
+      {
+       result = resultbuf;
+       allocated = *lengthp;
+      }
+    else
+      {
+       result = NULL;
+       allocated = 0;
+      }
+    length = 0;
+    /* Invariants:
+       result is either == resultbuf or == NULL or malloc-allocated.
+       If length > 0, then result != NULL.  */
+
+    /* Ensures that allocated >= needed.  Aborts through a jump to
+       out_of_memory if needed is SIZE_MAX or otherwise too big.  */
+#define ENSURE_ALLOCATION(needed) \
+    if ((needed) > allocated)                                               \
+      {                                                                             \
+       size_t memory_size;                                                  \
+       CHAR_T *memory;                                                      \
+                                                                            \
+       allocated = (allocated > 0 ? xtimes (allocated, 2) : 12);            \
+       if ((needed) > allocated)                                            \
+         allocated = (needed);                                              \
+       memory_size = xtimes (allocated, sizeof (CHAR_T));                   \
+       if (size_overflow_p (memory_size))                                   \
+         goto out_of_memory;                                                \
+       if (result == resultbuf || result == NULL)                           \
+         memory = (CHAR_T *) malloc (memory_size);                          \
+       else                                                                 \
+         memory = (CHAR_T *) realloc (result, memory_size);                 \
+       if (memory == NULL)                                                  \
+         goto out_of_memory;                                                \
+       if (result == resultbuf && length > 0)                               \
+         memcpy (memory, result, length * sizeof (CHAR_T));                 \
+       result = memory;                                                     \
+      }
+
+    for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
+      {
+       if (cp != dp->dir_start)
+         {
+           size_t n = dp->dir_start - cp;
+           size_t augmented_length = xsum (length, n);
+
+           ENSURE_ALLOCATION (augmented_length);
+           memcpy (result + length, cp, n * sizeof (CHAR_T));
+           length = augmented_length;
+         }
+       if (i == d.count)
+         break;
+
+       /* Execute a single directive.  */
+       if (dp->conversion == '%')
+         {
+           size_t augmented_length;
+
+           if (!(dp->arg_index == ARG_NONE))
+             abort ();
+           augmented_length = xsum (length, 1);
+           ENSURE_ALLOCATION (augmented_length);
+           result[length] = '%';
+           length = augmented_length;
+         }
+       else
+         {
+           if (!(dp->arg_index != ARG_NONE))
+             abort ();
+
+           if (dp->conversion == 'n')
+             {
+               switch (a.arg[dp->arg_index].type)
+                 {
+                 case TYPE_COUNT_SCHAR_POINTER:
+                   *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
+                   break;
+                 case TYPE_COUNT_SHORT_POINTER:
+                   *a.arg[dp->arg_index].a.a_count_short_pointer = length;
+                   break;
+                 case TYPE_COUNT_INT_POINTER:
+                   *a.arg[dp->arg_index].a.a_count_int_pointer = length;
+                   break;
+                 case TYPE_COUNT_LONGINT_POINTER:
+                   *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
+                   break;
+#ifdef HAVE_LONG_LONG
+                 case TYPE_COUNT_LONGLONGINT_POINTER:
+                   *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
+                   break;
+#endif
+                 default:
+                   abort ();
+                 }
+             }
+           else
+             {
+               arg_type type = a.arg[dp->arg_index].type;
+               CHAR_T *p;
+               unsigned int prefix_count;
+               int prefixes[2];
+#if !USE_SNPRINTF
+               size_t tmp_length;
+               CHAR_T tmpbuf[700];
+               CHAR_T *tmp;
+
+               /* Allocate a temporary buffer of sufficient size for calling
+                  sprintf.  */
+               {
+                 size_t width;
+                 size_t precision;
+
+                 width = 0;
+                 if (dp->width_start != dp->width_end)
+                   {
+                     if (dp->width_arg_index != ARG_NONE)
+                       {
+                         int arg;
+
+                         if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                           abort ();
+                         arg = a.arg[dp->width_arg_index].a.a_int;
+                         width = (arg < 0 ? (unsigned int) (-arg) : arg);
+                       }
+                     else
+                       {
+                         const CHAR_T *digitp = dp->width_start;
+
+                         do
+                           width = xsum (xtimes (width, 10), *digitp++ - '0');
+                         while (digitp != dp->width_end);
+                       }
+                   }
+
+                 precision = 6;
+                 if (dp->precision_start != dp->precision_end)
+                   {
+                     if (dp->precision_arg_index != ARG_NONE)
+                       {
+                         int arg;
+
+                         if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                           abort ();
+                         arg = a.arg[dp->precision_arg_index].a.a_int;
+                         precision = (arg < 0 ? 0 : arg);
+                       }
+                     else
+                       {
+                         const CHAR_T *digitp = dp->precision_start + 1;
+
+                         precision = 0;
+                         while (digitp != dp->precision_end)
+                           precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+                       }
+                   }
+
+                 switch (dp->conversion)
+                   {
+
+                   case 'd': case 'i': case 'u':
+# ifdef HAVE_LONG_LONG
+                     if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+                       tmp_length =
+                         (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+                                         * 0.30103 /* binary -> decimal */
+                                         * 2 /* estimate for FLAG_GROUP */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 1; /* account for leading sign */
+                     else
+# endif
+                     if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+                       tmp_length =
+                         (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+                                         * 0.30103 /* binary -> decimal */
+                                         * 2 /* estimate for FLAG_GROUP */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 1; /* account for leading sign */
+                     else
+                       tmp_length =
+                         (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+                                         * 0.30103 /* binary -> decimal */
+                                         * 2 /* estimate for FLAG_GROUP */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 1; /* account for leading sign */
+                     break;
+
+                   case 'o':
+# ifdef HAVE_LONG_LONG
+                     if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+                       tmp_length =
+                         (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+                                         * 0.333334 /* binary -> octal */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 1; /* account for leading sign */
+                     else
+# endif
+                     if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+                       tmp_length =
+                         (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+                                         * 0.333334 /* binary -> octal */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 1; /* account for leading sign */
+                     else
+                       tmp_length =
+                         (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+                                         * 0.333334 /* binary -> octal */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 1; /* account for leading sign */
+                     break;
+
+                   case 'x': case 'X':
+# ifdef HAVE_LONG_LONG
+                     if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+                       tmp_length =
+                         (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+                                         * 0.25 /* binary -> hexadecimal */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 2; /* account for leading sign or alternate form */
+                     else
+# endif
+                     if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+                       tmp_length =
+                         (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+                                         * 0.25 /* binary -> hexadecimal */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 2; /* account for leading sign or alternate form */
+                     else
+                       tmp_length =
+                         (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+                                         * 0.25 /* binary -> hexadecimal */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 2; /* account for leading sign or alternate form */
+                     break;
+
+                   case 'f': case 'F':
+# ifdef HAVE_LONG_DOUBLE
+                     if (type == TYPE_LONGDOUBLE)
+                       tmp_length =
+                         (unsigned int) (LDBL_MAX_EXP
+                                         * 0.30103 /* binary -> decimal */
+                                         * 2 /* estimate for FLAG_GROUP */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 10; /* sign, decimal point etc. */
+                     else
+# endif
+                       tmp_length =
+                         (unsigned int) (DBL_MAX_EXP
+                                         * 0.30103 /* binary -> decimal */
+                                         * 2 /* estimate for FLAG_GROUP */
+                                        )
+                         + 1 /* turn floor into ceil */
+                         + 10; /* sign, decimal point etc. */
+                     tmp_length = xsum (tmp_length, precision);
+                     break;
+
+                   case 'e': case 'E': case 'g': case 'G':
+                   case 'a': case 'A':
+                     tmp_length =
+                       12; /* sign, decimal point, exponent etc. */
+                     tmp_length = xsum (tmp_length, precision);
+                     break;
+
+                   case 'c':
+# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION
+                     if (type == TYPE_WIDE_CHAR)
+                       tmp_length = MB_CUR_MAX;
+                     else
+# endif
+                       tmp_length = 1;
+                     break;
+
+                   case 's':
+# ifdef HAVE_WCHAR_T
+                     if (type == TYPE_WIDE_STRING)
+                       {
+                         tmp_length =
+                           local_wcslen (a.arg[dp->arg_index].a.a_wide_string);
+
+#  if !WIDE_CHAR_VERSION
+                         tmp_length = xtimes (tmp_length, MB_CUR_MAX);
+#  endif
+                       }
+                     else
+# endif
+                       tmp_length = strlen (a.arg[dp->arg_index].a.a_string);
+                     break;
+
+                   case 'p':
+                     tmp_length =
+                       (unsigned int) (sizeof (void *) * CHAR_BIT
+                                       * 0.25 /* binary -> hexadecimal */
+                                      )
+                         + 1 /* turn floor into ceil */
+                         + 2; /* account for leading 0x */
+                     break;
+
+                   default:
+                     abort ();
+                   }
+
+                 if (tmp_length < width)
+                   tmp_length = width;
+
+                 tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+               }
+
+               if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T))
+                 tmp = tmpbuf;
+               else
+                 {
+                   size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T));
+
+                   if (size_overflow_p (tmp_memsize))
+                     /* Overflow, would lead to out of memory.  */
+                     goto out_of_memory;
+                   tmp = (CHAR_T *) malloc (tmp_memsize);
+                   if (tmp == NULL)
+                     /* Out of memory.  */
+                     goto out_of_memory;
+                 }
+#endif
+
+               /* Construct the format string for calling snprintf or
+                  sprintf.  */
+               p = buf;
+               *p++ = '%';
+               if (dp->flags & FLAG_GROUP)
+                 *p++ = '\'';
+               if (dp->flags & FLAG_LEFT)
+                 *p++ = '-';
+               if (dp->flags & FLAG_SHOWSIGN)
+                 *p++ = '+';
+               if (dp->flags & FLAG_SPACE)
+                 *p++ = ' ';
+               if (dp->flags & FLAG_ALT)
+                 *p++ = '#';
+               if (dp->flags & FLAG_ZERO)
+                 *p++ = '0';
+               if (dp->width_start != dp->width_end)
+                 {
+                   size_t n = dp->width_end - dp->width_start;
+                   memcpy (p, dp->width_start, n * sizeof (CHAR_T));
+                   p += n;
+                 }
+               if (dp->precision_start != dp->precision_end)
+                 {
+                   size_t n = dp->precision_end - dp->precision_start;
+                   memcpy (p, dp->precision_start, n * sizeof (CHAR_T));
+                   p += n;
+                 }
+
+               switch (type)
+                 {
+#ifdef HAVE_LONG_LONG
+                 case TYPE_LONGLONGINT:
+                 case TYPE_ULONGLONGINT:
+                   *p++ = 'l';
+                   /*FALLTHROUGH*/
+#endif
+                 case TYPE_LONGINT:
+                 case TYPE_ULONGINT:
+#ifdef HAVE_WINT_T
+                 case TYPE_WIDE_CHAR:
+#endif
+#ifdef HAVE_WCHAR_T
+                 case TYPE_WIDE_STRING:
+#endif
+                   *p++ = 'l';
+                   break;
+#ifdef HAVE_LONG_DOUBLE
+                 case TYPE_LONGDOUBLE:
+                   *p++ = 'L';
+                   break;
+#endif
+                 default:
+                   break;
+                 }
+               *p = dp->conversion;
+#if USE_SNPRINTF
+               p[1] = '%';
+               p[2] = 'n';
+               p[3] = '\0';
+#else
+               p[1] = '\0';
+#endif
+
+               /* Construct the arguments for calling snprintf or sprintf.  */
+               prefix_count = 0;
+               if (dp->width_arg_index != ARG_NONE)
+                 {
+                   if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                     abort ();
+                   prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
+                 }
+               if (dp->precision_arg_index != ARG_NONE)
+                 {
+                   if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+                     abort ();
+                   prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
+                 }
+
+#if USE_SNPRINTF
+               /* Prepare checking whether snprintf returns the count
+                  via %n.  */
+               ENSURE_ALLOCATION (xsum (length, 1));
+               result[length] = '\0';
+#endif
+
+               for (;;)
+                 {
+                   size_t maxlen;
+                   int count;
+                   int retcount;
+
+                   maxlen = allocated - length;
+                   count = -1;
+                   retcount = 0;
+
+#if USE_SNPRINTF
+# define SNPRINTF_BUF(arg) \
+                   switch (prefix_count)                                   \
+                     {                                                     \
+                     case 0:                                               \
+                       retcount = SNPRINTF (result + length, maxlen, buf,  \
+                                            arg, &count);                  \
+                       break;                                              \
+                     case 1:                                               \
+                       retcount = SNPRINTF (result + length, maxlen, buf,  \
+                                            prefixes[0], arg, &count);     \
+                       break;                                              \
+                     case 2:                                               \
+                       retcount = SNPRINTF (result + length, maxlen, buf,  \
+                                            prefixes[0], prefixes[1], arg, \
+                                            &count);                       \
+                       break;                                              \
+                     default:                                              \
+                       abort ();                                           \
+                     }
+#else
+# define SNPRINTF_BUF(arg) \
+                   switch (prefix_count)                                   \
+                     {                                                     \
+                     case 0:                                               \
+                       count = sprintf (tmp, buf, arg);                    \
+                       break;                                              \
+                     case 1:                                               \
+                       count = sprintf (tmp, buf, prefixes[0], arg);       \
+                       break;                                              \
+                     case 2:                                               \
+                       count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
+                                        arg);                              \
+                       break;                                              \
+                     default:                                              \
+                       abort ();                                           \
+                     }
+#endif
+
+                   switch (type)
+                     {
+                     case TYPE_SCHAR:
+                       {
+                         int arg = a.arg[dp->arg_index].a.a_schar;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+                     case TYPE_UCHAR:
+                       {
+                         unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+                     case TYPE_SHORT:
+                       {
+                         int arg = a.arg[dp->arg_index].a.a_short;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+                     case TYPE_USHORT:
+                       {
+                         unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+                     case TYPE_INT:
+                       {
+                         int arg = a.arg[dp->arg_index].a.a_int;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+                     case TYPE_UINT:
+                       {
+                         unsigned int arg = a.arg[dp->arg_index].a.a_uint;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+                     case TYPE_LONGINT:
+                       {
+                         long int arg = a.arg[dp->arg_index].a.a_longint;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+                     case TYPE_ULONGINT:
+                       {
+                         unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+#ifdef HAVE_LONG_LONG
+                     case TYPE_LONGLONGINT:
+                       {
+                         long long int arg = a.arg[dp->arg_index].a.a_longlongint;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+                     case TYPE_ULONGLONGINT:
+                       {
+                         unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+#endif
+                     case TYPE_DOUBLE:
+                       {
+                         double arg = a.arg[dp->arg_index].a.a_double;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+#ifdef HAVE_LONG_DOUBLE
+                     case TYPE_LONGDOUBLE:
+                       {
+                         long double arg = a.arg[dp->arg_index].a.a_longdouble;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+#endif
+                     case TYPE_CHAR:
+                       {
+                         int arg = a.arg[dp->arg_index].a.a_char;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+#ifdef HAVE_WINT_T
+                     case TYPE_WIDE_CHAR:
+                       {
+                         wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+#endif
+                     case TYPE_STRING:
+                       {
+                         const char *arg = a.arg[dp->arg_index].a.a_string;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+#ifdef HAVE_WCHAR_T
+                     case TYPE_WIDE_STRING:
+                       {
+                         const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+#endif
+                     case TYPE_POINTER:
+                       {
+                         void *arg = a.arg[dp->arg_index].a.a_pointer;
+                         SNPRINTF_BUF (arg);
+                       }
+                       break;
+                     default:
+                       abort ();
+                     }
+
+#if USE_SNPRINTF
+                   /* Portability: Not all implementations of snprintf()
+                      are ISO C 99 compliant.  Determine the number of
+                      bytes that snprintf() has produced or would have
+                      produced.  */
+                   if (count >= 0)
+                     {
+                       /* Verify that snprintf() has NUL-terminated its
+                          result.  */
+                       if (count < maxlen && result[length + count] != '\0')
+                         abort ();
+                       /* Portability hack.  */
+                       if (retcount > count)
+                         count = retcount;
+                     }
+                   else
+                     {
+                       /* snprintf() doesn't understand the '%n'
+                          directive.  */
+                       if (p[1] != '\0')
+                         {
+                           /* Don't use the '%n' directive; instead, look
+                              at the snprintf() return value.  */
+                           p[1] = '\0';
+                           continue;
+                         }
+                       else
+                         {
+                           /* Look at the snprintf() return value.  */
+                           if (retcount < 0)
+                             {
+                               /* HP-UX 10.20 snprintf() is doubly deficient:
+                                  It doesn't understand the '%n' directive,
+                                  *and* it returns -1 (rather than the length
+                                  that would have been required) when the
+                                  buffer is too small.  */
+                               size_t bigger_need =
+                                 xsum (xtimes (allocated, 2), 12);
+                               ENSURE_ALLOCATION (bigger_need);
+                               continue;
+                             }
+                           else
+                             count = retcount;
+                         }
+                     }
+#endif
+
+                   /* Attempt to handle failure.  */
+                   if (count < 0)
+                     {
+                       if (!(result == resultbuf || result == NULL))
+                         free (result);
+                       if (buf_malloced != NULL)
+                         free (buf_malloced);
+                       CLEANUP ();
+                       errno = EINVAL;
+                       return NULL;
+                     }
+
+#if !USE_SNPRINTF
+                   if (count >= tmp_length)
+                     /* tmp_length was incorrectly calculated - fix the
+                        code above!  */
+                     abort ();
+#endif
+
+                   /* Make room for the result.  */
+                   if (count >= maxlen)
+                     {
+                       /* Need at least count bytes.  But allocate
+                          proportionally, to avoid looping eternally if
+                          snprintf() reports a too small count.  */
+                       size_t n =
+                         xmax (xsum (length, count), xtimes (allocated, 2));
+
+                       ENSURE_ALLOCATION (n);
+#if USE_SNPRINTF
+                       continue;
+#endif
+                     }
+
+#if USE_SNPRINTF
+                   /* The snprintf() result did fit.  */
+#else
+                   /* Append the sprintf() result.  */
+                   memcpy (result + length, tmp, count * sizeof (CHAR_T));
+                   if (tmp != tmpbuf)
+                     free (tmp);
+#endif
+
+                   length += count;
+                   break;
+                 }
+             }
+         }
+      }
+
+    /* Add the final NUL.  */
+    ENSURE_ALLOCATION (xsum (length, 1));
+    result[length] = '\0';
+
+    if (result != resultbuf && length + 1 < allocated)
+      {
+       /* Shrink the allocated memory if possible.  */
+       CHAR_T *memory;
+
+       memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T));
+       if (memory != NULL)
+         result = memory;
+      }
+
+    if (buf_malloced != NULL)
+      free (buf_malloced);
+    CLEANUP ();
+    *lengthp = length;
+    if (length > INT_MAX)
+      goto length_overflow;
+    return result;
+
+  length_overflow:
+    /* We could produce such a big string, but its length doesn't fit into
+       an 'int'.  POSIX says that snprintf() fails with errno = EOVERFLOW in
+       this case.  */
+    if (result != resultbuf)
+      free (result);
+    errno = EOVERFLOW;
+    return NULL;
+
+  out_of_memory:
+    if (!(result == resultbuf || result == NULL))
+      free (result);
+    if (buf_malloced != NULL)
+      free (buf_malloced);
+  out_of_memory_1:
+    CLEANUP ();
+    errno = ENOMEM;
+    return NULL;
+  }
+}
+
+#undef SNPRINTF
+#undef USE_SNPRINTF
+#undef PRINTF_PARSE
+#undef DIRECTIVES
+#undef DIRECTIVE
+#undef CHAR_T
+#undef VASNPRINTF
diff --git a/intl/vasnprintf.h b/intl/vasnprintf.h
new file mode 100644 (file)
index 0000000..84da208
--- /dev/null
@@ -0,0 +1,78 @@
+/* vsprintf with automatic memory allocation.
+   Copyright (C) 2002-2004 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _VASNPRINTF_H
+#define _VASNPRINTF_H
+
+/* Get va_list.  */
+#include <stdarg.h>
+
+/* Get size_t.  */
+#include <stddef.h>
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+#  define __attribute__(Spec) /* empty */
+# endif
+/* The __-protected variants of `format' and `printf' attributes
+   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#  define __format__ format
+#  define __printf__ printf
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Write formatted output to a string dynamically allocated with malloc().
+   You can pass a preallocated buffer for the result in RESULTBUF and its
+   size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
+   If successful, return the address of the string (this may be = RESULTBUF
+   if no dynamic memory allocation was necessary) and set *LENGTHP to the
+   number of resulting bytes, excluding the trailing NUL.  Upon error, set
+   errno and return NULL.
+
+   When dynamic memory allocation occurs, the preallocated buffer is left
+   alone (with possibly modified contents).  This makes it possible to use
+   a statically allocated or stack-allocated buffer, like this:
+
+          char buf[100];
+          size_t len = sizeof (buf);
+          char *output = vasnprintf (buf, &len, format, args);
+          if (output == NULL)
+            ... error handling ...;
+          else
+            {
+              ... use the output string ...;
+              if (output != buf)
+                free (output);
+            }
+  */
+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 3, 4)));
+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 3, 0)));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _VASNPRINTF_H */
diff --git a/intl/vasnwprintf.h b/intl/vasnwprintf.h
new file mode 100644 (file)
index 0000000..d3cef4c
--- /dev/null
@@ -0,0 +1,46 @@
+/* vswprintf with automatic memory allocation.
+   Copyright (C) 2002-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _VASNWPRINTF_H
+#define _VASNWPRINTF_H
+
+/* Get va_list.  */
+#include <stdarg.h>
+
+/* Get wchar_t, size_t.  */
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Write formatted output to a string dynamically allocated with malloc().
+   You can pass a preallocated buffer for the result in RESULTBUF and its
+   size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
+   If successful, return the address of the string (this may be = RESULTBUF
+   if no dynamic memory allocation was necessary) and set *LENGTHP to the
+   number of resulting bytes, excluding the trailing NUL.  Upon error, set
+   errno and return NULL.  */
+extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...);
+extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _VASNWPRINTF_H */
diff --git a/intl/wprintf-parse.h b/intl/wprintf-parse.h
new file mode 100644 (file)
index 0000000..24a2cfc
--- /dev/null
@@ -0,0 +1,75 @@
+/* Parse printf format string.
+   Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _WPRINTF_PARSE_H
+#define _WPRINTF_PARSE_H
+
+#include "printf-args.h"
+
+
+/* Flags */
+#define FLAG_GROUP      1      /* ' flag */
+#define FLAG_LEFT       2      /* - flag */
+#define FLAG_SHOWSIGN   4      /* + flag */
+#define FLAG_SPACE      8      /* space flag */
+#define FLAG_ALT       16      /* # flag */
+#define FLAG_ZERO      32
+
+/* arg_index value indicating that no argument is consumed.  */
+#define ARG_NONE       (~(size_t)0)
+
+/* A parsed directive.  */
+typedef struct
+{
+  const wchar_t* dir_start;
+  const wchar_t* dir_end;
+  int flags;
+  const wchar_t* width_start;
+  const wchar_t* width_end;
+  size_t width_arg_index;
+  const wchar_t* precision_start;
+  const wchar_t* precision_end;
+  size_t precision_arg_index;
+  wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
+  size_t arg_index;
+}
+wchar_t_directive;
+
+/* A parsed format string.  */
+typedef struct
+{
+  size_t count;
+  wchar_t_directive *dir;
+  size_t max_width_length;
+  size_t max_precision_length;
+}
+wchar_t_directives;
+
+
+/* Parses the format string.  Fills in the number N of directives, and fills
+   in directives[0], ..., directives[N-1], and sets directives[N].dir_start
+   to the end of the format string.  Also fills in the arg_type fields of the
+   arguments and the needed count of arguments.  */
+#ifdef STATIC
+STATIC
+#else
+extern
+#endif
+int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a);
+
+#endif /* _WPRINTF_PARSE_H */
diff --git a/intl/xsize.h b/intl/xsize.h
new file mode 100644 (file)
index 0000000..362e24b
--- /dev/null
@@ -0,0 +1,109 @@
+/* xsize.h -- Checked size_t computations.
+
+   Copyright (C) 2003 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU Library General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.  */
+
+#ifndef _XSIZE_H
+#define _XSIZE_H
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Get SIZE_MAX.  */
+#include <limits.h>
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+/* The size of memory objects is often computed through expressions of
+   type size_t. Example:
+      void* p = malloc (header_size + n * element_size).
+   These computations can lead to overflow.  When this happens, malloc()
+   returns a piece of memory that is way too small, and the program then
+   crashes while attempting to fill the memory.
+   To avoid this, the functions and macros in this file check for overflow.
+   The convention is that SIZE_MAX represents overflow.
+   malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
+   implementation that uses mmap --, it's recommended to use size_overflow_p()
+   or size_in_bounds_p() before invoking malloc().
+   The example thus becomes:
+      size_t size = xsum (header_size, xtimes (n, element_size));
+      void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
+*/
+
+/* Convert an arbitrary value >= 0 to type size_t.  */
+#define xcast_size_t(N) \
+  ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
+
+/* Sum of two sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum (size_t size1, size_t size2)
+{
+  size_t sum = size1 + size2;
+  return (sum >= size1 ? sum : SIZE_MAX);
+}
+
+/* Sum of three sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum3 (size_t size1, size_t size2, size_t size3)
+{
+  return xsum (xsum (size1, size2), size3);
+}
+
+/* Sum of four sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
+{
+  return xsum (xsum (xsum (size1, size2), size3), size4);
+}
+
+/* Maximum of two sizes, with overflow check.  */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xmax (size_t size1, size_t size2)
+{
+  /* No explicit check is needed here, because for any n:
+     max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX.  */
+  return (size1 >= size2 ? size1 : size2);
+}
+
+/* Multiplication of a count with an element size, with overflow check.
+   The count must be >= 0 and the element size must be > 0.
+   This is a macro, not an inline function, so that it works correctly even
+   when N is of a wider tupe and N > SIZE_MAX.  */
+#define xtimes(N, ELSIZE) \
+  ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
+
+/* Check for overflow.  */
+#define size_overflow_p(SIZE) \
+  ((SIZE) == SIZE_MAX)
+/* Check against overflow.  */
+#define size_in_bounds_p(SIZE) \
+  ((SIZE) != SIZE_MAX)
+
+#endif /* _XSIZE_H */
diff --git a/intltool-extract.in b/intltool-extract.in
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/intltool-merge.in b/intltool-merge.in
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/intltool-update.in b/intltool-update.in
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/libtool b/libtool
new file mode 100755 (executable)
index 0000000..64b3c23
--- /dev/null
+++ b/libtool
@@ -0,0 +1,8894 @@
+#! /bin/sh
+
+# libtool - Provide generalized library-building support services.
+# Generated automatically by config.status (rrdtool) 1.3.99909060808
+# Libtool was configured on host james:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=2.2.6
+macro_revision=1.3012
+
+# Whether or not to build shared libraries.
+build_libtool_libs=yes
+
+# Whether or not to build static libraries.
+build_old_libs=yes
+
+# What type of objects to build.
+pic_mode=default
+
+# Whether or not to optimize for fast installation.
+fast_install=yes
+
+# The host system.
+host_alias=
+host=x86_64-unknown-linux-gnu
+host_os=linux-gnu
+
+# The build system.
+build_alias=
+build=x86_64-unknown-linux-gnu
+build_os=linux-gnu
+
+# A sed program that does not truncate output.
+SED="/bin/sed"
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP="/bin/grep"
+
+# An ERE matcher.
+EGREP="/bin/grep -E"
+
+# A literal string matcher.
+FGREP="/bin/grep -F"
+
+# A BSD- or MS-compatible name lister.
+NM="/usr/bin/nm -B"
+
+# Whether we need soft or hard links.
+LN_S="ln -s"
+
+# What is the maximum length of a command?
+max_cmd_len=98304
+
+# Object file suffix (normally "o").
+objext=o
+
+# Executable file suffix (normally "").
+exeext=
+
+# whether the shell understands "unset".
+lt_unset=unset
+
+# turn spaces into newlines.
+SP2NL="tr \\040 \\012"
+
+# turn newlines into spaces.
+NL2SP="tr \\015\\012 \\040\\040"
+
+# How to create reloadable object files.
+reload_flag=" -r"
+reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
+
+# An object symbol dumper.
+OBJDUMP="objdump"
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method="pass_all"
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd="\$MAGIC_CMD"
+
+# The archiver.
+AR="ar"
+AR_FLAGS="cru"
+
+# A symbol stripping program.
+STRIP="strip"
+
+# Commands used to install an old-style archive.
+RANLIB="ranlib"
+old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
+old_postuninstall_cmds=""
+
+# A C compiler.
+LTCC="gcc"
+
+# LTCC compiler flags.
+LTCFLAGS="-g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -W  -fPIC -DPIC"
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe="sed -n -e 's/^.*[   ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[       ][      ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'"
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (void *) \\&\\2},/p'"
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\(lib[^ ]*\\)\$/  {\"\\2\", (void *) \\&\\2},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/  {\"lib\\2\", (void *) \\&\\2},/p'"
+
+# The name of the directory that contains temporary libtool files.
+objdir=.libs
+
+# Shell to use when invoking shell scripts.
+SHELL="/bin/sh"
+
+# An echo program that does not interpret backslashes.
+ECHO="echo"
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=file
+
+# Must we lock files when doing compilation?
+need_locks="no"
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=""
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=""
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=""
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=""
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=""
+
+# Old archive suffix (normally "a").
+libext=a
+
+# Shared library suffix (normally ".so").
+shrext_cmds=".so"
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=""
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=no
+
+# Do we need a version for libraries?
+need_version=no
+
+# Library versioning type.
+version_type=linux
+
+# Shared library runtime path variable.
+runpath_var=LD_RUN_PATH
+
+# Shared library path variable.
+shlibpath_var=LD_LIBRARY_PATH
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=no
+
+# Format of library name prefix.
+libname_spec="lib\$name"
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
+
+# The coded name of the library, if different from the real name.
+soname_spec="\${libname}\${release}\${shared_ext}\$major"
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=""
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=""
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=""
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=yes
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec="/usr/lib/gcc-lib/x86_64-linux/3.3.5 /usr/lib64 /lib64"
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib /emul/ia32-linux/lib /emul/ia32-linux/usr/lib /emul/ia32-linux/usr/X11R6/lib "
+
+# Whether dlopen is supported.
+dlopen_support=unknown
+
+# Whether dlopen of programs is supported.
+dlopen_self=unknown
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=unknown
+
+# Commands to strip libraries.
+old_striplib="strip --strip-debug"
+striplib="strip --strip-unneeded"
+
+
+# The linker used to build libraries.
+LD="/usr/bin/ld -m elf_x86_64"
+
+# Commands used to build an old-style archive.
+old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
+
+# A language specific compiler.
+CC="gcc"
+
+# Is the compiler the GNU compiler?
+with_gcc=yes
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=" -fno-builtin"
+
+# How to pass a linker flag through the compiler.
+wl="-Wl,"
+
+# Additional compiler flags for building library objects.
+pic_flag=" -fPIC -DPIC"
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag="-static"
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o="yes"
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=no
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=no
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec="\${wl}--export-dynamic"
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object="no"
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=""
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=""
+
+# Commands used to build a shared archive.
+archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
+archive_expsym_cmds="echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
+           cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
+           echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
+           \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=""
+module_expsym_cmds=""
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld="yes"
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=""
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=""
+
+# Flag to hardcode $libdir into a binary during linking.
+# This must work even if $libdir does not exist
+hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir"
+
+# If ld is used when linking, flag to hardcode $libdir into a binary
+# during linking.  This must work even if $libdir does not exist.
+hardcode_libdir_flag_spec_ld=""
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=""
+
+# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=no
+
+# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting ${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=no
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=no
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=unsupported
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=no
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=no
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=unknown
+
+# Fix the shell variable $srcfile for the compiler.
+fix_srcfile_path=""
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=no
+
+# The commands to list exported symbols.
+export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
+
+# Symbols that must always be exported.
+include_expsyms=""
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=""
+
+# Specify filename containing input files.
+file_list_spec=""
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=immediate
+
+# ### END LIBTOOL CONFIG
+
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+#     --config             show all configuration variables
+#     --debug              enable verbose shell tracing
+# -n, --dry-run            display commands without modifying any files
+#     --features           display basic configuration information and exit
+#     --mode=MODE          use operation mode MODE
+#     --preserve-dup-deps  don't remove duplicate dependency libraries
+#     --quiet, --silent    don't print informational messages
+#     --tag=TAG            use configuration variables from tag TAG
+# -v, --verbose            print informational messages (default)
+#     --version            print version information
+# -h, --help               print short or long help message
+#
+# MODE must be one of the following:
+#
+#       clean              remove files from the build directory
+#       compile            compile a source file into a libtool object
+#       execute            automatically set library path, then run a program
+#       finish             complete the installation of libtool libraries
+#       install            install libraries or executables
+#       link               create a library or an executable
+#       uninstall          remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+#       host-triplet:  $host
+#       shell:         $SHELL
+#       compiler:              $LTCC
+#       compiler flags:                $LTCFLAGS
+#       linker:                $LD (gnu? $with_gnu_ld)
+#       $progname:             (GNU libtool) 2.2.6
+#       automake:              $automake_version
+#       autoconf:              $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=2.2.6
+TIMESTAMP=""
+package_revision=1.3012
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+          save_$lt_var=\$$lt_var
+          $lt_var=C
+         export $lt_var
+         lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+         lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+       fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/usr/bin/grep -E"}
+: ${FGREP="/usr/bin/grep -F"}
+: ${GREP="/usr/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/opt/local/bin/gsed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77     # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS="  $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+  # positional parameters, so assign one to ordinary parameter first.
+  func_stripname_result=${3}
+  func_stripname_result=${func_stripname_result#"${1}"}
+  func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
+
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1=\$$1\$2"
+}
+
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+  -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=$func_dirname_result
+     progdir=`cd "$progdir" && pwd`
+     progpath="$progdir/$progname"
+     ;;
+  *)
+     save_IFS="$IFS"
+     IFS=:
+     for progdir in $PATH; do
+       IFS="$save_IFS"
+       test -x "$progdir/$progname" && break
+     done
+     IFS="$save_IFS"
+     test -n "$progdir" || progdir=`pwd`
+     progpath="$progdir/$progname"
+     ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+  s/$bs4/&\\
+/g
+  s/^$bs2$dollar/$bs&/
+  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+  s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
+
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+    # bash bug again:
+    :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information."  ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    my_directory_path="$1"
+    my_dir_list=
+
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$my_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+       # list incase some portion of path contains whitespace.
+        my_dir_list="$my_directory_path:$my_dir_list"
+
+        # If the last portion added has no slash in it, the list is done
+        case $my_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+       IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$my_dir" 2>/dev/null || :
+      done
+      IFS="$save_mkdir_p_IFS"
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$opt_dry_run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+        # Failing that, at least try and use $RANDOM to avoid a race
+        my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+        save_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$my_tmpdir"
+        umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+    fi
+
+    $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+    case $1 in
+      *[\\\`\"\$]*)
+       func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+      *)
+        func_quote_for_eval_unquoted_result="$1" ;;
+    esac
+
+    case $func_quote_for_eval_unquoted_result in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and and variable
+      # expansion for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+        ;;
+      *)
+        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+    esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+    case $1 in
+      *[\\\`\"]*)
+       my_arg=`$ECHO "X$1" | $Xsed \
+           -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        my_arg="$1" ;;
+    esac
+
+    case $my_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+        my_arg="\"$my_arg\""
+        ;;
+    esac
+
+    func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+       eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$lt_user_locale
+           $my_cmd"
+      my_status=$?
+      eval "$lt_safe_locale"
+      if test "$my_status" -eq 0; then :; else
+       eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //
+       s/^# *$//
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+        p
+     }' < "$progpath"
+     exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $SED -n '/^# Usage:/,/# -h/ {
+        s/^# //
+       s/^# *$//
+       s/\$progname/'$progname'/
+       p
+    }' < "$progpath"
+    $ECHO
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+        s/^# //
+       s/^# *$//
+       s*\$progname*'$progname'*
+       s*\$host*'"$host"'*
+       s*\$SHELL*'"$SHELL"'*
+       s*\$LTCC*'"$LTCC"'*
+       s*\$LTCFLAGS*'"$LTCFLAGS"'*
+       s*\$LD*'"$LD"'*
+       s/\$with_gnu_ld/'"$with_gnu_ld"'/
+       s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+       s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+       p
+     }' < "$progpath"
+    exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    func_error "missing argument for $1"
+    exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell, and then maybe $ECHO will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+    done
+
+    exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+    $ECHO "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $ECHO "enable shared libraries"
+    else
+      $ECHO "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $ECHO "enable static libraries"
+    else
+      $ECHO "disable static libraries"
+    fi
+
+    exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+  # Global variable:
+  tagname="$1"
+
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
+
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
+    *)
+      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+       taglist="$taglist $tagname"
+
+       # Evaluate the configuration.  Be careful to quote the path
+       # and the sed script, to avoid splitting on whitespace, but
+       # also don't use non-portable quotes within backquotes within
+       # quotes we have to do it in 2 steps:
+       extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+       eval "$extractedcf"
+      else
+       func_error "ignoring unknown tag $tagname"
+      fi
+      ;;
+  esac
+}
+
+# Parse options once, thoroughly.  This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+  # Shorthand for --mode=foo, only valid as the first argument
+  case $1 in
+  clean|clea|cle|cl)
+    shift; set dummy --mode clean ${1+"$@"}; shift
+    ;;
+  compile|compil|compi|comp|com|co|c)
+    shift; set dummy --mode compile ${1+"$@"}; shift
+    ;;
+  execute|execut|execu|exec|exe|ex|e)
+    shift; set dummy --mode execute ${1+"$@"}; shift
+    ;;
+  finish|finis|fini|fin|fi|f)
+    shift; set dummy --mode finish ${1+"$@"}; shift
+    ;;
+  install|instal|insta|inst|ins|in|i)
+    shift; set dummy --mode install ${1+"$@"}; shift
+    ;;
+  link|lin|li|l)
+    shift; set dummy --mode link ${1+"$@"}; shift
+    ;;
+  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+    shift; set dummy --mode uninstall ${1+"$@"}; shift
+    ;;
+  esac
+
+  # Parse non-mode specific arguments:
+  while test "$#" -gt 0; do
+    opt="$1"
+    shift
+
+    case $opt in
+      --config)                func_config                                     ;;
+
+      --debug)         preserve_args="$preserve_args $opt"
+                       func_echo "enabling shell trace mode"
+                       opt_debug='set -x'
+                       $opt_debug
+                       ;;
+
+      -dlopen)         test "$#" -eq 0 && func_missing_arg "$opt" && break
+                       execute_dlfiles="$execute_dlfiles $1"
+                       shift
+                       ;;
+
+      --dry-run | -n)  opt_dry_run=:                                   ;;
+      --features)       func_features                                  ;;
+      --finish)                mode="finish"                                   ;;
+
+      --mode)          test "$#" -eq 0 && func_missing_arg "$opt" && break
+                       case $1 in
+                         # Valid mode arguments:
+                         clean)        ;;
+                         compile)      ;;
+                         execute)      ;;
+                         finish)       ;;
+                         install)      ;;
+                         link)         ;;
+                         relink)       ;;
+                         uninstall)    ;;
+
+                         # Catch anything else as an error
+                         *) func_error "invalid argument for $opt"
+                            exit_cmd=exit
+                            break
+                            ;;
+                       esac
+
+                       mode="$1"
+                       shift
+                       ;;
+
+      --preserve-dup-deps)
+                       opt_duplicate_deps=:                            ;;
+
+      --quiet|--silent)        preserve_args="$preserve_args $opt"
+                       opt_silent=:
+                       ;;
+
+      --verbose| -v)   preserve_args="$preserve_args $opt"
+                       opt_silent=false
+                       ;;
+
+      --tag)           test "$#" -eq 0 && func_missing_arg "$opt" && break
+                       preserve_args="$preserve_args $opt $1"
+                       func_enable_tag "$1"    # tagname is set here
+                       shift
+                       ;;
+
+      # Separate optargs to long options:
+      -dlopen=*|--mode=*|--tag=*)
+                       func_opt_split "$opt"
+                       set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+                       shift
+                       ;;
+
+      -\?|-h)          func_usage                                      ;;
+      --help)          opt_help=:                                      ;;
+      --version)       func_version                                    ;;
+
+      -*)              func_fatal_help "unrecognized option \`$opt'"   ;;
+
+      *)               nonopt="$opt"
+                       break
+                       ;;
+    esac
+  done
+
+
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
+      ;;
+    *)
+      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+      ;;
+  esac
+
+  # Having warned about all mis-specified options, bail out if
+  # anything was wrong.
+  $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+$opt_help || {
+  # Sanity checks first:
+  func_check_version_match
+
+  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+    func_fatal_configuration "not configured to build any kind of library"
+  fi
+
+  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+  # Darwin sucks
+  eval std_shrext=\"$shrext_cmds\"
+
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    func_error "unrecognized option \`-dlopen'"
+    $ECHO "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+    test -f "$1" &&
+      $SED -e 4q "$1" 2>/dev/null \
+        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs.  To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway.  Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+    lalib_p=no
+    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+       for lalib_p_l in 1 2 3 4
+       do
+           read lalib_p_line
+           case "$lalib_p_line" in
+               \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+           esac
+       done
+       exec 0<&5 5<&-
+    fi
+    test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+    func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+    func_ltwrapper_exec_suffix=
+    case $1 in
+    *.exe) ;;
+    *) func_ltwrapper_exec_suffix=.exe ;;
+    esac
+    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+    func_ltwrapper_scriptname_result=""
+    if func_ltwrapper_executable_p "$1"; then
+       func_dirname_and_basename "$1" "" "."
+       func_stripname '' '.exe' "$func_basename_result"
+       func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+    fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+    $opt_debug
+    save_ifs=$IFS; IFS='~'
+    for cmd in $1; do
+      IFS=$save_ifs
+      eval cmd=\"$cmd\"
+      func_show_eval "$cmd" "${2-:}"
+    done
+    IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)!  Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+    $opt_debug
+    case $1 in
+    */* | *\\*)        . "$1" ;;
+    *)         . "./$1" ;;
+    esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    $opt_debug
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+        func_quote_for_eval "$arg"
+       CC_quoted="$CC_quoted $func_quote_for_eval_result"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+       for z in $available_tags; do
+         if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+           # Evaluate the configuration.
+           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+           CC_quoted=
+           for arg in $CC; do
+             # Double-quote args containing other shell metacharacters.
+             func_quote_for_eval "$arg"
+             CC_quoted="$CC_quoted $func_quote_for_eval_result"
+           done
+           case "$@ " in
+             " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+             # The compiler in the base compile command matches
+             # the one in the tagged configuration.
+             # Assume this is the tagged configuration we want.
+             tagname=$z
+             break
+             ;;
+           esac
+         fi
+       done
+       # If $tagname still isn't set, then no tagged configuration
+       # was found and let the user know that the "--tag" command
+       # line option must be used.
+       if test -z "$tagname"; then
+         func_echo "unable to infer tagged configuration"
+         func_fatal_error "specify a tag with \`--tag'"
+#      else
+#        func_verbose "using $tagname tagged configuration"
+       fi
+       ;;
+      esac
+    fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=${1}
+    if test "$build_libtool_libs" = yes; then
+      write_lobj=\'${2}\'
+    else
+      write_lobj=none
+    fi
+
+    if test "$build_old_libs" = yes; then
+      write_oldobj=\'${3}\'
+    else
+      write_oldobj=none
+    fi
+
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "${write_libobj}"
+    }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $opt_debug
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+    pie_flag=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+       # do not "continue".  Instead, add this to base_compile
+       lastarg="$arg"
+       arg_mode=normal
+       ;;
+
+      target )
+       libobj="$arg"
+       arg_mode=normal
+       continue
+       ;;
+
+      normal )
+       # Accept any command-line options.
+       case $arg in
+       -o)
+         test -n "$libobj" && \
+           func_fatal_error "you cannot specify \`-o' more than once"
+         arg_mode=target
+         continue
+         ;;
+
+       -pie | -fpie | -fPIE)
+          pie_flag="$pie_flag $arg"
+         continue
+         ;;
+
+       -shared | -static | -prefer-pic | -prefer-non-pic)
+         later="$later $arg"
+         continue
+         ;;
+
+       -no-suppress)
+         suppress_opt=no
+         continue
+         ;;
+
+       -Xcompiler)
+         arg_mode=arg  #  the next one goes into the "base_compile" arg list
+         continue      #  The current "srcfile" will either be retained or
+         ;;            #  replaced later.  I would guess that would be a bug.
+
+       -Wc,*)
+         func_stripname '-Wc,' '' "$arg"
+         args=$func_stripname_result
+         lastarg=
+         save_ifs="$IFS"; IFS=','
+         for arg in $args; do
+           IFS="$save_ifs"
+           func_quote_for_eval "$arg"
+           lastarg="$lastarg $func_quote_for_eval_result"
+         done
+         IFS="$save_ifs"
+         func_stripname ' ' '' "$lastarg"
+         lastarg=$func_stripname_result
+
+         # Add the arguments to base_compile.
+         base_compile="$base_compile $lastarg"
+         continue
+         ;;
+
+       *)
+         # Accept the current argument as the source file.
+         # The previous "srcfile" becomes the current argument.
+         #
+         lastarg="$srcfile"
+         srcfile="$arg"
+         ;;
+       esac  #  case $arg
+       ;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      func_quote_for_eval "$lastarg"
+      base_compile="$base_compile $func_quote_for_eval_result"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      func_fatal_error "you must specify an argument for -Xcompile"
+      ;;
+    target)
+      func_fatal_error "you must specify a target with \`-o'"
+      ;;
+    *)
+      # Get the name of the library object.
+      test -z "$libobj" && {
+       func_basename "$srcfile"
+       libobj="$func_basename_result"
+      }
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    case $libobj in
+    *.[cCFSifmso] | \
+    *.ada | *.adb | *.ads | *.asm | \
+    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+      func_xform "$libobj"
+      libobj=$func_xform_result
+      ;;
+    esac
+
+    case $libobj in
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+    *)
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -shared)
+       test "$build_libtool_libs" != yes && \
+         func_fatal_configuration "can not build a shared library"
+       build_old_libs=no
+       continue
+       ;;
+
+      -static)
+       build_libtool_libs=no
+       build_old_libs=yes
+       continue
+       ;;
+
+      -prefer-pic)
+       pic_mode=yes
+       continue
+       ;;
+
+      -prefer-non-pic)
+       pic_mode=no
+       continue
+       ;;
+      esac
+    done
+
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'   &()|`$[]' \
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+    func_dirname_and_basename "$obj" "/" ""
+    objname="$func_basename_result"
+    xdir="$func_dirname_result"
+    lobj=${xdir}$objdir/$objname
+
+    test -z "$base_compile" && \
+      func_fatal_help "you must specify a compilation command"
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+       func_echo "Waiting for $lockfile to be removed"
+       sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+       $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $opt_dry_run || $RM $removelist
+       exit $EXIT_FAILURE
+      fi
+      removelist="$removelist $output_obj"
+      $ECHO "$srcfile" > "$lockfile"
+    fi
+
+    $opt_dry_run || $RM $removelist
+    removelist="$removelist $lockfile"
+    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+       command="$base_compile $qsrcfile $pic_flag"
+      else
+       # Don't build PIC code
+       command="$base_compile $qsrcfile"
+      fi
+
+      func_mkdir_p "$xdir$objdir"
+
+      if test -z "$output_obj"; then
+       # Place PIC objects in $objdir
+       command="$command -o $lobj"
+      fi
+
+      func_show_eval_locale "$command" \
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+       $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $opt_dry_run || $RM $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+       func_show_eval '$MV "$output_obj" "$lobj"' \
+         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+       suppress_output=' >/dev/null 2>&1'
+      fi
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+       # Don't build PIC code
+       command="$base_compile $qsrcfile$pie_flag"
+      else
+       command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+       command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      func_show_eval_locale "$command" \
+        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+       $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $opt_dry_run || $RM $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+       func_show_eval '$MV "$output_obj" "$obj"' \
+         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+    fi
+
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+      # Unlock the critical section if it was locked
+      if test "$need_locks" != no; then
+       removelist=$lockfile
+        $RM "$lockfile"
+      fi
+    }
+
+    exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+    # We need to display help for each of the modes.
+    case $mode in
+      "")
+        # Generic help is extracted from the usage comments
+        # at the start of this file.
+        func_help
+        ;;
+
+      clean)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+        ;;
+
+      compile)
+      $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -no-suppress      do not suppress compiler output for multiple passes
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -shared           do not build a \`.o' file suitable for static linking
+  -static           only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+        ;;
+
+      execute)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+        ;;
+
+      finish)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+        ;;
+
+      install)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
+
+      link)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -shared           only do dynamic linking of libtool libraries
+  -shrext SUFFIX    override the standard shared library file extension
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+  -weak LIBNAME     declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+        ;;
+
+      uninstall)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+        ;;
+
+      *)
+        func_fatal_help "invalid operation mode \`$mode'"
+        ;;
+    esac
+
+    $ECHO
+    $ECHO "Try \`$progname --help' for more information about other modes."
+
+    exit $?
+}
+
+  # Now that we've collected a possible --mode arg, show help if necessary
+  $opt_help && func_mode_help
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+    $opt_debug
+    # The first argument is the command name.
+    cmd="$nonopt"
+    test -z "$cmd" && \
+      func_fatal_help "you must specify a COMMAND"
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      test -f "$file" \
+       || func_fatal_help "\`$file' is not a file"
+
+      dir=
+      case $file in
+      *.la)
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$file" \
+         || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+       # Read the libtool library.
+       dlname=
+       library_names=
+       func_source "$file"
+
+       # Skip this library if it cannot be dlopened.
+       if test -z "$dlname"; then
+         # Warn if it was a shared library.
+         test -n "$library_names" && \
+           func_warning "\`$file' was not linked with \`-export-dynamic'"
+         continue
+       fi
+
+       func_dirname "$file" "" "."
+       dir="$func_dirname_result"
+
+       if test -f "$dir/$objdir/$dlname"; then
+         dir="$dir/$objdir"
+       else
+         if test ! -f "$dir/$dlname"; then
+           func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+         fi
+       fi
+       ;;
+
+      *.lo)
+       # Just add the directory containing the .lo file.
+       func_dirname "$file" "" "."
+       dir="$func_dirname_result"
+       ;;
+
+      *)
+       func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+       continue
+       ;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+       eval "$shlibpath_var=\"\$dir\""
+      else
+       eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+       # Do a test to see if this is really a libtool program.
+       if func_ltwrapper_script_p "$file"; then
+         func_source "$file"
+         # Transform arg to wrapped name.
+         file="$progdir/$program"
+       elif func_ltwrapper_executable_p "$file"; then
+         func_ltwrapper_scriptname "$file"
+         func_source "$func_ltwrapper_scriptname_result"
+         # Transform arg to wrapped name.
+         file="$progdir/$program"
+       fi
+       ;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      func_quote_for_eval "$file"
+      args="$args $func_quote_for_eval_result"
+    done
+
+    if test "X$opt_dry_run" = Xfalse; then
+      if test -n "$shlibpath_var"; then
+       # Export the shlibpath_var.
+       eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+       eval "if test \"\${save_$lt_var+set}\" = set; then
+                $lt_var=\$save_$lt_var; export $lt_var
+             else
+               $lt_unset $lt_var
+             fi"
+      done
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+       eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+       $ECHO "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+       libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+       if test -n "$finish_cmds"; then
+         # Do each command in the finish commands.
+         func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+       fi
+       if test -n "$finish_eval"; then
+         # Do the single finish_eval.
+         eval cmds=\"$finish_eval\"
+         $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+       $cmds"
+       fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    $opt_silent && exit $EXIT_SUCCESS
+
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    $ECHO "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $ECHO "   $libdir"
+    done
+    $ECHO
+    $ECHO "If you ever happen to want to link against installed libraries"
+    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $ECHO "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $ECHO "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $ECHO "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $ECHO "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $ECHO "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $ECHO
+
+    $ECHO "See any operating system documentation about shared libraries for"
+    case $host in
+      solaris2.[6789]|solaris2.1[0-9])
+        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+       $ECHO "pages."
+       ;;
+      *)
+        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+        ;;
+    esac
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+    $opt_debug
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+      # Aesthetically quote it.
+      func_quote_for_eval "$nonopt"
+      install_prog="$func_quote_for_eval_result "
+      arg=$1
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    func_quote_for_eval "$arg"
+    install_prog="$install_prog$func_quote_for_eval_result"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+       files="$files $dest"
+       dest=$arg
+       continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f)
+       case " $install_prog " in
+       *[\\\ /]cp\ *) ;;
+       *) prev=$arg ;;
+       esac
+       ;;
+      -g | -m | -o)
+       prev=$arg
+       ;;
+      -s)
+       stripme=" -s"
+       continue
+       ;;
+      -*)
+       ;;
+      *)
+       # If the previous option needed an argument, then skip it.
+       if test -n "$prev"; then
+         prev=
+       else
+         dest=$arg
+         continue
+       fi
+       ;;
+      esac
+
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      install_prog="$install_prog $func_quote_for_eval_result"
+    done
+
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prev' option requires an argument"
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+       func_fatal_help "no file or destination specified"
+      else
+       func_fatal_help "you must specify a destination"
+      fi
+    fi
+
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      func_dirname_and_basename "$dest" "" "."
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files; shift
+      test "$#" -gt 1 && \
+       func_fatal_help "\`$dest' is not a directory"
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+       case $file in
+       *.lo) ;;
+       *)
+         func_fatal_help "\`$destdir' must be an absolute directory name"
+         ;;
+       esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+       # Do the static libraries later.
+       staticlibs="$staticlibs $file"
+       ;;
+
+      *.la)
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$file" \
+         || func_fatal_help "\`$file' is not a valid libtool archive"
+
+       library_names=
+       old_library=
+       relink_command=
+       func_source "$file"
+
+       # Add the libdir to current_libdirs if it is the destination.
+       if test "X$destdir" = "X$libdir"; then
+         case "$current_libdirs " in
+         *" $libdir "*) ;;
+         *) current_libdirs="$current_libdirs $libdir" ;;
+         esac
+       else
+         # Note the libdir as a future libdir.
+         case "$future_libdirs " in
+         *" $libdir "*) ;;
+         *) future_libdirs="$future_libdirs $libdir" ;;
+         esac
+       fi
+
+       func_dirname "$file" "/" ""
+       dir="$func_dirname_result"
+       dir="$dir$objdir"
+
+       if test -n "$relink_command"; then
+         # Determine the prefix the user has applied to our future dir.
+         inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+         # Don't allow the user to place us outside of our expected
+         # location b/c this prevents finding dependent libraries that
+         # are installed to the same prefix.
+         # At present, this check doesn't affect windows .dll's that
+         # are installed into $libdir/../bin (currently, that works fine)
+         # but it's something to keep an eye on.
+         test "$inst_prefix_dir" = "$destdir" && \
+           func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+         if test -n "$inst_prefix_dir"; then
+           # Stick the inst_prefix_dir data into the link command.
+           relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+         else
+           relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+         fi
+
+         func_warning "relinking \`$file'"
+         func_show_eval "$relink_command" \
+           'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+       fi
+
+       # See the names of the shared library.
+       set dummy $library_names; shift
+       if test -n "$1"; then
+         realname="$1"
+         shift
+
+         srcname="$realname"
+         test -n "$relink_command" && srcname="$realname"T
+
+         # Install the shared library and build the symlinks.
+         func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+             'exit $?'
+         tstripme="$stripme"
+         case $host_os in
+         cygwin* | mingw* | pw32* | cegcc*)
+           case $realname in
+           *.dll.a)
+             tstripme=""
+             ;;
+           esac
+           ;;
+         esac
+         if test -n "$tstripme" && test -n "$striplib"; then
+           func_show_eval "$striplib $destdir/$realname" 'exit $?'
+         fi
+
+         if test "$#" -gt 0; then
+           # Delete the old symlinks, and create new ones.
+           # Try `ln -sf' first, because the `ln' binary might depend on
+           # the symlink we replace!  Solaris /bin/ln does not understand -f,
+           # so we also need to try rm && ln -s.
+           for linkname
+           do
+             test "$linkname" != "$realname" \
+               && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+           done
+         fi
+
+         # Do each command in the postinstall commands.
+         lib="$destdir/$realname"
+         func_execute_cmds "$postinstall_cmds" 'exit $?'
+       fi
+
+       # Install the pseudo-library for information purposes.
+       func_basename "$file"
+       name="$func_basename_result"
+       instname="$dir/$name"i
+       func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+       # Maybe install the static library, too.
+       test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+       ;;
+
+      *.lo)
+       # Install (i.e. copy) a libtool object.
+
+       # Figure out destination file name, if it wasn't already specified.
+       if test -n "$destname"; then
+         destfile="$destdir/$destname"
+       else
+         func_basename "$file"
+         destfile="$func_basename_result"
+         destfile="$destdir/$destfile"
+       fi
+
+       # Deduce the name of the destination old-style object file.
+       case $destfile in
+       *.lo)
+         func_lo2o "$destfile"
+         staticdest=$func_lo2o_result
+         ;;
+       *.$objext)
+         staticdest="$destfile"
+         destfile=
+         ;;
+       *)
+         func_fatal_help "cannot copy a libtool object to \`$destfile'"
+         ;;
+       esac
+
+       # Install the libtool object if requested.
+       test -n "$destfile" && \
+         func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+       # Install the old object if enabled.
+       if test "$build_old_libs" = yes; then
+         # Deduce the name of the old-style object file.
+         func_lo2o "$file"
+         staticobj=$func_lo2o_result
+         func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+       fi
+       exit $EXIT_SUCCESS
+       ;;
+
+      *)
+       # Figure out destination file name, if it wasn't already specified.
+       if test -n "$destname"; then
+         destfile="$destdir/$destname"
+       else
+         func_basename "$file"
+         destfile="$func_basename_result"
+         destfile="$destdir/$destfile"
+       fi
+
+       # If the file is missing, and there is a .exe on the end, strip it
+       # because it is most likely a libtool script we actually want to
+       # install
+       stripped_ext=""
+       case $file in
+         *.exe)
+           if test ! -f "$file"; then
+             func_stripname '' '.exe' "$file"
+             file=$func_stripname_result
+             stripped_ext=".exe"
+           fi
+           ;;
+       esac
+
+       # Do a test to see if this is really a libtool program.
+       case $host in
+       *cygwin* | *mingw*)
+           if func_ltwrapper_executable_p "$file"; then
+             func_ltwrapper_scriptname "$file"
+             wrapper=$func_ltwrapper_scriptname_result
+           else
+             func_stripname '' '.exe' "$file"
+             wrapper=$func_stripname_result
+           fi
+           ;;
+       *)
+           wrapper=$file
+           ;;
+       esac
+       if func_ltwrapper_script_p "$wrapper"; then
+         notinst_deplibs=
+         relink_command=
+
+         func_source "$wrapper"
+
+         # Check the variables that should have been set.
+         test -z "$generated_by_libtool_version" && \
+           func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+         finalize=yes
+         for lib in $notinst_deplibs; do
+           # Check to see that each library is installed.
+           libdir=
+           if test -f "$lib"; then
+             func_source "$lib"
+           fi
+           libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+           if test -n "$libdir" && test ! -f "$libfile"; then
+             func_warning "\`$lib' has not been installed in \`$libdir'"
+             finalize=no
+           fi
+         done
+
+         relink_command=
+         func_source "$wrapper"
+
+         outputname=
+         if test "$fast_install" = no && test -n "$relink_command"; then
+           $opt_dry_run || {
+             if test "$finalize" = yes; then
+               tmpdir=`func_mktempdir`
+               func_basename "$file$stripped_ext"
+               file="$func_basename_result"
+               outputname="$tmpdir/$file"
+               # Replace the output file specification.
+               relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+               $opt_silent || {
+                 func_quote_for_expand "$relink_command"
+                 eval "func_echo $func_quote_for_expand_result"
+               }
+               if eval "$relink_command"; then :
+                 else
+                 func_error "error: relink \`$file' with the above command before installing it"
+                 $opt_dry_run || ${RM}r "$tmpdir"
+                 continue
+               fi
+               file="$outputname"
+             else
+               func_warning "cannot relink \`$file'"
+             fi
+           }
+         else
+           # Install the binary that we compiled earlier.
+           file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+         fi
+       fi
+
+       # remove .exe since cygwin /usr/bin/install will append another
+       # one anyway
+       case $install_prog,$host in
+       */usr/bin/install*,*cygwin*)
+         case $file:$destfile in
+         *.exe:*.exe)
+           # this is ok
+           ;;
+         *.exe:*)
+           destfile=$destfile.exe
+           ;;
+         *:*.exe)
+           func_stripname '' '.exe' "$destfile"
+           destfile=$func_stripname_result
+           ;;
+         esac
+         ;;
+       esac
+       func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+       $opt_dry_run || if test -n "$outputname"; then
+         ${RM}r "$tmpdir"
+       fi
+       ;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      func_basename "$file"
+      name="$func_basename_result"
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+       func_show_eval "$old_striplib $oldlib" 'exit $?'
+      fi
+
+      # Do each command in the postinstall commands.
+      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+    done
+
+    test -n "$future_libdirs" && \
+      func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      $opt_dry_run && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+    $opt_debug
+    my_outputname="$1"
+    my_originator="$2"
+    my_pic_p="${3-no}"
+    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    my_dlsyms=
+
+    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+      if test -n "$NM" && test -n "$global_symbol_pipe"; then
+       my_dlsyms="${my_outputname}S.c"
+      else
+       func_error "not configured to extract global symbols from dlpreopened files"
+      fi
+    fi
+
+    if test -n "$my_dlsyms"; then
+      case $my_dlsyms in
+      "") ;;
+      *.c)
+       # Discover the nlist of each of the dlfiles.
+       nlist="$output_objdir/${my_outputname}.nm"
+
+       func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+       # Parse the name list into a source file.
+       func_verbose "creating $output_objdir/$my_dlsyms"
+
+       $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+       if test "$dlself" = yes; then
+         func_verbose "generating symbol list for \`$output'"
+
+         $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+         # Add our own program objects to the symbol list.
+         progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+         for progfile in $progfiles; do
+           func_verbose "extracting global C symbols from \`$progfile'"
+           $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+         done
+
+         if test -n "$exclude_expsyms"; then
+           $opt_dry_run || {
+             eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+           }
+         fi
+
+         if test -n "$export_symbols_regex"; then
+           $opt_dry_run || {
+             eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+           }
+         fi
+
+         # Prepare the list of exported symbols
+         if test -z "$export_symbols"; then
+           export_symbols="$output_objdir/$outputname.exp"
+           $opt_dry_run || {
+             $RM $export_symbols
+             eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+             case $host in
+             *cygwin* | *mingw* | *cegcc* )
+                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+               ;;
+             esac
+           }
+         else
+           $opt_dry_run || {
+             eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+             eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+             eval '$MV "$nlist"T "$nlist"'
+             case $host in
+               *cygwin | *mingw* | *cegcc* )
+                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                 ;;
+             esac
+           }
+         fi
+       fi
+
+       for dlprefile in $dlprefiles; do
+         func_verbose "extracting global C symbols from \`$dlprefile'"
+         func_basename "$dlprefile"
+         name="$func_basename_result"
+         $opt_dry_run || {
+           eval '$ECHO ": $name " >> "$nlist"'
+           eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+         }
+       done
+
+       $opt_dry_run || {
+         # Make sure we have at least an empty file.
+         test -f "$nlist" || : > "$nlist"
+
+         if test -n "$exclude_expsyms"; then
+           $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+           $MV "$nlist"T "$nlist"
+         fi
+
+         # Try sorting and uniquifying the output.
+         if $GREP -v "^: " < "$nlist" |
+             if sort -k 3 </dev/null >/dev/null 2>&1; then
+               sort -k 3
+             else
+               sort +2
+             fi |
+             uniq > "$nlist"S; then
+           :
+         else
+           $GREP -v "^: " < "$nlist" > "$nlist"S
+         fi
+
+         if test -f "$nlist"S; then
+           eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+         else
+           $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+         fi
+
+         $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols.  */
+typedef struct {
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+"
+         case $host in
+         *cygwin* | *mingw* | *cegcc* )
+           $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs.  */"
+           lt_dlsym_const= ;;
+         *osf5*)
+           echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+           lt_dlsym_const= ;;
+         *)
+           lt_dlsym_const=const ;;
+         esac
+
+         $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+  { \"$my_originator\", (void *) 0 },"
+
+         case $need_lib_prefix in
+         no)
+           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+           ;;
+         *)
+           eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+           ;;
+         esac
+         $ECHO >> "$output_objdir/$my_dlsyms" "\
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+       } # !$opt_dry_run
+
+       pic_flag_for_symtable=
+       case "$compile_command " in
+       *" -static "*) ;;
+       *)
+         case $host in
+         # compiling the symbol table file with pic_flag works around
+         # a FreeBSD bug that causes programs to crash when -lm is
+         # linked before any other PIC object.  But we must not use
+         # pic_flag when linking with -static.  The problem exists in
+         # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+           pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+         *-*-hpux*)
+           pic_flag_for_symtable=" $pic_flag"  ;;
+         *)
+           if test "X$my_pic_p" != Xno; then
+             pic_flag_for_symtable=" $pic_flag"
+           fi
+           ;;
+         esac
+         ;;
+       esac
+       symtab_cflags=
+       for arg in $LTCFLAGS; do
+         case $arg in
+         -pie | -fpie | -fPIE) ;;
+         *) symtab_cflags="$symtab_cflags $arg" ;;
+         esac
+       done
+
+       # Now compile the dynamic symbol file.
+       func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+       # Clean up the generated files.
+       func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+       # Transform the symbol file into the correct name.
+       symfileobj="$output_objdir/${my_outputname}S.$objext"
+       case $host in
+       *cygwin* | *mingw* | *cegcc* )
+         if test -f "$output_objdir/$my_outputname.def"; then
+           compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+           finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+         else
+           compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+           finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+         fi
+         ;;
+       *)
+         compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+         finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+         ;;
+       esac
+       ;;
+      *)
+       func_fatal_error "unknown suffix for \`$my_dlsyms'"
+       ;;
+      esac
+    else
+      # We keep going just in case the user didn't refer to
+      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+      # really was required.
+
+      # Nullify the symbol file.
+      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+    fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  $opt_debug
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 |
+       $SED -n -e '
+           1,100{
+               / I /{
+                   s,.*,import,
+                   p
+                   q
+               }
+           }'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $ECHO "$win32_libid_type"
+}
+
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+    fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    $opt_debug
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+       *) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      func_basename "$my_xlib"
+      my_xlib="$func_basename_result"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+       *" $my_xlib_u "*)
+         func_arith $extracted_serial + 1
+         extracted_serial=$func_arith_result
+         my_xlib_u=lt$extracted_serial-$my_xlib ;;
+       *) break ;;
+       esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      func_mkdir_p "$my_xdir"
+
+      case $host in
+      *-darwin*)
+       func_verbose "Extracting $my_xabs"
+       # Do not bother doing anything if just a dry run
+       $opt_dry_run || {
+         darwin_orig_dir=`pwd`
+         cd $my_xdir || exit $?
+         darwin_archive=$my_xabs
+         darwin_curdir=`pwd`
+         darwin_base_archive=`basename "$darwin_archive"`
+         darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+         if test -n "$darwin_arches"; then
+           darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+           darwin_arch=
+           func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+           for darwin_arch in  $darwin_arches ; do
+             func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+             $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+             cd "$darwin_curdir"
+             $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+           done # $darwin_arches
+            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+           darwin_file=
+           darwin_files=
+           for darwin_file in $darwin_filelist; do
+             darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+             $LIPO -create -output "$darwin_file" $darwin_files
+           done # $darwin_filelist
+           $RM -rf unfat-$$
+           cd "$darwin_orig_dir"
+         else
+           cd $darwin_orig_dir
+           func_extract_an_archive "$my_xdir" "$my_xabs"
+         fi # $darwin_arches
+       } # !$opt_dry_run
+       ;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+       ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+
+    func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+       func_emit_wrapper_part1_arg1=no
+       if test -n "$1" ; then
+         func_emit_wrapper_part1_arg1=$1
+       fi
+
+       $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variables:
+  generated_by_libtool_version='$macro_version'
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$ECHO are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    ECHO=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$ECHO works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$ECHO will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+       $ECHO "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+"
+}
+# end: func_emit_wrapper_part1
+
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+       func_emit_wrapper_part2_arg1=no
+       if test -n "$1" ; then
+         func_emit_wrapper_part2_arg1=$1
+       fi
+
+       $ECHO "\
+
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+    # special case for '.'
+    if test \"\$thisdir\" = \".\"; then
+      thisdir=\`pwd\`
+    fi
+    # remove .libs from thisdir
+    case \"\$thisdir\" in
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    $objdir )   thisdir=. ;;
+    esac
+  fi
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+       if test "$fast_install" = yes; then
+         $ECHO "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" ||
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $MKDIR \"\$progdir\"
+    else
+      $RM \"\$progdir/\$file\"
+    fi"
+
+         $ECHO "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+       $ECHO \"\$relink_command_output\" >&2
+       $RM \"\$progdir/\$file\"
+       exit 1
+      fi
+    fi
+
+    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $RM \"\$progdir/\$program\";
+      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $RM \"\$progdir/\$file\"
+  fi"
+       else
+         $ECHO "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+       fi
+
+       $ECHO "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+       # Export our shlibpath_var if we have one.
+       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+         $ECHO "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+       fi
+
+       # fixup the dll searchpath if we need to.
+       if test -n "$dllsearchpath"; then
+         $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+       fi
+
+       $ECHO "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+       case $host in
+       # Backslashes separate directories on plain windows
+       *-*-mingw | *-*-os2* | *-cegcc*)
+         $ECHO "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+         ;;
+
+       *)
+         $ECHO "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+         ;;
+       esac
+       $ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+}
+# end: func_emit_wrapper_part2
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+       func_emit_wrapper_arg1=no
+       if test -n "$1" ; then
+         func_emit_wrapper_arg1=$1
+       fi
+
+       # split this up so that func_emit_cwrapperexe_src
+       # can call each part independently.
+       func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+       func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
+
+
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+#    $build          $host
+#    mingw (msys)    mingw  [e.g. native]
+#    cygwin          mingw
+#    *nix + wine     mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin.  Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+  func_to_host_path_result="$1"
+  if test -n "$1" ; then
+    case $host in
+      *mingw* )
+        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+        case $build in
+          *mingw* ) # actually, msys
+            # awkward: cmd appends spaces to result
+            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          *cygwin* )
+            func_to_host_path_tmp1=`cygpath -w "$1"`
+            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          * )
+            # Unfortunately, winepath does not exit with a non-zero
+            # error code, so we are forced to check the contents of
+            # stdout. On the other hand, if the command is not
+            # found, the shell will set an exit code of 127 and print
+            # *an error message* to stdout. So we must check for both
+            # error code of zero AND non-empty stdout, which explains
+            # the odd construction:
+            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+                $SED -e "$lt_sed_naive_backslashify"`
+            else
+              # Allow warning below.
+              func_to_host_path_result=""
+            fi
+            ;;
+        esac
+        if test -z "$func_to_host_path_result" ; then
+          func_error "Could not determine host path corresponding to"
+          func_error "  '$1'"
+          func_error "Continuing, but uninstalled executables may not work."
+          # Fallback:
+          func_to_host_path_result="$1"
+        fi
+        ;;
+    esac
+  fi
+}
+# end: func_to_host_path
+
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+#    $build          $host
+#    mingw (msys)    mingw  [e.g. native]
+#    cygwin          mingw
+#    *nix + wine     mingw
+#
+# Path separators are also converted from $build format to
+# $host format. If ARG begins or ends with a path separator
+# character, it is preserved (but converted to $host format)
+# on output.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+  func_to_host_pathlist_result="$1"
+  if test -n "$1" ; then
+    case $host in
+      *mingw* )
+        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+        # Remove leading and trailing path separator characters from
+        # ARG. msys behavior is inconsistent here, cygpath turns them
+        # into '.;' and ';.', and winepath ignores them completely.
+        func_to_host_pathlist_tmp2="$1"
+        # Once set for this call, this variable should not be
+        # reassigned. It is used in tha fallback case.
+        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+          $SED -e 's|^:*||' -e 's|:*$||'`
+        case $build in
+          *mingw* ) # Actually, msys.
+            # Awkward: cmd appends spaces to result.
+            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          *cygwin* )
+            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          * )
+            # unfortunately, winepath doesn't convert pathlists
+            func_to_host_pathlist_result=""
+            func_to_host_pathlist_oldIFS=$IFS
+            IFS=:
+            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+              IFS=$func_to_host_pathlist_oldIFS
+              if test -n "$func_to_host_pathlist_f" ; then
+                func_to_host_path "$func_to_host_pathlist_f"
+                if test -n "$func_to_host_path_result" ; then
+                  if test -z "$func_to_host_pathlist_result" ; then
+                    func_to_host_pathlist_result="$func_to_host_path_result"
+                  else
+                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+                  fi
+                fi
+              fi
+              IFS=:
+            done
+            IFS=$func_to_host_pathlist_oldIFS
+            ;;
+        esac
+        if test -z "$func_to_host_pathlist_result" ; then
+          func_error "Could not determine the host path(s) corresponding to"
+          func_error "  '$1'"
+          func_error "Continuing, but uninstalled executables may not work."
+          # Fallback. This may break if $1 contains DOS-style drive
+          # specifications. The fix is not to complicate the expression
+          # below, but for the user to provide a working wine installation
+          # with winepath so that path translation in the cross-to-mingw
+          # case works properly.
+          lt_replace_pathsep_nix_to_dos="s|:|;|g"
+          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+            $SED -e "$lt_replace_pathsep_nix_to_dos"`
+        fi
+        # Now, add the leading and trailing path separators back
+        case "$1" in
+          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+            ;;
+        esac
+        case "$1" in
+          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+            ;;
+        esac
+        ;;
+    esac
+  fi
+}
+# end: func_to_host_pathlist
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+       cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "$SHELL $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+           cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+#  define HAVE_SETENV
+#  ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+#  endif
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+       (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+    va_list args;
+    va_start (args, fmt);
+    (void) vfprintf (stderr, fmt, args);
+    va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
+
+           func_emit_wrapper_part1 yes |
+               $SED -e 's/\([\\"]\)/\\\1/g' \
+                    -e 's/^/  "/' -e 's/$/\\n"/'
+           echo ";"
+           cat <<EOF
+
+static const char *script_text_part2 =
+EOF
+           func_emit_wrapper_part2 yes |
+               $SED -e 's/\([\\"]\)/\\\1/g' \
+                    -e 's/^/  "/' -e 's/$/\\n"/'
+           echo ";"
+
+           cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+           if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_pathlist "$temp_rpath"
+             cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
+EOF
+           else
+             cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
+           fi
+
+           if test -n "$dllsearchpath"; then
+              func_to_host_pathlist "$dllsearchpath:"
+             cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
+EOF
+           else
+             cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
+           fi
+
+           if test "$fast_install" = yes; then
+             cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+           else
+             cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+           fi
+
+
+           cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
+
+static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
+
+static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
+  /* argument is putenv-style "foo=bar", value of foo is set to bar */
+
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
+  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
+
+static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
+  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  intptr_t rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+  /* very simple arg parsing; don't want to rely on getopt */
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+       {
+EOF
+           case "$host" in
+             *mingw* | *cygwin* )
+               # make stdout use "unix" line endings
+               echo "          setmode(1,_O_BINARY);"
+               ;;
+             esac
+
+           cat <<"EOF"
+         printf ("%s", script_text_part1);
+         printf ("%s", script_text_part2);
+         return 0;
+       }
+    }
+
+  newargz = XMALLOC (char *, argc + 1);
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal ("Couldn't find %s", argv[0]);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+                         tmp_pathspec));
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+                         actual_cwrapper_path));
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
+                         target_name));
+EOF
+
+           cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+                   strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
+
+           cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
+
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
+
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
+
+           case $host_os in
+             mingw*)
+           cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+       *p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+       *p = '/';
+      }
+  }
+EOF
+           ;;
+           esac
+
+           cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
+
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+        {
+          if (argv[i][env_set_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_set_opt_len + 1;
+              lt_opt_process_env_set (p);
+            }
+          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_set (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_set_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+        {
+          if (argv[i][env_prepend_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_prepend_opt_len + 1;
+              lt_opt_process_env_prepend (p);
+            }
+          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_prepend_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+        {
+          if (argv[i][env_append_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_append_opt_len + 1;
+              lt_opt_process_env_append (p);
+            }
+          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_append (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_append_opt);
+          continue;
+        }
+      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal ("Unrecognized option in %s namespace: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
+
+  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+  for (i = 0; i < newargc; i++)
+    {
+      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+    }
+
+EOF
+
+           case $host_os in
+             mingw*)
+               cat <<"EOF"
+  /* execv doesn't actually work on mingw as expected on unix */
+  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+      return 127;
+    }
+  return rval;
+EOF
+               ;;
+             *)
+               cat <<"EOF"
+  execv (lt_argv_zero, newargz);
+  return rval; /* =127, but avoids unused variable warning */
+EOF
+               ;;
+           esac
+
+           cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+                         string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable (const char *path)
+{
+  struct stat st;
+
+  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
+                         path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
+
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
+
+  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
+                         path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
+
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise
+   Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+  int has_slash = 0;
+  const char *p;
+  const char *p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char *concat_name;
+
+  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
+                         wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable (concat_name))
+       return concat_name;
+      XFREE (concat_name);
+    }
+  else
+    {
+#endif
+      if (IS_DIR_SEPARATOR (wrapper[0]))
+       {
+         concat_name = xstrdup (wrapper);
+         if (check_executable (concat_name))
+           return concat_name;
+         XFREE (concat_name);
+       }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+    }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+      {
+       has_slash = 1;
+       break;
+      }
+  if (!has_slash)
+    {
+      /* no slashes; search PATH */
+      const char *path = getenv ("PATH");
+      if (path != NULL)
+       {
+         for (p = path; *p; p = p_next)
+           {
+             const char *q;
+             size_t p_len;
+             for (q = p; *q; q++)
+               if (IS_PATH_SEPARATOR (*q))
+                 break;
+             p_len = q - p;
+             p_next = (*q == '\0' ? q : q + 1);
+             if (p_len == 0)
+               {
+                 /* empty path: current directory */
+                 if (getcwd (tmp, LT_PATHMAX) == NULL)
+                   lt_fatal ("getcwd failed");
+                 tmp_len = strlen (tmp);
+                 concat_name =
+                   XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+                 memcpy (concat_name, tmp, tmp_len);
+                 concat_name[tmp_len] = '/';
+                 strcpy (concat_name + tmp_len + 1, wrapper);
+               }
+             else
+               {
+                 concat_name =
+                   XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+                 memcpy (concat_name, p, p_len);
+                 concat_name[p_len] = '/';
+                 strcpy (concat_name + p_len + 1, wrapper);
+               }
+             if (check_executable (concat_name))
+               return concat_name;
+             XFREE (concat_name);
+           }
+       }
+      /* not found in PATH; assume curdir */
+    }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen (tmp);
+  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable (concat_name))
+    return concat_name;
+  XFREE (concat_name);
+  return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+  return xstrdup (pathspec);
+#else
+  char buf[LT_PATHMAX];
+  struct stat s;
+  char *tmp_pathspec = xstrdup (pathspec);
+  char *p;
+  int has_symlinks = 0;
+  while (strlen (tmp_pathspec) && !has_symlinks)
+    {
+      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+                             tmp_pathspec));
+      if (lstat (tmp_pathspec, &s) == 0)
+       {
+         if (S_ISLNK (s.st_mode) != 0)
+           {
+             has_symlinks = 1;
+             break;
+           }
+
+         /* search backwards for last DIR_SEPARATOR */
+         p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+         while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+           p--;
+         if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+           {
+             /* no more DIR_SEPARATORS left */
+             break;
+           }
+         *p = '\0';
+       }
+      else
+       {
+         char *errstr = strerror (errno);
+         lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+       }
+    }
+  XFREE (tmp_pathspec);
+
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
+
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal ("Could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert (str != NULL);
+  assert (pat != NULL);
+
+  len = strlen (str);
+  patlen = strlen (pat);
+
+  if (patlen <= len)
+    {
+      str += len - patlen;
+      if (strcmp (str, pat) == 0)
+       *str = '\0';
+    }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+              const char *message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+  {
+#ifdef HAVE_SETENV
+    /* always make a copy, for consistency with !HAVE_SETENV */
+    char *str = xstrdup (value);
+    setenv (name, str, 1);
+#else
+    int len = strlen (name) + 1 + strlen (value) + 1;
+    char *str = XMALLOC (char, len);
+    sprintf (str, "%s=%s", name, value);
+    if (putenv (str) != EXIT_SUCCESS)
+      {
+        XFREE (str);
+      }
+#endif
+  }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+  char *new_value;
+  if (orig_value && *orig_value)
+    {
+      int orig_value_len = strlen (orig_value);
+      int add_len = strlen (add);
+      new_value = XMALLOC (char, add_len + orig_value_len + 1);
+      if (to_end)
+        {
+          strcpy (new_value, orig_value);
+          strcpy (new_value + orig_value_len, add);
+        }
+      else
+        {
+          strcpy (new_value, add);
+          strcpy (new_value + add_len, orig_value);
+        }
+    }
+  else
+    {
+      new_value = xstrdup (add);
+    }
+  return new_value;
+}
+
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+  const char *p;
+  int len;
+  if (!arg || !*arg)
+    return 1;
+
+  p = strchr (arg, (int)'=');
+
+  if (!p)
+    return 1;
+
+  *value = xstrdup (++p);
+
+  len = strlen (arg) - strlen (*value);
+  *name = XMALLOC (char, len);
+  strncpy (*name, arg, len-1);
+  (*name)[len - 1] = '\0';
+
+  return 0;
+}
+
+void
+lt_opt_process_env_set (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+    }
+
+  lt_setenv (name, value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+    }
+
+  new_value = lt_extend_str (getenv (name), value, 0);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_opt_process_env_append (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+    }
+
+  new_value = lt_extend_str (getenv (name), value, 1);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      /* some systems can't cope with a ':'-terminated path #' */
+      int len = strlen (new_value);
+      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+        {
+          new_value[len-1] = '\0';
+        }
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+    $opt_debug
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args=$nonopt
+    base_compile="$nonopt $@"
+    compile_command=$nonopt
+    finalize_command=$nonopt
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+    new_inherited_linker_flags=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+    weak_libs=
+    single_module="${wl}-single_module"
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -shared)
+       test "$build_libtool_libs" != yes && \
+         func_fatal_configuration "can not build a shared library"
+       build_old_libs=no
+       break
+       ;;
+      -all-static | -static | -static-libtool-libs)
+       case $arg in
+       -all-static)
+         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+           func_warning "complete static linking is impossible in this configuration"
+         fi
+         if test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=yes
+         ;;
+       -static)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=built
+         ;;
+       -static-libtool-libs)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=yes
+         ;;
+       esac
+       build_libtool_libs=no
+       build_old_libs=yes
+       break
+       ;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+       case $prev in
+       output)
+         func_append compile_command " @OUTPUT@"
+         func_append finalize_command " @OUTPUT@"
+         ;;
+       esac
+
+       case $prev in
+       dlfiles|dlprefiles)
+         if test "$preload" = no; then
+           # Add the symbol object into the linking commands.
+           func_append compile_command " @SYMFILE@"
+           func_append finalize_command " @SYMFILE@"
+           preload=yes
+         fi
+         case $arg in
+         *.la | *.lo) ;;  # We handle these cases below.
+         force)
+           if test "$dlself" = no; then
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
+           ;;
+         self)
+           if test "$prev" = dlprefiles; then
+             dlself=yes
+           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+             dlself=yes
+           else
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
+           ;;
+         *)
+           if test "$prev" = dlfiles; then
+             dlfiles="$dlfiles $arg"
+           else
+             dlprefiles="$dlprefiles $arg"
+           fi
+           prev=
+           continue
+           ;;
+         esac
+         ;;
+       expsyms)
+         export_symbols="$arg"
+         test -f "$arg" \
+           || func_fatal_error "symbol file \`$arg' does not exist"
+         prev=
+         continue
+         ;;
+       expsyms_regex)
+         export_symbols_regex="$arg"
+         prev=
+         continue
+         ;;
+       framework)
+         case $host in
+           *-*-darwin*)
+             case "$deplibs " in
+               *" $qarg.ltframework "*) ;;
+               *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+                  ;;
+             esac
+             ;;
+         esac
+         prev=
+         continue
+         ;;
+       inst_prefix)
+         inst_prefix_dir="$arg"
+         prev=
+         continue
+         ;;
+       objectlist)
+         if test -f "$arg"; then
+           save_arg=$arg
+           moreargs=
+           for fil in `cat "$save_arg"`
+           do
+#            moreargs="$moreargs $fil"
+             arg=$fil
+             # A libtool-controlled object.
+
+             # Check to see that this really is a libtool object.
+             if func_lalib_unsafe_p "$arg"; then
+               pic_object=
+               non_pic_object=
+
+               # Read the .lo file
+               func_source "$arg"
+
+               if test -z "$pic_object" ||
+                  test -z "$non_pic_object" ||
+                  test "$pic_object" = none &&
+                  test "$non_pic_object" = none; then
+                 func_fatal_error "cannot find name of object for \`$arg'"
+               fi
+
+               # Extract subdirectory from the argument.
+               func_dirname "$arg" "/" ""
+               xdir="$func_dirname_result"
+
+               if test "$pic_object" != none; then
+                 # Prepend the subdirectory the object is found in.
+                 pic_object="$xdir$pic_object"
+
+                 if test "$prev" = dlfiles; then
+                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+                     dlfiles="$dlfiles $pic_object"
+                     prev=
+                     continue
+                   else
+                     # If libtool objects are unsupported, then we need to preload.
+                     prev=dlprefiles
+                   fi
+                 fi
+
+                 # CHECK ME:  I think I busted this.  -Ossama
+                 if test "$prev" = dlprefiles; then
+                   # Preload the old-style object.
+                   dlprefiles="$dlprefiles $pic_object"
+                   prev=
+                 fi
+
+                 # A PIC object.
+                 func_append libobjs " $pic_object"
+                 arg="$pic_object"
+               fi
+
+               # Non-PIC object.
+               if test "$non_pic_object" != none; then
+                 # Prepend the subdirectory the object is found in.
+                 non_pic_object="$xdir$non_pic_object"
+
+                 # A standard non-PIC object
+                 func_append non_pic_objects " $non_pic_object"
+                 if test -z "$pic_object" || test "$pic_object" = none ; then
+                   arg="$non_pic_object"
+                 fi
+               else
+                 # If the PIC object exists, use it instead.
+                 # $xdir was prepended to $pic_object above.
+                 non_pic_object="$pic_object"
+                 func_append non_pic_objects " $non_pic_object"
+               fi
+             else
+               # Only an error if not doing a dry-run.
+               if $opt_dry_run; then
+                 # Extract subdirectory from the argument.
+                 func_dirname "$arg" "/" ""
+                 xdir="$func_dirname_result"
+
+                 func_lo2o "$arg"
+                 pic_object=$xdir$objdir/$func_lo2o_result
+                 non_pic_object=$xdir$func_lo2o_result
+                 func_append libobjs " $pic_object"
+                 func_append non_pic_objects " $non_pic_object"
+               else
+                 func_fatal_error "\`$arg' is not a valid libtool object"
+               fi
+             fi
+           done
+         else
+           func_fatal_error "link input file \`$arg' does not exist"
+         fi
+         arg=$save_arg
+         prev=
+         continue
+         ;;
+       precious_regex)
+         precious_files_regex="$arg"
+         prev=
+         continue
+         ;;
+       release)
+         release="-$arg"
+         prev=
+         continue
+         ;;
+       rpath | xrpath)
+         # We need an absolute path.
+         case $arg in
+         [\\/]* | [A-Za-z]:[\\/]*) ;;
+         *)
+           func_fatal_error "only absolute run-paths are allowed"
+           ;;
+         esac
+         if test "$prev" = rpath; then
+           case "$rpath " in
+           *" $arg "*) ;;
+           *) rpath="$rpath $arg" ;;
+           esac
+         else
+           case "$xrpath " in
+           *" $arg "*) ;;
+           *) xrpath="$xrpath $arg" ;;
+           esac
+         fi
+         prev=
+         continue
+         ;;
+       shrext)
+         shrext_cmds="$arg"
+         prev=
+         continue
+         ;;
+       weak)
+         weak_libs="$weak_libs $arg"
+         prev=
+         continue
+         ;;
+       xcclinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         func_append compile_command " $qarg"
+         func_append finalize_command " $qarg"
+         continue
+         ;;
+       xcompiler)
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         func_append compile_command " $qarg"
+         func_append finalize_command " $qarg"
+         continue
+         ;;
+       xlinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $wl$qarg"
+         prev=
+         func_append compile_command " $wl$qarg"
+         func_append finalize_command " $wl$qarg"
+         continue
+         ;;
+       *)
+         eval "$prev=\"\$arg\""
+         prev=
+         continue
+         ;;
+       esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+       if test -n "$link_static_flag"; then
+         # See comment for -static flag below, for more details.
+         func_append compile_command " $link_static_flag"
+         func_append finalize_command " $link_static_flag"
+       fi
+       continue
+       ;;
+
+      -allow-undefined)
+       # FIXME: remove this flag sometime in the future.
+       func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+       ;;
+
+      -avoid-version)
+       avoid_version=yes
+       continue
+       ;;
+
+      -dlopen)
+       prev=dlfiles
+       continue
+       ;;
+
+      -dlpreopen)
+       prev=dlprefiles
+       continue
+       ;;
+
+      -export-dynamic)
+       export_dynamic=yes
+       continue
+       ;;
+
+      -export-symbols | -export-symbols-regex)
+       if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+         func_fatal_error "more than one -exported-symbols argument is not allowed"
+       fi
+       if test "X$arg" = "X-export-symbols"; then
+         prev=expsyms
+       else
+         prev=expsyms_regex
+       fi
+       continue
+       ;;
+
+      -framework)
+       prev=framework
+       continue
+       ;;
+
+      -inst-prefix-dir)
+       prev=inst_prefix
+       continue
+       ;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+       case $with_gcc/$host in
+       no/*-*-irix* | /*-*-irix*)
+         func_append compile_command " $arg"
+         func_append finalize_command " $arg"
+         ;;
+       esac
+       continue
+       ;;
+
+      -L*)
+       func_stripname '-L' '' "$arg"
+       dir=$func_stripname_result
+       if test -z "$dir"; then
+         if test "$#" -gt 0; then
+           func_fatal_error "require no space between \`-L' and \`$1'"
+         else
+           func_fatal_error "need path for \`-L' option"
+         fi
+       fi
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         absdir=`cd "$dir" && pwd`
+         test -z "$absdir" && \
+           func_fatal_error "cannot determine absolute directory name of \`$dir'"
+         dir="$absdir"
+         ;;
+       esac
+       case "$deplibs " in
+       *" -L$dir "*) ;;
+       *)
+         deplibs="$deplibs -L$dir"
+         lib_search_path="$lib_search_path $dir"
+         ;;
+       esac
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+         testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$dir:"*) ;;
+         ::) dllsearchpath=$dir;;
+         *) dllsearchpath="$dllsearchpath:$dir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         ::) dllsearchpath=$testbindir;;
+         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         esac
+         ;;
+       esac
+       continue
+       ;;
+
+      -l*)
+       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+           # These systems don't actually have a C or math library (as such)
+           continue
+           ;;
+         *-*-os2*)
+           # These systems don't actually have a C library (as such)
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+           # Do not include libc due to us having libc/libc_r.
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C and math libraries are in the System framework
+           deplibs="$deplibs System.ltframework"
+           continue
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           test "X$arg" = "X-lc" && continue
+           ;;
+         esac
+       elif test "X$arg" = "X-lc_r"; then
+        case $host in
+        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+          # Do not include libc_r directly, use -pthread flag.
+          continue
+          ;;
+        esac
+       fi
+       deplibs="$deplibs $arg"
+       continue
+       ;;
+
+      -module)
+       module=yes
+       continue
+       ;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      # Darwin uses the -arch flag to determine output architecture.
+      -model|-arch|-isysroot)
+       compiler_flags="$compiler_flags $arg"
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+       prev=xcompiler
+       continue
+       ;;
+
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+       compiler_flags="$compiler_flags $arg"
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+       case "$new_inherited_linker_flags " in
+           *" $arg "*) ;;
+           * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+       esac
+       continue
+       ;;
+
+      -multi_module)
+       single_module="${wl}-multi_module"
+       continue
+       ;;
+
+      -no-fast-install)
+       fast_install=no
+       continue
+       ;;
+
+      -no-install)
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+         # The PATH hackery in wrapper scripts is required on Windows
+         # and Darwin in order for the loader to find any dlls it needs.
+         func_warning "\`-no-install' is ignored for $host"
+         func_warning "assuming \`-no-fast-install' instead"
+         fast_install=no
+         ;;
+       *) no_install=yes ;;
+       esac
+       continue
+       ;;
+
+      -no-undefined)
+       allow_undefined=no
+       continue
+       ;;
+
+      -objectlist)
+       prev=objectlist
+       continue
+       ;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+       prev=precious_regex
+       continue
+       ;;
+
+      -release)
+       prev=release
+       continue
+       ;;
+
+      -rpath)
+       prev=rpath
+       continue
+       ;;
+
+      -R)
+       prev=xrpath
+       continue
+       ;;
+
+      -R*)
+       func_stripname '-R' '' "$arg"
+       dir=$func_stripname_result
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         func_fatal_error "only absolute run-paths are allowed"
+         ;;
+       esac
+       case "$xrpath " in
+       *" $dir "*) ;;
+       *) xrpath="$xrpath $dir" ;;
+       esac
+       continue
+       ;;
+
+      -shared)
+       # The effects of -shared are defined in a previous loop.
+       continue
+       ;;
+
+      -shrext)
+       prev=shrext
+       continue
+       ;;
+
+      -static | -static-libtool-libs)
+       # The effects of -static are defined in a previous loop.
+       # We used to do the same as -all-static on platforms that
+       # didn't have a PIC flag, but the assumption that the effects
+       # would be equivalent was wrong.  It would break on at least
+       # Digital Unix and AIX.
+       continue
+       ;;
+
+      -thread-safe)
+       thread_safe=yes
+       continue
+       ;;
+
+      -version-info)
+       prev=vinfo
+       continue
+       ;;
+
+      -version-number)
+       prev=vinfo
+       vinfo_number=yes
+       continue
+       ;;
+
+      -weak)
+        prev=weak
+       continue
+       ;;
+
+      -Wc,*)
+       func_stripname '-Wc,' '' "$arg"
+       args=$func_stripname_result
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+         arg="$arg $wl$func_quote_for_eval_result"
+         compiler_flags="$compiler_flags $func_quote_for_eval_result"
+       done
+       IFS="$save_ifs"
+       func_stripname ' ' '' "$arg"
+       arg=$func_stripname_result
+       ;;
+
+      -Wl,*)
+       func_stripname '-Wl,' '' "$arg"
+       args=$func_stripname_result
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+         arg="$arg $wl$func_quote_for_eval_result"
+         compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+         linker_flags="$linker_flags $func_quote_for_eval_result"
+       done
+       IFS="$save_ifs"
+       func_stripname ' ' '' "$arg"
+       arg=$func_stripname_result
+       ;;
+
+      -Xcompiler)
+       prev=xcompiler
+       continue
+       ;;
+
+      -Xlinker)
+       prev=xlinker
+       continue
+       ;;
+
+      -XCClinker)
+       prev=xcclinker
+       continue
+       ;;
+
+      # -msg_* for osf cc
+      -msg_*)
+       func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+       ;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+        func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+        func_append compile_command " $arg"
+        func_append finalize_command " $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+       ;;
+
+      *.$objext)
+       # A standard object.
+       objs="$objs $arg"
+       ;;
+
+      *.lo)
+       # A libtool-controlled object.
+
+       # Check to see that this really is a libtool object.
+       if func_lalib_unsafe_p "$arg"; then
+         pic_object=
+         non_pic_object=
+
+         # Read the .lo file
+         func_source "$arg"
+
+         if test -z "$pic_object" ||
+            test -z "$non_pic_object" ||
+            test "$pic_object" = none &&
+            test "$non_pic_object" = none; then
+           func_fatal_error "cannot find name of object for \`$arg'"
+         fi
+
+         # Extract subdirectory from the argument.
+         func_dirname "$arg" "/" ""
+         xdir="$func_dirname_result"
+
+         if test "$pic_object" != none; then
+           # Prepend the subdirectory the object is found in.
+           pic_object="$xdir$pic_object"
+
+           if test "$prev" = dlfiles; then
+             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+               dlfiles="$dlfiles $pic_object"
+               prev=
+               continue
+             else
+               # If libtool objects are unsupported, then we need to preload.
+               prev=dlprefiles
+             fi
+           fi
+
+           # CHECK ME:  I think I busted this.  -Ossama
+           if test "$prev" = dlprefiles; then
+             # Preload the old-style object.
+             dlprefiles="$dlprefiles $pic_object"
+             prev=
+           fi
+
+           # A PIC object.
+           func_append libobjs " $pic_object"
+           arg="$pic_object"
+         fi
+
+         # Non-PIC object.
+         if test "$non_pic_object" != none; then
+           # Prepend the subdirectory the object is found in.
+           non_pic_object="$xdir$non_pic_object"
+
+           # A standard non-PIC object
+           func_append non_pic_objects " $non_pic_object"
+           if test -z "$pic_object" || test "$pic_object" = none ; then
+             arg="$non_pic_object"
+           fi
+         else
+           # If the PIC object exists, use it instead.
+           # $xdir was prepended to $pic_object above.
+           non_pic_object="$pic_object"
+           func_append non_pic_objects " $non_pic_object"
+         fi
+       else
+         # Only an error if not doing a dry-run.
+         if $opt_dry_run; then
+           # Extract subdirectory from the argument.
+           func_dirname "$arg" "/" ""
+           xdir="$func_dirname_result"
+
+           func_lo2o "$arg"
+           pic_object=$xdir$objdir/$func_lo2o_result
+           non_pic_object=$xdir$func_lo2o_result
+           func_append libobjs " $pic_object"
+           func_append non_pic_objects " $non_pic_object"
+         else
+           func_fatal_error "\`$arg' is not a valid libtool object"
+         fi
+       fi
+       ;;
+
+      *.$libext)
+       # An archive.
+       deplibs="$deplibs $arg"
+       old_deplibs="$old_deplibs $arg"
+       continue
+       ;;
+
+      *.la)
+       # A libtool-controlled library.
+
+       if test "$prev" = dlfiles; then
+         # This library was specified with -dlopen.
+         dlfiles="$dlfiles $arg"
+         prev=
+       elif test "$prev" = dlprefiles; then
+         # The library was specified with -dlpreopen.
+         dlprefiles="$dlprefiles $arg"
+         prev=
+       else
+         deplibs="$deplibs $arg"
+       fi
+       continue
+       ;;
+
+      # Some other compiler argument.
+      *)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       func_quote_for_eval "$arg"
+       arg="$func_quote_for_eval_result"
+       ;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+       func_append compile_command " $arg"
+       func_append finalize_command " $arg"
+      fi
+    done # argument parsing loop
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prevarg' option requires an argument"
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      func_append compile_command " $arg"
+      func_append finalize_command " $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    func_basename "$output"
+    outputname="$func_basename_result"
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    func_dirname "$output" "/" ""
+    output_objdir="$func_dirname_result$objdir"
+    # Create the object directory.
+    func_mkdir_p "$output_objdir"
+
+    # Determine the type of output
+    case $output in
+    "")
+      func_fatal_help "you must specify an output file"
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if $opt_duplicate_deps ; then
+       case "$libs " in
+       *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+       esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if $opt_duplicate_compiler_generated_deps; then
+       for pre_post_dep in $predeps $postdeps; do
+         case "$pre_post_deps " in
+         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+         esac
+         pre_post_deps="$pre_post_deps $pre_post_dep"
+       done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+
+    case $linkmode in
+    lib)
+       passes="conv dlpreopen link"
+       for file in $dlfiles $dlprefiles; do
+         case $file in
+         *.la) ;;
+         *)
+           func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+           ;;
+         esac
+       done
+       ;;
+    prog)
+       compile_deplibs=
+       finalize_deplibs=
+       alldeplibs=no
+       newdlfiles=
+       newdlprefiles=
+       passes="conv scan dlopen dlpreopen link"
+       ;;
+    *)  passes="conv"
+       ;;
+    esac
+
+    for pass in $passes; do
+      # The preopen pass in lib mode reverses $deplibs; put it back here
+      # so that -L comes before libs that need it for instance...
+      if test "$linkmode,$pass" = "lib,link"; then
+       ## FIXME: Find the place where the list is rebuilt in the wrong
+       ##        order, and fix it there properly
+        tmp_deplibs=
+       for deplib in $deplibs; do
+         tmp_deplibs="$deplib $tmp_deplibs"
+       done
+       deplibs="$tmp_deplibs"
+      fi
+
+      if test "$linkmode,$pass" = "lib,link" ||
+        test "$linkmode,$pass" = "prog,scan"; then
+       libs="$deplibs"
+       deplibs=
+      fi
+      if test "$linkmode" = prog; then
+       case $pass in
+       dlopen) libs="$dlfiles" ;;
+       dlpreopen) libs="$dlprefiles" ;;
+       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+       esac
+      fi
+      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+       # Collect and forward deplibs of preopened libtool libs
+       for lib in $dlprefiles; do
+         # Ignore non-libtool-libs
+         dependency_libs=
+         case $lib in
+         *.la) func_source "$lib" ;;
+         esac
+
+         # Collect preopened libtool deplibs, except any this library
+         # has declared as weak libs
+         for deplib in $dependency_libs; do
+            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+           case " $weak_libs " in
+           *" $deplib_base "*) ;;
+           *) deplibs="$deplibs $deplib" ;;
+           esac
+         done
+       done
+       libs="$dlprefiles"
+      fi
+      if test "$pass" = dlopen; then
+       # Collect dlpreopened libraries
+       save_deplibs="$deplibs"
+       deplibs=
+      fi
+
+      for deplib in $libs; do
+       lib=
+       found=no
+       case $deplib in
+       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+         if test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+         else
+           compiler_flags="$compiler_flags $deplib"
+           if test "$linkmode" = lib ; then
+               case "$new_inherited_linker_flags " in
+                   *" $deplib "*) ;;
+                   * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+               esac
+           fi
+         fi
+         continue
+         ;;
+       -l*)
+         if test "$linkmode" != lib && test "$linkmode" != prog; then
+           func_warning "\`-l' is ignored for archives/objects"
+           continue
+         fi
+         func_stripname '-l' '' "$deplib"
+         name=$func_stripname_result
+         if test "$linkmode" = lib; then
+           searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+         else
+           searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+         fi
+         for searchdir in $searchdirs; do
+           for search_ext in .la $std_shrext .so .a; do
+             # Search the libtool library
+             lib="$searchdir/lib${name}${search_ext}"
+             if test -f "$lib"; then
+               if test "$search_ext" = ".la"; then
+                 found=yes
+               else
+                 found=no
+               fi
+               break 2
+             fi
+           done
+         done
+         if test "$found" != yes; then
+           # deplib doesn't seem to be a libtool library
+           if test "$linkmode,$pass" = "prog,link"; then
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             deplibs="$deplib $deplibs"
+             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+           fi
+           continue
+         else # deplib is a libtool library
+           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+           # We need to do some special things here, and not later.
+           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+             case " $predeps $postdeps " in
+             *" $deplib "*)
+               if func_lalib_p "$lib"; then
+                 library_names=
+                 old_library=
+                 func_source "$lib"
+                 for l in $old_library $library_names; do
+                   ll="$l"
+                 done
+                 if test "X$ll" = "X$old_library" ; then # only static version available
+                   found=no
+                   func_dirname "$lib" "" "."
+                   ladir="$func_dirname_result"
+                   lib=$ladir/$old_library
+                   if test "$linkmode,$pass" = "prog,link"; then
+                     compile_deplibs="$deplib $compile_deplibs"
+                     finalize_deplibs="$deplib $finalize_deplibs"
+                   else
+                     deplibs="$deplib $deplibs"
+                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+                   fi
+                   continue
+                 fi
+               fi
+               ;;
+             *) ;;
+             esac
+           fi
+         fi
+         ;; # -l
+       *.ltframework)
+         if test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+         else
+           deplibs="$deplib $deplibs"
+           if test "$linkmode" = lib ; then
+               case "$new_inherited_linker_flags " in
+                   *" $deplib "*) ;;
+                   * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+               esac
+           fi
+         fi
+         continue
+         ;;
+       -L*)
+         case $linkmode in
+         lib)
+           deplibs="$deplib $deplibs"
+           test "$pass" = conv && continue
+           newdependency_libs="$deplib $newdependency_libs"
+           func_stripname '-L' '' "$deplib"
+           newlib_search_path="$newlib_search_path $func_stripname_result"
+           ;;
+         prog)
+           if test "$pass" = conv; then
+             deplibs="$deplib $deplibs"
+             continue
+           fi
+           if test "$pass" = scan; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           func_stripname '-L' '' "$deplib"
+           newlib_search_path="$newlib_search_path $func_stripname_result"
+           ;;
+         *)
+           func_warning "\`-L' is ignored for archives/objects"
+           ;;
+         esac # linkmode
+         continue
+         ;; # -L
+       -R*)
+         if test "$pass" = link; then
+           func_stripname '-R' '' "$deplib"
+           dir=$func_stripname_result
+           # Make sure the xrpath contains only unique directories.
+           case "$xrpath " in
+           *" $dir "*) ;;
+           *) xrpath="$xrpath $dir" ;;
+           esac
+         fi
+         deplibs="$deplib $deplibs"
+         continue
+         ;;
+       *.la) lib="$deplib" ;;
+       *.$libext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+           continue
+         fi
+         case $linkmode in
+         lib)
+           # Linking convenience modules into shared libraries is allowed,
+           # but linking other static libraries is non-portable.
+           case " $dlpreconveniencelibs " in
+           *" $deplib "*) ;;
+           *)
+             valid_a_lib=no
+             case $deplibs_check_method in
+               match_pattern*)
+                 set dummy $deplibs_check_method; shift
+                 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+                 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+                   | $EGREP "$match_pattern_regex" > /dev/null; then
+                   valid_a_lib=yes
+                 fi
+               ;;
+               pass_all)
+                 valid_a_lib=yes
+               ;;
+             esac
+             if test "$valid_a_lib" != yes; then
+               $ECHO
+               $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+               $ECHO "*** I have the capability to make that library automatically link in when"
+               $ECHO "*** you link to this library.  But I can only do this if you have a"
+               $ECHO "*** shared version of the library, which you do not appear to have"
+               $ECHO "*** because the file extensions .$libext of this argument makes me believe"
+               $ECHO "*** that it is just a static archive that I should not use here."
+             else
+               $ECHO
+               $ECHO "*** Warning: Linking the shared library $output against the"
+               $ECHO "*** static library $deplib is not portable!"
+               deplibs="$deplib $deplibs"
+             fi
+             ;;
+           esac
+           continue
+           ;;
+         prog)
+           if test "$pass" != link; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           continue
+           ;;
+         esac # linkmode
+         ;; # *.$libext
+       *.lo | *.$objext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+         elif test "$linkmode" = prog; then
+           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+             # If there is no dlopen support or we're linking statically,
+             # we need to preload.
+             newdlprefiles="$newdlprefiles $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             newdlfiles="$newdlfiles $deplib"
+           fi
+         fi
+         continue
+         ;;
+       %DEPLIBS%)
+         alldeplibs=yes
+         continue
+         ;;
+       esac # case $deplib
+
+       if test "$found" = yes || test -f "$lib"; then :
+       else
+         func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+       fi
+
+       # Check to see that this really is a libtool archive.
+       func_lalib_unsafe_p "$lib" \
+         || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+       func_dirname "$lib" "" "."
+       ladir="$func_dirname_result"
+
+       dlname=
+       dlopen=
+       dlpreopen=
+       libdir=
+       library_names=
+       old_library=
+       inherited_linker_flags=
+       # If the library was installed with an old release of libtool,
+       # it will not redefine variables installed, or shouldnotlink
+       installed=yes
+       shouldnotlink=no
+       avoidtemprpath=
+
+
+       # Read the .la file
+       func_source "$lib"
+
+       # Convert "-framework foo" to "foo.ltframework"
+       if test -n "$inherited_linker_flags"; then
+         tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+         for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+           case " $new_inherited_linker_flags " in
+             *" $tmp_inherited_linker_flag "*) ;;
+             *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+           esac
+         done
+       fi
+       dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+       if test "$linkmode,$pass" = "lib,link" ||
+          test "$linkmode,$pass" = "prog,scan" ||
+          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+         test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+       fi
+
+       if test "$pass" = conv; then
+         # Only check for convenience libraries
+         deplibs="$lib $deplibs"
+         if test -z "$libdir"; then
+           if test -z "$old_library"; then
+             func_fatal_error "cannot find name of link library for \`$lib'"
+           fi
+           # It is a libtool convenience library, so add in its objects.
+           convenience="$convenience $ladir/$objdir/$old_library"
+           old_convenience="$old_convenience $ladir/$objdir/$old_library"
+         elif test "$linkmode" != prog && test "$linkmode" != lib; then
+           func_fatal_error "\`$lib' is not a convenience library"
+         fi
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           deplibs="$deplib $deplibs"
+           if $opt_duplicate_deps ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$tmp_libs $deplib"
+         done
+         continue
+       fi # $pass = conv
+
+
+       # Get the name of the library we link against.
+       linklib=
+       for l in $old_library $library_names; do
+         linklib="$l"
+       done
+       if test -z "$linklib"; then
+         func_fatal_error "cannot find name of link library for \`$lib'"
+       fi
+
+       # This library was specified with -dlopen.
+       if test "$pass" = dlopen; then
+         if test -z "$libdir"; then
+           func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+         fi
+         if test -z "$dlname" ||
+            test "$dlopen_support" != yes ||
+            test "$build_libtool_libs" = no; then
+           # If there is no dlname, no dlopen support or we're linking
+           # statically, we need to preload.  We also need to preload any
+           # dependent libraries so libltdl's deplib preloader doesn't
+           # bomb out in the load deplibs phase.
+           dlprefiles="$dlprefiles $lib $dependency_libs"
+         else
+           newdlfiles="$newdlfiles $lib"
+         fi
+         continue
+       fi # $pass = dlopen
+
+       # We need an absolute path.
+       case $ladir in
+       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+       *)
+         abs_ladir=`cd "$ladir" && pwd`
+         if test -z "$abs_ladir"; then
+           func_warning "cannot determine absolute directory name of \`$ladir'"
+           func_warning "passing it literally to the linker, although it might fail"
+           abs_ladir="$ladir"
+         fi
+         ;;
+       esac
+       func_basename "$lib"
+       laname="$func_basename_result"
+
+       # Find the relevant object directory and library name.
+       if test "X$installed" = Xyes; then
+         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           func_warning "library \`$lib' was moved."
+           dir="$ladir"
+           absdir="$abs_ladir"
+           libdir="$abs_ladir"
+         else
+           dir="$libdir"
+           absdir="$libdir"
+         fi
+         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+       else
+         if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           dir="$ladir"
+           absdir="$abs_ladir"
+           # Remove this search path later
+           notinst_path="$notinst_path $abs_ladir"
+         else
+           dir="$ladir/$objdir"
+           absdir="$abs_ladir/$objdir"
+           # Remove this search path later
+           notinst_path="$notinst_path $abs_ladir"
+         fi
+       fi # $installed = yes
+       func_stripname 'lib' '.la' "$laname"
+       name=$func_stripname_result
+
+       # This library was specified with -dlpreopen.
+       if test "$pass" = dlpreopen; then
+         if test -z "$libdir" && test "$linkmode" = prog; then
+           func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+         fi
+         # Prefer using a static library (so that no silly _DYNAMIC symbols
+         # are required to link).
+         if test -n "$old_library"; then
+           newdlprefiles="$newdlprefiles $dir/$old_library"
+           # Keep a list of preopened convenience libraries to check
+           # that they are being used correctly in the link pass.
+           test -z "$libdir" && \
+               dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+         # Otherwise, use the dlname, so that lt_dlopen finds it.
+         elif test -n "$dlname"; then
+           newdlprefiles="$newdlprefiles $dir/$dlname"
+         else
+           newdlprefiles="$newdlprefiles $dir/$linklib"
+         fi
+       fi # $pass = dlpreopen
+
+       if test -z "$libdir"; then
+         # Link the convenience library
+         if test "$linkmode" = lib; then
+           deplibs="$dir/$old_library $deplibs"
+         elif test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$dir/$old_library $compile_deplibs"
+           finalize_deplibs="$dir/$old_library $finalize_deplibs"
+         else
+           deplibs="$lib $deplibs" # used for prog,scan pass
+         fi
+         continue
+       fi
+
+
+       if test "$linkmode" = prog && test "$pass" != link; then
+         newlib_search_path="$newlib_search_path $ladir"
+         deplibs="$lib $deplibs"
+
+         linkalldeplibs=no
+         if test "$link_all_deplibs" != no || test -z "$library_names" ||
+            test "$build_libtool_libs" = no; then
+           linkalldeplibs=yes
+         fi
+
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           case $deplib in
+           -L*) func_stripname '-L' '' "$deplib"
+                newlib_search_path="$newlib_search_path $func_stripname_result"
+                ;;
+           esac
+           # Need to link against all dependency_libs?
+           if test "$linkalldeplibs" = yes; then
+             deplibs="$deplib $deplibs"
+           else
+             # Need to hardcode shared library paths
+             # or/and link against static libraries
+             newdependency_libs="$deplib $newdependency_libs"
+           fi
+           if $opt_duplicate_deps ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$tmp_libs $deplib"
+         done # for deplib
+         continue
+       fi # $linkmode = prog...
+
+       if test "$linkmode,$pass" = "prog,link"; then
+         if test -n "$library_names" &&
+            { { test "$prefer_static_libs" = no ||
+                test "$prefer_static_libs,$installed" = "built,yes"; } ||
+              test -z "$old_library"; }; then
+           # We need to hardcode the library path
+           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+             # Make sure the rpath contains only unique directories.
+             case "$temp_rpath:" in
+             *"$absdir:"*) ;;
+             *) temp_rpath="$temp_rpath$absdir:" ;;
+             esac
+           fi
+
+           # Hardcode the library path.
+           # Skip directories that are in the system default run-time
+           # search path.
+           case " $sys_lib_dlsearch_path " in
+           *" $absdir "*) ;;
+           *)
+             case "$compile_rpath " in
+             *" $absdir "*) ;;
+             *) compile_rpath="$compile_rpath $absdir"
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) finalize_rpath="$finalize_rpath $libdir"
+             esac
+             ;;
+           esac
+         fi # $linkmode,$pass = prog,link...
+
+         if test "$alldeplibs" = yes &&
+            { test "$deplibs_check_method" = pass_all ||
+              { test "$build_libtool_libs" = yes &&
+                test -n "$library_names"; }; }; then
+           # We only need to search for static libraries
+           continue
+         fi
+       fi
+
+       link_static=no # Whether the deplib will be linked statically
+       use_static_libs=$prefer_static_libs
+       if test "$use_static_libs" = built && test "$installed" = yes; then
+         use_static_libs=no
+       fi
+       if test -n "$library_names" &&
+          { test "$use_static_libs" = no || test -z "$old_library"; }; then
+         case $host in
+         *cygwin* | *mingw* | *cegcc*)
+             # No point in relinking DLLs because paths are not encoded
+             notinst_deplibs="$notinst_deplibs $lib"
+             need_relink=no
+           ;;
+         *)
+           if test "$installed" = no; then
+             notinst_deplibs="$notinst_deplibs $lib"
+             need_relink=yes
+           fi
+           ;;
+         esac
+         # This is a shared library
+
+         # Warn about portability, can't link against -module's on some
+         # systems (darwin).  Don't bleat about dlopened modules though!
+         dlopenmodule=""
+         for dlpremoduletest in $dlprefiles; do
+           if test "X$dlpremoduletest" = "X$lib"; then
+             dlopenmodule="$dlpremoduletest"
+             break
+           fi
+         done
+         if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+           $ECHO
+           if test "$linkmode" = prog; then
+             $ECHO "*** Warning: Linking the executable $output against the loadable module"
+           else
+             $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+           fi
+           $ECHO "*** $linklib is not portable!"
+         fi
+         if test "$linkmode" = lib &&
+            test "$hardcode_into_libs" = yes; then
+           # Hardcode the library path.
+           # Skip directories that are in the system default run-time
+           # search path.
+           case " $sys_lib_dlsearch_path " in
+           *" $absdir "*) ;;
+           *)
+             case "$compile_rpath " in
+             *" $absdir "*) ;;
+             *) compile_rpath="$compile_rpath $absdir"
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) finalize_rpath="$finalize_rpath $libdir"
+             esac
+             ;;
+           esac
+         fi
+
+         if test -n "$old_archive_from_expsyms_cmds"; then
+           # figure out the soname
+           set dummy $library_names
+           shift
+           realname="$1"
+           shift
+           libname=`eval "\\$ECHO \"$libname_spec\""`
+           # use dlname if we got it. it's perfectly good, no?
+           if test -n "$dlname"; then
+             soname="$dlname"
+           elif test -n "$soname_spec"; then
+             # bleh windows
+             case $host in
+             *cygwin* | mingw* | *cegcc*)
+               func_arith $current - $age
+               major=$func_arith_result
+               versuffix="-$major"
+               ;;
+             esac
+             eval soname=\"$soname_spec\"
+           else
+             soname="$realname"
+           fi
+
+           # Make a new name for the extract_expsyms_cmds to use
+           soroot="$soname"
+           func_basename "$soroot"
+           soname="$func_basename_result"
+           func_stripname 'lib' '.dll' "$soname"
+           newlib=libimp-$func_stripname_result.a
+
+           # If the library has no export list, then create one now
+           if test -f "$output_objdir/$soname-def"; then :
+           else
+             func_verbose "extracting exported symbol list from \`$soname'"
+             func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+           fi
+
+           # Create $newlib
+           if test -f "$output_objdir/$newlib"; then :; else
+             func_verbose "generating import library for \`$soname'"
+             func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+           fi
+           # make sure the library variables are pointing to the new library
+           dir=$output_objdir
+           linklib=$newlib
+         fi # test -n "$old_archive_from_expsyms_cmds"
+
+         if test "$linkmode" = prog || test "$mode" != relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           lib_linked=yes
+           case $hardcode_action in
+           immediate | unsupported)
+             if test "$hardcode_direct" = no; then
+               add="$dir/$linklib"
+               case $host in
+                 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+                 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+                 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+                   *-*-unixware7*) add_dir="-L$dir" ;;
+                 *-*-darwin* )
+                   # if the lib is a (non-dlopened) module then we can not
+                   # link against it, someone is ignoring the earlier warnings
+                   if /usr/bin/file -L $add 2> /dev/null |
+                        $GREP ": [^:]* bundle" >/dev/null ; then
+                     if test "X$dlopenmodule" != "X$lib"; then
+                       $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+                       if test -z "$old_library" ; then
+                         $ECHO
+                         $ECHO "*** And there doesn't seem to be a static archive available"
+                         $ECHO "*** The link will probably fail, sorry"
+                       else
+                         add="$dir/$old_library"
+                       fi
+                     elif test -n "$old_library"; then
+                       add="$dir/$old_library"
+                     fi
+                   fi
+               esac
+             elif test "$hardcode_minus_L" = no; then
+               case $host in
+               *-*-sunos*) add_shlibpath="$dir" ;;
+               esac
+               add_dir="-L$dir"
+               add="-l$name"
+             elif test "$hardcode_shlibpath_var" = no; then
+               add_shlibpath="$dir"
+               add="-l$name"
+             else
+               lib_linked=no
+             fi
+             ;;
+           relink)
+             if test "$hardcode_direct" = yes &&
+                test "$hardcode_direct_absolute" = no; then
+               add="$dir/$linklib"
+             elif test "$hardcode_minus_L" = yes; then
+               add_dir="-L$dir"
+               # Try looking first in the location we're being installed to.
+               if test -n "$inst_prefix_dir"; then
+                 case $libdir in
+                   [\\/]*)
+                     add_dir="$add_dir -L$inst_prefix_dir$libdir"
+                     ;;
+                 esac
+               fi
+               add="-l$name"
+             elif test "$hardcode_shlibpath_var" = yes; then
+               add_shlibpath="$dir"
+               add="-l$name"
+             else
+               lib_linked=no
+             fi
+             ;;
+           *) lib_linked=no ;;
+           esac
+
+           if test "$lib_linked" != yes; then
+             func_fatal_configuration "unsupported hardcode properties"
+           fi
+
+           if test -n "$add_shlibpath"; then
+             case :$compile_shlibpath: in
+             *":$add_shlibpath:"*) ;;
+             *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+             esac
+           fi
+           if test "$linkmode" = prog; then
+             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+             test -n "$add" && compile_deplibs="$add $compile_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+             if test "$hardcode_direct" != yes &&
+                test "$hardcode_minus_L" != yes &&
+                test "$hardcode_shlibpath_var" = yes; then
+               case :$finalize_shlibpath: in
+               *":$libdir:"*) ;;
+               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+               esac
+             fi
+           fi
+         fi
+
+         if test "$linkmode" = prog || test "$mode" = relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           # Finalize command for both is simple: just hardcode it.
+           if test "$hardcode_direct" = yes &&
+              test "$hardcode_direct_absolute" = no; then
+             add="$libdir/$linklib"
+           elif test "$hardcode_minus_L" = yes; then
+             add_dir="-L$libdir"
+             add="-l$name"
+           elif test "$hardcode_shlibpath_var" = yes; then
+             case :$finalize_shlibpath: in
+             *":$libdir:"*) ;;
+             *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+             esac
+             add="-l$name"
+           elif test "$hardcode_automatic" = yes; then
+             if test -n "$inst_prefix_dir" &&
+                test -f "$inst_prefix_dir$libdir/$linklib" ; then
+               add="$inst_prefix_dir$libdir/$linklib"
+             else
+               add="$libdir/$linklib"
+             fi
+           else
+             # We cannot seem to hardcode it, guess we'll fake it.
+             add_dir="-L$libdir"
+             # Try looking first in the location we're being installed to.
+             if test -n "$inst_prefix_dir"; then
+               case $libdir in
+                 [\\/]*)
+                   add_dir="$add_dir -L$inst_prefix_dir$libdir"
+                   ;;
+               esac
+             fi
+             add="-l$name"
+           fi
+
+           if test "$linkmode" = prog; then
+             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+           fi
+         fi
+       elif test "$linkmode" = prog; then
+         # Here we assume that one of hardcode_direct or hardcode_minus_L
+         # is not unsupported.  This is valid on all known static and
+         # shared platforms.
+         if test "$hardcode_direct" != unsupported; then
+           test -n "$old_library" && linklib="$old_library"
+           compile_deplibs="$dir/$linklib $compile_deplibs"
+           finalize_deplibs="$dir/$linklib $finalize_deplibs"
+         else
+           compile_deplibs="-l$name -L$dir $compile_deplibs"
+           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+         fi
+       elif test "$build_libtool_libs" = yes; then
+         # Not a shared library
+         if test "$deplibs_check_method" != pass_all; then
+           # We're trying link a shared library against a static one
+           # but the system doesn't support it.
+
+           # Just print a warning and add the library to dependency_libs so
+           # that the program can be linked against the static library.
+           $ECHO
+           $ECHO "*** Warning: This system can not link to static lib archive $lib."
+           $ECHO "*** I have the capability to make that library automatically link in when"
+           $ECHO "*** you link to this library.  But I can only do this if you have a"
+           $ECHO "*** shared version of the library, which you do not appear to have."
+           if test "$module" = yes; then
+             $ECHO "*** But as you try to build a module library, libtool will still create "
+             $ECHO "*** a static module, that should work as long as the dlopening application"
+             $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+             if test -z "$global_symbol_pipe"; then
+               $ECHO
+               $ECHO "*** However, this would only work if libtool was able to extract symbol"
+               $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+               $ECHO "*** not find such a program.  So, this module is probably useless."
+               $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+             fi
+             if test "$build_old_libs" = no; then
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         else
+           deplibs="$dir/$old_library $deplibs"
+           link_static=yes
+         fi
+       fi # link shared/static library?
+
+       if test "$linkmode" = lib; then
+         if test -n "$dependency_libs" &&
+            { test "$hardcode_into_libs" != yes ||
+              test "$build_old_libs" = yes ||
+              test "$link_static" = yes; }; then
+           # Extract -R from dependency_libs
+           temp_deplibs=
+           for libdir in $dependency_libs; do
+             case $libdir in
+             -R*) func_stripname '-R' '' "$libdir"
+                  temp_xrpath=$func_stripname_result
+                  case " $xrpath " in
+                  *" $temp_xrpath "*) ;;
+                  *) xrpath="$xrpath $temp_xrpath";;
+                  esac;;
+             *) temp_deplibs="$temp_deplibs $libdir";;
+             esac
+           done
+           dependency_libs="$temp_deplibs"
+         fi
+
+         newlib_search_path="$newlib_search_path $absdir"
+         # Link against this library
+         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+         # ... and its dependency_libs
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           newdependency_libs="$deplib $newdependency_libs"
+           if $opt_duplicate_deps ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$tmp_libs $deplib"
+         done
+
+         if test "$link_all_deplibs" != no; then
+           # Add the search paths of all dependency libraries
+           for deplib in $dependency_libs; do
+             case $deplib in
+             -L*) path="$deplib" ;;
+             *.la)
+               func_dirname "$deplib" "" "."
+               dir="$func_dirname_result"
+               # We need an absolute path.
+               case $dir in
+               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+               *)
+                 absdir=`cd "$dir" && pwd`
+                 if test -z "$absdir"; then
+                   func_warning "cannot determine absolute directory name of \`$dir'"
+                   absdir="$dir"
+                 fi
+                 ;;
+               esac
+               if $GREP "^installed=no" $deplib > /dev/null; then
+               case $host in
+               *-*-darwin*)
+                 depdepl=
+                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+                 if test -n "$deplibrary_names" ; then
+                   for tmp in $deplibrary_names ; do
+                     depdepl=$tmp
+                   done
+                   if test -f "$absdir/$objdir/$depdepl" ; then
+                     depdepl="$absdir/$objdir/$depdepl"
+                     darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+                      if test -z "$darwin_install_name"; then
+                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                      fi
+                     compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+                     linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+                     path=
+                   fi
+                 fi
+                 ;;
+               *)
+                 path="-L$absdir/$objdir"
+                 ;;
+               esac
+               else
+                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+                 test -z "$libdir" && \
+                   func_fatal_error "\`$deplib' is not a valid libtool archive"
+                 test "$absdir" != "$libdir" && \
+                   func_warning "\`$deplib' seems to be moved"
+
+                 path="-L$absdir"
+               fi
+               ;;
+             esac
+             case " $deplibs " in
+             *" $path "*) ;;
+             *) deplibs="$path $deplibs" ;;
+             esac
+           done
+         fi # link_all_deplibs != no
+       fi # linkmode = lib
+      done # for deplib in $libs
+      if test "$pass" = link; then
+       if test "$linkmode" = "prog"; then
+         compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+         finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+       else
+         compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+       fi
+      fi
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+       # Link the dlpreopened libraries before other libraries
+       for deplib in $save_deplibs; do
+         deplibs="$deplib $deplibs"
+       done
+      fi
+      if test "$pass" != dlopen; then
+       if test "$pass" != conv; then
+         # Make sure lib_search_path contains only unique directories.
+         lib_search_path=
+         for dir in $newlib_search_path; do
+           case "$lib_search_path " in
+           *" $dir "*) ;;
+           *) lib_search_path="$lib_search_path $dir" ;;
+           esac
+         done
+         newlib_search_path=
+       fi
+
+       if test "$linkmode,$pass" != "prog,link"; then
+         vars="deplibs"
+       else
+         vars="compile_deplibs finalize_deplibs"
+       fi
+       for var in $vars dependency_libs; do
+         # Add libraries to $var in reverse order
+         eval tmp_libs=\"\$$var\"
+         new_libs=
+         for deplib in $tmp_libs; do
+           # FIXME: Pedantically, this is the right thing to do, so
+           #        that some nasty dependency loop isn't accidentally
+           #        broken:
+           #new_libs="$deplib $new_libs"
+           # Pragmatically, this seems to cause very few problems in
+           # practice:
+           case $deplib in
+           -L*) new_libs="$deplib $new_libs" ;;
+           -R*) ;;
+           *)
+             # And here is the reason: when a library appears more
+             # than once as an explicit dependence of a library, or
+             # is implicitly linked in more than once by the
+             # compiler, it is considered special, and multiple
+             # occurrences thereof are not removed.  Compare this
+             # with having the same library being listed as a
+             # dependency of multiple other libraries: in this case,
+             # we know (pedantically, we assume) the library does not
+             # need to be listed more than once, so we keep only the
+             # last copy.  This is not always right, but it is rare
+             # enough that we require users that really mean to play
+             # such unportable linking tricks to link the library
+             # using -Wl,-lname, so that libtool does not consider it
+             # for duplicate removal.
+             case " $specialdeplibs " in
+             *" $deplib "*) new_libs="$deplib $new_libs" ;;
+             *)
+               case " $new_libs " in
+               *" $deplib "*) ;;
+               *) new_libs="$deplib $new_libs" ;;
+               esac
+               ;;
+             esac
+             ;;
+           esac
+         done
+         tmp_libs=
+         for deplib in $new_libs; do
+           case $deplib in
+           -L*)
+             case " $tmp_libs " in
+             *" $deplib "*) ;;
+             *) tmp_libs="$tmp_libs $deplib" ;;
+             esac
+             ;;
+           *) tmp_libs="$tmp_libs $deplib" ;;
+           esac
+         done
+         eval $var=\"$tmp_libs\"
+       done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+       case " $predeps $postdeps $compiler_lib_search_path " in
+       *" $i "*)
+         i=""
+         ;;
+       esac
+       if test -n "$i" ; then
+         tmp_libs="$tmp_libs $i"
+       fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+    fi
+    if test "$linkmode" = prog || test "$linkmode" = lib; then
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       func_warning "\`-dlopen' is ignored for archives"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+       func_warning "\`-l' and \`-L' are ignored for archives" ;;
+      esac
+
+      test -n "$rpath" && \
+       func_warning "\`-rpath' is ignored for archives"
+
+      test -n "$xrpath" && \
+       func_warning "\`-R' is ignored for archives"
+
+      test -n "$vinfo" && \
+       func_warning "\`-version-info/-version-number' is ignored for archives"
+
+      test -n "$release" && \
+       func_warning "\`-release' is ignored for archives"
+
+      test -n "$export_symbols$export_symbols_regex" && \
+       func_warning "\`-export-symbols' is ignored for archives"
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+       func_stripname 'lib' '.la' "$outputname"
+       name=$func_stripname_result
+       eval shared_ext=\"$shrext_cmds\"
+       eval libname=\"$libname_spec\"
+       ;;
+      *)
+       test "$module" = no && \
+         func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+       if test "$need_lib_prefix" != no; then
+         # Add the "lib" prefix for modules if required
+         func_stripname '' '.la' "$outputname"
+         name=$func_stripname_result
+         eval shared_ext=\"$shrext_cmds\"
+         eval libname=\"$libname_spec\"
+       else
+         func_stripname '' '.la' "$outputname"
+         libname=$func_stripname_result
+       fi
+       ;;
+      esac
+
+      if test -n "$objs"; then
+       if test "$deplibs_check_method" != pass_all; then
+         func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+       else
+         $ECHO
+         $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+         $ECHO "*** objects $objs is not portable!"
+         libobjs="$libobjs $objs"
+       fi
+      fi
+
+      test "$dlself" != no && \
+       func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+      set dummy $rpath
+      shift
+      test "$#" -gt 1 && \
+       func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+      install_libdir="$1"
+
+      oldlibs=
+      if test -z "$rpath"; then
+       if test "$build_libtool_libs" = yes; then
+         # Building a libtool convenience library.
+         # Some compilers have problems with a `.al' extension so
+         # convenience libraries should have the same extension an
+         # archive normally would.
+         oldlibs="$output_objdir/$libname.$libext $oldlibs"
+         build_libtool_libs=convenience
+         build_old_libs=yes
+       fi
+
+       test -n "$vinfo" && \
+         func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+       test -n "$release" && \
+         func_warning "\`-release' is ignored for convenience libraries"
+      else
+
+       # Parse the version information argument.
+       save_ifs="$IFS"; IFS=':'
+       set dummy $vinfo 0 0 0
+       shift
+       IFS="$save_ifs"
+
+       test -n "$7" && \
+         func_fatal_help "too many parameters to \`-version-info'"
+
+       # convert absolute version numbers to libtool ages
+       # this retains compatibility with .la files and attempts
+       # to make the code below a bit more comprehensible
+
+       case $vinfo_number in
+       yes)
+         number_major="$1"
+         number_minor="$2"
+         number_revision="$3"
+         #
+         # There are really only two kinds -- those that
+         # use the current revision as the major version
+         # and those that subtract age and use age as
+         # a minor version.  But, then there is irix
+         # which has an extra 1 added just for fun
+         #
+         case $version_type in
+         darwin|linux|osf|windows|none)
+           func_arith $number_major + $number_minor
+           current=$func_arith_result
+           age="$number_minor"
+           revision="$number_revision"
+           ;;
+         freebsd-aout|freebsd-elf|sunos)
+           current="$number_major"
+           revision="$number_minor"
+           age="0"
+           ;;
+         irix|nonstopux)
+           func_arith $number_major + $number_minor
+           current=$func_arith_result
+           age="$number_minor"
+           revision="$number_minor"
+           lt_irix_increment=no
+           ;;
+         esac
+         ;;
+       no)
+         current="$1"
+         revision="$2"
+         age="$3"
+         ;;
+       esac
+
+       # Check that each of the things are valid numbers.
+       case $current in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "CURRENT \`$current' must be a nonnegative integer"
+         func_fatal_error "\`$vinfo' is not valid version information"
+         ;;
+       esac
+
+       case $revision in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "REVISION \`$revision' must be a nonnegative integer"
+         func_fatal_error "\`$vinfo' is not valid version information"
+         ;;
+       esac
+
+       case $age in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         func_error "AGE \`$age' must be a nonnegative integer"
+         func_fatal_error "\`$vinfo' is not valid version information"
+         ;;
+       esac
+
+       if test "$age" -gt "$current"; then
+         func_error "AGE \`$age' is greater than the current interface number \`$current'"
+         func_fatal_error "\`$vinfo' is not valid version information"
+       fi
+
+       # Calculate the version variables.
+       major=
+       versuffix=
+       verstring=
+       case $version_type in
+       none) ;;
+
+       darwin)
+         # Like Linux, but with the current version available in
+         # verstring for coding it into the library header
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix="$major.$age.$revision"
+         # Darwin ld doesn't like 0 for these options...
+         func_arith $current + 1
+         minor_current=$func_arith_result
+         xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+         verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+         ;;
+
+       freebsd-aout)
+         major=".$current"
+         versuffix=".$current.$revision";
+         ;;
+
+       freebsd-elf)
+         major=".$current"
+         versuffix=".$current"
+         ;;
+
+       irix | nonstopux)
+         if test "X$lt_irix_increment" = "Xno"; then
+           func_arith $current - $age
+         else
+           func_arith $current - $age + 1
+         fi
+         major=$func_arith_result
+
+         case $version_type in
+           nonstopux) verstring_prefix=nonstopux ;;
+           *)         verstring_prefix=sgi ;;
+         esac
+         verstring="$verstring_prefix$major.$revision"
+
+         # Add in all the interfaces that we are compatible with.
+         loop=$revision
+         while test "$loop" -ne 0; do
+           func_arith $revision - $loop
+           iface=$func_arith_result
+           func_arith $loop - 1
+           loop=$func_arith_result
+           verstring="$verstring_prefix$major.$iface:$verstring"
+         done
+
+         # Before this point, $major must not contain `.'.
+         major=.$major
+         versuffix="$major.$revision"
+         ;;
+
+       linux)
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix="$major.$age.$revision"
+         ;;
+
+       osf)
+         func_arith $current - $age
+         major=.$func_arith_result
+         versuffix=".$current.$age.$revision"
+         verstring="$current.$age.$revision"
+
+         # Add in all the interfaces that we are compatible with.
+         loop=$age
+         while test "$loop" -ne 0; do
+           func_arith $current - $loop
+           iface=$func_arith_result
+           func_arith $loop - 1
+           loop=$func_arith_result
+           verstring="$verstring:${iface}.0"
+         done
+
+         # Make executables depend on our current version.
+         verstring="$verstring:${current}.0"
+         ;;
+
+       qnx)
+         major=".$current"
+         versuffix=".$current"
+         ;;
+
+       sunos)
+         major=".$current"
+         versuffix=".$current.$revision"
+         ;;
+
+       windows)
+         # Use '-' rather than '.', since we only want one
+         # extension on DOS 8.3 filesystems.
+         func_arith $current - $age
+         major=$func_arith_result
+         versuffix="-$major"
+         ;;
+
+       *)
+         func_fatal_configuration "unknown library version type \`$version_type'"
+         ;;
+       esac
+
+       # Clear the version info if we defaulted, and they specified a release.
+       if test -z "$vinfo" && test -n "$release"; then
+         major=
+         case $version_type in
+         darwin)
+           # we can't check for "0.0" in archive_cmds due to quoting
+           # problems, so we reset it completely
+           verstring=
+           ;;
+         *)
+           verstring="0.0"
+           ;;
+         esac
+         if test "$need_version" = no; then
+           versuffix=
+         else
+           versuffix=".0.0"
+         fi
+       fi
+
+       # Remove version info from name if versioning should be avoided
+       if test "$avoid_version" = yes && test "$need_version" = no; then
+         major=
+         versuffix=
+         verstring=""
+       fi
+
+       # Check to see if the archive will have undefined symbols.
+       if test "$allow_undefined" = yes; then
+         if test "$allow_undefined_flag" = unsupported; then
+           func_warning "undefined symbols not allowed in $host shared libraries"
+           build_libtool_libs=no
+           build_old_libs=yes
+         fi
+       else
+         # Don't allow undefined symbols.
+         allow_undefined_flag="$no_undefined_flag"
+       fi
+
+      fi
+
+      func_generate_dlsyms "$libname" "$libname" "yes"
+      libobjs="$libobjs $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
+
+      if test "$mode" != relink; then
+       # Remove our outputs, but don't remove object files since they
+       # may have been created when compiling PIC objects.
+       removelist=
+       tempremovelist=`$ECHO "$output_objdir/*"`
+       for p in $tempremovelist; do
+         case $p in
+           *.$objext | *.gcno)
+              ;;
+           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+              if test "X$precious_files_regex" != "X"; then
+                if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+                then
+                  continue
+                fi
+              fi
+              removelist="$removelist $p"
+              ;;
+           *) ;;
+         esac
+       done
+       test -n "$removelist" && \
+         func_show_eval "${RM}r \$removelist"
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+       oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+       # Transform .lo files to .o files.
+       oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #        lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+      #        deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+      #        dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+      #done
+
+      if test -n "$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       temp_xrpath=
+       for libdir in $xrpath; do
+         temp_xrpath="$temp_xrpath -R$libdir"
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_rpath="$finalize_rpath $libdir" ;;
+         esac
+       done
+       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+         dependency_libs="$temp_xrpath $dependency_libs"
+       fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+       case " $dlprefiles $dlfiles " in
+       *" $lib "*) ;;
+       *) dlfiles="$dlfiles $lib" ;;
+       esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+       case "$dlprefiles " in
+       *" $lib "*) ;;
+       *) dlprefiles="$dlprefiles $lib" ;;
+       esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+       if test -n "$rpath"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+           # these systems don't actually have a c library (as such)!
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C library is in the System framework
+           deplibs="$deplibs System.ltframework"
+           ;;
+         *-*-netbsd*)
+           # Don't link with libc until the a.out ld.so is fixed.
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+           # Do not include libc due to us having libc/libc_r.
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           ;;
+         *)
+           # Add libc to deplibs on all other systems if necessary.
+           if test "$build_libtool_need_lc" = "yes"; then
+             deplibs="$deplibs -lc"
+           fi
+           ;;
+         esac
+       fi
+
+       # Transform deplibs into only deplibs that can be linked in shared.
+       name_save=$name
+       libname_save=$libname
+       release_save=$release
+       versuffix_save=$versuffix
+       major_save=$major
+       # I'm not sure if I'm treating the release correctly.  I think
+       # release should show up in the -l (ie -lgmp5) so we don't want to
+       # add it in twice.  Is that correct?
+       release=""
+       versuffix=""
+       major=""
+       newdeplibs=
+       droppeddeps=no
+       case $deplibs_check_method in
+       pass_all)
+         # Don't check for shared/static.  Everything works.
+         # This might be a little naive.  We might want to check
+         # whether the library exists or not.  But this is on
+         # osf3 & osf4 and I'm not really sure... Just
+         # implementing what was already the behavior.
+         newdeplibs=$deplibs
+         ;;
+       test_compile)
+         # This code stresses the "libraries are programs" paradigm to its
+         # limits. Maybe even breaks it.  We compile a program, linking it
+         # against the deplibs as a proxy for the library.  Then we can check
+         # whether they linked in statically or dynamically with ldd.
+         $opt_dry_run || $RM conftest.c
+         cat > conftest.c <<EOF
+         int main() { return 0; }
+EOF
+         $opt_dry_run || $RM conftest
+         if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+           ldd_output=`ldd conftest`
+           for i in $deplibs; do
+             case $i in
+             -l*)
+               func_stripname -l '' "$i"
+               name=$func_stripname_result
+               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                 case " $predeps $postdeps " in
+                 *" $i "*)
+                   newdeplibs="$newdeplibs $i"
+                   i=""
+                   ;;
+                 esac
+               fi
+               if test -n "$i" ; then
+                 libname=`eval "\\$ECHO \"$libname_spec\""`
+                 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+                 set dummy $deplib_matches; shift
+                 deplib_match=$1
+                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                   newdeplibs="$newdeplibs $i"
+                 else
+                   droppeddeps=yes
+                   $ECHO
+                   $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+                   $ECHO "*** I have the capability to make that library automatically link in when"
+                   $ECHO "*** you link to this library.  But I can only do this if you have a"
+                   $ECHO "*** shared version of the library, which I believe you do not have"
+                   $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+                   $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+                 fi
+               fi
+               ;;
+             *)
+               newdeplibs="$newdeplibs $i"
+               ;;
+             esac
+           done
+         else
+           # Error occurred in the first compile.  Let's try to salvage
+           # the situation: Compile a separate program for each library.
+           for i in $deplibs; do
+             case $i in
+             -l*)
+               func_stripname -l '' "$i"
+               name=$func_stripname_result
+               $opt_dry_run || $RM conftest
+               if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+                 ldd_output=`ldd conftest`
+                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                   case " $predeps $postdeps " in
+                   *" $i "*)
+                     newdeplibs="$newdeplibs $i"
+                     i=""
+                     ;;
+                   esac
+                 fi
+                 if test -n "$i" ; then
+                   libname=`eval "\\$ECHO \"$libname_spec\""`
+                   deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+                   set dummy $deplib_matches; shift
+                   deplib_match=$1
+                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                     newdeplibs="$newdeplibs $i"
+                   else
+                     droppeddeps=yes
+                     $ECHO
+                     $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+                     $ECHO "*** I have the capability to make that library automatically link in when"
+                     $ECHO "*** you link to this library.  But I can only do this if you have a"
+                     $ECHO "*** shared version of the library, which you do not appear to have"
+                     $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+                     $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+                   fi
+                 fi
+               else
+                 droppeddeps=yes
+                 $ECHO
+                 $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
+                 $ECHO "*** make it link in!  You will probably need to install it or some"
+                 $ECHO "*** library that it depends on before this library will be fully"
+                 $ECHO "*** functional.  Installing it before continuing would be even better."
+               fi
+               ;;
+             *)
+               newdeplibs="$newdeplibs $i"
+               ;;
+             esac
+           done
+         fi
+         ;;
+       file_magic*)
+         set dummy $deplibs_check_method; shift
+         file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+         for a_deplib in $deplibs; do
+           case $a_deplib in
+           -l*)
+             func_stripname -l '' "$a_deplib"
+             name=$func_stripname_result
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 newdeplibs="$newdeplibs $a_deplib"
+                 a_deplib=""
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib" ; then
+               libname=`eval "\\$ECHO \"$libname_spec\""`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 for potent_lib in $potential_libs; do
+                     # Follow soft links.
+                     if ls -lLd "$potent_lib" 2>/dev/null |
+                        $GREP " -> " >/dev/null; then
+                       continue
+                     fi
+                     # The statement above tries to avoid entering an
+                     # endless loop below, in case of cyclic links.
+                     # We might still enter an endless loop, since a link
+                     # loop can be closed while we follow links,
+                     # but so what?
+                     potlib="$potent_lib"
+                     while test -h "$potlib" 2>/dev/null; do
+                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+                       case $potliblink in
+                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+                       *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+                       esac
+                     done
+                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+                        $SED -e 10q |
+                        $EGREP "$file_magic_regex" > /dev/null; then
+                       newdeplibs="$newdeplibs $a_deplib"
+                       a_deplib=""
+                       break 2
+                     fi
+                 done
+               done
+             fi
+             if test -n "$a_deplib" ; then
+               droppeddeps=yes
+               $ECHO
+               $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+               $ECHO "*** I have the capability to make that library automatically link in when"
+               $ECHO "*** you link to this library.  But I can only do this if you have a"
+               $ECHO "*** shared version of the library, which you do not appear to have"
+               $ECHO "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+               else
+                 $ECHO "*** with $libname and none of the candidates passed a file format test"
+                 $ECHO "*** using a file magic. Last file checked: $potlib"
+               fi
+             fi
+             ;;
+           *)
+             # Add a -L argument.
+             newdeplibs="$newdeplibs $a_deplib"
+             ;;
+           esac
+         done # Gone through all deplibs.
+         ;;
+       match_pattern*)
+         set dummy $deplibs_check_method; shift
+         match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+         for a_deplib in $deplibs; do
+           case $a_deplib in
+           -l*)
+             func_stripname -l '' "$a_deplib"
+             name=$func_stripname_result
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 newdeplibs="$newdeplibs $a_deplib"
+                 a_deplib=""
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib" ; then
+               libname=`eval "\\$ECHO \"$libname_spec\""`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 for potent_lib in $potential_libs; do
+                   potlib="$potent_lib" # see symlink-check above in file_magic test
+                   if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+                      $EGREP "$match_pattern_regex" > /dev/null; then
+                     newdeplibs="$newdeplibs $a_deplib"
+                     a_deplib=""
+                     break 2
+                   fi
+                 done
+               done
+             fi
+             if test -n "$a_deplib" ; then
+               droppeddeps=yes
+               $ECHO
+               $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+               $ECHO "*** I have the capability to make that library automatically link in when"
+               $ECHO "*** you link to this library.  But I can only do this if you have a"
+               $ECHO "*** shared version of the library, which you do not appear to have"
+               $ECHO "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+               else
+                 $ECHO "*** with $libname and none of the candidates passed a file format test"
+                 $ECHO "*** using a regex pattern. Last file checked: $potlib"
+               fi
+             fi
+             ;;
+           *)
+             # Add a -L argument.
+             newdeplibs="$newdeplibs $a_deplib"
+             ;;
+           esac
+         done # Gone through all deplibs.
+         ;;
+       none | unknown | *)
+         newdeplibs=""
+         tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+             -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+           for i in $predeps $postdeps ; do
+             # can't use Xsed below, because $i might contain '/'
+             tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+           done
+         fi
+         if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[      ]//g' |
+            $GREP . >/dev/null; then
+           $ECHO
+           if test "X$deplibs_check_method" = "Xnone"; then
+             $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+           else
+             $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+           fi
+           $ECHO "*** All declared inter-library dependencies are being dropped."
+           droppeddeps=yes
+         fi
+         ;;
+       esac
+       versuffix=$versuffix_save
+       major=$major_save
+       release=$release_save
+       libname=$libname_save
+       name=$name_save
+
+       case $host in
+       *-*-rhapsody* | *-*-darwin1.[012])
+         # On Rhapsody replace the C library with the System framework
+         newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+         ;;
+       esac
+
+       if test "$droppeddeps" = yes; then
+         if test "$module" = yes; then
+           $ECHO
+           $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+           $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
+           $ECHO "*** a static module, that should work as long as the dlopening"
+           $ECHO "*** application is linked with the -dlopen flag."
+           if test -z "$global_symbol_pipe"; then
+             $ECHO
+             $ECHO "*** However, this would only work if libtool was able to extract symbol"
+             $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+             $ECHO "*** not find such a program.  So, this module is probably useless."
+             $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+           fi
+           if test "$build_old_libs" = no; then
+             oldlibs="$output_objdir/$libname.$libext"
+             build_libtool_libs=module
+             build_old_libs=yes
+           else
+             build_libtool_libs=no
+           fi
+         else
+           $ECHO "*** The inter-library dependencies that have been dropped here will be"
+           $ECHO "*** automatically added whenever a program is linked with this library"
+           $ECHO "*** or is declared to -dlopen it."
+
+           if test "$allow_undefined" = no; then
+             $ECHO
+             $ECHO "*** Since this library must not contain undefined symbols,"
+             $ECHO "*** because either the platform does not support them or"
+             $ECHO "*** it was explicitly requested with -no-undefined,"
+             $ECHO "*** libtool will only create a static version of it."
+             if test "$build_old_libs" = no; then
+               oldlibs="$output_objdir/$libname.$libext"
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         fi
+       fi
+       # Done checking deplibs!
+       deplibs=$newdeplibs
+      fi
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+       *-*-darwin*)
+         newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+         ;;
+      esac
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+       case " $new_libs " in
+       *" -L$path/$objdir "*) ;;
+       *)
+         case " $deplibs " in
+         *" -L$path/$objdir "*)
+           new_libs="$new_libs -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) new_libs="$new_libs $deplib" ;;
+         esac
+         ;;
+       *) new_libs="$new_libs $deplib" ;;
+       esac
+      done
+      deplibs="$new_libs"
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+       if test "$hardcode_into_libs" = yes; then
+         # Hardcode the library paths
+         hardcode_libdirs=
+         dep_rpath=
+         rpath="$finalize_rpath"
+         test "$mode" != relink && rpath="$compile_rpath$rpath"
+         for libdir in $rpath; do
+           if test -n "$hardcode_libdir_flag_spec"; then
+             if test -n "$hardcode_libdir_separator"; then
+               if test -z "$hardcode_libdirs"; then
+                 hardcode_libdirs="$libdir"
+               else
+                 # Just accumulate the unique libdirs.
+                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+                   ;;
+                 *)
+                   hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+                   ;;
+                 esac
+               fi
+             else
+               eval flag=\"$hardcode_libdir_flag_spec\"
+               dep_rpath="$dep_rpath $flag"
+             fi
+           elif test -n "$runpath_var"; then
+             case "$perm_rpath " in
+             *" $libdir "*) ;;
+             *) perm_rpath="$perm_rpath $libdir" ;;
+             esac
+           fi
+         done
+         # Substitute the hardcoded libdirs into the rpath.
+         if test -n "$hardcode_libdir_separator" &&
+            test -n "$hardcode_libdirs"; then
+           libdir="$hardcode_libdirs"
+           if test -n "$hardcode_libdir_flag_spec_ld"; then
+             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+           else
+             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+           fi
+         fi
+         if test -n "$runpath_var" && test -n "$perm_rpath"; then
+           # We should set the runpath_var.
+           rpath=
+           for dir in $perm_rpath; do
+             rpath="$rpath$dir:"
+           done
+           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+         fi
+         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+       fi
+
+       shlibpath="$finalize_shlibpath"
+       test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+       if test -n "$shlibpath"; then
+         eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+       fi
+
+       # Get the real and link names of the library.
+       eval shared_ext=\"$shrext_cmds\"
+       eval library_names=\"$library_names_spec\"
+       set dummy $library_names
+       shift
+       realname="$1"
+       shift
+
+       if test -n "$soname_spec"; then
+         eval soname=\"$soname_spec\"
+       else
+         soname="$realname"
+       fi
+       if test -z "$dlname"; then
+         dlname=$soname
+       fi
+
+       lib="$output_objdir/$realname"
+       linknames=
+       for link
+       do
+         linknames="$linknames $link"
+       done
+
+       # Use standard objects if they are pic
+       test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+       test "X$libobjs" = "X " && libobjs=
+
+       delfiles=
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+         export_symbols="$output_objdir/$libname.uexp"
+         delfiles="$delfiles $export_symbols"
+       fi
+
+       orig_export_symbols=
+       case $host_os in
+       cygwin* | mingw* | cegcc*)
+         if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+           # exporting using user supplied symfile
+           if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+             # and it's NOT already a .def file. Must figure out
+             # which of the given symbols are data symbols and tag
+             # them as such. So, trigger use of export_symbols_cmds.
+             # export_symbols gets reassigned inside the "prepare
+             # the list of exported symbols" if statement, so the
+             # include_expsyms logic still works.
+             orig_export_symbols="$export_symbols"
+             export_symbols=
+             always_export_symbols=yes
+           fi
+         fi
+         ;;
+       esac
+
+       # Prepare the list of exported symbols
+       if test -z "$export_symbols"; then
+         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+           func_verbose "generating symbol list for \`$libname.la'"
+           export_symbols="$output_objdir/$libname.exp"
+           $opt_dry_run || $RM $export_symbols
+           cmds=$export_symbols_cmds
+           save_ifs="$IFS"; IFS='~'
+           for cmd in $cmds; do
+             IFS="$save_ifs"
+             eval cmd=\"$cmd\"
+             func_len " $cmd"
+             len=$func_len_result
+             if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+               func_show_eval "$cmd" 'exit $?'
+               skipped_export=false
+             else
+               # The command line is too long to execute in one step.
+               func_verbose "using reloadable object file for export list..."
+               skipped_export=:
+               # Break out early, otherwise skipped_export may be
+               # set to false by a later but shorter cmd.
+               break
+             fi
+           done
+           IFS="$save_ifs"
+           if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+           fi
+         fi
+       fi
+
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         tmp_export_symbols="$export_symbols"
+         test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+         $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+       fi
+
+       if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+         # The given exports_symbols file has to be filtered, so filter it.
+         func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+         # FIXME: $output_objdir/$libname.filter potentially contains lots of
+         # 's' commands which not all seds can handle. GNU sed should be fine
+         # though. Also, the filter scales superlinearly with the number of
+         # global variables. join(1) would be nice here, but unfortunately
+         # isn't a blessed tool.
+         $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+         delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+         export_symbols=$output_objdir/$libname.def
+         $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+       fi
+
+       tmp_deplibs=
+       for test_deplib in $deplibs; do
+         case " $convenience " in
+         *" $test_deplib "*) ;;
+         *)
+           tmp_deplibs="$tmp_deplibs $test_deplib"
+           ;;
+         esac
+       done
+       deplibs="$tmp_deplibs"
+
+       if test -n "$convenience"; then
+         if test -n "$whole_archive_flag_spec" &&
+           test "$compiler_needs_object" = yes &&
+           test -z "$libobjs"; then
+           # extract the archives, so we have objects to list.
+           # TODO: could optimize this to just extract one archive.
+           whole_archive_flag_spec=
+         fi
+         if test -n "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+           test "X$libobjs" = "X " && libobjs=
+         else
+           gentop="$output_objdir/${outputname}x"
+           generated="$generated $gentop"
+
+           func_extract_archives $gentop $convenience
+           libobjs="$libobjs $func_extract_archives_result"
+           test "X$libobjs" = "X " && libobjs=
+         fi
+       fi
+
+       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+         eval flag=\"$thread_safe_flag_spec\"
+         linker_flags="$linker_flags $flag"
+       fi
+
+       # Make a backup of the uninstalled library when relinking
+       if test "$mode" = relink; then
+         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+       fi
+
+       # Do each of the archive commands.
+       if test "$module" = yes && test -n "$module_cmds" ; then
+         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+           eval test_cmds=\"$module_expsym_cmds\"
+           cmds=$module_expsym_cmds
+         else
+           eval test_cmds=\"$module_cmds\"
+           cmds=$module_cmds
+         fi
+       else
+         if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+           eval test_cmds=\"$archive_expsym_cmds\"
+           cmds=$archive_expsym_cmds
+         else
+           eval test_cmds=\"$archive_cmds\"
+           cmds=$archive_cmds
+         fi
+       fi
+
+       if test "X$skipped_export" != "X:" &&
+          func_len " $test_cmds" &&
+          len=$func_len_result &&
+          test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         :
+       else
+         # The command line is too long to link in one step, link piecewise
+         # or, if using GNU ld and skipped_export is not :, use a linker
+         # script.
+
+         # Save the value of $output and $libobjs because we want to
+         # use them later.  If we have whole_archive_flag_spec, we
+         # want to use save_libobjs as it was before
+         # whole_archive_flag_spec was expanded, because we can't
+         # assume the linker understands whole_archive_flag_spec.
+         # This may have to be revisited, in case too many
+         # convenience libraries get linked in and end up exceeding
+         # the spec.
+         if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+         fi
+         save_output=$output
+         output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+         # Clear the reloadable object creation command queue and
+         # initialize k to one.
+         test_cmds=
+         concat_cmds=
+         objlist=
+         last_robj=
+         k=1
+
+         if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+           output=${output_objdir}/${output_la}.lnkscript
+           func_verbose "creating GNU ld script: $output"
+           $ECHO 'INPUT (' > $output
+           for obj in $save_libobjs
+           do
+             $ECHO "$obj" >> $output
+           done
+           $ECHO ')' >> $output
+           delfiles="$delfiles $output"
+         elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+           output=${output_objdir}/${output_la}.lnk
+           func_verbose "creating linker input file list: $output"
+           : > $output
+           set x $save_libobjs
+           shift
+           firstobj=
+           if test "$compiler_needs_object" = yes; then
+             firstobj="$1 "
+             shift
+           fi
+           for obj
+           do
+             $ECHO "$obj" >> $output
+           done
+           delfiles="$delfiles $output"
+           output=$firstobj\"$file_list_spec$output\"
+         else
+           if test -n "$save_libobjs"; then
+             func_verbose "creating reloadable object files..."
+             output=$output_objdir/$output_la-${k}.$objext
+             eval test_cmds=\"$reload_cmds\"
+             func_len " $test_cmds"
+             len0=$func_len_result
+             len=$len0
+
+             # Loop over the list of objects to be linked.
+             for obj in $save_libobjs
+             do
+               func_len " $obj"
+               func_arith $len + $func_len_result
+               len=$func_arith_result
+               if test "X$objlist" = X ||
+                  test "$len" -lt "$max_cmd_len"; then
+                 func_append objlist " $obj"
+               else
+                 # The command $test_cmds is almost too long, add a
+                 # command to the queue.
+                 if test "$k" -eq 1 ; then
+                   # The first file doesn't have a previous command to add.
+                   eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+                 else
+                   # All subsequent reloadable object files will link in
+                   # the last one created.
+                   eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+                 fi
+                 last_robj=$output_objdir/$output_la-${k}.$objext
+                 func_arith $k + 1
+                 k=$func_arith_result
+                 output=$output_objdir/$output_la-${k}.$objext
+                 objlist=$obj
+                 func_len " $last_robj"
+                 func_arith $len0 + $func_len_result
+                 len=$func_arith_result
+               fi
+             done
+             # Handle the remaining objects by creating one last
+             # reloadable object file.  All subsequent reloadable object
+             # files will link in the last one created.
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+             if test -n "$last_robj"; then
+               eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+             fi
+             delfiles="$delfiles $output"
+
+           else
+             output=
+           fi
+
+           if ${skipped_export-false}; then
+             func_verbose "generating symbol list for \`$libname.la'"
+             export_symbols="$output_objdir/$libname.exp"
+             $opt_dry_run || $RM $export_symbols
+             libobjs=$output
+             # Append the command to create the export file.
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+             if test -n "$last_robj"; then
+               eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+             fi
+           fi
+
+           test -n "$save_libobjs" &&
+             func_verbose "creating a temporary reloadable object file: $output"
+
+           # Loop through the commands generated above and execute them.
+           save_ifs="$IFS"; IFS='~'
+           for cmd in $concat_cmds; do
+             IFS="$save_ifs"
+             $opt_silent || {
+                 func_quote_for_expand "$cmd"
+                 eval "func_echo $func_quote_for_expand_result"
+             }
+             $opt_dry_run || eval "$cmd" || {
+               lt_exit=$?
+
+               # Restore the uninstalled library and exit
+               if test "$mode" = relink; then
+                 ( cd "$output_objdir" && \
+                   $RM "${realname}T" && \
+                   $MV "${realname}U" "$realname" )
+               fi
+
+               exit $lt_exit
+             }
+           done
+           IFS="$save_ifs"
+
+           if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+           fi
+         fi
+
+          if ${skipped_export-false}; then
+           if test -n "$export_symbols" && test -n "$include_expsyms"; then
+             tmp_export_symbols="$export_symbols"
+             test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+             $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+           fi
+
+           if test -n "$orig_export_symbols"; then
+             # The given exports_symbols file has to be filtered, so filter it.
+             func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+             # FIXME: $output_objdir/$libname.filter potentially contains lots of
+             # 's' commands which not all seds can handle. GNU sed should be fine
+             # though. Also, the filter scales superlinearly with the number of
+             # global variables. join(1) would be nice here, but unfortunately
+             # isn't a blessed tool.
+             $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+             delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+             export_symbols=$output_objdir/$libname.def
+             $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+           fi
+         fi
+
+         libobjs=$output
+         # Restore the value of output.
+         output=$save_output
+
+         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+           test "X$libobjs" = "X " && libobjs=
+         fi
+         # Expand the library linking commands again to reset the
+         # value of $libobjs for piecewise linking.
+
+         # Do each of the archive commands.
+         if test "$module" = yes && test -n "$module_cmds" ; then
+           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+             cmds=$module_expsym_cmds
+           else
+             cmds=$module_cmds
+           fi
+         else
+           if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+             cmds=$archive_expsym_cmds
+           else
+             cmds=$archive_cmds
+           fi
+         fi
+       fi
+
+       if test -n "$delfiles"; then
+         # Append the command to remove temporary files to $cmds.
+         eval cmds=\"\$cmds~\$RM $delfiles\"
+       fi
+
+       # Add any objects from preloaded convenience libraries
+       if test -n "$dlprefiles"; then
+         gentop="$output_objdir/${outputname}x"
+         generated="$generated $gentop"
+
+         func_extract_archives $gentop $dlprefiles
+         libobjs="$libobjs $func_extract_archives_result"
+         test "X$libobjs" = "X " && libobjs=
+       fi
+
+       save_ifs="$IFS"; IFS='~'
+       for cmd in $cmds; do
+         IFS="$save_ifs"
+         eval cmd=\"$cmd\"
+         $opt_silent || {
+           func_quote_for_expand "$cmd"
+           eval "func_echo $func_quote_for_expand_result"
+         }
+         $opt_dry_run || eval "$cmd" || {
+           lt_exit=$?
+
+           # Restore the uninstalled library and exit
+           if test "$mode" = relink; then
+             ( cd "$output_objdir" && \
+               $RM "${realname}T" && \
+               $MV "${realname}U" "$realname" )
+           fi
+
+           exit $lt_exit
+         }
+       done
+       IFS="$save_ifs"
+
+       # Restore the uninstalled library and exit
+       if test "$mode" = relink; then
+         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+         if test -n "$convenience"; then
+           if test -z "$whole_archive_flag_spec"; then
+             func_show_eval '${RM}r "$gentop"'
+           fi
+         fi
+
+         exit $EXIT_SUCCESS
+       fi
+
+       # Create links to the real library.
+       for linkname in $linknames; do
+         if test "$realname" != "$linkname"; then
+           func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+         fi
+       done
+
+       # If -module or -export-dynamic was specified, set the dlname.
+       if test "$module" = yes || test "$export_dynamic" = yes; then
+         # On all known operating systems, these are identical.
+         dlname="$soname"
+       fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       func_warning "\`-dlopen' is ignored for objects"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+       func_warning "\`-l' and \`-L' are ignored for objects" ;;
+      esac
+
+      test -n "$rpath" && \
+       func_warning "\`-rpath' is ignored for objects"
+
+      test -n "$xrpath" && \
+       func_warning "\`-R' is ignored for objects"
+
+      test -n "$vinfo" && \
+       func_warning "\`-version-info' is ignored for objects"
+
+      test -n "$release" && \
+       func_warning "\`-release' is ignored for objects"
+
+      case $output in
+      *.lo)
+       test -n "$objs$old_deplibs" && \
+         func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+       libobj=$output
+       func_lo2o "$libobj"
+       obj=$func_lo2o_result
+       ;;
+      *)
+       libobj=
+       obj="$output"
+       ;;
+      esac
+
+      # Delete the old objects.
+      $opt_dry_run || $RM $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+       if test -n "$whole_archive_flag_spec"; then
+         eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+         reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+       else
+         gentop="$output_objdir/${obj}x"
+         generated="$generated $gentop"
+
+         func_extract_archives $gentop $convenience
+         reload_conv_objs="$reload_objs $func_extract_archives_result"
+       fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      func_execute_cmds "$reload_cmds" 'exit $?'
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+       if test -n "$gentop"; then
+         func_show_eval '${RM}r "$gentop"'
+       fi
+
+       exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+       if test -n "$gentop"; then
+         func_show_eval '${RM}r "$gentop"'
+       fi
+
+       # Create an invalid libtool object if no PIC, so that we don't
+       # accidentally link it into a program.
+       # $show "echo timestamp > $libobj"
+       # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+       exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+       # Only do commands if we really have different PIC objects.
+       reload_objs="$libobjs $reload_conv_objs"
+       output="$libobj"
+       func_execute_cmds "$reload_cmds" 'exit $?'
+      fi
+
+      if test -n "$gentop"; then
+       func_show_eval '${RM}r "$gentop"'
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+       *cygwin*) func_stripname '' '.exe' "$output"
+                 output=$func_stripname_result.exe;;
+      esac
+      test -n "$vinfo" && \
+       func_warning "\`-version-info' is ignored for programs"
+
+      test -n "$release" && \
+       func_warning "\`-release' is ignored for programs"
+
+      test "$preload" = yes \
+        && test "$dlopen_support" = unknown \
+       && test "$dlopen_self" = unknown \
+       && test "$dlopen_self_static" = unknown && \
+         func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+       # On Rhapsody replace the C library is the System framework
+       compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+       finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+       ;;
+      esac
+
+      case $host in
+      *-*-darwin*)
+       # Don't allow lazy linking, it breaks C++ global constructors
+       # But is supposedly fixed on 10.4 or later (yay!).
+       if test "$tagname" = CXX ; then
+         case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+           10.[0123])
+             compile_command="$compile_command ${wl}-bind_at_load"
+             finalize_command="$finalize_command ${wl}-bind_at_load"
+           ;;
+         esac
+       fi
+       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+       compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+       finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+       ;;
+      esac
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+       case " $new_libs " in
+       *" -L$path/$objdir "*) ;;
+       *)
+         case " $compile_deplibs " in
+         *" -L$path/$objdir "*)
+           new_libs="$new_libs -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $compile_deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) new_libs="$new_libs $deplib" ;;
+         esac
+         ;;
+       *) new_libs="$new_libs $deplib" ;;
+       esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       for libdir in $rpath $xrpath; do
+         # This is the magic to use -rpath.
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_rpath="$finalize_rpath $libdir" ;;
+         esac
+       done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+       if test -n "$hardcode_libdir_flag_spec"; then
+         if test -n "$hardcode_libdir_separator"; then
+           if test -z "$hardcode_libdirs"; then
+             hardcode_libdirs="$libdir"
+           else
+             # Just accumulate the unique libdirs.
+             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+               ;;
+             *)
+               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           rpath="$rpath $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$perm_rpath " in
+         *" $libdir "*) ;;
+         *) perm_rpath="$perm_rpath $libdir" ;;
+         esac
+       fi
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+         testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$libdir:"*) ;;
+         ::) dllsearchpath=$libdir;;
+         *) dllsearchpath="$dllsearchpath:$libdir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         ::) dllsearchpath=$testbindir;;
+         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         esac
+         ;;
+       esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir="$hardcode_libdirs"
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+       if test -n "$hardcode_libdir_flag_spec"; then
+         if test -n "$hardcode_libdir_separator"; then
+           if test -z "$hardcode_libdirs"; then
+             hardcode_libdirs="$libdir"
+           else
+             # Just accumulate the unique libdirs.
+             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+               ;;
+             *)
+               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           rpath="$rpath $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$finalize_perm_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+         esac
+       fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir="$hardcode_libdirs"
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+       # Transform all the library objects into standard objects.
+       compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+       finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+       func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
+
+      wrappers_required=yes
+      case $host in
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *cegcc)
+        # Disable wrappers for cegcc, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
+      *)
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      esac
+      if test "$wrappers_required" = no; then
+       # Replace the output file specification.
+       compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+       link_command="$compile_command$compile_rpath"
+
+       # We have no uninstalled library dependencies, so finalize right now.
+       exit_status=0
+       func_show_eval "$link_command" 'exit_status=$?'
+
+       # Delete the generated files.
+       if test -f "$output_objdir/${outputname}S.${objext}"; then
+         func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+       fi
+
+       exit $exit_status
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+       finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+       if test -n "$perm_rpath"; then
+         # We should set the runpath_var.
+         rpath=
+         for dir in $perm_rpath; do
+           rpath="$rpath$dir:"
+         done
+         compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+       fi
+       if test -n "$finalize_perm_rpath"; then
+         # We should set the runpath_var.
+         rpath=
+         for dir in $finalize_perm_rpath; do
+           rpath="$rpath$dir:"
+         done
+         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+       fi
+      fi
+
+      if test "$no_install" = yes; then
+       # We don't need to create a wrapper script.
+       link_command="$compile_var$compile_command$compile_rpath"
+       # Replace the output file specification.
+       link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+       # Delete the old output file.
+       $opt_dry_run || $RM $output
+       # Link the executable and exit
+       func_show_eval "$link_command" 'exit $?'
+       exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+       # Fast installation is not supported
+       link_command="$compile_var$compile_command$compile_rpath"
+       relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+       func_warning "this platform does not like uninstalled shared libraries"
+       func_warning "\`$output' will be relinked during installation"
+      else
+       if test "$fast_install" != no; then
+         link_command="$finalize_var$compile_command$finalize_rpath"
+         if test "$fast_install" = yes; then
+           relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+         else
+           # fast_install is set to needless
+           relink_command=
+         fi
+       else
+         link_command="$compile_var$compile_command$compile_rpath"
+         relink_command="$finalize_var$finalize_command$finalize_rpath"
+       fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      func_show_eval "$link_command" 'exit $?'
+
+      # Now create the wrapper script.
+      func_verbose "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+       # Preserve any variables that may affect compiler behavior
+       for var in $variables_saved_for_relink; do
+         if eval test -z \"\${$var+set}\"; then
+           relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+         elif eval var_value=\$$var; test -z "$var_value"; then
+           relink_command="$var=; export $var; $relink_command"
+         else
+           func_quote_for_eval "$var_value"
+           relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+         fi
+       done
+       relink_command="(cd `pwd`; $relink_command)"
+       relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $ECHO for shipping.
+      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+       case $progpath in
+       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+       esac
+       qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+       qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if not in dry run mode.
+      $opt_dry_run || {
+       # win32 will think the script is a binary if it has
+       # a .exe suffix, so we strip it off here.
+       case $output in
+         *.exe) func_stripname '' '.exe' "$output"
+                output=$func_stripname_result ;;
+       esac
+       # test for cygwin because mv fails w/o .exe extensions
+       case $host in
+         *cygwin*)
+           exeext=.exe
+           func_stripname '' '.exe' "$outputname"
+           outputname=$func_stripname_result ;;
+         *) exeext= ;;
+       esac
+       case $host in
+         *cygwin* | *mingw* )
+           func_dirname_and_basename "$output" "" "."
+           output_name=$func_basename_result
+           output_path=$func_dirname_result
+           cwrappersource="$output_path/$objdir/lt-$output_name.c"
+           cwrapper="$output_path/$output_name.exe"
+           $RM $cwrappersource $cwrapper
+           trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+           func_emit_cwrapperexe_src > $cwrappersource
+
+           # The wrapper executable is built using the $host compiler,
+           # because it contains $host paths and files. If cross-
+           # compiling, it, like the target executable, must be
+           # executed on the $host or under an emulation environment.
+           $opt_dry_run || {
+             $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+             $STRIP $cwrapper
+           }
+
+           # Now, create the wrapper script for func_source use:
+           func_ltwrapper_scriptname $cwrapper
+           $RM $func_ltwrapper_scriptname_result
+           trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+           $opt_dry_run || {
+             # note: this script will not be executed, so do not chmod.
+             if test "x$build" = "x$host" ; then
+               $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+             else
+               func_emit_wrapper no > $func_ltwrapper_scriptname_result
+             fi
+           }
+         ;;
+         * )
+           $RM $output
+           trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+           func_emit_wrapper no > $output
+           chmod +x $output
+         ;;
+       esac
+      }
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+       oldobjs="$libobjs_save $symfileobj"
+       addlibs="$convenience"
+       build_libtool_libs=no
+      else
+       if test "$build_libtool_libs" = module; then
+         oldobjs="$libobjs_save"
+         build_libtool_libs=no
+       else
+         oldobjs="$old_deplibs $non_pic_objects"
+         if test "$preload" = yes && test -f "$symfileobj"; then
+           oldobjs="$oldobjs $symfileobj"
+         fi
+       fi
+       addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+       gentop="$output_objdir/${outputname}x"
+       generated="$generated $gentop"
+
+       func_extract_archives $gentop $addlibs
+       oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+
+       # Add any objects from preloaded convenience libraries
+       if test -n "$dlprefiles"; then
+         gentop="$output_objdir/${outputname}x"
+         generated="$generated $gentop"
+
+         func_extract_archives $gentop $dlprefiles
+         oldobjs="$oldobjs $func_extract_archives_result"
+       fi
+
+       # POSIX demands no paths to be encoded in archives.  We have
+       # to avoid creating archives with duplicate basenames if we
+       # might have to extract them afterwards, e.g., when creating a
+       # static archive out of a convenience library, or when linking
+       # the entirety of a libtool archive into another (currently
+       # not supported by libtool).
+       if (for obj in $oldobjs
+           do
+             func_basename "$obj"
+             $ECHO "$func_basename_result"
+           done | sort | sort -uc >/dev/null 2>&1); then
+         :
+       else
+         $ECHO "copying selected object files to avoid basename conflicts..."
+         gentop="$output_objdir/${outputname}x"
+         generated="$generated $gentop"
+         func_mkdir_p "$gentop"
+         save_oldobjs=$oldobjs
+         oldobjs=
+         counter=1
+         for obj in $save_oldobjs
+         do
+           func_basename "$obj"
+           objbase="$func_basename_result"
+           case " $oldobjs " in
+           " ") oldobjs=$obj ;;
+           *[\ /]"$objbase "*)
+             while :; do
+               # Make sure we don't pick an alternate name that also
+               # overlaps.
+               newobj=lt$counter-$objbase
+               func_arith $counter + 1
+               counter=$func_arith_result
+               case " $oldobjs " in
+               *[\ /]"$newobj "*) ;;
+               *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+               esac
+             done
+             func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+             oldobjs="$oldobjs $gentop/$newobj"
+             ;;
+           *) oldobjs="$oldobjs $obj" ;;
+           esac
+         done
+       fi
+       eval cmds=\"$old_archive_cmds\"
+
+       func_len " $cmds"
+       len=$func_len_result
+       if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         cmds=$old_archive_cmds
+       else
+         # the command line is too long to link in one step, link in parts
+         func_verbose "using piecewise archive linking..."
+         save_RANLIB=$RANLIB
+         RANLIB=:
+         objlist=
+         concat_cmds=
+         save_oldobjs=$oldobjs
+         oldobjs=
+         # Is there a better way of finding the last object in the list?
+         for obj in $save_oldobjs
+         do
+           last_oldobj=$obj
+         done
+         eval test_cmds=\"$old_archive_cmds\"
+         func_len " $test_cmds"
+         len0=$func_len_result
+         len=$len0
+         for obj in $save_oldobjs
+         do
+           func_len " $obj"
+           func_arith $len + $func_len_result
+           len=$func_arith_result
+           func_append objlist " $obj"
+           if test "$len" -lt "$max_cmd_len"; then
+             :
+           else
+             # the above command should be used before it gets too long
+             oldobjs=$objlist
+             if test "$obj" = "$last_oldobj" ; then
+               RANLIB=$save_RANLIB
+             fi
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+             objlist=
+             len=$len0
+           fi
+         done
+         RANLIB=$save_RANLIB
+         oldobjs=$objlist
+         if test "X$oldobjs" = "X" ; then
+           eval cmds=\"\$concat_cmds\"
+         else
+           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+         fi
+       fi
+      fi
+      func_execute_cmds "$cmds" 'exit $?'
+    done
+
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      func_verbose "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+       if eval test -z \"\${$var+set}\"; then
+         relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+       elif eval var_value=\$$var; test -z "$var_value"; then
+         relink_command="$var=; export $var; $relink_command"
+       else
+         func_quote_for_eval "$var_value"
+         relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+       fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+       relink_command=
+      fi
+
+      # Only create the output if not a dry run.
+      $opt_dry_run || {
+       for installed in no yes; do
+         if test "$installed" = yes; then
+           if test -z "$install_libdir"; then
+             break
+           fi
+           output="$output_objdir/$outputname"i
+           # Replace all uninstalled libtool libraries with the installed ones
+           newdependency_libs=
+           for deplib in $dependency_libs; do
+             case $deplib in
+             *.la)
+               func_basename "$deplib"
+               name="$func_basename_result"
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$deplib' is not a valid libtool archive"
+               newdependency_libs="$newdependency_libs $libdir/$name"
+               ;;
+             *) newdependency_libs="$newdependency_libs $deplib" ;;
+             esac
+           done
+           dependency_libs="$newdependency_libs"
+           newdlfiles=
+
+           for lib in $dlfiles; do
+             case $lib in
+             *.la)
+               func_basename "$lib"
+               name="$func_basename_result"
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$lib' is not a valid libtool archive"
+               newdlfiles="$newdlfiles $libdir/$name"
+               ;;
+             *) newdlfiles="$newdlfiles $lib" ;;
+             esac
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+             *.la)
+               # Only pass preopened files to the pseudo-archive (for
+               # eventual linking with the app. that links it) if we
+               # didn't already link the preopened objects directly into
+               # the library:
+               func_basename "$lib"
+               name="$func_basename_result"
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$lib' is not a valid libtool archive"
+               newdlprefiles="$newdlprefiles $libdir/$name"
+               ;;
+             esac
+           done
+           dlprefiles="$newdlprefiles"
+         else
+           newdlfiles=
+           for lib in $dlfiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             newdlfiles="$newdlfiles $abs"
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             newdlprefiles="$newdlprefiles $abs"
+           done
+           dlprefiles="$newdlprefiles"
+         fi
+         $RM $output
+         # place dlname in correct position for cygwin
+         tdlname=$dlname
+         case $host,$output,$installed,$module,$dlname in
+           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+         esac
+         $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+         if test "$installed" = no && test "$need_relink" = yes; then
+           $ECHO >> $output "\
+relink_command=\"$relink_command\""
+         fi
+       done
+      }
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+    func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $opt_debug
+    RM="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) RM="$RM $arg"; rmforce=yes ;;
+      -*) RM="$RM $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      func_dirname "$file" "" "."
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
+       objdir="$origobjdir"
+      else
+       objdir="$dir/$origobjdir"
+      fi
+      func_basename "$file"
+      name="$func_basename_result"
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+       case " $rmdirs " in
+         *" $objdir "*) ;;
+         *) rmdirs="$rmdirs $objdir" ;;
+       esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if { test -L "$file"; } >/dev/null 2>&1 ||
+        { test -h "$file"; } >/dev/null 2>&1 ||
+        test -f "$file"; then
+       :
+      elif test -d "$file"; then
+       exit_status=1
+       continue
+      elif test "$rmforce" = yes; then
+       continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+       # Possibly a libtool archive, so verify it.
+       if func_lalib_p "$file"; then
+         func_source $dir/$name
+
+         # Delete the libtool libraries and symlinks.
+         for n in $library_names; do
+           rmfiles="$rmfiles $objdir/$n"
+         done
+         test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+         case "$mode" in
+         clean)
+           case "  $library_names " in
+           # "  " in the beginning catches empty $dlname
+           *" $dlname "*) ;;
+           *) rmfiles="$rmfiles $objdir/$dlname" ;;
+           esac
+           test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+           ;;
+         uninstall)
+           if test -n "$library_names"; then
+             # Do each command in the postuninstall commands.
+             func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+           fi
+
+           if test -n "$old_library"; then
+             # Do each command in the old_postuninstall commands.
+             func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+           fi
+           # FIXME: should reinstall the best remaining shared library.
+           ;;
+         esac
+       fi
+       ;;
+
+      *.lo)
+       # Possibly a libtool object, so verify it.
+       if func_lalib_p "$file"; then
+
+         # Read the .lo file
+         func_source $dir/$name
+
+         # Add PIC object to the list of files to remove.
+         if test -n "$pic_object" &&
+            test "$pic_object" != none; then
+           rmfiles="$rmfiles $dir/$pic_object"
+         fi
+
+         # Add non-PIC object to the list of files to remove.
+         if test -n "$non_pic_object" &&
+            test "$non_pic_object" != none; then
+           rmfiles="$rmfiles $dir/$non_pic_object"
+         fi
+       fi
+       ;;
+
+      *)
+       if test "$mode" = clean ; then
+         noexename=$name
+         case $file in
+         *.exe)
+           func_stripname '' '.exe' "$file"
+           file=$func_stripname_result
+           func_stripname '' '.exe' "$name"
+           noexename=$func_stripname_result
+           # $file with .exe has already been added to rmfiles,
+           # add $file without .exe
+           rmfiles="$rmfiles $file"
+           ;;
+         esac
+         # Do a test to see if this is a libtool program.
+         if func_ltwrapper_p "$file"; then
+           if func_ltwrapper_executable_p "$file"; then
+             func_ltwrapper_scriptname "$file"
+             relink_command=
+             func_source $func_ltwrapper_scriptname_result
+             rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+           else
+             relink_command=
+             func_source $dir/$noexename
+           fi
+
+           # note $name still contains .exe if it was in $file originally
+           # as does the version of $file that was added into $rmfiles
+           rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+           if test "$fast_install" = yes && test -n "$relink_command"; then
+             rmfiles="$rmfiles $objdir/lt-$name"
+           fi
+           if test "X$noexename" != "X$name" ; then
+             rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+           fi
+         fi
+       fi
+       ;;
+      esac
+      func_show_eval "$RM $rmfiles" 'exit_status=1'
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+       func_show_eval "rmdir $dir >/dev/null 2>&1"
+      fi
+    done
+
+    exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+  help="$generic_help"
+  func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+  func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+  eval exec "$exec_cmd"
+  exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
index b612e9a6d88c81d436e10c139e87c0e72f6e5bbe..b36c4ad366cbb8c137b19a3789eecf29af5aeb98 100755 (executable)
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -65,7 +65,7 @@
 #       compiler:              $LTCC
 #       compiler flags:                $LTCFLAGS
 #       linker:                $LD (gnu? $with_gnu_ld)
-#       $progname:             (GNU libtool) 2.2.6 Debian-2.2.6a-1ubuntu1
+#       $progname:             (GNU libtool) 2.2.6
 #       automake:              $automake_version
 #       autoconf:              $autoconf_version
 #
@@ -73,7 +73,7 @@
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION="2.2.6 Debian-2.2.6a-1ubuntu1"
+VERSION=2.2.6
 TIMESTAMP=""
 package_revision=1.3012
 
@@ -116,15 +116,15 @@ $lt_unset CDPATH
 
 : ${CP="cp -f"}
 : ${ECHO="echo"}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
+: ${EGREP="/usr/bin/grep -E"}
+: ${FGREP="/usr/bin/grep -F"}
+: ${GREP="/usr/bin/grep"}
 : ${LN_S="ln -s"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
-: ${SED="/bin/sed"}
+: ${SED="/opt/local/bin/gsed"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
 : ${Xsed="$SED -e 1s/^X//"}
 
@@ -5033,10 +5033,7 @@ func_mode_link ()
        case $pass in
        dlopen) libs="$dlfiles" ;;
        dlpreopen) libs="$dlprefiles" ;;
-       link)
-         libs="$deplibs %DEPLIBS%"
-         test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
-         ;;
+       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
        esac
       fi
       if test "$linkmode,$pass" = "lib,dlpreopen"; then
@@ -6209,9 +6206,6 @@ func_mode_link ()
            revision="$number_minor"
            lt_irix_increment=no
            ;;
-         *)
-           func_fatal_configuration "$modename: unknown library version type \`$version_type'"
-           ;;
          esac
          ;;
        no)
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
new file mode 100644 (file)
index 0000000..f1b6119
--- /dev/null
@@ -0,0 +1,592 @@
+dnl Helper Functions for the RRDtool configure.ac script
+dnl 
+dnl this file gets included into aclocal.m4 when runnning aclocal
+dnl
+dnl
+dnl
+dnl Check for the presence of a particular library and its header files
+dnl if this check fails set the environment variable EX_CHECK_ALL_ERR to YES
+dnl and prints out a helful message
+dnl
+dnl
+dnl EX_CHECK_ALL(library, function, header, pkgconf name, tested-version, homepage, cppflags)
+dnl              $1       $2        $3      $4            $5              $6        $7
+dnl
+dnl
+AC_DEFUN([EX_CHECK_ALL],
+[
+ AC_LANG_PUSH(C)
+ EX_CHECK_STATE=NO
+ ex_check_save_LIBS=${LIBS}
+ ex_check_save_CPPFLAGS=${CPPFLAGS}
+ ex_check_save_LDFLAGS=${LDFLAGS}
+ if test "x$7" != "x"; then
+   CPPFLAGS="$CPPFLAGS -I$7"
+ fi
+ dnl try compiling naked first
+ AC_CHECK_LIB($1,$2, [
+    AC_CHECK_HEADER($3,[LIBS="-l$1 ${LIBS}";EX_CHECK_STATE=YES],[])],[])
+ if test $EX_CHECK_STATE = NO; then
+    dnl now asking pkg-config for help
+    AC_CHECK_PROGS(PKGCONFIG,[pkg-config],no)
+    if test "$PKGCONFIG" != "no"; then
+          if $PKGCONFIG --exists $4; then
+             CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags $4`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L $4`
+             LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other $4`
+             LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l $4`
+            dnl remove the cached value and test again
+            unset ac_cv_lib_`echo $1 | sed ['s/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/']`_$2
+             AC_CHECK_LIB($1,$2,[
+                unset ac_cv_header_`echo $3 | sed ['s/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/']`
+                AC_CHECK_HEADER($3,[EX_CHECK_STATE=YES],[])
+            ],[])
+          else
+             AC_MSG_WARN([
+----------------------------------------------------------------------------
+* I found a copy of pkgconfig, but there is no $4.pc file around.
+  You may want to set the PKG_CONFIG_PATH variable to point to its
+  location.
+----------------------------------------------------------------------------
+                       ])
+           fi
+     fi
+  fi  
+
+  if test ${EX_CHECK_STATE} = NO; then
+     AC_MSG_WARN([
+----------------------------------------------------------------------------
+* I could not find a working copy of $4. Check config.log for hints on why
+  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
+  so that compiler and the linker can find lib$1 and its header files. If
+  you have not installed $4, you can get it either from its original home on
+
+     $6
+
+  You can find also find an archive copy on
+
+     http://oss.oetiker.ch/rrdtool/pub/libs
+
+  The last tested version of $4 is $5.
+
+       LIBS=$LIBS
+   LDFLAGS=$LDFLAGS
+  CPPFLAGS=$CPPFLAGS
+
+----------------------------------------------------------------------------
+                ])
+       EX_CHECK_ALL_ERR=YES
+       LIBS="${ex_check_save_LIBS}"
+       CPPFLAGS="${ex_check_save_CPPFLAGS}"
+       LDFLAGS="${ex_check_save_LDFLAGS}"
+    fi
+    AC_LANG_POP(C)
+]
+)
+
+dnl
+dnl  Ptherad check from http://autoconf-archive.cryp.to/acx_pthread.m4
+dnl
+dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+dnl
+dnl This macro figures out how to build C programs using POSIX threads.
+dnl It sets the PTHREAD_LIBS output variable to the threads library and
+dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
+dnl C compiler flags that are needed. (The user can also force certain
+dnl compiler flags/libs to be tested by setting these environment
+dnl variables.)
+dnl
+dnl Also sets PTHREAD_CC to any special C compiler that is needed for
+dnl multi-threaded programs (defaults to the value of CC otherwise).
+dnl (This is necessary on AIX to use the special cc_r compiler alias.)
+dnl
+dnl NOTE: You are assumed to not only compile your program with these
+dnl flags, but also link it with them as well. e.g. you should link
+dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
+dnl $LIBS
+dnl
+dnl If you are only building threads programs, you may wish to use
+dnl these variables in your default LIBS, CFLAGS, and CC:
+dnl
+dnl        LIBS="$PTHREAD_LIBS $LIBS"
+dnl        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+dnl        CC="$PTHREAD_CC"
+dnl
+dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
+dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
+dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+dnl
+dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
+dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
+dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
+dnl default action will define HAVE_PTHREAD.
+dnl
+dnl Please let the authors know if this macro fails on any platform, or
+dnl if you have any other suggestions or comments. This macro was based
+dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
+dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
+dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
+dnl We are also grateful for the helpful feedback of numerous users.
+dnl
+dnl @category InstalledPackages
+dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
+dnl @version 2005-01-14
+dnl @license GPLWithACException
+
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_PUSH(C)
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthread or
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+        ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $flag])
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+               pthread-config)
+               AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+               if test x"$acx_pthread_config" = xno; then continue; fi
+               PTHREAD_CFLAGS="`pthread-config --cflags`"
+               PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+               ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$flag])
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ]])],[acx_pthread_ok=yes],[])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+       AC_MSG_CHECKING([for joinable pthread attribute])
+       attr_name=unknown
+       for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+           AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[int attr=$attr;]])],[attr_name=$attr; break],[])
+       done
+        AC_MSG_RESULT($attr_name)
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+                               [Define to necessary symbol if this constant
+                                uses a non-standard name on your system.])
+        fi
+
+        AC_MSG_CHECKING([if more special flags are required for pthreads])
+        x_rflag=no
+        case "${host_cpu}-${host_os}" in
+            *-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";;
+            *solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";;
+            *-linux* | *-k*bsd*-gnu*)                
+            if test x"$PTHREAD_CFLAGS" = "x-pthread"; then
+                # For Linux/gcc "-pthread" implies "-lpthread". We need, however, to make this explicit
+                # in PTHREAD_LIBS such that a shared library to be built properly depends on libpthread.
+                PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
+            fi;;
+        esac
+        AC_MSG_RESULT(${x_rflag})
+        if test "x$x_rflag" != xno; then
+            PTHREAD_CFLAGS="$x_rflag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
+else
+        PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+        :
+else
+        acx_pthread_ok=no
+        $2
+fi
+AC_LANG_POP(C)
+])dnl ACX_PTHREAD
+
+
+dnl
+dnl determine how to get IEEE math working
+dnl AC_IEEE(MESSAGE, set rd_cv_ieee_[var] variable, INCLUDES,
+dnl   FUNCTION-BODY, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
+dnl
+
+dnl substitute them in all the files listed in AC_OUTPUT
+AC_SUBST(PERLFLAGS)
+
+AC_DEFUN([AC_IEEE], [
+AC_MSG_CHECKING([if IEEE math works $1])
+AC_CACHE_VAL([rd_cv_ieee_$2],
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[$3
+
+#if HAVE_MATH_H
+#  include <math.h>
+#endif
+
+#if HAVE_FLOAT_H
+#  include <float.h>  
+#endif
+
+#if HAVE_IEEEFP_H
+#  include <ieeefp.h>
+#endif
+
+#if HAVE_FP_CLASS_H
+#  include <fp_class.h>
+#endif
+
+/* Solaris */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF)
+#endif
+
+/* solaris 10 it defines isnan such that only forte can compile it ... bad bad  */
+#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS))
+#  undef isnan
+#  define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN)
+#endif
+
+/* Digital UNIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF)
+#endif 
+
+/* AIX */
+#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS))
+#  define HAVE_ISINF 1
+#  define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF)
+#endif
+
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF)
+#endif
+
+#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE))
+#  define HAVE_ISINF 1
+#  define isinf(a) (fpclassify(a) == FP_INFINITE)
+#endif
+
+#include <stdio.h>
+int main(void){
+    double rrdnan,rrdinf,rrdc,rrdzero;
+    $4;
+    /* some math to see if we get a floating point exception */
+    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
+    rrdnan=0.0/rrdzero; /* especially here */
+    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
+                 /* at run time without sig fpe */
+    rrdc = rrdinf + rrdnan;
+    rrdc = rrdinf / rrdnan;
+    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
+    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
+    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
+    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
+    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
+    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
+    return 0;
+ }]])],[rd_cv_ieee_$2=yes],[rd_cv_ieee_$2=no],[:])])
+dnl these we run regardles is cached or not
+if test x${rd_cv_ieee_$2} = "xyes"; then
+ AC_MSG_RESULT(yes)
+ $5
+else
+ AC_MSG_RESULT(no)
+ $6
+fi
+
+])
+
+AC_DEFUN([AC_FULL_IEEE],[
+AC_LANG_PUSH(C)
+_cflags=${CFLAGS}
+AC_IEEE([out of the box], works, , , ,
+  [CFLAGS="$_cflags -ieee"
+  AC_IEEE([with the -ieee switch], switch, , , ,
+    [CFLAGS="$_cflags -qfloat=nofold"
+    AC_IEEE([with the -qfloat=nofold switch], nofold, , , ,
+      [CFLAGS="$_cflags -w -qflttrap=enable:zerodivide"
+      AC_IEEE([with the -w -qflttrap=enable:zerodivide], flttrap, , , ,
+       [CFLAGS="$_cflags -mieee"
+       AC_IEEE([with the -mieee switch], mswitch, , , ,
+         [CFLAGS="$_cflags -q float=rndsngl"
+         AC_IEEE([with the -q float=rndsngl switch], qswitch, , , ,
+           [CFLAGS="$_cflags -OPT:IEEE_NaN_inf=ON"
+           AC_IEEE([with the -OPT:IEEE_NaN_inf=ON switch], ieeenaninfswitch, , , ,
+             [CFLAGS="$_cflags -OPT:IEEE_comparisons=ON"
+             AC_IEEE([with the -OPT:IEEE_comparisons=ON switch], ieeecmpswitch, , , ,
+               [CFLAGS=$_cflags
+               AC_IEEE([with fpsetmask(0)], mask,
+                 [#include <floatingpoint.h>], [fpsetmask(0)],
+                 [AC_DEFINE(MUST_DISABLE_FPMASK)
+                PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK"],
+                 [AC_IEEE([with signal(SIGFPE,SIG_IGN)], sigfpe,
+                   [#include <signal.h>], [signal(SIGFPE,SIG_IGN)],
+                   [AC_DEFINE(MUST_DISABLE_SIGFPE)
+                   PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE"],         
+                   AC_MSG_ERROR([
+Your Compiler does not do propper IEEE math ... Please find out how to
+make IEEE math work with your compiler and let me know (tobi@oetiker.ch).
+Check config.log to see what went wrong ...
+]))])])])])])])])])])
+
+AC_LANG_POP(C)
+
+])
+
+
+dnl a macro to check for ability to create python extensions
+dnl  AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for headers required to compile python extensions)
+dnl deduce PYTHON_INCLUDES
+py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
+])
+
+dnl a macro to add some color to the build process.
+dnl CONFIGURE_PART(MESSAGE)
+
+AC_DEFUN([CONFIGURE_PART],[
+case $TERM in
+       #   for the most important terminal types we directly know the sequences
+       xterm|xterm*|vt220|vt220*)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+       ;;
+       vt100|vt100*|cygwin)
+               T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+               T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+       ;;
+       *)
+               T_MD=''
+               T_ME=''
+       ;;
+esac
+  AC_MSG_RESULT()
+  AC_MSG_RESULT([${T_MD}$1${T_ME}])
+])
+
+dnl check 
+
+AC_DEFUN([CHECK_FOR_WORKING_MS_ASYNC], [
+AC_MSG_CHECKING([if msync with MS_ASYNC updates the files mtime])
+AC_CACHE_VAL([rd_cv_ms_async],
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/mman.h>
+#include <stdlib.h>
+#include <utime.h>
+int main(void){
+        int fd;
+        struct stat stbuf;
+        char *addr;
+        int res;
+        char temp[] = "mmaptestXXXXXX";
+        struct utimbuf newtime;
+
+        time_t create_ts;
+        fd = mkstemp(temp);
+        if (fd == -1){
+            perror(temp);
+            return 1;
+        }
+        write(fd,"12345\n", 6);        
+        stat(temp, &stbuf);
+        create_ts = stbuf.st_mtime;
+        newtime.actime = 0;
+        newtime.modtime = 0;
+        utime(temp,&newtime);
+        addr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+        if (addr == MAP_FAILED) {
+            perror("mmap");
+            goto bad_exit;
+        }
+        addr[0]='x';
+        res = msync(addr, 4, MS_ASYNC);
+        if (res == -1) {
+           perror("msync");
+           goto bad_exit;
+        }
+        res = close(fd);        
+        if (res == -1) {
+           perror("close");
+           goto bad_exit;
+        }
+        /* The ASYNC means that we schedule the msync and return immediately.
+           Since we want to see if the modification time is updated upon
+           msync(), we have to make sure that our asynchronous request
+           completes before we stat below. In a real application, the
+           request would be completed at a random time in the future
+           but for this test we do not want to wait an arbitrary amount of
+           time, so force a commit now.  */
+        sync();
+        stat(temp, &stbuf);
+        if (create_ts > stbuf.st_mtime){
+           goto bad_exit;
+        }      
+        unlink(temp);  
+        return 0;
+     bad_exit:
+        unlink(temp);
+        return 1;
+}
+]])],[rd_cv_ms_async=ok],[rd_cv_ms_async=broken],[:])])
+
+
+if test "${rd_cv_ms_async}" = "ok"; then
+ AC_MSG_RESULT(yes)
+else
+ AC_DEFINE_UNQUOTED(HAVE_BROKEN_MS_ASYNC, 1 , [set to 1 if msync with MS_ASYNC fails to update mtime])
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([With mmap access, your platform fails to update the files])
+ AC_MSG_WARN([mtime. RRDtool will work around this problem by calling utime on each])
+ AC_MSG_WARN([file it opens for rw access.])
+ sleep 2
+fi
+
+])
+
diff --git a/m4/codeset.m4 b/m4/codeset.m4
new file mode 100644 (file)
index 0000000..a6e67ec
--- /dev/null
@@ -0,0 +1,21 @@
+# codeset.m4 serial AM1 (gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+    [AC_TRY_LINK([#include <langinfo.h>],
+      [char* cs = nl_langinfo(CODESET);],
+      am_cv_langinfo_codeset=yes,
+      am_cv_langinfo_codeset=no)
+    ])
+  if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+  fi
+])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
new file mode 100644 (file)
index 0000000..624a807
--- /dev/null
@@ -0,0 +1,549 @@
+# gettext.m4 serial 37 (gettext-0.14.4)
+dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl    default (if it is not specified or empty) is 'no-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.  If NEEDSYMBOL is specified and is
+dnl    'need-formatstring-macros', then GNU gettext implementations that don't
+dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries.  If empty,
+dnl    the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+  dnl Argument checking.
+  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+  define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
+  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+
+  AC_REQUIRE([AM_PO_SUBDIRS])dnl
+  ifelse(gt_included_intl, yes, [
+    AC_REQUIRE([AM_INTL_SUBDIR])dnl
+  ])
+
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Sometimes libintl requires libiconv, so first search for libiconv.
+  dnl Ideally we would do this search only after the
+  dnl      if test "$USE_NLS" = "yes"; then
+  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl the configure script would need to contain the same shell code
+  dnl again, outside any 'if'. There are two solutions:
+  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+  dnl documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+  gt_INTL_MACOSX
+
+  dnl Set USE_NLS.
+  AM_NLS
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  dnl If we use NLS figure out what method
+  if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+    ifelse(gt_included_intl, yes, [
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH(included-gettext,
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+    ])
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
+
+        dnl Add a version number to the cache macros.
+        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
+        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
+        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
+
+        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+         [AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+            [bindtextdomain ("", "");
+return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
+            gt_cv_func_gnugettext_libc=yes,
+            gt_cv_func_gnugettext_libc=no)])
+
+        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+          dnl Sometimes libintl requires libiconv, so first search for libiconv.
+          ifelse(gt_included_intl, yes, , [
+            AM_ICONV_LINK
+          ])
+          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+          dnl even if libiconv doesn't exist.
+          AC_LIB_LINKFLAGS_BODY([intl])
+          AC_CACHE_CHECK([for GNU gettext in libintl],
+            gt_cv_func_gnugettext_libintl,
+           [gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+            dnl Now see whether libintl exists and does not depend on libiconv.
+            AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+              [bindtextdomain ("", "");
+return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+              gt_cv_func_gnugettext_libintl=yes,
+              gt_cv_func_gnugettext_libintl=no)
+            dnl Now see whether libintl exists and depends on libiconv.
+            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+                [bindtextdomain ("", "");
+return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+               [LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                gt_cv_func_gnugettext_libintl=yes
+               ])
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"])
+        fi
+
+        dnl If an already present or preinstalled GNU gettext() is found,
+        dnl use it.  But if this macro is used in GNU gettext, and GNU
+        dnl gettext is already preinstalled in libintl, we update this
+        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+        if test "$gt_cv_func_gnugettext_libc" = "yes" \
+           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+          dnl Reset the values set by searching for libintl.
+          LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+    ifelse(gt_included_intl, yes, [
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+          dnl GNU gettext is not found in the C library.
+          dnl Fall back on included GNU gettext library.
+          nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
+        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions to use GNU gettext tools.
+        CATOBJEXT=.gmo
+      fi
+    ])
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Some extra flags are needed during linking.
+        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [Define to 1 if translation of program messages to the user's native language
+   is requested.])
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  AC_MSG_CHECKING([whether to use NLS])
+  AC_MSG_RESULT([$USE_NLS])
+  if test "$USE_NLS" = "yes"; then
+    AC_MSG_CHECKING([where the gettext function comes from])
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    AC_MSG_RESULT([$gt_source])
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+        AC_MSG_CHECKING([how to link with libintl])
+        AC_MSG_RESULT([$LIBINTL])
+        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+      fi
+
+      dnl For backward compatibility. Some packages may be using this.
+      AC_DEFINE(HAVE_GETTEXT, 1,
+       [Define if the GNU gettext() function is already present or preinstalled.])
+      AC_DEFINE(HAVE_DCGETTEXT, 1,
+       [Define if the GNU dcgettext() function is already present or preinstalled.])
+    fi
+
+    dnl We need to process the po/ directory.
+    POSUB=po
+  fi
+
+  ifelse(gt_included_intl, yes, [
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(BUILD_INCLUDED_LIBINTL)
+    AC_SUBST(USE_INCLUDED_LIBINTL)
+    AC_SUBST(CATOBJEXT)
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST(DATADIRNAME)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST(INSTOBJEXT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST(GENCAT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+    AC_SUBST(INTLOBJS)
+
+    dnl Enable libtool support if the surrounding package wishes it.
+    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+  ])
+
+  dnl For backward compatibility. Some Makefiles may be using this.
+  INTLLIBS="$LIBINTL"
+  AC_SUBST(INTLLIBS)
+
+  dnl Make all documented variables known to autoconf.
+  AC_SUBST(LIBINTL)
+  AC_SUBST(LTLIBINTL)
+  AC_SUBST(POSUB)
+])
+
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+  AC_REQUIRE([gt_GLIBC2])dnl
+  AC_REQUIRE([AC_PROG_RANLIB])dnl
+  AC_REQUIRE([AC_ISC_POSIX])dnl
+  AC_REQUIRE([AC_HEADER_STDC])dnl
+  AC_REQUIRE([AC_C_CONST])dnl
+  AC_REQUIRE([bh_C_SIGNED])dnl
+  AC_REQUIRE([AC_C_INLINE])dnl
+  AC_REQUIRE([AC_TYPE_OFF_T])dnl
+  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+  AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
+  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
+  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
+  AC_REQUIRE([gt_TYPE_WINT_T])dnl
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_REQUIRE([gt_TYPE_INTMAX_T])
+  AC_REQUIRE([gt_PRINTF_POSIX])
+  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+  AC_REQUIRE([AC_FUNC_MMAP])dnl
+  AC_REQUIRE([gl_GLIBC21])dnl
+  AC_REQUIRE([gt_INTDIV0])dnl
+  AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
+  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
+  AC_REQUIRE([gt_INTTYPES_PRI])dnl
+  AC_REQUIRE([gl_XSIZE])dnl
+  AC_REQUIRE([gt_INTL_MACOSX])dnl
+
+  AC_CHECK_TYPE([ptrdiff_t], ,
+    [AC_DEFINE([ptrdiff_t], [long],
+       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+    ])
+  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
+mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
+strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
+__fsetlocking])
+
+  dnl Use the _snprintf function only if it is declared (because on NetBSD it
+  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
+  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+
+  dnl Use the *_unlocked functions only if they are declared.
+  dnl (because some of them were defined without being declared in Solaris
+  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+  dnl on Solaris 2.5.1 to run on Solaris 2.6).
+  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
+  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
+  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+
+  case $gt_cv_func_printf_posix in
+    *yes) HAVE_POSIX_PRINTF=1 ;;
+    *) HAVE_POSIX_PRINTF=0 ;;
+  esac
+  AC_SUBST([HAVE_POSIX_PRINTF])
+  if test "$ac_cv_func_asprintf" = yes; then
+    HAVE_ASPRINTF=1
+  else
+    HAVE_ASPRINTF=0
+  fi
+  AC_SUBST([HAVE_ASPRINTF])
+  if test "$ac_cv_func_snprintf" = yes; then
+    HAVE_SNPRINTF=1
+  else
+    HAVE_SNPRINTF=0
+  fi
+  AC_SUBST([HAVE_SNPRINTF])
+  if test "$ac_cv_func_wprintf" = yes; then
+    HAVE_WPRINTF=1
+  else
+    HAVE_WPRINTF=0
+  fi
+  AC_SUBST([HAVE_WPRINTF])
+
+  AM_ICONV
+  AM_LANGINFO_CODESET
+  if test $ac_cv_header_locale_h = yes; then
+    gt_LC_MESSAGES
+  fi
+
+  if test -n "$INTL_MACOSX_LIBS"; then
+    CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+  fi
+
+  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+  dnl because plural.y uses bison specific features. It requires at least
+  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+  dnl compile.
+  dnl bison is only needed for the maintainer (who touches plural.y). But in
+  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+  dnl the rule in general Makefile. Now, some people carelessly touch the
+  dnl files or have a broken "make" program, hence the plural.c rule will
+  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+  dnl present or too old.
+  AC_CHECK_PROGS([INTLBISON], [bison])
+  if test -z "$INTLBISON"; then
+    ac_verc_fail=yes
+  else
+    dnl Found it, now check the version.
+    AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+    esac
+    AC_MSG_RESULT([$ac_prog_version])
+  fi
+  if test $ac_verc_fail = yes; then
+    INTLBISON=:
+  fi
+])
+
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+  dnl Check for API introduced in MacOS X 10.2.
+  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+    gt_cv_func_CFPreferencesCopyAppValue,
+    [gt_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -framework CoreFoundation"
+     AC_TRY_LINK([#include <CFPreferences.h>],
+       [CFPreferencesCopyAppValue(NULL, NULL)],
+       [gt_cv_func_CFPreferencesCopyAppValue=yes],
+       [gt_cv_func_CFPreferencesCopyAppValue=no])
+     CPPFLAGS="$gt_save_CPPFLAGS"
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
+      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+  fi
+  dnl Check for API introduced in MacOS X 10.3.
+  AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
+    [gt_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -framework CoreFoundation"
+     AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
+       [gt_cv_func_CFLocaleCopyCurrent=yes],
+       [gt_cv_func_CFLocaleCopyCurrent=no])
+     CPPFLAGS="$gt_save_CPPFLAGS"
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
+      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+  AC_SUBST([INTL_MACOSX_LIBS])
+])
+
+
+dnl gt_CHECK_DECL(FUNC, INCLUDES)
+dnl Check whether a function is declared.
+AC_DEFUN([gt_CHECK_DECL],
+[
+  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
+    [AC_TRY_COMPILE([$2], [
+#ifndef $1
+  char *p = (char *) $1;
+#endif
+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
+  if test $ac_cv_have_decl_$1 = yes; then
+    gt_value=1
+  else
+    gt_value=0
+  fi
+  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
+    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/m4/glibc2.m4 b/m4/glibc2.m4
new file mode 100644 (file)
index 0000000..e8f5bfe
--- /dev/null
@@ -0,0 +1,30 @@
+# glibc2.m4 serial 1
+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.0 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gt_GLIBC2],
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
+      ac_cv_gnu_library_2,
+      [AC_EGREP_CPP([Lucky GNU user],
+       [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+  Lucky GNU user
+ #endif
+#endif
+       ],
+       ac_cv_gnu_library_2=yes,
+       ac_cv_gnu_library_2=no)
+      ]
+    )
+    AC_SUBST(GLIBC2)
+    GLIBC2="$ac_cv_gnu_library_2"
+  ]
+)
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
new file mode 100644 (file)
index 0000000..d95fd98
--- /dev/null
@@ -0,0 +1,30 @@
+# glibc21.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gl_GLIBC21],
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+      ac_cv_gnu_library_2_1,
+      [AC_EGREP_CPP([Lucky GNU user],
+       [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+       ],
+       ac_cv_gnu_library_2_1=yes,
+       ac_cv_gnu_library_2_1=no)
+      ]
+    )
+    AC_SUBST(GLIBC21)
+    GLIBC21="$ac_cv_gnu_library_2_1"
+  ]
+)
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644 (file)
index 0000000..654c415
--- /dev/null
@@ -0,0 +1,101 @@
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libiconv and not disabled its use
+  dnl via --without-libiconv-prefix, he wants to use it. The first
+  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+      [iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);],
+      am_cv_func_iconv=yes)
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+        [iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);],
+        am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes)
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+  AC_SUBST(LIBICONV)
+  AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+  AM_ICONV_LINK
+  if test "$am_cv_func_iconv" = yes; then
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL(am_cv_proto_iconv, [
+      AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+      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);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    AC_MSG_RESULT([$]{ac_t:-
+         }[$]am_cv_proto_iconv)
+    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+])
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
new file mode 100644 (file)
index 0000000..b8d7817
--- /dev/null
@@ -0,0 +1,70 @@
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+    gt_cv_int_divbyzero_sigfpe,
+    [
+      AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
+  exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+  signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+  signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL.  */
+#if defined (__sparc__) && defined (__linux__)
+  signal (SIGILL, sigfpe_handler);
+#endif
+
+  z = x / y;
+  nan = y / y;
+  exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+        [
+          # Guess based on the CPU.
+          case "$host_cpu" in
+            alpha* | i[34567]86 | m68k | s390*)
+              gt_cv_int_divbyzero_sigfpe="guessing yes";;
+            *)
+              gt_cv_int_divbyzero_sigfpe="guessing no";;
+          esac
+        ])
+    ])
+  case "$gt_cv_int_divbyzero_sigfpe" in
+    *yes) value=1;;
+    *) value=0;;
+  esac
+  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+    [Define if integer division by zero raises signal SIGFPE.])
+])
diff --git a/m4/intmax.m4 b/m4/intmax.m4
new file mode 100644 (file)
index 0000000..d99c999
--- /dev/null
@@ -0,0 +1,30 @@
+# intmax.m4 serial 2 (gettext-0.14.2)
+dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
+dnl find a replacement if it is lacking.
+
+AC_DEFUN([gt_TYPE_INTMAX_T],
+[
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
+    [AC_TRY_COMPILE([
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
+  if test $gt_cv_c_intmax_t = yes; then
+    AC_DEFINE(HAVE_INTMAX_T, 1,
+      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
new file mode 100644 (file)
index 0000000..4d56a9a
--- /dev/null
@@ -0,0 +1,30 @@
+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values.  This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+  AC_REQUIRE([gt_HEADER_INTTYPES_H])
+  if test $gt_cv_header_inttypes_h = yes; then
+    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+      gt_cv_inttypes_pri_broken,
+      [
+        AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+      ])
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+  fi
+])
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
new file mode 100644 (file)
index 0000000..779bcea
--- /dev/null
@@ -0,0 +1,25 @@
+# inttypes.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+  [
+    AC_TRY_COMPILE(
+      [#include <sys/types.h>
+#include <inttypes.h>],
+      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+  ])
+  if test $gt_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+  fi
+])
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
new file mode 100644 (file)
index 0000000..a5d075d
--- /dev/null
@@ -0,0 +1,26 @@
+# inttypes_h.m4 serial 6
+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+#include <inttypes.h>],
+    [uintmax_t i = (uintmax_t) -1;],
+    gl_cv_header_inttypes_h=yes,
+    gl_cv_header_inttypes_h=no)])
+  if test $gl_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff --git a/m4/isc-posix.m4 b/m4/isc-posix.m4
new file mode 100644 (file)
index 0000000..74dc8f2
--- /dev/null
@@ -0,0 +1,24 @@
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+  [
+    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+  ]
+)
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
new file mode 100644 (file)
index 0000000..19aa77e
--- /dev/null
@@ -0,0 +1,30 @@
+# lcmessage.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([gt_LC_MESSAGES],
+[
+  AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
+    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+       gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
+  if test $gt_cv_val_LC_MESSAGES = yes; then
+    AC_DEFINE(HAVE_LC_MESSAGES, 1,
+      [Define if your <locale.h> file defines LC_MESSAGES.])
+  fi
+])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
new file mode 100644 (file)
index 0000000..96c4e2c
--- /dev/null
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]* | [A-Za-z]:[\\/]*)]
+      [re_direlt='/[^/][^/]*/\.\./']
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break ;;
+      *)
+       test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
new file mode 100644 (file)
index 0000000..ea0b0c4
--- /dev/null
@@ -0,0 +1,553 @@
+# lib-link.m4 serial 6 (gettext-0.14.3)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.50)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIB[]NAME"
+    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE(rpath,
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib$1-prefix],
+[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
+  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]NAME=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='$1 $2'
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+        dnl or AC_LIB_HAVE_LINKFLAGS call.
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+          else
+            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+            dnl that this library doesn't exist. So just drop it.
+            :
+          fi
+        else
+          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+          dnl and the already constructed $LIBNAME/$LTLIBNAME.
+          found_dir=
+          found_la=
+          found_so=
+          found_a=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIB[]NAME; do
+              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+            dnl Found the library.
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+              dnl Linking with a shared library. We attempt to hardcode its
+              dnl directory into the executable's runpath, unless it's the
+              dnl standard /usr/lib.
+              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+                dnl No hardcoding is needed.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+              else
+                dnl Use an explicit option to hardcode DIR into the resulting
+                dnl binary.
+                dnl Potentially add DIR to ltrpathdirs.
+                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                dnl The hardcoding into $LIBNAME is system dependent.
+                if test "$hardcode_direct" = yes; then
+                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+                  dnl resulting binary.
+                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                    dnl Use an explicit option to hardcode DIR into the resulting
+                    dnl binary.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    dnl Potentially add DIR to rpathdirs.
+                    dnl The rpathdirs will be appended to $LIBNAME at the end.
+                    haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                    dnl Rely on "-L$found_dir".
+                    dnl But don't add it if it's already contained in the LDFLAGS
+                    dnl or the already constructed $LIBNAME
+                    haveit=
+                    for x in $LDFLAGS $LIB[]NAME; do
+                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+                    fi
+                    if test "$hardcode_minus_L" != no; then
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    else
+                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+                      dnl here, because this doesn't fit in flags passed to the
+                      dnl compiler. So give up. No hardcoding. This affects only
+                      dnl very old systems.
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                dnl Linking with a static library.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+              else
+                dnl We shouldn't come here, but anyway it's good to have a
+                dnl fallback.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+              fi
+            fi
+            dnl Assume the include files are nearby.
+            additional_includedir=
+            case "$found_dir" in
+              */lib | */lib/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+              dnl Potentially add $additional_includedir to $INCNAME.
+              dnl But don't add it
+              dnl   1. if it's the standard /usr/include,
+              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
+              dnl   3. if it's already present in $CPPFLAGS or the already
+              dnl      constructed $INCNAME,
+              dnl   4. if it doesn't exist as a directory.
+              if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INC[]NAME; do
+                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                      dnl Really add $additional_includedir to $INCNAME.
+                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+            dnl Look for dependencies.
+            if test -n "$found_la"; then
+              dnl Read the .la file. It defines the variables
+              dnl dlname, library_names, old_library, dependency_libs, current,
+              dnl age, revision, installed, dlopen, dlpreopen, libdir.
+              save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+              dnl We use only dependency_libs.
+              for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+                    dnl But don't add it
+                    dnl   1. if it's the standard /usr/lib,
+                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
+                    dnl   3. if it's already present in $LDFLAGS or the already
+                    dnl      constructed $LIBNAME,
+                    dnl   4. if it doesn't exist as a directory.
+                    if test "X$additional_libdir" != "X/usr/lib"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                      dnl Potentially add DIR to rpathdirs.
+                      dnl The rpathdirs will be appended to $LIBNAME at the end.
+                      haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                      dnl Potentially add DIR to ltrpathdirs.
+                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                      haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                    dnl Handle this in the next round.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                    dnl Handle this in the next round. Throw away the .la's
+                    dnl directory; it is already contained in a preceding -L
+                    dnl option.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                    dnl Most likely an immediate library name.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+            dnl Didn't find the library; assume it is in the system directories
+            dnl known to the linker and runtime loader. (All the system
+            dnl directories known to the linker should also be known to the
+            dnl runtime loader, otherwise the system is severely misconfigured.)
+            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$hardcode_libdir_separator"; then
+      dnl Weird platform: only the last -rpath option counts, the user must
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
new file mode 100644 (file)
index 0000000..0d895ca
--- /dev/null
@@ -0,0 +1,153 @@
+# lib-prefix.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib-prefix],
+[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/lib"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/lib"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
diff --git a/m4/libtool.m4 b/m4/libtool.m4
new file mode 100644 (file)
index 0000000..39ba996
--- /dev/null
@@ -0,0 +1,7357 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+       [m4_default([$3],
+                  [m4_fatal([Libtool version $1 or higher is required],
+                            63)])],
+       [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+  *\ * | *\    *)
+    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    _LT_PATH_MAGIC
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME.  Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+       [m4_ifval([$1], [$1], [$2])])
+    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+    m4_ifval([$4],
+       [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+    lt_dict_add_subkey([lt_decl_dict], [$2],
+       [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+  [0], [m4_fatal([$0: too few arguments: $#])],
+  [1], [m4_fatal([$0: too few arguments: $#: $1])],
+  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_if([$2], [],
+          m4_quote(lt_decl_varnames),
+       m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+                       lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'.  VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly.  In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+#    # Some comment about what VAR is for.
+#    visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+                                          [description])))[]dnl
+m4_pushdef([_libtool_name],
+    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+    [0], [_libtool_name=[$]$1],
+    [1], [_libtool_name=$lt_[]$1],
+    [2], [_libtool_name=$lt_[]$1],
+    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'.  Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+       dnl If the libtool generation code has been placed in $CONFIG_LT,
+       dnl instead of duplicating it all over again into config.status,
+       dnl then we will have config.status run $CONFIG_LT later, so it
+       dnl needs to know what name is stored there:
+        [AC_CONFIG_COMMANDS([libtool],
+            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+    dnl If the libtool generation code is destined for config.status,
+    dnl expand the accumulated commands and init code now:
+    [AC_CONFIG_COMMANDS([libtool],
+        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+  ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+  case $[1] in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+    *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure.  Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+  lt_cl_success=:
+  test "$silent" = yes &&
+    lt_config_lt_args="$lt_config_lt_args --quiet"
+  exec AS_MESSAGE_LOG_FD>/dev/null
+  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+  exec AS_MESSAGE_LOG_FD>>config.log
+  $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars.  Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+  m4_if(_LT_TAG, [C], [
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+  _LT_PROG_LTMAIN
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  _LT_PROG_XSI_SHELLFNS
+
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+  [C],                 [_LT_LANG(C)],
+  [C++],               [_LT_LANG(CXX)],
+  [Java],              [_LT_LANG(GCJ)],
+  [Fortran 77],                [_LT_LANG(F77)],
+  [Fortran],           [_LT_LANG(FC)],
+  [Windows Resource],  [_LT_LANG(RC)],
+  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+    [_LT_LANG($1)],
+    [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+  [LT_SUPPORTED_TAG([$1])dnl
+  m4_append([_LT_TAGS], [$1 ])dnl
+  m4_define([_LT_LANG_]$1[_enabled], [])dnl
+  _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+  [LT_LANG(CXX)],
+  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+  [LT_LANG(F77)],
+  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+  [LT_LANG(FC)],
+  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+  [LT_LANG(GCJ)],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+    [LT_LANG(GCJ)],
+    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+      [LT_LANG(GCJ)],
+      [m4_ifdef([AC_PROG_GCJ],
+       [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([A][M_PROG_GCJ],
+       [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([LT_PROG_GCJ],
+       [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+  [LT_LANG(RC)],
+  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+    AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+    _LT_DECL([], [DSYMUTIL], [1],
+      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+    _LT_DECL([], [NMEDIT], [1],
+      [Tool to change global to local symbols on Mac OS X])
+    _LT_DECL([], [LIPO], [1],
+      [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+      [lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+       # By default we will add the -single_module flag. You can override
+       # by either setting the environment variable LT_MULTI_MODULE
+       # non-empty at configure time, or by adding -multi_module to the
+       # link flags.
+       rm -rf libconftest.dylib*
+       echo "int foo(void){return 1;}" > conftest.c
+       echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+       $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+         -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+       if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+         lt_cv_apple_cc_single_mod=yes
+       else
+         cat conftest.err >&AS_MESSAGE_LOG_FD
+       fi
+       rm -rf libconftest.dylib*
+       rm -f conftest.*
+      fi])
+    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+      [lt_cv_ld_exported_symbols_list],
+      [lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+       [lt_cv_ld_exported_symbols_list=yes],
+       [lt_cv_ld_exported_symbols_list=no])
+       LDFLAGS="$save_LDFLAGS"
+    ])
+    case $host_os in
+    rhapsody* | darwin1.[[012]])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+       10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+       10.[[012]]*)
+         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+       10.*)
+         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_automatic, $1)=yes
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  _LT_TAGVAR(link_all_deplibs, $1)=yes
+  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    m4_if([$1], [CXX],
+[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+],[])
+  else
+  _LT_TAGVAR(ld_shlibs, $1)=no
+  fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+       /^0/ {
+           s/^0  *\(.*\)$/\1/
+           p
+       }
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+            [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+        [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<_LT_EOF
+[$]*
+_LT_EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+  if test "X${echo_test_string+set}" != Xset; then
+    # find a string as large as possible, as long as the shell can cope with it
+    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+        { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+      then
+        break
+      fi
+    done
+  fi
+
+  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+     test "X$echo_testing_string" = "X$echo_test_string"; then
+    :
+  else
+    # The Solaris, AIX, and Digital Unix default echo programs unquote
+    # backslashes.  This makes it impossible to quote backslashes using
+    #   echo "$something" | sed 's/\\/\\\\/g'
+    #
+    # So, first we look for a working echo in the user's PATH.
+
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
+    IFS="$lt_save_ifs"
+
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+          test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+      else
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+          echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+          test "X$echo_testing_string" = "X$echo_test_string"; then
+         # Cool, printf works
+         :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+            test "X$echo_testing_string" = 'X\t' &&
+            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+            test "X$echo_testing_string" = "X$echo_test_string"; then
+         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+         export CONFIG_SHELL
+         SHELL="$CONFIG_SHELL"
+         export SHELL
+         ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+            test "X$echo_testing_string" = 'X\t' &&
+            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+            test "X$echo_testing_string" = "X$echo_test_string"; then
+         ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        else
+         # maybe with a smaller string...
+         prev=:
+
+         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+           if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+           then
+             break
+           fi
+           prev="$cmd"
+         done
+
+         if test "$prev" != 'sed 50q "[$]0"'; then
+           echo_test_string=`eval $prev`
+           export echo_test_string
+           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+         else
+           # Oops.  We lost completely, so just stick with echo.
+           ECHO=echo
+         fi
+        fi
+      fi
+    fi
+  fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+    [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+  [AS_HELP_STRING([--disable-libtool-lock],
+    [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+       HPUX_IA64_MODE="32"
+       ;;
+      *ELF-64*)
+       HPUX_IA64_MODE="64"
+       ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+       *32-bit*)
+         LD="${LD-ld} -melf32bsmip"
+         ;;
+       *N32*)
+         LD="${LD-ld} -melf32bmipn32"
+         ;;
+       *64-bit*)
+         LD="${LD-ld} -melf64bmip"
+       ;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+       *32-bit*)
+         LD="${LD-ld} -32"
+         ;;
+       *N32*)
+         LD="${LD-ld} -n32"
+         ;;
+       *64-bit*)
+         LD="${LD-ld} -64"
+         ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+       case $host in
+         x86_64-*kfreebsd*-gnu)
+           LD="${LD-ld} -m elf_i386_fbsd"
+           ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_i386"
+           ;;
+         ppc64-*linux*|powerpc64-*linux*)
+           LD="${LD-ld} -m elf32ppclinux"
+           ;;
+         s390x-*linux*)
+           LD="${LD-ld} -m elf_s390"
+           ;;
+         sparc64-*linux*)
+           LD="${LD-ld} -m elf32_sparc"
+           ;;
+       esac
+       ;;
+      *64-bit*)
+       case $host in
+         x86_64-*kfreebsd*-gnu)
+           LD="${LD-ld} -m elf_x86_64_fbsd"
+           ;;
+         x86_64-*linux*)
+           LD="${LD-ld} -m elf_x86_64"
+           ;;
+         ppc*-*linux*|powerpc*-*linux*)
+           LD="${LD-ld} -m elf64ppc"
+           ;;
+         s390*-*linux*|s390*-*tpf*)
+           LD="${LD-ld} -m elf64_s390"
+           ;;
+         sparc*-*linux*)
+           LD="${LD-ld} -m elf64_sparc"
+           ;;
+       esac
+       ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+       if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+         LD="${LD-ld} -64"
+       fi
+       ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+    [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+    [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#              [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$5], , :, [$5])
+else
+    m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                  [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$4], , :, [$4])
+else
+    m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+                = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+             test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL          RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL                DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL                0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW         DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW       RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW     DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW     0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}]
+_LT_EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+    ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+         [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+           [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+       [AC_CHECK_FUNC([dlopen],
+             [lt_cv_dlopen="dlopen"],
+         [AC_CHECK_LIB([dl], [dlopen],
+               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+           [AC_CHECK_LIB([svld], [dlopen],
+                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+             [AC_CHECK_LIB([dld], [dld_link],
+                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+             ])
+           ])
+         ])
+       ])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+         lt_cv_dlopen_self, [dnl
+         _LT_TRY_DLOPEN_SELF(
+           lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+           lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+         lt_cv_dlopen_self_static, [dnl
+         _LT_TRY_DLOPEN_SELF(
+           lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+           lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+        [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+        [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+        [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+       [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+         [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+    [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      AC_MSG_RESULT([yes])
+    else
+      AC_MSG_RESULT([no])
+    fi
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+       [], [
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[[4-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+          echo ' yes '
+          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+       :
+      else
+       can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    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'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[[3-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       else
+               version_type=irix
+       fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+       [shlibpath_overrides_runpath=yes])])
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+       shlibpath_overrides_runpath=no
+       ;;
+      *)
+       shlibpath_overrides_runpath=yes
+       ;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+       ;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+    [Variables whose values should be saved in libtool wrapper scripts and
+    restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+    [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+    [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+    [[List of archive names.  First name is the real one, the rest are links.
+    The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+    [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+    [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+    [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+    [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+    [[As "finish_cmds", except a single script fragment to be evaled but
+    not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+    [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+    [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+    [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="m4_if([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+       case $deplibs_check_method in
+       "file_magic "*)
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+           $EGREP "$file_magic_regex" > /dev/null; then
+           :
+         else
+           cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+         fi ;;
+       esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+        [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+       [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break
+       ;;
+      *)
+       test "$with_gnu_ld" != yes && break
+       ;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [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]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[[3-9]]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    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]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+    [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+    [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+       # Check to see if the nm accepts a BSD-compat flag.
+       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       #   nm: unknown option "B" ignored
+       # Tru64's nm complains that /dev/null is an invalid object file
+       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+       */dev/null* | *'Invalid file or object type'*)
+         lt_cv_path_NM="$tmp_nm -B"
+         break
+         ;;
+       *)
+         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+         */dev/null*)
+           lt_cv_path_NM="$tmp_nm -p"
+           break
+           ;;
+         *)
+           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+           continue # so that we can try to find one that supports BSD flags
+           ;;
+         esac
+         ;;
+       esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  AC_SUBST([DUMPBIN])
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+  [lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  cat conftest.out >&AS_MESSAGE_LOG_FD
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+       [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK ['"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx]"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[    ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+       mv -f "$nlist"T "$nlist"
+      else
+       rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+       if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+         cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+         # Now generate the symbol file.
+         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+         cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+const struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+         cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+         # Now try linking the two files.
+         mv conftest.$ac_objext conftstm.$ac_objext
+         lt_save_LIBS="$LIBS"
+         lt_save_CFLAGS="$CFLAGS"
+         LIBS="conftstm.$ac_objext"
+         CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+         if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+           pipe_works=yes
+         fi
+         LIBS="$lt_save_LIBS"
+         CFLAGS="$lt_save_CFLAGS"
+       else
+         echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+       fi
+      else
+       echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+    [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+    [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+    [lt_cv_sys_global_symbol_to_c_name_address], [1],
+    [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+    [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+       ;;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       ;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[[4-9]]*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+         # AIX 5 now supports IA64 processor
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       else
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+      chorus*)
+       case $cc_basename in
+       cxch68*)
+         # Green Hills C++ Compiler
+         # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+         ;;
+       esac
+       ;;
+      dgux*)
+       case $cc_basename in
+         ec++*)
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           ;;
+         ghcx*)
+           # Green Hills C++ Compiler
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      freebsd* | dragonfly*)
+       # FreeBSD uses GNU C++
+       ;;
+      hpux9* | hpux10* | hpux11*)
+       case $cc_basename in
+         CC*)
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+           if test "$host_cpu" != ia64; then
+             _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+           fi
+           ;;
+         aCC*)
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+           case $host_cpu in
+           hppa*64*|ia64*)
+             # +Z the default
+             ;;
+           *)
+             _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+             ;;
+           esac
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      interix*)
+       # This is c89, which is MS Visual C++ (no shared libs)
+       # Anyone wants to do a port?
+       ;;
+      irix5* | irix6* | nonstopux*)
+       case $cc_basename in
+         CC*)
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           # CC pic flag -KPIC is the default.
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      linux* | k*bsd*-gnu)
+       case $cc_basename in
+         KCC*)
+           # KAI C++ Compiler
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+           ;;
+         ecpc* )
+           # old Intel C++ for x86_64 which still supported -KPIC.
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+           ;;
+         icpc* )
+           # Intel C++, used to be incompatible with GCC.
+           # ICC 10 doesn't accept -KPIC any more.
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+           ;;
+         pgCC* | pgcpp*)
+           # Portland Group C++ compiler
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           ;;
+         cxx*)
+           # Compaq C++
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           ;;
+         xlc* | xlC*)
+           # IBM XL 8.0 on PPC
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+           ;;
+         *)
+           case `$CC -V 2>&1 | sed 5q` in
+           *Sun\ C*)
+             # Sun C++ 5.9
+             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+             ;;
+           esac
+           ;;
+       esac
+       ;;
+      lynxos*)
+       ;;
+      m88k*)
+       ;;
+      mvs*)
+       case $cc_basename in
+         cxx*)
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      netbsd*)
+       ;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+       case $cc_basename in
+         KCC*)
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+           ;;
+         RCC*)
+           # Rational C++ 2.4.1
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         cxx*)
+           # Digital/Compaq C++
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      psos*)
+       ;;
+      solaris*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.2, 5.x and Centerline C++
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+           ;;
+         gcx*)
+           # Green Hills C++ Compiler
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sunos4*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.x
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           ;;
+         lcc*)
+           # Lucid
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+       case $cc_basename in
+         CC*)
+           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           ;;
+       esac
+       ;;
+      tandem*)
+       case $cc_basename in
+         NCC*)
+           # NonStop-UX NCC 3.20
+           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      vxworks*)
+       ;;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+       ;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+       # +Z the default
+       ;;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       ;;
+      esac
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      m4_if([$1], [GCJ], [],
+       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+       ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      xl*)
+       # IBM XL C 8.0/Fortran 10.1 on PPC
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+       ;;
+      *)
+       case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ C*)
+         # Sun C 5.9
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         ;;
+       *Sun\ F*)
+         # Sun Fortran 8.3 passes all unrecognized flags to the linker
+         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+         _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+         ;;
+       esac
+       ;;
+      esac
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+       [How to pass a linker flag through the compiler])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+       [Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+       [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix[[4-9]]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      _LT_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'
+    else
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw* | cegcc*)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+  runpath_var=
+  _LT_TAGVAR(allow_undefined_flag, $1)=
+  _LT_TAGVAR(always_export_symbols, $1)=no
+  _LT_TAGVAR(archive_cmds, $1)=
+  _LT_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_TAGVAR(compiler_needs_object, $1)=no
+  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(hardcode_automatic, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(inherit_rpath, $1)=no
+  _LT_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_TAGVAR(module_cmds, $1)=
+  _LT_TAGVAR(module_expsym_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[[3-9]]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=no
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
+       else
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+       _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    interix[[3-9]]*)
+      _LT_TAGVAR(hardcode_direct, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+       case $cc_basename in
+         diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
+       esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+        && test "$tmp_diet" = no
+      then
+       tmp_addflag=
+       tmp_sharedflag='-shared'
+       case $cc_basename,$host_cpu in
+        pgcc*)                         # Portland Group C compiler
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       lf95*)                          # Lahey Fortran 8.1
+         _LT_TAGVAR(whole_archive_flag_spec, $1)=
+         tmp_sharedflag='--shared' ;;
+       xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
+         tmp_sharedflag='-qmkshrobj'
+         tmp_addflag= ;;
+       esac
+       case `$CC -V 2>&1 | sed 5q` in
+       *Sun\ C*)                       # Sun C 5.9
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+         _LT_TAGVAR(compiler_needs_object, $1)=yes
+         tmp_sharedflag='-G' ;;
+       *Sun\ F*)                       # Sun Fortran 8.3
+         tmp_sharedflag='-G' ;;
+       esac
+       _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+           echo "local: *; };" >> $output_objdir/$libname.ver~
+           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+       case $cc_basename in
+       xlf*)
+         # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+         _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+         if test "x$supports_anon_versioning" = xyes; then
+           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+             echo "local: *; };" >> $output_objdir/$libname.ver~
+             $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+         fi
+         ;;
+       esac
+      else
+        _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+       ;;
+       *)
+         # For security reasons, it is highly recommended that you always
+         # use absolute paths for naming shared libraries, and exclude the
+         # DT_RUNPATH tag from executables and libraries.  But doing so
+         # requires that you compile everything twice, which is a pain.
+         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         else
+           _LT_TAGVAR(ld_shlibs, $1)=no
+         fi
+       ;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       _LT_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix[[4-9]]*)
+      if test "$host_cpu" = ia64; then
+       # On IA64, the linker does run time linking by default, so we don't
+       # have to do anything special.
+       aix_use_runtimelinking=no
+       exp_sym_flag='-Bexport'
+       no_entry_flag=""
+      else
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+         _LT_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'
+       else
+         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+       fi
+       aix_use_runtimelinking=no
+
+       # Test if we are trying to use run time linking or normal
+       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+       # need to do runtime linking.
+       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+         for ld_flag in $LDFLAGS; do
+         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+           aix_use_runtimelinking=yes
+           break
+         fi
+         done
+         ;;
+       esac
+
+       exp_sym_flag='-bexport'
+       no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_TAGVAR(archive_cmds, $1)=''
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+      if test "$GCC" = yes; then
+       case $host_os in aix4.[[012]]|aix4.[[012]].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" &&
+          strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+         :
+         else
+         # We have old collect2
+         _LT_TAGVAR(hardcode_direct, $1)=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         _LT_TAGVAR(hardcode_minus_L, $1)=yes
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+         _LT_TAGVAR(hardcode_libdir_separator, $1)=
+         fi
+         ;;
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag="$shared_flag "'${wl}-G'
+       fi
+      else
+       # not using gcc
+       if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+       else
+         if test "$aix_use_runtimelinking" = yes; then
+           shared_flag='${wl}-G'
+         else
+           shared_flag='${wl}-bM:SRE'
+         fi
+       fi
+      fi
+
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+       # Warning - without using the other runtime loading flags (-brtl),
+       # -berok will link without error, but may produce a broken library.
+       _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        _LT_SYS_MODULE_PATH_AIX
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+       if test "$host_cpu" = ia64; then
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+         _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        _LT_SYS_MODULE_PATH_AIX
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+         # Warning - without using the other run time loading flags,
+         # -berok will link without error, but may produce a broken library.
+         _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+         # Exported symbols can be pulled into shared objects from archives
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+         _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
+
+    dgux*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+       _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case $host_cpu in
+       hppa*64*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       case $host_cpu in
+       hppa*64*|ia64*)
+         _LT_TAGVAR(hardcode_direct, $1)=no
+         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+         ;;
+       *)
+         _LT_TAGVAR(hardcode_direct, $1)=yes
+         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         _LT_TAGVAR(hardcode_minus_L, $1)=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       # Try to use the -exported_symbol ld option, if it does not
+       # work, assume that -exports_file does not work either and
+       # implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        AC_LINK_IFELSE(int foo(void) {},
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+        )
+        LDFLAGS="$save_LDFLAGS"
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(inherit_rpath, $1)=yes
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+       _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       else
+         case $host_os in
+          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+            _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+            ;;
+          *)
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+            ;;
+         esac
+       fi
+      else
+       _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+       _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+      if test "$GCC" = yes; then
+       wlarc='${wl}'
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+       case `$CC -V 2>&1` in
+       *"Compilers 5.0"*)
+         wlarc=''
+         _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+         ;;
+       *)
+         wlarc='${wl}'
+         _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+         ;;
+       esac
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+       # The compiler driver will combine and reorder linker options,
+       # but understands `-z linker_flag'.  GCC discards it without `$wl',
+       # but is careful enough not to reorder.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       if test "$GCC" = yes; then
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+       else
+         _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+       fi
+       ;;
+      esac
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+         _LT_TAGVAR(hardcode_direct, $1)=no
+        ;;
+       motorola)
+         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       _LT_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+       ;;
+      esac
+    fi
+  fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+    [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+       pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+        _LT_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+        then
+         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+         _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+    [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+    [enable_shared_with_static_runtimes], [0],
+    [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+    [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+    [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+    [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+    [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+    [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+    [Commands used to build a loadable module if different from building
+    a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+    [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+    [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+    [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+    [Flag to hardcode $libdir into a binary during linking.
+    This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+    [[If ld is used when linking, flag to hardcode $libdir into a binary
+    during linking.  This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+    [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary and the resulting library dependency is
+    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+    [Set to "yes" if building a shared library automatically hardcodes DIR
+    into the library and all subsequent libraries and executables linked
+    against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+    [Set to yes if linker adds runtime paths of dependent libraries
+    to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+    [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+    [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+    [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+    [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+    [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+    [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+    [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+    [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl    [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_SYS_DYNAMIC_LINKER($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
+  _LT_CMD_STRIPLIB
+
+  # Report which library types will actually be built
+  AC_MSG_CHECKING([if libtool supports shared libraries])
+  AC_MSG_RESULT([$can_build_shared])
+
+  AC_MSG_CHECKING([whether to build shared libraries])
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[[4-9]]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  AC_MSG_RESULT([$enable_shared])
+
+  AC_MSG_CHECKING([whether to build static libraries])
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  AC_MSG_RESULT([$enable_static])
+
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+    else
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+      LT_PATH_LD
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+         $GREP 'no-whole-archive' > /dev/null; then
+          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          _LT_TAGVAR(whole_archive_flag_spec, $1)=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+    _LT_TAGVAR(ld_shlibs, $1)=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+      aix[[4-9]]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+           for ld_flag in $LDFLAGS; do
+             case $ld_flag in
+             *-brtl*)
+               aix_use_runtimelinking=yes
+               break
+               ;;
+             esac
+           done
+           ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        _LT_TAGVAR(archive_cmds, $1)=''
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[[012]]|aix4.[[012]].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" &&
+            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+         then
+           # We have reworked collect2
+           :
+         else
+           # We have old collect2
+           _LT_TAGVAR(hardcode_direct, $1)=unsupported
+           # It fails to find uninstalled libraries when the uninstalled
+           # path is not listed in the libpath.  Setting hardcode_minus_L
+           # to unsupported forces relinking
+           _LT_TAGVAR(hardcode_minus_L, $1)=yes
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+           _LT_TAGVAR(hardcode_libdir_separator, $1)=
+         fi
+          esac
+          shared_flag='-shared'
+         if test "$aix_use_runtimelinking" = yes; then
+           shared_flag="$shared_flag "'${wl}-G'
+         fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+         # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+          else
+           if test "$aix_use_runtimelinking" = yes; then
+             shared_flag='${wl}-G'
+           else
+             shared_flag='${wl}-bM:SRE'
+           fi
+          fi
+        fi
+
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+       # export.
+        _LT_TAGVAR(always_export_symbols, $1)=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          _LT_SYS_MODULE_PATH_AIX
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+           # Determine the default libpath from the value encoded in an
+           # empty executable.
+           _LT_SYS_MODULE_PATH_AIX
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+           # Warning - without using the other run time loading flags,
+           # -berok will link without error, but may produce a broken library.
+           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+           # Exported symbols can be pulled into shared objects from archives
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+           # This is similar to how AIX traditionally builds its shared
+           # libraries.
+           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+         # support --undefined.  This deserves some investigation.  FIXME
+         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       else
+         _LT_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+         # FIXME: insert proper C++ library support
+         _LT_TAGVAR(ld_shlibs, $1)=no
+         ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+        # as there is no search path for DLLs.
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+        _LT_TAGVAR(always_export_symbols, $1)=no
+        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+          # If the export-symbols file already is a .def file (1st line
+          # is EXPORTS), use it as is; otherwise, prepend...
+          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+           cp $export_symbols $output_objdir/$soname.def;
+          else
+           echo EXPORTS > $output_objdir/$soname.def;
+           cat $export_symbols >> $output_objdir/$soname.def;
+          fi~
+          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        else
+          _LT_TAGVAR(ld_shlibs, $1)=no
+        fi
+        ;;
+      darwin* | rhapsody*)
+        _LT_DARWIN_LINKER_FEATURES($1)
+       ;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          ghcx*)
+           # Green Hills C++ Compiler
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          *)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+        esac
+        ;;
+
+      freebsd[[12]]*)
+        # C++ shared libraries reported to be fairly broken before
+       # switch to ELF
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      freebsd-elf*)
+        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      hpux9*)
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+                                            # but as the default
+                                            # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            _LT_TAGVAR(ld_shlibs, $1)=no
+            ;;
+          aCC*)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              _LT_TAGVAR(ld_shlibs, $1)=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            _LT_TAGVAR(hardcode_direct, $1)=no
+            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+            ;;
+          *)
+            _LT_TAGVAR(hardcode_direct, $1)=yes
+            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+                                                # but as the default
+                                                # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          aCC*)
+           case $host_cpu in
+             hppa*64*)
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               ;;
+             ia64*)
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               ;;
+             *)
+               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+               ;;
+           esac
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           #
+           # There doesn't appear to be a way to prevent this compiler from
+           # explicitly linking system object files so we need to strip them
+           # from the output so that they don't get included in the library
+           # dependencies.
+           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 "X$list" | $Xsed'
+           ;;
+          *)
+           if test "$GXX" = yes; then
+             if test $with_gnu_ld = no; then
+               case $host_cpu in
+                 hppa*64*)
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   ;;
+                 ia64*)
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   ;;
+                 *)
+                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+                   ;;
+               esac
+             fi
+           else
+             # FIXME: insert proper C++ library support
+             _LT_TAGVAR(ld_shlibs, $1)=no
+           fi
+           ;;
+        esac
+        ;;
+
+      interix[[3-9]]*)
+       _LT_TAGVAR(hardcode_direct, $1)=no
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+       # Instead, shared libraries are loaded at an image base (0x10000000 by
+       # default) and relocated if they conflict, which is a slow very memory
+       # consuming and fragmenting process.  To avoid this, we pick a random,
+       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+       ;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+           # SGI C++
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+           # Archives containing C++ object files must be created using
+           # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+           # necessary to make sure instantiated templates are included
+           # in the archive.
+           _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+           ;;
+          *)
+           if test "$GXX" = yes; then
+             if test "$with_gnu_ld" = no; then
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+             else
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+             fi
+           fi
+           _LT_TAGVAR(link_all_deplibs, $1)=yes
+           ;;
+        esac
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(inherit_rpath, $1)=yes
+        ;;
+
+      linux* | k*bsd*-gnu)
+        case $cc_basename in
+          KCC*)
+           # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+           # KCC will only create a shared library if the output file
+           # ends with ".so" (or ".sl" for HP-UX), so rename the library
+           # to its proper name (with version) after linking.
+           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           #
+           # There doesn't appear to be a way to prevent this compiler from
+           # explicitly linking system object files so we need to strip them
+           # from the output so that they don't get included in the library
+           # dependencies.
+           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 "X$list" | $Xsed'
+
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+           # Archives containing C++ object files must be created using
+           # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+           _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+           ;;
+         icpc* | ecpc* )
+           # Intel C++
+           with_gnu_ld=yes
+           # version 8.0 and above of icpc choke on multiply defined symbols
+           # if we add $predep_objects and $postdep_objects, however 7.1 and
+           # earlier do not add the objects themselves.
+           case `$CC -V 2>&1` in
+             *"Version 7."*)
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+               ;;
+             *)  # Version 8.0 or newer
+               tmp_idyn=
+               case $host_cpu in
+                 ia64*) tmp_idyn=' -i_dynamic';;
+               esac
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+               ;;
+           esac
+           _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+           ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+           case `$CC -V` in
+           *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+             _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+               compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+             _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+               $RANLIB $oldlib'
+             _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+             _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+             ;;
+           *) # Version 6 will use weak symbols
+             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+             ;;
+           esac
+
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+         cxx*)
+           # Compaq C++
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+           runpath_var=LD_RUN_PATH
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           #
+           # There doesn't appear to be a way to prevent this compiler from
+           # explicitly linking system object files so we need to strip them
+           # from the output so that they don't get included in the library
+           # dependencies.
+           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
+           ;;
+         xl*)
+           # IBM XL 8.0 on PPC, with GNU ld
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+           if test "x$supports_anon_versioning" = xyes; then
+             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+               echo "local: *; };" >> $output_objdir/$libname.ver~
+               $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+           fi
+           ;;
+         *)
+           case `$CC -V 2>&1 | sed 5q` in
+           *Sun\ C*)
+             # Sun C++ 5.9
+             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+             _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+             # Not sure whether something based on
+             # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+             # would be better.
+             output_verbose_link_cmd='echo'
+
+             # Archives containing C++ object files must be created using
+             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+             # necessary to make sure instantiated templates are included
+             # in the archive.
+             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+             ;;
+           esac
+           ;;
+       esac
+       ;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       ;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+       ;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+         *)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+       esac
+       ;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+         wlarc=
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+         _LT_TAGVAR(hardcode_direct, $1)=yes
+         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       fi
+       # Workaround some broken pre-1.5 toolchains
+       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+       ;;
+
+      *nto* | *qnx*)
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+       ;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+       _LT_TAGVAR(ld_shlibs, $1)=no
+       ;;
+
+      openbsd*)
+       if test -f /usr/libexec/ld.so; then
+         _LT_TAGVAR(hardcode_direct, $1)=yes
+         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+         fi
+         output_verbose_link_cmd=echo
+       else
+         _LT_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+           # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+           # KCC will only create a shared library if the output file
+           # ends with ".so" (or ".sl" for HP-UX), so rename the library
+           # to its proper name (with version) after linking.
+           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+           # Archives containing C++ object files must be created using
+           # the KAI C++ compiler.
+           case $host in
+             osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+             *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+           esac
+           ;;
+          RCC*)
+           # Rational C++ 2.4.1
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          cxx*)
+           case $host in
+             osf3*)
+               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+               ;;
+             *)
+               _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+               _LT_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~
+                 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+                 $RM $lib.exp'
+               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+               ;;
+           esac
+
+           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           #
+           # There doesn't appear to be a way to prevent this compiler from
+           # explicitly linking system object files so we need to strip them
+           # from the output so that they don't get included in the library
+           # dependencies.
+           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
+           ;;
+         *)
+           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+             case $host in
+               osf3*)
+                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 ;;
+               *)
+                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+                 ;;
+             esac
+
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+             # Commands to make compiler produce verbose output that lists
+             # what "hidden" libraries, object files and flags are used when
+             # linking a shared library.
+             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+           else
+             # FIXME: insert proper C++ library support
+             _LT_TAGVAR(ld_shlibs, $1)=no
+           fi
+           ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+           # Sun C++ 4.x
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          lcc*)
+           # Lucid
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          *)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC*)
+           # Sun C++ 4.2, 5.x and Centerline C++
+            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+           _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+             $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+           case $host_os in
+             solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+             *)
+               # The compiler driver will combine and reorder linker options,
+               # but understands `-z linker_flag'.
+               # Supported since Solaris 2.6 (maybe 2.5.1?)
+               _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+               ;;
+           esac
+           _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+           output_verbose_link_cmd='echo'
+
+           # Archives containing C++ object files must be created using
+           # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+           # necessary to make sure instantiated templates are included
+           # in the archive.
+           _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+           ;;
+          gcx*)
+           # Green Hills C++ Compiler
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+           # The C++ compiler must be used to create the archive.
+           _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+           ;;
+          *)
+           # GNU C++ compiler with Solaris linker
+           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+             if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+               # Commands to make compiler produce verbose output that lists
+               # what "hidden" libraries, object files and flags are used when
+               # linking a shared library.
+               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+             else
+               # g++ 2.7 appears to require `-G' NOT `-shared' on this
+               # platform.
+               _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+               # Commands to make compiler produce verbose output that lists
+               # what "hidden" libraries, object files and flags are used when
+               # linking a shared library.
+               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+             fi
+
+             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+             case $host_os in
+               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+               *)
+                 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+                 ;;
+             esac
+           fi
+           ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+       # Note: We can NOT use -z defs as we might desire, because we do not
+       # link with -lc, and that would cause any symbols used from libc to
+       # always be unresolved, which means just about no library would
+       # ever link correctly.  If we're not using GNU ld we use -z text
+       # though, which does catch some bad symbols but isn't as heavy-handed
+       # as -z defs.
+       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+       _LT_TAGVAR(link_all_deplibs, $1)=yes
+       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+       runpath_var='LD_RUN_PATH'
+
+       case $cc_basename in
+          CC*)
+           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           ;;
+         *)
+           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+           ;;
+       esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+           # NonStop-UX NCC 3.20
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+          *)
+           # FIXME: insert proper C++ library support
+           _LT_TAGVAR(ld_shlibs, $1)=no
+           ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+    esac
+
+    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+        prev=$p
+        continue
+       else
+        prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+        case $p in
+        -L* | -R*)
+          # Internal compiler library paths should come after those
+          # provided the user.  The postdeps already come after the
+          # user supplied libs so there is no need to process them.
+          if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+            _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+          else
+            _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+          fi
+          ;;
+        # The "-l" case would never come before the object being
+        # linked, so don't bother handling this case.
+        esac
+       else
+        if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+          _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+        else
+          _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+        fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+        pre_test_object_deps_done=yes
+        continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+        if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+          _LT_TAGVAR(predep_objects, $1)="$p"
+        else
+          _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+        fi
+       else
+        if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+          _LT_TAGVAR(postdep_objects, $1)="$p"
+        else
+          _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+        fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_TAGVAR(predep_objects,$1)=
+  _LT_TAGVAR(postdep_objects,$1)=
+  _LT_TAGVAR(postdeps,$1)=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+    [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+    [Dependencies to place before and after the objects being linked to
+    create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+    [The library search path used internally by the compiler when linking
+    a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${F77-"f77"}
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+  GCC=$G77
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+       if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+         test "$enable_shared" = yes && enable_static=no
+       fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$G77"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${FC-"f95"}
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
+
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+       if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+         test "$enable_shared" = yes && enable_static=no
+       fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+  :
+  _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+    [AC_CHECK_TOOL(GCJ, gcj,)
+      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+  # positional parameters, so assign one to ordinary parameter first.
+  func_stripname_result=${3}
+  func_stripname_result=${func_stripname_result#"${1}"}
+  func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
+
+_LT_EOF
+    ;;
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+  esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]+=\$[2]"
+}
+_LT_EOF
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+    ;;
+  esac
+])
diff --git a/m4/longdouble.m4 b/m4/longdouble.m4
new file mode 100644 (file)
index 0000000..40cd7ce
--- /dev/null
@@ -0,0 +1,28 @@
+# longdouble.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the compiler supports the 'long double' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_LONGDOUBLE],
+[
+  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
+    [if test "$GCC" = yes; then
+       gt_cv_c_long_double=yes
+     else
+       AC_TRY_COMPILE([
+         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
+         long double foo = 0.0;
+         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+         ], ,
+         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
+     fi])
+  if test $gt_cv_c_long_double = yes; then
+    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
+  fi
+])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
new file mode 100644 (file)
index 0000000..7b399e0
--- /dev/null
@@ -0,0 +1,23 @@
+# longlong.m4 serial 5
+dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG if 'long long' works.
+
+AC_DEFUN([gl_AC_TYPE_LONG_LONG],
+[
+  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
+  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
+    [long long llmax = (long long) -1;
+     return ll << i | ll >> i | llmax / ll | llmax % ll;],
+    ac_cv_type_long_long=yes,
+    ac_cv_type_long_long=no)])
+  if test $ac_cv_type_long_long = yes; then
+    AC_DEFINE(HAVE_LONG_LONG, 1,
+      [Define if you have the 'long long' type.])
+  fi
+])
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
new file mode 100644 (file)
index 0000000..34151a3
--- /dev/null
@@ -0,0 +1,368 @@
+# Helper functions for option handling.                    -*- Autoconf -*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+        _LT_MANGLE_DEFUN([$1], [$2]),
+    [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+           [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+                     [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+    [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  dnl
+  dnl If no reference was made to various pairs of opposing options, then
+  dnl we run the default mode handler for the pair.  For example, if neither
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl archives by default:
+  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+                  [_LT_ENABLE_FAST_INSTALL])
+  ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+       [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_shared=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+       [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+       [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_static=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+    _LT_DECL([build_old_libs], [enable_static], [0],
+       [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_fast_install=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+        [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_HELP_STRING([--with-pic],
+       [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+                [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+                [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+                [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+                [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+                [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
new file mode 100644 (file)
index 0000000..9000a05
--- /dev/null
@@ -0,0 +1,123 @@
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+          m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+            [m4_foreach([_Lt_suffix],
+               ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+       [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+         [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+                [lt_append([$1], [$2], [$3])$4],
+                [$5])],
+         [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+       m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+       [$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+                     [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
new file mode 100644 (file)
index 0000000..b8e154f
--- /dev/null
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers                      -*- Autoconf -*-
+#
+#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 3012 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6])
+m4_define([LT_PACKAGE_REVISION], [1.3012])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6'
+macro_revision='1.3012'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
new file mode 100644 (file)
index 0000000..637bb20
--- /dev/null
@@ -0,0 +1,92 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else.  This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION],  [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP],             [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],        [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT],         [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],    [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN],           [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR],             [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL],    [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN],           [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER],       [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK],               [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],        [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],    [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],    [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR],         [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR],            [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],  [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC],             [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU],            [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG],    [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD],   [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP],          [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED],            [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME],           [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE],  [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE],    [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL],          [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP],          [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN],                [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],     [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG],          [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL],   [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX],           [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77],           [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ],           [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC],             [AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG],      [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG],    [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG],    [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],    [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG],     [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG],         [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C],       [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/m4/nls.m4 b/m4/nls.m4
new file mode 100644 (file)
index 0000000..2082c3b
--- /dev/null
+++ b/m4/nls.m4
@@ -0,0 +1,51 @@
+# nls.m4 serial 2 (gettext-0.14.3)
+dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+AC_DEFUN([AM_NLS],
+[
+  AC_MSG_CHECKING([whether NLS is requested])
+  dnl Default is enabled NLS
+  AC_ARG_ENABLE(nls,
+    [  --disable-nls           do not use Native Language Support],
+    USE_NLS=$enableval, USE_NLS=yes)
+  AC_MSG_RESULT($USE_NLS)
+  AC_SUBST(USE_NLS)
+])
+
+AC_DEFUN([AM_MKINSTALLDIRS],
+[
+  dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
+  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+  dnl Try to locate it.
+  MKINSTALLDIRS=
+  if test -n "$ac_aux_dir"; then
+    case "$ac_aux_dir" in
+      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+    esac
+  fi
+  if test -z "$MKINSTALLDIRS"; then
+    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+  fi
+  AC_SUBST(MKINSTALLDIRS)
+])
diff --git a/m4/po.m4 b/m4/po.m4
new file mode 100644 (file)
index 0000000..f2795ee
--- /dev/null
+++ b/m4/po.m4
@@ -0,0 +1,429 @@
+# po.m4 serial 7 (gettext-0.14.3)
+dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+  dnl Test whether we really found GNU msgfmt.
+  if test "$GMSGFMT" != ":"; then
+    dnl If it is no GNU msgfmt we define it as : so that the
+    dnl Makefiles still can work.
+    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+      : ;
+    else
+      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+      AC_MSG_RESULT(
+        [found $GMSGFMT program is not GNU msgfmt; ignore it])
+      GMSGFMT=":"
+    fi
+  fi
+
+  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+  dnl Test whether we really found GNU xgettext.
+  if test "$XGETTEXT" != ":"; then
+    dnl If it is no GNU xgettext we define it as : so that the
+    dnl Makefiles still can work.
+    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+      : ;
+    else
+      AC_MSG_RESULT(
+        [found xgettext program is not GNU xgettext; ignore it])
+      XGETTEXT=":"
+    fi
+    dnl Remove leftover from FreeBSD xgettext call.
+    rm -f messages.po
+  fi
+
+  AC_OUTPUT_COMMANDS([
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done],
+   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+   ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+  # When this code is run, in config.status, two variables have already been
+  # set:
+  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+  # - LINGUAS is the value of the environment variable LINGUAS at configure
+  #   time.
+
+changequote(,)dnl
+  # Adjust a relative srcdir.
+  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+  # In autoconf-2.13 it is called $ac_given_srcdir.
+  # In autoconf-2.50 it is called $srcdir.
+  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+  case "$ac_given_srcdir" in
+    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+    /*) top_srcdir="$ac_given_srcdir" ;;
+    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
+  # A sed script that extracts the value of VARIABLE from a Makefile.
+  sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[     ]*VARIABLE[     ]*=/{
+  # Seen the first line of the variable definition.
+  s/^[  ]*VARIABLE[     ]*=//
+  ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+  # Set POTFILES to the value of the Makefile variable POTFILES.
+  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
+  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+  # Compute POTFILES_DEPS as
+  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+  POTFILES_DEPS=
+  for file in $POTFILES; do
+    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+  done
+  POMAKEFILEDEPS=""
+
+  if test -n "$OBSOLETE_ALL_LINGUAS"; then
+    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+  fi
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+  else
+    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
+    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Hide the ALL_LINGUAS assigment from automake.
+  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; then
+        desiredlanguages="$LINGUAS"
+      else
+        desiredlanguages="$ALL_LINGUAS"
+      fi
+      for desiredlang in $desiredlanguages; do
+        # Use the presentlang catalog if desiredlang is
+        #   a. equal to presentlang, or
+        #   b. a variant of presentlang (because in this case,
+        #      presentlang can be used as a fallback for messages
+        #      which are not translated in the desiredlang catalog).
+        case "$desiredlang" in
+          "$presentlang"*) useit=yes;;
+        esac
+      done
+      if test $useit = yes; then
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+       @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+       \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+       @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+       \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])
diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4
new file mode 100644 (file)
index 0000000..af10170
--- /dev/null
@@ -0,0 +1,44 @@
+# printf-posix.m4 serial 2 (gettext-0.13.1)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the printf() function supports POSIX/XSI format strings with
+dnl positions.
+
+AC_DEFUN([gt_PRINTF_POSIX],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
+    gt_cv_func_printf_posix,
+    [
+      AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
+      [
+        AC_EGREP_CPP(notposix, [
+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+  notposix
+#endif
+        ], gt_cv_func_printf_posix="guessing no",
+           gt_cv_func_printf_posix="guessing yes")
+      ])
+    ])
+  case $gt_cv_func_printf_posix in
+    *yes)
+      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
+        [Define if your printf() function supports format strings with positions.])
+      ;;
+  esac
+])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
new file mode 100644 (file)
index 0000000..a56365c
--- /dev/null
@@ -0,0 +1,92 @@
+# progtest.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ(2.50)
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  [[\\/]]* | ?:[[\\/]]*)
+    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+          if [$3]; then
+            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+    ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
diff --git a/m4/signed.m4 b/m4/signed.m4
new file mode 100644 (file)
index 0000000..048f593
--- /dev/null
@@ -0,0 +1,17 @@
+# signed.m4 serial 1 (gettext-0.10.40)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([bh_C_SIGNED],
+[
+  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
+   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
+  if test $bh_cv_c_signed = no; then
+    AC_DEFINE(signed, ,
+              [Define to empty if the C compiler doesn't support this keyword.])
+  fi
+])
diff --git a/m4/size_max.m4 b/m4/size_max.m4
new file mode 100644 (file)
index 0000000..4fe81c7
--- /dev/null
@@ -0,0 +1,59 @@
+# size_max.m4 serial 2
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_SIZE_MAX],
+[
+  AC_CHECK_HEADERS(stdint.h)
+  dnl First test whether the system already has SIZE_MAX.
+  AC_MSG_CHECKING([for SIZE_MAX])
+  result=
+  AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], result=yes)
+  if test -z "$result"; then
+    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+    dnl than the type 'unsigned long'.
+    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
+    dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
+    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
+      [#include <stddef.h>], result=?)
+    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
+      [#include <stddef.h>], result=?)
+    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
+      [#include <stddef.h>], result=?)
+    if test "$fits_in_uint" = 1; then
+      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+      AC_TRY_COMPILE([#include <stddef.h>
+        extern size_t foo;
+        extern unsigned long foo;
+        ], [], fits_in_uint=0)
+    fi
+    if test -z "$result"; then
+      if test "$fits_in_uint" = 1; then
+        result="$res_hi$res_lo"U
+      else
+        result="$res_hi$res_lo"UL
+      fi
+    else
+      dnl Shouldn't happen, but who knows...
+      result='~(size_t)0'
+    fi
+  fi
+  AC_MSG_RESULT([$result])
+  if test "$result" != yes; then
+    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
+      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
+  fi
+])
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
new file mode 100644 (file)
index 0000000..3355f35
--- /dev/null
@@ -0,0 +1,26 @@
+# stdint_h.m4 serial 5
+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_STDINT_H],
+[
+  AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+#include <stdint.h>],
+    [uintmax_t i = (uintmax_t) -1;],
+    gl_cv_header_stdint_h=yes,
+    gl_cv_header_stdint_h=no)])
+  if test $gl_cv_header_stdint_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4
new file mode 100644 (file)
index 0000000..bf83ed7
--- /dev/null
@@ -0,0 +1,30 @@
+# uintmax_t.m4 serial 9
+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
+[
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+    AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
+    test $ac_cv_type_unsigned_long_long = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+      [Define to unsigned long or unsigned long long
+       if <stdint.h> and <inttypes.h> don't define.])
+  else
+    AC_DEFINE(HAVE_UINTMAX_T, 1,
+      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4
new file mode 100644 (file)
index 0000000..dee10cc
--- /dev/null
@@ -0,0 +1,23 @@
+# ulonglong.m4 serial 4
+dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
+
+AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
+  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
+    [unsigned long long ullmax = (unsigned long long) -1;
+     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
+    ac_cv_type_unsigned_long_long=yes,
+    ac_cv_type_unsigned_long_long=no)])
+  if test $ac_cv_type_unsigned_long_long = yes; then
+    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+      [Define if you have the 'unsigned long long' type.])
+  fi
+])
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
new file mode 100644 (file)
index 0000000..cde2129
--- /dev/null
@@ -0,0 +1,20 @@
+# wchar_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
+    [AC_TRY_COMPILE([#include <stddef.h>
+       wchar_t foo = (wchar_t)'\0';], ,
+       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
+  if test $gt_cv_c_wchar_t = yes; then
+    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
+  fi
+])
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
new file mode 100644 (file)
index 0000000..b8fff9c
--- /dev/null
@@ -0,0 +1,20 @@
+# wint_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
+    [AC_TRY_COMPILE([#include <wchar.h>
+       wint_t foo = (wchar_t)'\0';], ,
+       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
+  if test $gt_cv_c_wint_t = yes; then
+    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
+  fi
+])
diff --git a/m4/xsize.m4 b/m4/xsize.m4
new file mode 100644 (file)
index 0000000..85bb721
--- /dev/null
@@ -0,0 +1,13 @@
+# xsize.m4 serial 3
+dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSIZE],
+[
+  dnl Prerequisites of lib/xsize.h.
+  AC_REQUIRE([gl_SIZE_MAX])
+  AC_REQUIRE([AC_C_INLINE])
+  AC_CHECK_HEADERS(stdint.h)
+])
diff --git a/missing b/missing
index 1c8ff7049d8f3aaa9741c53e7f3145d9b76a77d8..28055d2ae6f2a2c584afcd769d7881e11f62ecd9 100755 (executable)
--- a/missing
+++ b/missing
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2006-05-10.23
+scriptversion=2009-04-28.21; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,7 @@ scriptversion=2006-05-10.23
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -89,6 +87,9 @@ Supported PROGRAM values:
   tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
 Send bug reports to <bug-automake@gnu.org>."
     exit $?
     ;;
@@ -106,15 +107,22 @@ Send bug reports to <bug-automake@gnu.org>."
 
 esac
 
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
 # Now exit if we have it, but it failed.  Also exit now if we
 # don't have it and --version was passed (most likely to detect
-# the program).
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
 case $1 in
-  lex|yacc)
+  lex*|yacc*)
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar)
+  tar*)
     if test -n "$run"; then
        echo 1>&2 "ERROR: \`tar' requires --run"
        exit 1
@@ -138,7 +146,7 @@ esac
 
 # If it does not exist, or fails to run (possibly an outdated version),
 # try to emulate it.
-case $1 in
+case $program in
   aclocal*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
@@ -148,7 +156,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch aclocal.m4
     ;;
 
-  autoconf)
+  autoconf*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
@@ -157,7 +165,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch configure
     ;;
 
-  autoheader)
+  autoheader*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
@@ -187,7 +195,7 @@ WARNING: \`$1' is $msg.  You should only need it if
           while read f; do touch "$f"; done
     ;;
 
-  autom4te)
+  autom4te*)
     echo 1>&2 "\
 WARNING: \`$1' is needed, but is $msg.
          You might have modified some files without having the
@@ -210,7 +218,7 @@ WARNING: \`$1' is needed, but is $msg.
     fi
     ;;
 
-  bison|yacc)
+  bison*|yacc*)
     echo 1>&2 "\
 WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
@@ -240,7 +248,7 @@ WARNING: \`$1' $msg.  You should only need it if
     fi
     ;;
 
-  lex|flex)
+  lex*|flex*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
@@ -263,7 +271,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     fi
     ;;
 
-  help2man)
+  help2man*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
@@ -277,11 +285,11 @@ WARNING: \`$1' is $msg.  You should only need it if
     else
        test -z "$file" || exec >$file
        echo ".ab help2man is required to generate this page"
-       exit 1
+       exit $?
     fi
     ;;
 
-  makeinfo)
+  makeinfo*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -310,7 +318,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar)
+  tar*)
     shift
 
     # We have already tried tar in the generic part.
@@ -363,5 +371,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755 (executable)
index 0000000..4191a45
--- /dev/null
@@ -0,0 +1,162 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+
+scriptversion=2009-04-28.21; # UTC
+
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+IFS=" ""       $nl"
+errstatus=0
+dirmode=
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake@gnu.org>."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage"
+      exit $?
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --version)
+      echo "$0 $scriptversion"
+      exit $?
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error.  This is a problem when calling mkinstalldirs
+# from a parallel make.  We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
+case $dirmode in
+  '')
+    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    else
+      # On NextStep and OpenStep, the `mkdir' command does not
+      # recognize any option.  It will interpret all options as
+      # directories to create, and then abort because `.' already
+      # exists.
+      test -d ./-p && rmdir ./-p
+      test -d ./--version && rmdir ./--version
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+       test ! -d ./--version; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    else
+      # Clean up after NextStep and OpenStep mkdir.
+      for d in ./-m ./-p ./--version "./$dirmode";
+      do
+        test -d $d && rmdir $d
+      done
+    fi
+    ;;
+esac
+
+for file
+do
+  case $file in
+    /*) pathcomp=/ ;;
+    *)  pathcomp= ;;
+  esac
+  oIFS=$IFS
+  IFS=/
+  set fnord $file
+  shift
+  IFS=$oIFS
+
+  for d
+  do
+    test "x$d" = x && continue
+
+    pathcomp=$pathcomp$d
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+       errstatus=$lasterr
+      else
+       if test ! -z "$dirmode"; then
+         echo "chmod $dirmode $pathcomp"
+         lasterr=
+         chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+         if test ! -z "$lasterr"; then
+           errstatus=$lasterr
+         fi
+       fi
+      fi
+    fi
+
+    pathcomp=$pathcomp/
+  done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
index 8251db8edd7ab3fc619fb4be97003244722a9c6a..f738a7b02ff4dad402da1bde03d1b87515c34deb 100644 (file)
@@ -1 +1,12 @@
-# no change log yet
+2009-05-26  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * Makefile.in.in: New file, from gettext-0.17.
+       * Rules-quot: New file, from gettext-0.17.
+       * boldquot.sed: New file, from gettext-0.17.
+       * en@boldquot.header: New file, from gettext-0.17.
+       * en@quot.header: New file, from gettext-0.17.
+       * insert-header.sin: New file, from gettext-0.17.
+       * quot.sed: New file, from gettext-0.17.
+       * remove-potcdate.sin: New file, from gettext-0.17.
+       * POTFILES.in: New file.
+
index 46ae20d6284439cec5ade4a66b2ac83f5a7238c6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,2 +0,0 @@
-de
-
index c7e83022c02cbece27335685be4e83da06c7fcba..1f5cc285dea50cfe19b7b700f7aa967c5db28eab 100644 (file)
-# Makefile for program source directory in GNU NLS utilities package.
-# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
 #
-# This file may be copied and used freely without restrictions.  It may
-# be used in projects which are not available under a GNU Public License,
-# but which still want to provide support for the GNU gettext functionality.
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
 #
-# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
-#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
-#
-# - Modified by jacob berkman <jacob@ximian.com> to install
-#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
-#
-# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
-#
-# We have the following line for use by intltoolize:
-# INTLTOOL_MAKEFILE
+# Origin: gettext-0.14.4
 
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 
-SHELL = @SHELL@
+SHELL = /bin/sh
+@SET_MAKE@
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
-top_builddir = @top_builddir@
 VPATH = @srcdir@
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 datadir = @datadir@
-datarootdir = @datarootdir@
-libdir = @libdir@
-DATADIRNAME = @DATADIRNAME@
-itlocaledir = $(prefix)/$(DATADIRNAME)/locale
-subdir = po
-install_sh = @install_sh@
-# Automake >= 1.8 provides @mkdir_p@.
-# Until it can be supposed, use the safe fallback:
-mkdir_p = $(install_sh) -d
+localedir = $(datadir)/locale
+gettextsrcdir = $(datadir)/gettext/po
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
 
 GMSGFMT = @GMSGFMT@
 MSGFMT = @MSGFMT@
 XGETTEXT = @XGETTEXT@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
-GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
-
-ALL_LINGUAS = @ALL_LINGUAS@
-
-PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
-
-USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep '^$$lang$$' $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep '^$$lang$$'`"; then printf "$$lang "; fi; done; fi)
-
-USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
-
-POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
-
-DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
-EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
 
 POTFILES = \
-# This comment gets stripped out
 
-CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+CATALOGS = @CATALOGS@
 
-.SUFFIXES:
-.SUFFIXES: .po .pox .gmo .mo .msg .cat
+# Makevars gets inserted here. (Don't remove this line!)
 
-.po.pox:
-       $(MAKE) $(GETTEXT_PACKAGE).pot
-       $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
 
 .po.mo:
-       $(MSGFMT) -o $@ $<
+       @echo "$(MSGFMT) -c -o $@ $<"; \
+       $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
 
 .po.gmo:
-       file=`echo $* | sed 's,.*/,,'`.gmo \
-         && rm -f $$file && $(GMSGFMT) -o $$file $<
+       @lang=`echo $* | sed -e 's,.*/,,'`; \
+       test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+       echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
+       cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
 
-.po.cat:
-       sed -f ../intl/po2msg.sed < $< > $*.msg \
-         && rm -f $@ && gencat $@ $*.msg
+.sin.sed:
+       sed -e '/^#/d' $< > t-$@
+       mv t-$@ $@
 
 
 all: all-@USE_NLS@
 
-all-yes: $(CATALOGS)
+all-yes: stamp-po
 all-no:
 
-$(GETTEXT_PACKAGE).pot: $(POTFILES)
-       $(GENPOT)
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+       test ! -f $(srcdir)/$(DOMAIN).pot || \
+         test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+       @test ! -f $(srcdir)/$(DOMAIN).pot || { \
+         echo "touch stamp-po" && \
+         echo timestamp > stamp-poT && \
+         mv stamp-poT stamp-po; \
+       }
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+       if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+         msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+       else \
+         msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+       fi; \
+       $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+         --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
+         --files-from=$(srcdir)/POTFILES.in \
+         --copyright-holder='$(COPYRIGHT_HOLDER)' \
+         --msgid-bugs-address="$$msgid_bugs_address"
+       test ! -f $(DOMAIN).po || { \
+         if test -f $(srcdir)/$(DOMAIN).pot; then \
+           sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+           sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+           if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+             rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+           else \
+             rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+             mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+           fi; \
+         else \
+           mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+         fi; \
+       }
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+       $(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+       @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+       if test -f "$(srcdir)/$${lang}.po"; then \
+         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+         echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+         cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
+       else \
+         $(MAKE) $${lang}.po-create; \
+       fi
+
 
-install: install-data
+install: install-exec install-data
+install-exec:
 install-data: install-data-@USE_NLS@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+         for file in $(DISTFILES.common) Makevars.template; do \
+           $(INSTALL_DATA) $(srcdir)/$$file \
+                           $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+         for file in Makevars; do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
+       fi
 install-data-no: all
 install-data-yes: all
-       linguas="$(USE_LINGUAS)"; \
-       for lang in $$linguas; do \
-         dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
-         $(mkdir_p) $$dir; \
-         if test -r $$lang.gmo; then \
-           $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
-           echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
-         else \
-           $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
-           echo "installing $(srcdir)/$$lang.gmo as" \
-                "$$dir/$(GETTEXT_PACKAGE).mo"; \
-         fi; \
-         if test -r $$lang.gmo.m; then \
-           $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
-           echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
-         else \
-           if test -r $(srcdir)/$$lang.gmo.m ; then \
-             $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
-               $$dir/$(GETTEXT_PACKAGE).mo.m; \
-             echo "installing $(srcdir)/$$lang.gmo.m as" \
-                  "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
-           else \
-             true; \
+       $(mkinstalldirs) $(DESTDIR)$(datadir)
+       @catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         dir=$(localedir)/$$lang/LC_MESSAGES; \
+         $(mkinstalldirs) $(DESTDIR)$$dir; \
+         if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+         $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+         echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+         for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+           if test -n "$$lc"; then \
+             if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+               link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+               mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+               mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+                for file in *; do \
+                  if test -f $$file; then \
+                    ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+                  fi; \
+                done); \
+               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+             else \
+               if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+                 :; \
+               else \
+                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               fi; \
+             fi; \
+             rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+             ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+             ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+             cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+             echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
            fi; \
-         fi; \
+         done; \
        done
 
-# Empty stubs to satisfy archaic automake needs
-dvi info tags TAGS ID:
+install-strip: install
 
-# Define this as empty until I found a useful application.
-install-exec installcheck:
-
-uninstall:
-       linguas="$(USE_LINGUAS)"; \
-       for lang in $$linguas; do \
-         rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
-         rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-@USE_NLS@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+       else \
+         : ; \
+       fi
+installdirs-data-no:
+installdirs-data-yes:
+       $(mkinstalldirs) $(DESTDIR)$(datadir)
+       @catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         dir=$(localedir)/$$lang/LC_MESSAGES; \
+         $(mkinstalldirs) $(DESTDIR)$$dir; \
+         for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+           if test -n "$$lc"; then \
+             if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+               link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+               mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+               mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+                for file in *; do \
+                  if test -f $$file; then \
+                    ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+                  fi; \
+                done); \
+               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+             else \
+               if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+                 :; \
+               else \
+                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+               fi; \
+             fi; \
+           fi; \
+         done; \
        done
 
-check: all $(GETTEXT_PACKAGE).pot
-       rm -f missing notexist
-       srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
-       if [ -r missing -o -r notexist ]; then \
-         exit 1; \
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-@USE_NLS@
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         for file in $(DISTFILES.common) Makevars.template; do \
+           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+         done; \
+       else \
+         : ; \
        fi
+uninstall-data-no:
+uninstall-data-yes:
+       catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+         cat=`basename $$cat`; \
+         lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+         for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+           rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+         done; \
+       done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
 
 mostlyclean:
-       rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
-       rm -f .intltool-merge-cache
+       rm -f remove-potcdate.sed
+       rm -f stamp-poT
+       rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+       rm -fr *.o
 
 clean: mostlyclean
 
 distclean: clean
-       rm -f Makefile Makefile.in POTFILES stamp-it
-       rm -f *.mo *.msg *.cat *.cat.m *.gmo
+       rm -f Makefile Makefile.in POTFILES *.mo
 
 maintainer-clean: distclean
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."
-       rm -f Makefile.in.in
-
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: $(DISTFILES)
+       rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+       $(MAKE) update-po
+       @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: stamp-po $(DISTFILES)
        dists="$(DISTFILES)"; \
-       extra_dists="$(EXTRA_DISTFILES)"; \
-       for file in $$extra_dists; do \
-         test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+       if test "$(PACKAGE)" = "gettext-tools"; then \
+         dists="$$dists Makevars.template"; \
+       fi; \
+       if test -f $(srcdir)/$(DOMAIN).pot; then \
+         dists="$$dists $(DOMAIN).pot stamp-po"; \
+       fi; \
+       if test -f $(srcdir)/ChangeLog; then \
+         dists="$$dists ChangeLog"; \
+       fi; \
+       for i in 0 1 2 3 4 5 6 7 8 9; do \
+         if test -f $(srcdir)/ChangeLog.$$i; then \
+           dists="$$dists ChangeLog.$$i"; \
+         fi; \
        done; \
+       if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
        for file in $$dists; do \
-         test -f $$file || file="$(srcdir)/$$file"; \
-         ln $$file $(distdir) 2> /dev/null \
-           || cp -p $$file $(distdir); \
+         if test -f $$file; then \
+           cp -p $$file $(distdir) || exit 1; \
+         else \
+           cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+         fi; \
        done
 
 update-po: Makefile
-       $(MAKE) $(GETTEXT_PACKAGE).pot
+       $(MAKE) $(DOMAIN).pot-update
+       test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+       $(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+       @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+       echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+       exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+       @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+       if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
        tmpdir=`pwd`; \
-       linguas="$(USE_LINGUAS)"; \
-       for lang in $$linguas; do \
-         echo "$$lang:"; \
-         result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
-         if $$result; then \
-           if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
-             rm -f $$tmpdir/$$lang.new.po; \
-            else \
-             if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
-               :; \
-             else \
-               echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
-               rm -f $$tmpdir/$$lang.new.po; \
-               exit 1; \
-             fi; \
-           fi; \
-         else \
-           echo "msgmerge for $$lang.gmo failed!"; \
+       echo "$$lang:"; \
+       test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+       echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+       cd $(srcdir); \
+       if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+         if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
            rm -f $$tmpdir/$$lang.new.po; \
+         else \
+           if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+             :; \
+           else \
+             echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+             exit 1; \
+           fi; \
          fi; \
-       done
-
-Makefile POTFILES: stamp-it
-       @if test ! -f $@; then \
-         rm -f stamp-it; \
-         $(MAKE) stamp-it; \
+       else \
+         echo "msgmerge for $$lang.po failed!" 1>&2; \
+         rm -f $$tmpdir/$$lang.new.po; \
        fi
 
-stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+       @:
+
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
        cd $(top_builddir) \
-         && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+         && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
               $(SHELL) ./config.status
 
+force:
+
 # Tell versions [3.59,3.63) of GNU make not to export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644 (file)
index 0000000..c450650
--- /dev/null
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Tobias Oetiker
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = http://oss.oetiker.ch/rrdtool-trac/newticket
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644 (file)
index 0000000..9c2a995
--- /dev/null
@@ -0,0 +1,47 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en@quot.po-create:
+       $(MAKE) en@quot.po-update
+en@boldquot.po-create:
+       $(MAKE) en@boldquot.po-update
+
+en@quot.po-update: en@quot.po-update-en
+en@boldquot.po-update: en@boldquot.po-update-en
+
+.insert-header.po-update-en:
+       @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+       if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+       tmpdir=`pwd`; \
+       echo "$$lang:"; \
+       ll=`echo $$lang | sed -e 's/@.*//'`; \
+       LC_ALL=C; export LC_ALL; \
+       cd $(srcdir); \
+       if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
+         if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+           rm -f $$tmpdir/$$lang.new.po; \
+         else \
+           if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+             :; \
+           else \
+             echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+             exit 1; \
+           fi; \
+         fi; \
+       else \
+         echo "creation of $$lang.po failed!" 1>&2; \
+         rm -f $$tmpdir/$$lang.new.po; \
+       fi
+
+en@quot.insert-header: insert-header.sin
+       sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
+
+en@boldquot.insert-header: insert-header.sin
+       sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+       rm -f *.insert-header
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644 (file)
index 0000000..4b937aa
--- /dev/null
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
+s/“/“\e[1m/g
+s/”/\e[0m”/g
+s/‘/‘\e[1m/g
+s/’/\e[0m’/g
diff --git a/po/de.po b/po/de.po
deleted file mode 100644 (file)
index 4c556c7..0000000
--- a/po/de.po
+++ /dev/null
@@ -1,334 +0,0 @@
-#: ../src/rrd_getopt.c:615
-#, c-format
-msgid "%s: option `%s' is ambiguous\n"
-msgstr ""
-
-#: ../src/rrd_getopt.c:637
-#, c-format
-msgid "%s: option `--%s' doesn't allow an argument\n"
-msgstr ""
-
-#: ../src/rrd_getopt.c:643
-#, c-format
-msgid "%s: option `%c%s' doesn't allow an argument\n"
-msgstr ""
-
-#: ../src/rrd_getopt.c:658 ../src/rrd_getopt.c:811
-#, c-format
-msgid "%s: option `%s' requires an argument\n"
-msgstr ""
-
-#. --option
-#: ../src/rrd_getopt.c:684
-#, c-format
-msgid "%s: unrecognized option `--%s'\n"
-msgstr ""
-
-#. +option or -option
-#: ../src/rrd_getopt.c:688
-#, c-format
-msgid "%s: unrecognized option `%c%s'\n"
-msgstr ""
-
-#. 1003.2 specifies the format of this message.
-#: ../src/rrd_getopt.c:712
-#, c-format
-msgid "%s: illegal option -- %c\n"
-msgstr ""
-
-#: ../src/rrd_getopt.c:715
-#, c-format
-msgid "%s: invalid option -- %c\n"
-msgstr ""
-
-#: ../src/rrd_getopt.c:741 ../src/rrd_getopt.c:849
-#, c-format
-msgid "%s: option requires an argument -- %c\n"
-msgstr ""
-
-#: ../src/rrd_getopt.c:783
-#, c-format
-msgid "%s: option `-W %s' is ambiguous\n"
-msgstr ""
-
-#: ../src/rrd_getopt.c:798
-#, c-format
-msgid "%s: option `-W %s' doesn't allow an argument\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:49
-#, c-format
-msgid ""
-"RRDtool %s  Copyright 1997-2007 by Tobias Oetiker <tobi@oetiker.ch>\n"
-"               Compiled %s %s\n"
-"\n"
-"Usage: rrdtool [options] command command_options\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:55
-msgid ""
-"Valid commands: create, update, updatev, graph, dump, restore,\n"
-"\t\tlast, lastupdate, first, info, fetch, tune,\n"
-"\t\tresize, xport\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:60
-msgid ""
-"Valid remote commands: quit, ls, cd, mkdir, pwd\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:64
-msgid ""
-"* create - create a new RRD\n"
-"\n"
-"\trrdtool create filename [--start|-b start time]\n"
-"\t\t[--step|-s step]\n"
-"\t\t[DS:ds-name:DST:dst arguments]\n"
-"\t\t[RRA:CF:cf arguments]\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:71
-msgid ""
-"* dump - dump an RRD to XML\n"
-"\n"
-"\trrdtool dump filename.rrd >filename.xml\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:75
-msgid ""
-"* info - returns the configuration and status of the RRD\n"
-"\n"
-"\trrdtool info filename.rrd\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:79
-msgid ""
-"* restore - restore an RRD file from its XML form\n"
-"\n"
-"\trrdtool restore [--range-check|-r] [--force-overwrite|-f] filename.xml "
-"filename.rrd\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:83
-msgid ""
-"* last - show last update time for RRD\n"
-"\n"
-"\trrdtool last filename.rrd\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:87
-msgid ""
-"* lastupdate - returns the most recent datum stored for\n"
-"  each DS in an RRD\n"
-"\n"
-"\trrdtool lastupdate filename.rrd\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:91
-msgid ""
-"* first - show first update time for RRA within an RRD\n"
-"\n"
-"\trrdtool first filename.rrd [--rraindex number]\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:95
-msgid ""
-"* update - update an RRD\n"
-"\n"
-"\trrdtool update filename\n"
-"\t\t--template|-t ds-name:ds-name:...\n"
-"\t\ttime|N:value[:value...]\n"
-"\n"
-"\t\tat-time@value[:value...]\n"
-"\n"
-"\t\t[ time:value[:value...] ..]\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:103
-msgid ""
-"* updatev - a verbose version of update\n"
-"\treturns information about values, RRAs, and datasources updated\n"
-"\n"
-"\trrdtool updatev filename\n"
-"\t\t--template|-t ds-name:ds-name:...\n"
-"\t\ttime|N:value[:value...]\n"
-"\n"
-"\t\tat-time@value[:value...]\n"
-"\n"
-"\t\t[ time:value[:value...] ..]\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:112
-msgid ""
-"* fetch - fetch data out of an RRD\n"
-"\n"
-"\trrdtool fetch filename.rrd CF\n"
-"\t\t[-r|--resolution resolution]\n"
-"\t\t[-s|--start start] [-e|--end end]\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:120
-msgid ""
-"* graph - generate a graph from one or several RRD\n"
-"\n"
-"\trrdtool graph filename [-s|--start seconds] [-e|--end seconds]\n"
-"\t\t[-x|--x-grid x-axis grid and label]\n"
-"\t\t[-Y|--alt-y-grid]\n"
-"\t\t[-y|--y-grid y-axis grid and label]\n"
-"\t\t[-v|--vertical-label string] [-w|--width pixels]\n"
-"\t\t[-h|--height pixels] [-o|--logarithmic]\n"
-"\t\t[-u|--upper-limit value] [-z|--lazy]\n"
-"\t\t[-l|--lower-limit value] [-r|--rigid]\n"
-"\t\t[-g|--no-legend]\n"
-"\t\t[-F|--force-rules-legend]\n"
-"\t\t[-j|--only-graph]\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:132
-msgid ""
-"\t\t[-n|--font FONTTAG:size:font]\n"
-"\t\t[-m|--zoom factor]\n"
-"\t\t[-A|--alt-autoscale]\n"
-"\t\t[-M|--alt-autoscale-max]\n"
-"\t\t[-R|--font-render-mode {normal,light,mono}]\n"
-"\t\t[-B|--font-smoothing-threshold size]\n"
-"\t\t[-E|--slope-mode]\n"
-"\t\t[-N|--no-gridfit]\n"
-"\t\t[-X|--units-exponent value]\n"
-"\t\t[-L|--units-length value]\n"
-"\t\t[-S|--step seconds]\n"
-"\t\t[-f|--imginfo printfstr]\n"
-"\t\t[-a|--imgformat PNG]\n"
-"\t\t[-c|--color COLORTAG#rrggbb[aa]] [-t|--title string]\n"
-"\t\t[-W|--watermark string]\n"
-"\t\t[DEF:vname=rrd:ds-name:CF]\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:148
-msgid ""
-"\t\t[CDEF:vname=rpn-expression]\n"
-"\t\t[VDEF:vdefname=rpn-expression]\n"
-"\t\t[PRINT:vdefname:format]\n"
-"\t\t[GPRINT:vdefname:format]\n"
-"\t\t[COMMENT:text]\n"
-"\t\t[SHIFT:vname:offset]\n"
-"\t\t[TICK:vname#rrggbb[aa][:[fraction][:legend]]]\n"
-"\t\t[HRULE:value#rrggbb[aa][:legend]]\n"
-"\t\t[VRULE:value#rrggbb[aa][:legend]]\n"
-"\t\t[LINE[width]:vname[#rrggbb[aa][:[legend][:STACK]]]]\n"
-"\t\t[AREA:vname[#rrggbb[aa][:[legend][:STACK]]]]\n"
-"\t\t[PRINT:vname:CF:format] (deprecated)\n"
-"\t\t[GPRINT:vname:CF:format] (deprecated)\n"
-"\t\t[STACK:vname[#rrggbb[aa][:legend]]] (deprecated)\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:164
-msgid ""
-" * tune -  Modify some basic properties of an RRD\n"
-"\n"
-"\trrdtool tune filename\n"
-"\t\t[--heartbeat|-h ds-name:heartbeat]\n"
-"\t\t[--data-source-type|-d ds-name:DST]\n"
-"\t\t[--data-source-rename|-r old-name:new-name]\n"
-"\t\t[--minimum|-i ds-name:min] [--maximum|-a ds-name:max]\n"
-"\t\t[--deltapos scale-value] [--deltaneg scale-value]\n"
-"\t\t[--failure-threshold integer]\n"
-"\t\t[--window-length integer]\n"
-"\t\t[--alpha adaptation-parameter]\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:175
-msgid ""
-" * tune -  Modify some basic properties of an RRD\n"
-"\n"
-"\t\t[--beta adaptation-parameter]\n"
-"\t\t[--gamma adaptation-parameter]\n"
-"\t\t[--gamma-deviation adaptation-parameter]\n"
-"\t\t[--aberrant-reset ds-name]\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:182
-msgid ""
-" * resize - alter the length of one of the RRAs in an RRD\n"
-"\n"
-"\trrdtool resize filename rranum GROW|SHRINK rows\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:186
-msgid ""
-"* xport - generate XML dump from one or several RRD\n"
-"\n"
-"\trrdtool xport [-s|--start seconds] [-e|--end seconds]\n"
-"\t\t[-m|--maxrows rows]\n"
-"\t\t[--step seconds]\n"
-"\t\t[--enumds]\n"
-"\t\t[DEF:vname=rrd:ds-name:CF]\n"
-"\t\t[CDEF:vname=rpn-expression]\n"
-"\t\t[XPORT:vname:legend]\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:195
-msgid ""
-" * quit - closing a session in remote mode\n"
-"\n"
-"\trrdtool quit\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:198
-msgid ""
-" * ls - lists all *.rrd files in current directory\n"
-"\n"
-"\trrdtool ls\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:202
-msgid ""
-" * cd - changes the current directory\n"
-"\n"
-"\trrdtool cd new directory\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:206
-msgid ""
-" * mkdir - creates a new directory\n"
-"\n"
-"\trrdtool mkdir newdirectoryname\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:210
-msgid ""
-" * pwd - returns the current working directory\n"
-"\n"
-"\trrdtool pwd\n"
-"\n"
-msgstr ""
-
-#: ../src/rrd_tool.c:214
-msgid ""
-"RRDtool is distributed under the Terms of the GNU General\n"
-"Public License Version 2. (www.gnu.org/copyleft/gpl.html)\n"
-"\n"
-"For more information read the RRD manpages\n"
-"\n"
-msgstr ""
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
new file mode 100644 (file)
index 0000000..fedb6a0
--- /dev/null
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/po/en@quot.header b/po/en@quot.header
new file mode 100644 (file)
index 0000000..a9647fc
--- /dev/null
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644 (file)
index 0000000..b26de01
--- /dev/null
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644 (file)
index 0000000..0122c46
--- /dev/null
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644 (file)
index 0000000..2436c49
--- /dev/null
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/rrdtool.pot b/po/rrdtool.pot
new file mode 100644 (file)
index 0000000..bea2057
--- /dev/null
@@ -0,0 +1,376 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Tobias Oetiker
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: http://oss.oetiker.ch/rrdtool-trac/newticket\n"
+"POT-Creation-Date: 2009-06-08 08:34+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/rrd_getopt.c:618
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr ""
+
+#: src/rrd_getopt.c:640
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr ""
+
+#: src/rrd_getopt.c:646
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr ""
+
+#: src/rrd_getopt.c:661 src/rrd_getopt.c:814
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr ""
+
+#: src/rrd_getopt.c:687
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr ""
+
+#: src/rrd_getopt.c:691
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr ""
+
+#: src/rrd_getopt.c:715
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr ""
+
+#: src/rrd_getopt.c:718
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr ""
+
+#: src/rrd_getopt.c:744 src/rrd_getopt.c:852
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr ""
+
+#: src/rrd_getopt.c:786
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr ""
+
+#: src/rrd_getopt.c:801
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr ""
+
+#: src/rrd_tool.c:51
+#, c-format
+msgid ""
+"RRDtool %s  Copyright 1997-2008 by Tobias Oetiker <tobi@oetiker.ch>\n"
+"               Compiled %s %s\n"
+"\n"
+"Usage: rrdtool [options] command command_options\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:58
+msgid ""
+"Valid commands: create, update, updatev, graph, graphv,  dump, restore,\n"
+"\t\tlast, lastupdate, first, info, fetch, tune,\n"
+"\t\tresize, xport, flushcached\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:63
+msgid ""
+"Valid remote commands: quit, ls, cd, mkdir, pwd\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:67
+msgid ""
+"* create - create a new RRD\n"
+"\n"
+"\trrdtool create filename [--start|-b start time]\n"
+"\t\t[--step|-s step]\n"
+"\t\t[DS:ds-name:DST:dst arguments]\n"
+"\t\t[RRA:CF:cf arguments]\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:74
+msgid ""
+"* dump - dump an RRD to XML\n"
+"\n"
+"\trrdtool dump filename.rrd >filename.xml\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:78
+msgid ""
+"* info - returns the configuration and status of the RRD\n"
+"\n"
+"\trrdtool info filename.rrd\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:82
+msgid ""
+"* restore - restore an RRD file from its XML form\n"
+"\n"
+"\trrdtool restore [--range-check|-r] [--force-overwrite|-f] filename.xml "
+"filename.rrd\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:86
+msgid ""
+"* last - show last update time for RRD\n"
+"\n"
+"\trrdtool last filename.rrd\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:90
+msgid ""
+"* lastupdate - returns the most recent datum stored for\n"
+"  each DS in an RRD\n"
+"\n"
+"\trrdtool lastupdate filename.rrd\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:94
+msgid ""
+"* first - show first update time for RRA within an RRD\n"
+"\n"
+"\trrdtool first filename.rrd [--rraindex number]\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:98
+msgid ""
+"* update - update an RRD\n"
+"\n"
+"\trrdtool update filename\n"
+"\t\t[--template|-t ds-name:ds-name:...]\n"
+"\t\t[--daemon <address>]\n"
+"\t\ttime|N:value[:value...]\n"
+"\n"
+"\t\tat-time@value[:value...]\n"
+"\n"
+"\t\t[ time:value[:value...] ..]\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:107
+msgid ""
+"* updatev - a verbose version of update\n"
+"\treturns information about values, RRAs, and datasources updated\n"
+"\n"
+"\trrdtool updatev filename\n"
+"\t\t[--template|-t ds-name:ds-name:...]\n"
+"\t\ttime|N:value[:value...]\n"
+"\n"
+"\t\tat-time@value[:value...]\n"
+"\n"
+"\t\t[ time:value[:value...] ..]\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:116
+msgid ""
+"* fetch - fetch data out of an RRD\n"
+"\n"
+"\trrdtool fetch filename.rrd CF\n"
+"\t\t[-r|--resolution resolution]\n"
+"\t\t[-s|--start start] [-e|--end end]\n"
+"\t\t[--daemon <address>]\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:123
+msgid ""
+"* flushcached - flush cached data out to an RRD file\n"
+"\n"
+"\trrdtool flushcached filename.rrd\n"
+"\t\t[--daemon <address>]\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:130
+msgid ""
+"* graph - generate a graph from one or several RRD\n"
+"\n"
+"\trrdtool graph filename [-s|--start seconds] [-e|--end seconds]\n"
+msgstr ""
+
+#: src/rrd_tool.c:133
+msgid ""
+"* graphv - generate a graph from one or several RRD\n"
+"           with meta data printed before the graph\n"
+"\n"
+"\trrdtool graphv filename [-s|--start seconds] [-e|--end seconds]\n"
+msgstr ""
+
+#: src/rrd_tool.c:137
+msgid ""
+"\t\t[-x|--x-grid x-axis grid and label]\n"
+"\t\t[-Y|--alt-y-grid] [--full-size-mode]\n"
+"\t\t[-y|--y-grid y-axis grid and label]\n"
+"\t\t[-v|--vertical-label string] [-w|--width pixels]\n"
+"\t\t[--right-axis scale:shift] [--right-axis-label label]\n"
+"\t\t[--right-axis-format format]\n"
+"\t\t[-h|--height pixels] [-o|--logarithmic]\n"
+"\t\t[-u|--upper-limit value] [-z|--lazy]\n"
+"\t\t[-l|--lower-limit value] [-r|--rigid]\n"
+"\t\t[-g|--no-legend] [--daemon <address>]\n"
+"\t\t[-F|--force-rules-legend]\n"
+"\t\t[-j|--only-graph]\n"
+msgstr ""
+
+#: src/rrd_tool.c:149
+msgid ""
+"\t\t[-n|--font FONTTAG:size:font]\n"
+"\t\t[-m|--zoom factor]\n"
+"\t\t[-A|--alt-autoscale]\n"
+"\t\t[-M|--alt-autoscale-max]\n"
+"\t\t[-G|--graph-render-mode {normal,mono}]\n"
+"\t\t[-R|--font-render-mode {normal,light,mono}]\n"
+"\t\t[-B|--font-smoothing-threshold size]\n"
+"\t\t[-T|--tabwidth width]\n"
+"\t\t[-E|--slope-mode]\n"
+"\t\t[-N|--no-gridfit]\n"
+"\t\t[-X|--units-exponent value]\n"
+"\t\t[-L|--units-length value]\n"
+"\t\t[-S|--step seconds]\n"
+"\t\t[-f|--imginfo printfstr]\n"
+"\t\t[-a|--imgformat PNG]\n"
+"\t\t[-c|--color COLORTAG#rrggbb[aa]] [-t|--title string]\n"
+"\t\t[-W|--watermark string]\n"
+"\t\t[DEF:vname=rrd:ds-name:CF]\n"
+msgstr ""
+
+#: src/rrd_tool.c:168
+msgid ""
+"\t\t[CDEF:vname=rpn-expression]\n"
+"\t\t[VDEF:vdefname=rpn-expression]\n"
+"\t\t[PRINT:vdefname:format]\n"
+"\t\t[GPRINT:vdefname:format]\n"
+"\t\t[COMMENT:text]\n"
+"\t\t[SHIFT:vname:offset]\n"
+"\t\t[TICK:vname#rrggbb[aa][:[fraction][:legend]]]\n"
+"\t\t[HRULE:value#rrggbb[aa][:legend]]\n"
+"\t\t[VRULE:value#rrggbb[aa][:legend]]\n"
+"\t\t[LINE[width]:vname[#rrggbb[aa][:[legend][:STACK]]]]\n"
+"\t\t[AREA:vname[#rrggbb[aa][:[legend][:STACK]]]]\n"
+"\t\t[PRINT:vname:CF:format] (deprecated)\n"
+"\t\t[GPRINT:vname:CF:format] (deprecated)\n"
+"\t\t[STACK:vname[#rrggbb[aa][:legend]]] (deprecated)\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:182
+msgid ""
+" * tune -  Modify some basic properties of an RRD\n"
+"\n"
+"\trrdtool tune filename\n"
+"\t\t[--heartbeat|-h ds-name:heartbeat]\n"
+"\t\t[--data-source-type|-d ds-name:DST]\n"
+"\t\t[--data-source-rename|-r old-name:new-name]\n"
+"\t\t[--minimum|-i ds-name:min] [--maximum|-a ds-name:max]\n"
+"\t\t[--deltapos scale-value] [--deltaneg scale-value]\n"
+"\t\t[--failure-threshold integer]\n"
+"\t\t[--window-length integer]\n"
+"\t\t[--alpha adaptation-parameter]\n"
+msgstr ""
+
+#: src/rrd_tool.c:193
+msgid ""
+" * tune -  Modify some basic properties of an RRD\n"
+"\n"
+"\t\t[--beta adaptation-parameter]\n"
+"\t\t[--gamma adaptation-parameter]\n"
+"\t\t[--gamma-deviation adaptation-parameter]\n"
+"\t\t[--aberrant-reset ds-name]\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:200
+msgid ""
+" * resize - alter the length of one of the RRAs in an RRD\n"
+"\n"
+"\trrdtool resize filename rranum GROW|SHRINK rows\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:203
+msgid ""
+"* xport - generate XML dump from one or several RRD\n"
+"\n"
+"\trrdtool xport [-s|--start seconds] [-e|--end seconds]\n"
+"\t\t[-m|--maxrows rows]\n"
+"\t\t[--step seconds]\n"
+"\t\t[--enumds]\n"
+"\t\t[DEF:vname=rrd:ds-name:CF]\n"
+"\t\t[CDEF:vname=rpn-expression]\n"
+"\t\t[XPORT:vname:legend]\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:210
+msgid ""
+" * quit - closing a session in remote mode\n"
+"\n"
+"\trrdtool quit\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:213
+msgid ""
+" * ls - lists all *.rrd files in current directory\n"
+"\n"
+"\trrdtool ls\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:216
+msgid ""
+" * cd - changes the current directory\n"
+"\n"
+"\trrdtool cd new directory\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:219
+msgid ""
+" * mkdir - creates a new directory\n"
+"\n"
+"\trrdtool mkdir newdirectoryname\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:222
+msgid ""
+" * pwd - returns the current working directory\n"
+"\n"
+"\trrdtool pwd\n"
+"\n"
+msgstr ""
+
+#: src/rrd_tool.c:225
+msgid ""
+"RRDtool is distributed under the Terms of the GNU General\n"
+"Public License Version 2. (www.gnu.org/copyleft/gpl.html)\n"
+"\n"
+"For more information read the RRD manpages\n"
+"\n"
+msgstr ""
diff --git a/po/stamp-po b/po/stamp-po
new file mode 100644 (file)
index 0000000..9788f70
--- /dev/null
@@ -0,0 +1 @@
+timestamp
index 76ff01760662a6e41eb9f57d0f7fa7ff4b47f16a..969e56d06b55dcaabc22a8a18d1ab2a48a9d0cf2 100644 (file)
 /* Define if building universal (internal helper macro) */
 #undef AC_APPLE_UNIVERSAL_BUILD
 
-/* Use this in code sections to mark them for libintl build */
-#undef BUILD_LIBINTL
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
 
-/* always defined to indicate that i18n is enabled */
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
 #undef ENABLE_NLS
 
-/* Gettext package */
-#undef GETTEXT_PACKAGE
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
 
-/* Define to 1 if you have the `bind_textdomain_codeset' function. */
-#undef HAVE_BIND_TEXTDOMAIN_CODESET
+/* Define to 1 if you have the `asprintf' function. */
+#undef HAVE_ASPRINTF
 
 /* set to 1 if msync with MS_ASYNC fails to update mtime */
 #undef HAVE_BROKEN_MS_ASYNC
 
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
 /* Define to 1 if you have the `chdir' function. */
 #undef HAVE_CHDIR
 
 /* Define to 1 if you have the <ctype.h> header file. */
 #undef HAVE_CTYPE_H
 
-/* Define to 1 if you have the `dcgettext' function. */
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
 #undef HAVE_DCGETTEXT
 
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FEOF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FGETS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
 /* Define to 1 if you have the declaration of `madvise', and to 0 if you
    don't. */
 #undef HAVE_DECL_MADVISE
    don't. */
 #undef HAVE_DECL_STRERROR_R
 
+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL__SNPRINTF
+
+/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL__SNWPRINTF
+
 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
    */
 #undef HAVE_DIRENT_H
 /* Define to 1 if you have the `fsync' function. */
 #undef HAVE_FSYNC
 
+/* Define to 1 if you have the `fwprintf' function. */
+#undef HAVE_FWPRINTF
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `getegid' function. */
+#undef HAVE_GETEGID
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getgid' function. */
+#undef HAVE_GETGID
+
 /* Define to 1 if you have the `getpagesize' function. */
 #undef HAVE_GETPAGESIZE
 
 /* Define to 1 if you have the `getuid' function. */
 #undef HAVE_GETUID
 
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
 /* Define to 1 if you have the <ieeefp.h> header file. */
 #undef HAVE_IEEEFP_H
 
-/* Define to 1 if you have the <inttypes.h> header file. */
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_INTMAX_T
+
+/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
 #undef HAVE_INTTYPES_H
 
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
 /* Define to 1 if you have the global variable 'int opterr'. */
 #undef HAVE_INT_OPTERR
 
 /* Define to 1 if you have the `isnan' function. */
 #undef HAVE_ISNAN
 
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
 /* Define if your <locale.h> file defines LC_MESSAGES. */
 #undef HAVE_LC_MESSAGES
 
+/* have got libdbi installed */
+#undef HAVE_LIBDBI
+
 /* Define to 1 if you have the <libgen.h> header file. */
 #undef HAVE_LIBGEN_H
 
-/* Define to 1 if you have the <libintl.h> header file. */
-#undef HAVE_LIBINTL_H
-
 /* Define to 1 if you have the `m' library (-lm). */
 #undef HAVE_LIBM
 
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
 /* Define to 1 if you have the <locale.h> header file. */
 #undef HAVE_LOCALE_H
 
+/* Define if you have the 'long double' type. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define if you have the 'long long' type. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if you have the <lualib.h> header file. */
+#undef HAVE_LUALIB_H
+
+/* Define to 1 if you have the <lua.h> header file. */
+#undef HAVE_LUA_H
+
 /* Define to 1 if you have the `madvise' function. */
 #undef HAVE_MADVISE
 
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
 /* Define to 1 if you have the `mktime' function. */
 #undef HAVE_MKTIME
 
 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
 #undef HAVE_NDIR_H
 
+/* Define to 1 if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
 /* Define to 1 if you have the `opendir' function. */
 #undef HAVE_OPENDIR
 
 /* Define to 1 if you have the `posix_madvise' function. */
 #undef HAVE_POSIX_MADVISE
 
+/* Define if your printf() function supports format strings with positions. */
+#undef HAVE_POSIX_PRINTF
+
 /* Define if you have POSIX threads libraries and header files. */
 #undef HAVE_PTHREAD
 
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
 /* Define to 1 if you have the `readdir' function. */
 #undef HAVE_READDIR
 
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
 /* Define to 1 if you have the `setlocale' function. */
 #undef HAVE_SETLOCALE
 
 /* Define to 1 if you have the `snprintf' function. */
 #undef HAVE_SNPRINTF
 
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#undef HAVE_STDINT_H_WITH_UINTMAX
+
 /* Define to 1 if you have the <stdio.h> header file. */
 #undef HAVE_STDIO_H
 
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
+/* Define to 1 if you have the `stpcpy' function. */
+#undef HAVE_STPCPY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
 /* Define to 1 if you have the `strchr' function. */
 #undef HAVE_STRCHR
 
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
 /* Define to 1 if you have the `strerror' function. */
 #undef HAVE_STRERROR
 
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
+
 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
    */
 #undef HAVE_SYS_DIR_H
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
 /* Define to 1 if you have the `tzset' function. */
 #undef HAVE_TZSET
 
+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_UINTMAX_T
+
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define if you have the 'unsigned long long' type. */
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
 /* Define to 1 if you have the `vprintf' function. */
 #undef HAVE_VPRINTF
 
 /* Define to 1 if you have the `vsnprintf' function. */
 #undef HAVE_VSNPRINTF
 
+/* Define if you have the 'wchar_t' type. */
+#undef HAVE_WCHAR_T
+
+/* Define to 1 if you have the `wcslen' function. */
+#undef HAVE_WCSLEN
+
+/* Define if you have the 'wint_t' type. */
+#undef HAVE_WINT_T
+
+/* Define to 1 if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define to 1 if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define to 1 if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
+
+/* Define to 1 if you have the `__fsetlocking' function. */
+#undef HAVE___FSETLOCKING
+
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
+/* Define if integer division by zero raises signal SIGFPE. */
+#undef INTDIV0_RAISES_SIGFPE
+
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
    */
 #undef LT_OBJDIR
 
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
 /* Name of package */
 #undef PACKAGE
 
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+#undef PRI_MACROS_BROKEN
+
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
 #undef PTHREAD_CREATE_JOINABLE
 /* Vertical label angle: -90.0 (default) or 90.0 */
 #undef RRDGRAPH_YLEGEND_ANGLE
 
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#undef SIZE_MAX
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+       STACK_DIRECTION > 0 => grows toward higher addresses
+       STACK_DIRECTION < 0 => grows toward lower addresses
+       STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
 #undef TM_IN_SYS_TIME
 
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
 /* Version number of package */
 #undef VERSION
 
 # endif
 #endif
 
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
 /* Define to empty if `const' does not conform to ANSI C. */
 #undef const
 
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `long int' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define as the type of the result of subtracting two pointers, if the system
+   doesn't define it. */
+#undef ptrdiff_t
+
+/* Define to empty if the C compiler doesn't support this keyword. */
+#undef signed
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to unsigned long or unsigned long long if <stdint.h> and
+   <inttypes.h> don't define. */
+#undef uintmax_t
+
 
 
 #ifdef MUST_HAVE_MALLOC_MALLOC_H
index bd8ba3451fb4dfe50f116e879024628e677a9721..239687b1b92994b6b8ebd491696a16ec391b9f67 100644 (file)
@@ -4,13 +4,13 @@
 %define with_ruby %{?_without_ruby: 0} %{?!_without_ruby: 1}
 %define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4)
 %define svnrev r1190
-%define pre rc9
 #define pretag 1.2.99908020600
+%define rrdcached_user rrdcached
 
 Summary: Round Robin Database Tool to store and display time-series data
 Name: rrdtool
-Version: 1.3.8
-Release: 1
+Version: 1.3.99909060808
+Release: 0.20%{?dist}
 License: GPLv2+ with exceptions
 Group: Applications/Databases
 URL: http://oss.oetiker.ch/rrdtool/
@@ -24,7 +24,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: dejavu-lgc-fonts
 BuildRequires: gcc-c++, openssl-devel, freetype-devel
 BuildRequires: libpng-devel, zlib-devel, intltool >= 0.35.0
-BuildRequires: cairo-devel >= 1.4.6, pango-devel >= 1.17
+BuildRequires: cairo-devel >= 1.2, pango-devel >= 1.14
 BuildRequires: libtool, groff
 BuildRequires: gettext, libxml2-devel
 %if 0%{?fedora} >= 7
@@ -143,6 +143,18 @@ Requires: %{name} = %{version}-%{release}
 The %{name}-ruby package includes RRDtool bindings for Ruby.
 %endif
 
+%package cached
+Summary: Data caching daemon for RRDtool
+Group: Applications/Databases
+Requires: %{name} = %{version}-%{release}
+
+%description cached
+rrdcached is a daemon that receives updates to existing RRD files,
+accumulates them and, if enough have been received or a defined time has
+passed, writes the updates to the RRD file.  The daemon was written with
+big setups in mind which usually runs into I/O related problems.  This
+daemon was written to alleviate these problems.
+
 %prep
 %if %{with_php}
 %setup -q -n %{name}-%{version} -a 1
@@ -176,6 +188,7 @@ cp -p /usr/lib/rpm/config.{guess,sub} php4/
 
 %build
 %configure \
+    CFLAGS="-g -O0" \
     --with-perl-options='INSTALLDIRS="vendor"' \
 %if %{with_tcl}
     --enable-tcl-site \
@@ -274,19 +287,44 @@ find examples/ -type f -exec chmod 0644 {} \;
         $RPM_BUILD_ROOT%{_datadir}/%{name}/examples \
         $RPM_BUILD_ROOT%{perl_vendorarch}/auto/*/{.packlist,*.bs}
 
+# Set up rrdcached
+%__install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/default
+%__install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
+%__install -m 0644 etc/rrdcached-default $RPM_BUILD_ROOT/%{_sysconfdir}/default/rrdcached
+%__install -m 0755 etc/rrdcached-init $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/rrdcached
+%__install -d -m 0755 -o nobody -g nobody $RPM_BUILD_ROOT/%{_localstatedir}/run/rrdcached
+
 %clean
 %{__rm} -rf $RPM_BUILD_ROOT
 
+%pre cached
+/usr/sbin/groupadd %rrdcached_user &>/dev/null ||:
+/usr/sbin/useradd -s /sbin/nologin -g %rrdcached_user -c %rrdcached_user -d %{_localstatedir}/run/rrdcached  %rrdcached_user &>/dev/null || :
+
 %post -p /sbin/ldconfig
 
+%post cached
+/sbin/chkconfig --add rrdcached
+/sbin/service rrdcached start
+
+%preun cached
+/sbin/service rrdcached stop
+
 %postun -p /sbin/ldconfig
 
+%postun cached
+/sbin/chkconfig --del rrdcached
+test "$1" != 0 || /usr/sbin/userdel %rrdcached_user &>/dev/null || :
+#test "$1" != 0 || /usr/sbin/groupdel %rrdcached_user &>/dev/null || :
+
 %files
 %defattr(-,root,root,-)
 %{_bindir}/*
+%exclude %{_bindir}/rrdcached
 %{_libdir}/*.so.*
 %{_datadir}/%{name}
 %{_mandir}/man1/*
+%exclude %{_mandir}/man1/rrdcached*
 
 %files devel
 %defattr(-,root,root,-)
@@ -337,7 +375,21 @@ find examples/ -type f -exec chmod 0644 {} \;
 %{ruby_sitearch}/RRD.so
 %endif
 
+%files cached
+%{_bindir}/rrdcached
+%config %{_sysconfdir}/default/*
+%config %{_sysconfdir}/rc.d/init.d/*
+%{_mandir}/man1/rrdcached*
+%attr(0775 %rrdcached_user %rrdcached_user) %dir %{_localstatedir}/run/rrdcached
+
 %changelog
+* Wed Oct 08 2008 Bernard Li <bernard@vanhpc.org>
+- Split rrdcached related files to -cached subpackage
+- Create rrdcached user and make rrdcached related files owned by it
+
+* Tue Oct 07 2008 Bernard Li <bernard@vanhpc.org>
+- Include librrd.pc file in -devel package
+
 * Sun Jun 08 2008 Jarod Wilson <jwilson@redhat.com> 1.3-0.20.rc9
 - Update to rrdtool 1.3 rc9
 - Minor spec tweaks to permit building on older EL
index 74d382f3962e7fd8555f982f471f711423d25a29..05d75b007475c6fc617f2850c55b0d576d0747b3 100644 (file)
@@ -12,6 +12,8 @@ endif
 INCLUDES = -DLOCALEDIR="\"$(datadir)/locale\""
 RRD_DEFAULT_FONT=@RRD_DEFAULT_FONT@
 AM_CPPFLAGS = -DRRD_DEFAULT_FONT=\"$(RRD_DEFAULT_FONT)\" -DNUMVERS=@NUMVERS@
+AM_CFLAGS = @CFLAGS@
+## no including this by default @WERROR@
 
 UPD_C_FILES =          \
        rrd_parsetime.c \
@@ -23,8 +25,10 @@ UPD_C_FILES =                \
        rrd_info.c      \
        rrd_error.c     \
        rrd_open.c      \
+       rrd_client.c    \
        rrd_nan_inf.c   \
        rrd_rpncalc.c   \
+       rrd_utils.c     \
        rrd_update.c
 
 RRD_C_FILES =          \
@@ -41,12 +45,14 @@ RRD_C_FILES =               \
        rrd_xport.c     \
        rrd_gfx.c \
        rrd_dump.c      \
+       rrd_flushcached.c \
        rrd_fetch.c     \
        rrd_resize.c \
        rrd_tune.c
 
 noinst_HEADERS = \
        unused.h \
+        gettext.h \
        rrd_getopt.h rrd_parsetime.h \
        rrd_config_bottom.h rrd_i18n.h \
        rrd_format.h rrd_tool.h rrd_xport.h rrd.h rrd_rpncalc.h \
@@ -54,6 +60,10 @@ noinst_HEADERS = \
        fnv.h rrd_graph.h \
        rrd_is_thread_safe.h
 
+if BUILD_LIBDBI
+RRD_C_FILES += rrd_fetch_libdbi.c
+endif
+
 if BUILD_GETOPT
 noinst_HEADERS += rrd_getopt.h
 UPD_C_FILES += rrd_getopt.c rrd_getopt1.c
@@ -77,14 +87,14 @@ librrd_la_LDFLAGS         += -export-symbols librrd.sym
 
 librrd_th_la_SOURCES         = $(UPD_C_FILES) $(RRD_C_FILES) rrd_thread_safe.c
 librrd_th_la_DEPENDENCIES    = librrd.sym
-librrd_th_la_CFLAGS          = $(MULTITHREAD_CFLAGS)
+librrd_th_la_CFLAGS          = $(AM_CFLAGS) $(MULTITHREAD_CFLAGS)
 librrd_th_la_LDFLAGS         = $(MULTITHREAD_LDFLAGS) -version-info @LIBVERS@
 librrd_th_la_LDFLAGS         += -export-symbols librrd.sym
 librrd_th_la_LIBADD          = $(ALL_LIBS)
 
-include_HEADERS        = rrd.h rrd_format.h
+include_HEADERS        = rrd.h rrd_format.h rrd_client.h
 
-bin_PROGRAMS   = rrdtool rrdupdate
+bin_PROGRAMS   = rrdtool rrdupdate rrdcached
 
 if BUILD_RRDCGI
 bin_PROGRAMS += rrdcgi
@@ -100,6 +110,11 @@ rrdtool_SOURCES = rrd_tool.c
 rrdtool_DEPENDENCIES = librrd.la
 rrdtool_LDADD  = librrd.la
 
+rrdcached_SOURCES = rrd_daemon.c
+rrdcached_DEPENDENCIES = librrd_th.la
+rrdcached_CPPFLAGS = -DVERSION='"$(VERSION)"' -DLOCALSTATEDIR='"$(localstatedir)"'
+rrdcached_LDADD = librrd_th.la
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = librrd.pc
 
@@ -108,5 +123,6 @@ pkgconfig_DATA = librrd.pc
 EXTRA_DIST= librrd.pc.in strftime.c strftime.h  rrd_getopt.c rrd_getopt1.c rrd_getopt.h \
        win32comp.c  rrd_thread_safe_nt.c get_ver.awk librrd.sym.in.in plbasename.c   plbasename.h   
 
+
 librrd.sym: librrd.sym.in
-       grep -v LIBC_HAS_GETOPT_LONG librrd.sym.in >$@
+       $(AM_V_GEN)grep -v LIBC_HAS_GETOPT_LONG librrd.sym.in >$@
index fb863bd9240468f5d00aada1cc19c7d7d1043dcf..679d3beeafb8fef8454f9650265e8317a650922d 100644 (file)
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10.2 from Makefile.am.
+# Makefile.in generated by automake 1.11 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -24,8 +25,9 @@
 
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -41,90 +43,140 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-@BUILD_GETOPT_TRUE@am__append_1 = rrd_getopt.h
-@BUILD_GETOPT_TRUE@am__append_2 = rrd_getopt.c rrd_getopt1.c
-@BUILD_MULTITHREAD_TRUE@am__append_3 = librrd_th.la
-bin_PROGRAMS = rrdtool$(EXEEXT) rrdupdate$(EXEEXT) $(am__EXEEXT_1)
-@BUILD_RRDCGI_TRUE@am__append_4 = rrdcgi
+@BUILD_LIBDBI_TRUE@am__append_1 = rrd_fetch_libdbi.c
+@BUILD_GETOPT_TRUE@am__append_2 = rrd_getopt.h
+@BUILD_GETOPT_TRUE@am__append_3 = rrd_getopt.c rrd_getopt1.c
+@BUILD_MULTITHREAD_TRUE@am__append_4 = librrd_th.la
+bin_PROGRAMS = rrdtool$(EXEEXT) rrdupdate$(EXEEXT) rrdcached$(EXEEXT) \
+       $(am__EXEEXT_1)
+@BUILD_RRDCGI_TRUE@am__append_5 = rrdcgi
 subdir = src
 DIST_COMMON = $(am__noinst_HEADERS_DIST) $(include_HEADERS) \
        $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
        $(srcdir)/librrd.pc.in $(srcdir)/librrd.sym.in.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
+       $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
+       $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \
+       $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
+       $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
+       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/rrd_config.h
 CONFIG_CLEAN_FILES = librrd.sym.in librrd.pc
+CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
        "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-am__objects_1 = hash_32.lo pngsize.lo rrd_create.lo rrd_graph.lo \
+am__librrd_la_SOURCES_DIST = hash_32.c pngsize.c rrd_create.c \
+       rrd_graph.c rrd_graph_helper.c rrd_version.c rrd_last.c \
+       rrd_lastupdate.c rrd_first.c rrd_restore.c rrd_xport.c \
+       rrd_gfx.c rrd_dump.c rrd_flushcached.c rrd_fetch.c \
+       rrd_resize.c rrd_tune.c rrd_fetch_libdbi.c
+@BUILD_LIBDBI_TRUE@am__objects_1 = rrd_fetch_libdbi.lo
+am__objects_2 = hash_32.lo pngsize.lo rrd_create.lo rrd_graph.lo \
        rrd_graph_helper.lo rrd_version.lo rrd_last.lo \
        rrd_lastupdate.lo rrd_first.lo rrd_restore.lo rrd_xport.lo \
-       rrd_gfx.lo rrd_dump.lo rrd_fetch.lo rrd_resize.lo rrd_tune.lo
-am_librrd_la_OBJECTS = $(am__objects_1)
+       rrd_gfx.lo rrd_dump.lo rrd_flushcached.lo rrd_fetch.lo \
+       rrd_resize.lo rrd_tune.lo $(am__objects_1)
+am_librrd_la_OBJECTS = $(am__objects_2)
 librrd_la_OBJECTS = $(am_librrd_la_OBJECTS)
-librrd_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+librrd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(librrd_la_LDFLAGS) $(LDFLAGS) -o $@
 am__librrd_th_la_SOURCES_DIST = rrd_parsetime.c rrd_hw.c rrd_hw_math.c \
        rrd_hw_update.c rrd_diff.c rrd_format.c rrd_info.c rrd_error.c \
-       rrd_open.c rrd_nan_inf.c rrd_rpncalc.c rrd_update.c \
-       rrd_getopt.c rrd_getopt1.c hash_32.c pngsize.c rrd_create.c \
-       rrd_graph.c rrd_graph_helper.c rrd_version.c rrd_last.c \
-       rrd_lastupdate.c rrd_first.c rrd_restore.c rrd_xport.c \
-       rrd_gfx.c rrd_dump.c rrd_fetch.c rrd_resize.c rrd_tune.c \
-       rrd_thread_safe.c
-@BUILD_GETOPT_TRUE@am__objects_2 = librrd_th_la-rrd_getopt.lo \
+       rrd_open.c rrd_client.c rrd_nan_inf.c rrd_rpncalc.c \
+       rrd_utils.c rrd_update.c rrd_getopt.c rrd_getopt1.c hash_32.c \
+       pngsize.c rrd_create.c rrd_graph.c rrd_graph_helper.c \
+       rrd_version.c rrd_last.c rrd_lastupdate.c rrd_first.c \
+       rrd_restore.c rrd_xport.c rrd_gfx.c rrd_dump.c \
+       rrd_flushcached.c rrd_fetch.c rrd_resize.c rrd_tune.c \
+       rrd_fetch_libdbi.c rrd_thread_safe.c
+@BUILD_GETOPT_TRUE@am__objects_3 = librrd_th_la-rrd_getopt.lo \
 @BUILD_GETOPT_TRUE@    librrd_th_la-rrd_getopt1.lo
-am__objects_3 = librrd_th_la-rrd_parsetime.lo librrd_th_la-rrd_hw.lo \
+am__objects_4 = librrd_th_la-rrd_parsetime.lo librrd_th_la-rrd_hw.lo \
        librrd_th_la-rrd_hw_math.lo librrd_th_la-rrd_hw_update.lo \
        librrd_th_la-rrd_diff.lo librrd_th_la-rrd_format.lo \
        librrd_th_la-rrd_info.lo librrd_th_la-rrd_error.lo \
-       librrd_th_la-rrd_open.lo librrd_th_la-rrd_nan_inf.lo \
-       librrd_th_la-rrd_rpncalc.lo librrd_th_la-rrd_update.lo \
-       $(am__objects_2)
-am__objects_4 = librrd_th_la-hash_32.lo librrd_th_la-pngsize.lo \
+       librrd_th_la-rrd_open.lo librrd_th_la-rrd_client.lo \
+       librrd_th_la-rrd_nan_inf.lo librrd_th_la-rrd_rpncalc.lo \
+       librrd_th_la-rrd_utils.lo librrd_th_la-rrd_update.lo \
+       $(am__objects_3)
+@BUILD_LIBDBI_TRUE@am__objects_5 = librrd_th_la-rrd_fetch_libdbi.lo
+am__objects_6 = librrd_th_la-hash_32.lo librrd_th_la-pngsize.lo \
        librrd_th_la-rrd_create.lo librrd_th_la-rrd_graph.lo \
        librrd_th_la-rrd_graph_helper.lo librrd_th_la-rrd_version.lo \
        librrd_th_la-rrd_last.lo librrd_th_la-rrd_lastupdate.lo \
        librrd_th_la-rrd_first.lo librrd_th_la-rrd_restore.lo \
        librrd_th_la-rrd_xport.lo librrd_th_la-rrd_gfx.lo \
-       librrd_th_la-rrd_dump.lo librrd_th_la-rrd_fetch.lo \
-       librrd_th_la-rrd_resize.lo librrd_th_la-rrd_tune.lo
-am_librrd_th_la_OBJECTS = $(am__objects_3) $(am__objects_4) \
+       librrd_th_la-rrd_dump.lo librrd_th_la-rrd_flushcached.lo \
+       librrd_th_la-rrd_fetch.lo librrd_th_la-rrd_resize.lo \
+       librrd_th_la-rrd_tune.lo $(am__objects_5)
+am_librrd_th_la_OBJECTS = $(am__objects_4) $(am__objects_6) \
        librrd_th_la-rrd_thread_safe.lo
 librrd_th_la_OBJECTS = $(am_librrd_th_la_OBJECTS)
-librrd_th_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+librrd_th_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(librrd_th_la_CFLAGS) \
        $(CFLAGS) $(librrd_th_la_LDFLAGS) $(LDFLAGS) -o $@
 @BUILD_MULTITHREAD_TRUE@am_librrd_th_la_rpath = -rpath $(libdir)
 librrdupd_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
 am__librrdupd_la_SOURCES_DIST = rrd_parsetime.c rrd_hw.c rrd_hw_math.c \
        rrd_hw_update.c rrd_diff.c rrd_format.c rrd_info.c rrd_error.c \
-       rrd_open.c rrd_nan_inf.c rrd_rpncalc.c rrd_update.c \
-       rrd_getopt.c rrd_getopt1.c rrd_not_thread_safe.c
-@BUILD_GETOPT_TRUE@am__objects_5 = rrd_getopt.lo rrd_getopt1.lo
-am__objects_6 = rrd_parsetime.lo rrd_hw.lo rrd_hw_math.lo \
+       rrd_open.c rrd_client.c rrd_nan_inf.c rrd_rpncalc.c \
+       rrd_utils.c rrd_update.c rrd_getopt.c rrd_getopt1.c \
+       rrd_not_thread_safe.c
+@BUILD_GETOPT_TRUE@am__objects_7 = rrd_getopt.lo rrd_getopt1.lo
+am__objects_8 = rrd_parsetime.lo rrd_hw.lo rrd_hw_math.lo \
        rrd_hw_update.lo rrd_diff.lo rrd_format.lo rrd_info.lo \
-       rrd_error.lo rrd_open.lo rrd_nan_inf.lo rrd_rpncalc.lo \
-       rrd_update.lo $(am__objects_5)
-am_librrdupd_la_OBJECTS = $(am__objects_6) rrd_not_thread_safe.lo
+       rrd_error.lo rrd_open.lo rrd_client.lo rrd_nan_inf.lo \
+       rrd_rpncalc.lo rrd_utils.lo rrd_update.lo $(am__objects_7)
+am_librrdupd_la_OBJECTS = $(am__objects_8) rrd_not_thread_safe.lo
 librrdupd_la_OBJECTS = $(am_librrdupd_la_OBJECTS)
 @BUILD_RRDCGI_TRUE@am__EXEEXT_1 = rrdcgi$(EXEEXT)
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
+am_rrdcached_OBJECTS = rrdcached-rrd_daemon.$(OBJEXT)
+rrdcached_OBJECTS = $(am_rrdcached_OBJECTS)
 am_rrdcgi_OBJECTS = rrd_cgi.$(OBJEXT)
 rrdcgi_OBJECTS = $(am_rrdcgi_OBJECTS)
 rrdcgi_DEPENDENCIES = librrd.la
@@ -136,46 +188,62 @@ rrdupdate_DEPENDENCIES = librrdupd.la
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo "  CC    " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo "  CCLD  " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(librrd_la_SOURCES) $(librrd_th_la_SOURCES) \
-       $(librrdupd_la_SOURCES) $(rrdcgi_SOURCES) $(rrdtool_SOURCES) \
-       $(rrdupdate_SOURCES)
-DIST_SOURCES = $(librrd_la_SOURCES) $(am__librrd_th_la_SOURCES_DIST) \
-       $(am__librrdupd_la_SOURCES_DIST) $(rrdcgi_SOURCES) \
+       $(librrdupd_la_SOURCES) $(rrdcached_SOURCES) $(rrdcgi_SOURCES) \
        $(rrdtool_SOURCES) $(rrdupdate_SOURCES)
-pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DIST_SOURCES = $(am__librrd_la_SOURCES_DIST) \
+       $(am__librrd_th_la_SOURCES_DIST) \
+       $(am__librrdupd_la_SOURCES_DIST) $(rrdcached_SOURCES) \
+       $(rrdcgi_SOURCES) $(rrdtool_SOURCES) $(rrdupdate_SOURCES)
 DATA = $(pkgconfig_DATA)
-includeHEADERS_INSTALL = $(INSTALL_HEADER)
-am__noinst_HEADERS_DIST = unused.h rrd_getopt.h rrd_parsetime.h \
-       rrd_config_bottom.h rrd_i18n.h rrd_format.h rrd_tool.h \
-       rrd_xport.h rrd.h rrd_rpncalc.h rrd_hw.h rrd_hw_math.h \
-       rrd_hw_update.h fnv.h rrd_graph.h rrd_is_thread_safe.h
+am__noinst_HEADERS_DIST = unused.h gettext.h rrd_getopt.h \
+       rrd_parsetime.h rrd_config_bottom.h rrd_i18n.h rrd_format.h \
+       rrd_tool.h rrd_xport.h rrd.h rrd_rpncalc.h rrd_hw.h \
+       rrd_hw_math.h rrd_hw_update.h fnv.h rrd_graph.h \
+       rrd_is_thread_safe.h
 HEADERS = $(include_HEADERS) $(noinst_HEADERS)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
 ALL_LIBS = @ALL_LIBS@
-ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-CATALOGS = @CATALOGS@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+COMP_LUA = @COMP_LUA@
 COMP_PERL = @COMP_PERL@
 COMP_PYTHON = @COMP_PYTHON@
 COMP_RUBY = @COMP_RUBY@
@@ -194,37 +262,50 @@ ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-GMOFILES = @GMOFILES@
+GENCAT = @GENCAT@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
 GMSGFMT = @GMSGFMT@
 GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_WPRINTF = @HAVE_WPRINTF@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
 INTLLIBS = @INTLLIBS@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_PERL = @INTLTOOL_PERL@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
 LIBVERS = @LIBVERS@
-LIB_LIBINTL = @LIB_LIBINTL@
 LIPO = @LIPO@
 LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
+LUA = @LUA@
+LUA_CFLAGS = @LUA_CFLAGS@
+LUA_DEFINES = @LUA_DEFINES@
+LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@
+LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@
+LUA_LFLAGS = @LUA_LFLAGS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
-MSGFMT_OPTS = @MSGFMT_OPTS@
 MSGMERGE = @MSGMERGE@
 MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@
 MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@
@@ -255,10 +336,7 @@ PERL_VERSION = @PERL_VERSION@
 PKGCONFIG = @PKGCONFIG@
 POD2HTML = @POD2HTML@
 POD2MAN = @POD2MAN@
-POFILES = @POFILES@
 POSUB = @POSUB@
-PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
-PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
@@ -290,8 +368,10 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
 TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
 TCL_VERSION = @TCL_VERSION@
 TROFF = @TROFF@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
+WERROR = @WERROR@
 XGETTEXT = @XGETTEXT@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -357,34 +437,23 @@ top_srcdir = @top_srcdir@
 @STATIC_PROGRAMS_TRUE@AM_LDFLAGS = -all-static
 INCLUDES = -DLOCALEDIR="\"$(datadir)/locale\""
 AM_CPPFLAGS = -DRRD_DEFAULT_FONT=\"$(RRD_DEFAULT_FONT)\" -DNUMVERS=@NUMVERS@
+AM_CFLAGS = @CFLAGS@
 UPD_C_FILES = rrd_parsetime.c rrd_hw.c rrd_hw_math.c rrd_hw_update.c \
        rrd_diff.c rrd_format.c rrd_info.c rrd_error.c rrd_open.c \
-       rrd_nan_inf.c rrd_rpncalc.c rrd_update.c $(am__append_2)
-RRD_C_FILES = \
-       hash_32.c       \
-       pngsize.c       \
-       rrd_create.c    \
-       rrd_graph.c     \
-       rrd_graph_helper.c      \
-       rrd_version.c   \
-       rrd_last.c      \
-       rrd_lastupdate.c        \
-       rrd_first.c     \
-       rrd_restore.c   \
-       rrd_xport.c     \
-       rrd_gfx.c \
-       rrd_dump.c      \
-       rrd_fetch.c     \
-       rrd_resize.c \
-       rrd_tune.c
-
-noinst_HEADERS = unused.h rrd_getopt.h rrd_parsetime.h \
+       rrd_client.c rrd_nan_inf.c rrd_rpncalc.c rrd_utils.c \
+       rrd_update.c $(am__append_3)
+RRD_C_FILES = hash_32.c pngsize.c rrd_create.c rrd_graph.c \
+       rrd_graph_helper.c rrd_version.c rrd_last.c rrd_lastupdate.c \
+       rrd_first.c rrd_restore.c rrd_xport.c rrd_gfx.c rrd_dump.c \
+       rrd_flushcached.c rrd_fetch.c rrd_resize.c rrd_tune.c \
+       $(am__append_1)
+noinst_HEADERS = unused.h gettext.h rrd_getopt.h rrd_parsetime.h \
        rrd_config_bottom.h rrd_i18n.h rrd_format.h rrd_tool.h \
        rrd_xport.h rrd.h rrd_rpncalc.h rrd_hw.h rrd_hw_math.h \
        rrd_hw_update.h fnv.h rrd_graph.h rrd_is_thread_safe.h \
-       $(am__append_1)
+       $(am__append_2)
 noinst_LTLIBRARIES = librrdupd.la
-lib_LTLIBRARIES = librrd.la $(am__append_3)
+lib_LTLIBRARIES = librrd.la $(am__append_4)
 librrdupd_la_SOURCES = $(UPD_C_FILES) rrd_not_thread_safe.c
 librrdupd_la_LIBADD = $(CORE_LIBS) @LIB_LIBINTL@
 librrd_la_SOURCES = $(RRD_C_FILES)
@@ -393,11 +462,11 @@ librrd_la_LIBADD = librrdupd.la $(ALL_LIBS)
 librrd_la_LDFLAGS = -version-info @LIBVERS@ -export-symbols librrd.sym
 librrd_th_la_SOURCES = $(UPD_C_FILES) $(RRD_C_FILES) rrd_thread_safe.c
 librrd_th_la_DEPENDENCIES = librrd.sym
-librrd_th_la_CFLAGS = $(MULTITHREAD_CFLAGS)
+librrd_th_la_CFLAGS = $(AM_CFLAGS) $(MULTITHREAD_CFLAGS)
 librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info @LIBVERS@ \
        -export-symbols librrd.sym
 librrd_th_la_LIBADD = $(ALL_LIBS)
-include_HEADERS = rrd.h rrd_format.h
+include_HEADERS = rrd.h rrd_format.h rrd_client.h
 rrdcgi_SOURCES = rrd_cgi.c
 rrdcgi_LDADD = librrd.la
 rrdupdate_SOURCES = rrdupdate.c
@@ -405,6 +474,10 @@ rrdupdate_LDADD = librrdupd.la
 rrdtool_SOURCES = rrd_tool.c
 rrdtool_DEPENDENCIES = librrd.la
 rrdtool_LDADD = librrd.la
+rrdcached_SOURCES = rrd_daemon.c
+rrdcached_DEPENDENCIES = librrd_th.la
+rrdcached_CPPFLAGS = -DVERSION='"$(VERSION)"' -DLOCALSTATEDIR='"$(localstatedir)"'
+rrdcached_LDADD = librrd_th.la
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = librrd.pc
 
@@ -426,9 +499,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__confi
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  src/Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnu src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -446,6 +519,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 librrd.sym.in: $(top_builddir)/config.status $(srcdir)/librrd.sym.in.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 librrd.pc: $(top_builddir)/config.status $(srcdir)/librrd.pc.in
@@ -453,20 +527,24 @@ librrd.pc: $(top_builddir)/config.status $(srcdir)/librrd.pc.in
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
        test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+       list2=; for p in $$list; do \
          if test -f $$p; then \
-           f=$(am__strip_dir) \
-           echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           list2="$$list2 $$p"; \
          else :; fi; \
-       done
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+       }
 
 uninstall-libLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         p=$(am__strip_dir) \
-         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
        done
 
 clean-libLTLIBRARIES:
@@ -487,48 +565,66 @@ clean-noinstLTLIBRARIES:
          rm -f "$${dir}/so_locations"; \
        done
 librrd.la: $(librrd_la_OBJECTS) $(librrd_la_DEPENDENCIES) 
-       $(librrd_la_LINK) -rpath $(libdir) $(librrd_la_OBJECTS) $(librrd_la_LIBADD) $(LIBS)
+       $(AM_V_CCLD)$(librrd_la_LINK) -rpath $(libdir) $(librrd_la_OBJECTS) $(librrd_la_LIBADD) $(LIBS)
 librrd_th.la: $(librrd_th_la_OBJECTS) $(librrd_th_la_DEPENDENCIES) 
-       $(librrd_th_la_LINK) $(am_librrd_th_la_rpath) $(librrd_th_la_OBJECTS) $(librrd_th_la_LIBADD) $(LIBS)
+       $(AM_V_CCLD)$(librrd_th_la_LINK) $(am_librrd_th_la_rpath) $(librrd_th_la_OBJECTS) $(librrd_th_la_LIBADD) $(LIBS)
 librrdupd.la: $(librrdupd_la_OBJECTS) $(librrdupd_la_DEPENDENCIES) 
-       $(LINK)  $(librrdupd_la_OBJECTS) $(librrdupd_la_LIBADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK)  $(librrdupd_la_OBJECTS) $(librrdupd_la_LIBADD) $(LIBS)
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
        test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-binPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 clean-binPROGRAMS:
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+rrdcached$(EXEEXT): $(rrdcached_OBJECTS) $(rrdcached_DEPENDENCIES) 
+       @rm -f rrdcached$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(rrdcached_OBJECTS) $(rrdcached_LDADD) $(LIBS)
 rrdcgi$(EXEEXT): $(rrdcgi_OBJECTS) $(rrdcgi_DEPENDENCIES) 
        @rm -f rrdcgi$(EXEEXT)
-       $(LINK) $(rrdcgi_OBJECTS) $(rrdcgi_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(rrdcgi_OBJECTS) $(rrdcgi_LDADD) $(LIBS)
 rrdtool$(EXEEXT): $(rrdtool_OBJECTS) $(rrdtool_DEPENDENCIES) 
        @rm -f rrdtool$(EXEEXT)
-       $(LINK) $(rrdtool_OBJECTS) $(rrdtool_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(rrdtool_OBJECTS) $(rrdtool_LDADD) $(LIBS)
 rrdupdate$(EXEEXT): $(rrdupdate_OBJECTS) $(rrdupdate_DEPENDENCIES) 
        @rm -f rrdupdate$(EXEEXT)
-       $(LINK) $(rrdupdate_OBJECTS) $(rrdupdate_LDADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK) $(rrdupdate_OBJECTS) $(rrdupdate_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -539,12 +635,15 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash_32.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-hash_32.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-pngsize.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_client.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_create.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_diff.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_dump.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_error.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_fetch.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_fetch_libdbi.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_first.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_flushcached.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_format.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_getopt.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_getopt1.Plo@am__quote@
@@ -566,16 +665,20 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_thread_safe.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_tune.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_update.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_utils.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_version.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_xport.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngsize.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_cgi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_client.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_create.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_diff.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_dump.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_error.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_fetch.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_fetch_libdbi.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_first.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_flushcached.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_format.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_getopt.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_getopt1.Plo@am__quote@
@@ -598,247 +701,331 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_tool.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_tune.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_update.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_utils.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_version.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_xport.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrdcached-rrd_daemon.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrdupdate.Po@am__quote@
 
 .c.o:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
 
 librrd_th_la-rrd_parsetime.lo: rrd_parsetime.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_parsetime.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_parsetime.Tpo -c -o librrd_th_la-rrd_parsetime.lo `test -f 'rrd_parsetime.c' || echo '$(srcdir)/'`rrd_parsetime.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_parsetime.Tpo $(DEPDIR)/librrd_th_la-rrd_parsetime.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_parsetime.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_parsetime.Tpo -c -o librrd_th_la-rrd_parsetime.lo `test -f 'rrd_parsetime.c' || echo '$(srcdir)/'`rrd_parsetime.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_parsetime.Tpo $(DEPDIR)/librrd_th_la-rrd_parsetime.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_parsetime.c' object='librrd_th_la-rrd_parsetime.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_parsetime.lo `test -f 'rrd_parsetime.c' || echo '$(srcdir)/'`rrd_parsetime.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_parsetime.lo `test -f 'rrd_parsetime.c' || echo '$(srcdir)/'`rrd_parsetime.c
 
 librrd_th_la-rrd_hw.lo: rrd_hw.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_hw.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_hw.Tpo -c -o librrd_th_la-rrd_hw.lo `test -f 'rrd_hw.c' || echo '$(srcdir)/'`rrd_hw.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_hw.Tpo $(DEPDIR)/librrd_th_la-rrd_hw.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_hw.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_hw.Tpo -c -o librrd_th_la-rrd_hw.lo `test -f 'rrd_hw.c' || echo '$(srcdir)/'`rrd_hw.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_hw.Tpo $(DEPDIR)/librrd_th_la-rrd_hw.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_hw.c' object='librrd_th_la-rrd_hw.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_hw.lo `test -f 'rrd_hw.c' || echo '$(srcdir)/'`rrd_hw.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_hw.lo `test -f 'rrd_hw.c' || echo '$(srcdir)/'`rrd_hw.c
 
 librrd_th_la-rrd_hw_math.lo: rrd_hw_math.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_hw_math.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_hw_math.Tpo -c -o librrd_th_la-rrd_hw_math.lo `test -f 'rrd_hw_math.c' || echo '$(srcdir)/'`rrd_hw_math.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_hw_math.Tpo $(DEPDIR)/librrd_th_la-rrd_hw_math.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_hw_math.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_hw_math.Tpo -c -o librrd_th_la-rrd_hw_math.lo `test -f 'rrd_hw_math.c' || echo '$(srcdir)/'`rrd_hw_math.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_hw_math.Tpo $(DEPDIR)/librrd_th_la-rrd_hw_math.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_hw_math.c' object='librrd_th_la-rrd_hw_math.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_hw_math.lo `test -f 'rrd_hw_math.c' || echo '$(srcdir)/'`rrd_hw_math.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_hw_math.lo `test -f 'rrd_hw_math.c' || echo '$(srcdir)/'`rrd_hw_math.c
 
 librrd_th_la-rrd_hw_update.lo: rrd_hw_update.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_hw_update.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_hw_update.Tpo -c -o librrd_th_la-rrd_hw_update.lo `test -f 'rrd_hw_update.c' || echo '$(srcdir)/'`rrd_hw_update.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_hw_update.Tpo $(DEPDIR)/librrd_th_la-rrd_hw_update.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_hw_update.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_hw_update.Tpo -c -o librrd_th_la-rrd_hw_update.lo `test -f 'rrd_hw_update.c' || echo '$(srcdir)/'`rrd_hw_update.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_hw_update.Tpo $(DEPDIR)/librrd_th_la-rrd_hw_update.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_hw_update.c' object='librrd_th_la-rrd_hw_update.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_hw_update.lo `test -f 'rrd_hw_update.c' || echo '$(srcdir)/'`rrd_hw_update.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_hw_update.lo `test -f 'rrd_hw_update.c' || echo '$(srcdir)/'`rrd_hw_update.c
 
 librrd_th_la-rrd_diff.lo: rrd_diff.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_diff.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_diff.Tpo -c -o librrd_th_la-rrd_diff.lo `test -f 'rrd_diff.c' || echo '$(srcdir)/'`rrd_diff.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_diff.Tpo $(DEPDIR)/librrd_th_la-rrd_diff.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_diff.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_diff.Tpo -c -o librrd_th_la-rrd_diff.lo `test -f 'rrd_diff.c' || echo '$(srcdir)/'`rrd_diff.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_diff.Tpo $(DEPDIR)/librrd_th_la-rrd_diff.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_diff.c' object='librrd_th_la-rrd_diff.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_diff.lo `test -f 'rrd_diff.c' || echo '$(srcdir)/'`rrd_diff.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_diff.lo `test -f 'rrd_diff.c' || echo '$(srcdir)/'`rrd_diff.c
 
 librrd_th_la-rrd_format.lo: rrd_format.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_format.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_format.Tpo -c -o librrd_th_la-rrd_format.lo `test -f 'rrd_format.c' || echo '$(srcdir)/'`rrd_format.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_format.Tpo $(DEPDIR)/librrd_th_la-rrd_format.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_format.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_format.Tpo -c -o librrd_th_la-rrd_format.lo `test -f 'rrd_format.c' || echo '$(srcdir)/'`rrd_format.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_format.Tpo $(DEPDIR)/librrd_th_la-rrd_format.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_format.c' object='librrd_th_la-rrd_format.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_format.lo `test -f 'rrd_format.c' || echo '$(srcdir)/'`rrd_format.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_format.lo `test -f 'rrd_format.c' || echo '$(srcdir)/'`rrd_format.c
 
 librrd_th_la-rrd_info.lo: rrd_info.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_info.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_info.Tpo -c -o librrd_th_la-rrd_info.lo `test -f 'rrd_info.c' || echo '$(srcdir)/'`rrd_info.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_info.Tpo $(DEPDIR)/librrd_th_la-rrd_info.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_info.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_info.Tpo -c -o librrd_th_la-rrd_info.lo `test -f 'rrd_info.c' || echo '$(srcdir)/'`rrd_info.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_info.Tpo $(DEPDIR)/librrd_th_la-rrd_info.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_info.c' object='librrd_th_la-rrd_info.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_info.lo `test -f 'rrd_info.c' || echo '$(srcdir)/'`rrd_info.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_info.lo `test -f 'rrd_info.c' || echo '$(srcdir)/'`rrd_info.c
 
 librrd_th_la-rrd_error.lo: rrd_error.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_error.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_error.Tpo -c -o librrd_th_la-rrd_error.lo `test -f 'rrd_error.c' || echo '$(srcdir)/'`rrd_error.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_error.Tpo $(DEPDIR)/librrd_th_la-rrd_error.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_error.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_error.Tpo -c -o librrd_th_la-rrd_error.lo `test -f 'rrd_error.c' || echo '$(srcdir)/'`rrd_error.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_error.Tpo $(DEPDIR)/librrd_th_la-rrd_error.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_error.c' object='librrd_th_la-rrd_error.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_error.lo `test -f 'rrd_error.c' || echo '$(srcdir)/'`rrd_error.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_error.lo `test -f 'rrd_error.c' || echo '$(srcdir)/'`rrd_error.c
 
 librrd_th_la-rrd_open.lo: rrd_open.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_open.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_open.Tpo -c -o librrd_th_la-rrd_open.lo `test -f 'rrd_open.c' || echo '$(srcdir)/'`rrd_open.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_open.Tpo $(DEPDIR)/librrd_th_la-rrd_open.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_open.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_open.Tpo -c -o librrd_th_la-rrd_open.lo `test -f 'rrd_open.c' || echo '$(srcdir)/'`rrd_open.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_open.Tpo $(DEPDIR)/librrd_th_la-rrd_open.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_open.c' object='librrd_th_la-rrd_open.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_open.lo `test -f 'rrd_open.c' || echo '$(srcdir)/'`rrd_open.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_open.lo `test -f 'rrd_open.c' || echo '$(srcdir)/'`rrd_open.c
+
+librrd_th_la-rrd_client.lo: rrd_client.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_client.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_client.Tpo -c -o librrd_th_la-rrd_client.lo `test -f 'rrd_client.c' || echo '$(srcdir)/'`rrd_client.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_client.Tpo $(DEPDIR)/librrd_th_la-rrd_client.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_client.c' object='librrd_th_la-rrd_client.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_client.lo `test -f 'rrd_client.c' || echo '$(srcdir)/'`rrd_client.c
 
 librrd_th_la-rrd_nan_inf.lo: rrd_nan_inf.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_nan_inf.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_nan_inf.Tpo -c -o librrd_th_la-rrd_nan_inf.lo `test -f 'rrd_nan_inf.c' || echo '$(srcdir)/'`rrd_nan_inf.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_nan_inf.Tpo $(DEPDIR)/librrd_th_la-rrd_nan_inf.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_nan_inf.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_nan_inf.Tpo -c -o librrd_th_la-rrd_nan_inf.lo `test -f 'rrd_nan_inf.c' || echo '$(srcdir)/'`rrd_nan_inf.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_nan_inf.Tpo $(DEPDIR)/librrd_th_la-rrd_nan_inf.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_nan_inf.c' object='librrd_th_la-rrd_nan_inf.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_nan_inf.lo `test -f 'rrd_nan_inf.c' || echo '$(srcdir)/'`rrd_nan_inf.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_nan_inf.lo `test -f 'rrd_nan_inf.c' || echo '$(srcdir)/'`rrd_nan_inf.c
 
 librrd_th_la-rrd_rpncalc.lo: rrd_rpncalc.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_rpncalc.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_rpncalc.Tpo -c -o librrd_th_la-rrd_rpncalc.lo `test -f 'rrd_rpncalc.c' || echo '$(srcdir)/'`rrd_rpncalc.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_rpncalc.Tpo $(DEPDIR)/librrd_th_la-rrd_rpncalc.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_rpncalc.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_rpncalc.Tpo -c -o librrd_th_la-rrd_rpncalc.lo `test -f 'rrd_rpncalc.c' || echo '$(srcdir)/'`rrd_rpncalc.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_rpncalc.Tpo $(DEPDIR)/librrd_th_la-rrd_rpncalc.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_rpncalc.c' object='librrd_th_la-rrd_rpncalc.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_rpncalc.lo `test -f 'rrd_rpncalc.c' || echo '$(srcdir)/'`rrd_rpncalc.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_rpncalc.lo `test -f 'rrd_rpncalc.c' || echo '$(srcdir)/'`rrd_rpncalc.c
+
+librrd_th_la-rrd_utils.lo: rrd_utils.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_utils.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_utils.Tpo -c -o librrd_th_la-rrd_utils.lo `test -f 'rrd_utils.c' || echo '$(srcdir)/'`rrd_utils.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_utils.Tpo $(DEPDIR)/librrd_th_la-rrd_utils.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_utils.c' object='librrd_th_la-rrd_utils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_utils.lo `test -f 'rrd_utils.c' || echo '$(srcdir)/'`rrd_utils.c
 
 librrd_th_la-rrd_update.lo: rrd_update.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_update.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_update.Tpo -c -o librrd_th_la-rrd_update.lo `test -f 'rrd_update.c' || echo '$(srcdir)/'`rrd_update.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_update.Tpo $(DEPDIR)/librrd_th_la-rrd_update.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_update.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_update.Tpo -c -o librrd_th_la-rrd_update.lo `test -f 'rrd_update.c' || echo '$(srcdir)/'`rrd_update.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_update.Tpo $(DEPDIR)/librrd_th_la-rrd_update.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_update.c' object='librrd_th_la-rrd_update.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_update.lo `test -f 'rrd_update.c' || echo '$(srcdir)/'`rrd_update.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_update.lo `test -f 'rrd_update.c' || echo '$(srcdir)/'`rrd_update.c
 
 librrd_th_la-rrd_getopt.lo: rrd_getopt.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_getopt.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_getopt.Tpo -c -o librrd_th_la-rrd_getopt.lo `test -f 'rrd_getopt.c' || echo '$(srcdir)/'`rrd_getopt.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_getopt.Tpo $(DEPDIR)/librrd_th_la-rrd_getopt.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_getopt.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_getopt.Tpo -c -o librrd_th_la-rrd_getopt.lo `test -f 'rrd_getopt.c' || echo '$(srcdir)/'`rrd_getopt.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_getopt.Tpo $(DEPDIR)/librrd_th_la-rrd_getopt.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_getopt.c' object='librrd_th_la-rrd_getopt.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_getopt.lo `test -f 'rrd_getopt.c' || echo '$(srcdir)/'`rrd_getopt.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_getopt.lo `test -f 'rrd_getopt.c' || echo '$(srcdir)/'`rrd_getopt.c
 
 librrd_th_la-rrd_getopt1.lo: rrd_getopt1.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_getopt1.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_getopt1.Tpo -c -o librrd_th_la-rrd_getopt1.lo `test -f 'rrd_getopt1.c' || echo '$(srcdir)/'`rrd_getopt1.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_getopt1.Tpo $(DEPDIR)/librrd_th_la-rrd_getopt1.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_getopt1.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_getopt1.Tpo -c -o librrd_th_la-rrd_getopt1.lo `test -f 'rrd_getopt1.c' || echo '$(srcdir)/'`rrd_getopt1.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_getopt1.Tpo $(DEPDIR)/librrd_th_la-rrd_getopt1.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_getopt1.c' object='librrd_th_la-rrd_getopt1.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_getopt1.lo `test -f 'rrd_getopt1.c' || echo '$(srcdir)/'`rrd_getopt1.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_getopt1.lo `test -f 'rrd_getopt1.c' || echo '$(srcdir)/'`rrd_getopt1.c
 
 librrd_th_la-hash_32.lo: hash_32.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-hash_32.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-hash_32.Tpo -c -o librrd_th_la-hash_32.lo `test -f 'hash_32.c' || echo '$(srcdir)/'`hash_32.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-hash_32.Tpo $(DEPDIR)/librrd_th_la-hash_32.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-hash_32.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-hash_32.Tpo -c -o librrd_th_la-hash_32.lo `test -f 'hash_32.c' || echo '$(srcdir)/'`hash_32.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-hash_32.Tpo $(DEPDIR)/librrd_th_la-hash_32.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='hash_32.c' object='librrd_th_la-hash_32.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-hash_32.lo `test -f 'hash_32.c' || echo '$(srcdir)/'`hash_32.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-hash_32.lo `test -f 'hash_32.c' || echo '$(srcdir)/'`hash_32.c
 
 librrd_th_la-pngsize.lo: pngsize.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-pngsize.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-pngsize.Tpo -c -o librrd_th_la-pngsize.lo `test -f 'pngsize.c' || echo '$(srcdir)/'`pngsize.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-pngsize.Tpo $(DEPDIR)/librrd_th_la-pngsize.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-pngsize.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-pngsize.Tpo -c -o librrd_th_la-pngsize.lo `test -f 'pngsize.c' || echo '$(srcdir)/'`pngsize.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-pngsize.Tpo $(DEPDIR)/librrd_th_la-pngsize.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='pngsize.c' object='librrd_th_la-pngsize.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-pngsize.lo `test -f 'pngsize.c' || echo '$(srcdir)/'`pngsize.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-pngsize.lo `test -f 'pngsize.c' || echo '$(srcdir)/'`pngsize.c
 
 librrd_th_la-rrd_create.lo: rrd_create.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_create.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_create.Tpo -c -o librrd_th_la-rrd_create.lo `test -f 'rrd_create.c' || echo '$(srcdir)/'`rrd_create.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_create.Tpo $(DEPDIR)/librrd_th_la-rrd_create.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_create.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_create.Tpo -c -o librrd_th_la-rrd_create.lo `test -f 'rrd_create.c' || echo '$(srcdir)/'`rrd_create.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_create.Tpo $(DEPDIR)/librrd_th_la-rrd_create.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_create.c' object='librrd_th_la-rrd_create.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_create.lo `test -f 'rrd_create.c' || echo '$(srcdir)/'`rrd_create.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_create.lo `test -f 'rrd_create.c' || echo '$(srcdir)/'`rrd_create.c
 
 librrd_th_la-rrd_graph.lo: rrd_graph.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_graph.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_graph.Tpo -c -o librrd_th_la-rrd_graph.lo `test -f 'rrd_graph.c' || echo '$(srcdir)/'`rrd_graph.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_graph.Tpo $(DEPDIR)/librrd_th_la-rrd_graph.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_graph.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_graph.Tpo -c -o librrd_th_la-rrd_graph.lo `test -f 'rrd_graph.c' || echo '$(srcdir)/'`rrd_graph.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_graph.Tpo $(DEPDIR)/librrd_th_la-rrd_graph.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_graph.c' object='librrd_th_la-rrd_graph.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_graph.lo `test -f 'rrd_graph.c' || echo '$(srcdir)/'`rrd_graph.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_graph.lo `test -f 'rrd_graph.c' || echo '$(srcdir)/'`rrd_graph.c
 
 librrd_th_la-rrd_graph_helper.lo: rrd_graph_helper.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_graph_helper.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_graph_helper.Tpo -c -o librrd_th_la-rrd_graph_helper.lo `test -f 'rrd_graph_helper.c' || echo '$(srcdir)/'`rrd_graph_helper.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_graph_helper.Tpo $(DEPDIR)/librrd_th_la-rrd_graph_helper.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_graph_helper.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_graph_helper.Tpo -c -o librrd_th_la-rrd_graph_helper.lo `test -f 'rrd_graph_helper.c' || echo '$(srcdir)/'`rrd_graph_helper.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_graph_helper.Tpo $(DEPDIR)/librrd_th_la-rrd_graph_helper.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_graph_helper.c' object='librrd_th_la-rrd_graph_helper.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_graph_helper.lo `test -f 'rrd_graph_helper.c' || echo '$(srcdir)/'`rrd_graph_helper.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_graph_helper.lo `test -f 'rrd_graph_helper.c' || echo '$(srcdir)/'`rrd_graph_helper.c
 
 librrd_th_la-rrd_version.lo: rrd_version.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_version.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_version.Tpo -c -o librrd_th_la-rrd_version.lo `test -f 'rrd_version.c' || echo '$(srcdir)/'`rrd_version.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_version.Tpo $(DEPDIR)/librrd_th_la-rrd_version.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_version.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_version.Tpo -c -o librrd_th_la-rrd_version.lo `test -f 'rrd_version.c' || echo '$(srcdir)/'`rrd_version.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_version.Tpo $(DEPDIR)/librrd_th_la-rrd_version.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_version.c' object='librrd_th_la-rrd_version.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_version.lo `test -f 'rrd_version.c' || echo '$(srcdir)/'`rrd_version.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_version.lo `test -f 'rrd_version.c' || echo '$(srcdir)/'`rrd_version.c
 
 librrd_th_la-rrd_last.lo: rrd_last.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_last.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_last.Tpo -c -o librrd_th_la-rrd_last.lo `test -f 'rrd_last.c' || echo '$(srcdir)/'`rrd_last.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_last.Tpo $(DEPDIR)/librrd_th_la-rrd_last.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_last.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_last.Tpo -c -o librrd_th_la-rrd_last.lo `test -f 'rrd_last.c' || echo '$(srcdir)/'`rrd_last.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_last.Tpo $(DEPDIR)/librrd_th_la-rrd_last.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_last.c' object='librrd_th_la-rrd_last.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_last.lo `test -f 'rrd_last.c' || echo '$(srcdir)/'`rrd_last.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_last.lo `test -f 'rrd_last.c' || echo '$(srcdir)/'`rrd_last.c
 
 librrd_th_la-rrd_lastupdate.lo: rrd_lastupdate.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_lastupdate.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_lastupdate.Tpo -c -o librrd_th_la-rrd_lastupdate.lo `test -f 'rrd_lastupdate.c' || echo '$(srcdir)/'`rrd_lastupdate.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_lastupdate.Tpo $(DEPDIR)/librrd_th_la-rrd_lastupdate.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_lastupdate.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_lastupdate.Tpo -c -o librrd_th_la-rrd_lastupdate.lo `test -f 'rrd_lastupdate.c' || echo '$(srcdir)/'`rrd_lastupdate.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_lastupdate.Tpo $(DEPDIR)/librrd_th_la-rrd_lastupdate.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_lastupdate.c' object='librrd_th_la-rrd_lastupdate.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_lastupdate.lo `test -f 'rrd_lastupdate.c' || echo '$(srcdir)/'`rrd_lastupdate.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_lastupdate.lo `test -f 'rrd_lastupdate.c' || echo '$(srcdir)/'`rrd_lastupdate.c
 
 librrd_th_la-rrd_first.lo: rrd_first.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_first.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_first.Tpo -c -o librrd_th_la-rrd_first.lo `test -f 'rrd_first.c' || echo '$(srcdir)/'`rrd_first.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_first.Tpo $(DEPDIR)/librrd_th_la-rrd_first.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_first.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_first.Tpo -c -o librrd_th_la-rrd_first.lo `test -f 'rrd_first.c' || echo '$(srcdir)/'`rrd_first.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_first.Tpo $(DEPDIR)/librrd_th_la-rrd_first.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_first.c' object='librrd_th_la-rrd_first.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_first.lo `test -f 'rrd_first.c' || echo '$(srcdir)/'`rrd_first.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_first.lo `test -f 'rrd_first.c' || echo '$(srcdir)/'`rrd_first.c
 
 librrd_th_la-rrd_restore.lo: rrd_restore.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_restore.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_restore.Tpo -c -o librrd_th_la-rrd_restore.lo `test -f 'rrd_restore.c' || echo '$(srcdir)/'`rrd_restore.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_restore.Tpo $(DEPDIR)/librrd_th_la-rrd_restore.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_restore.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_restore.Tpo -c -o librrd_th_la-rrd_restore.lo `test -f 'rrd_restore.c' || echo '$(srcdir)/'`rrd_restore.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_restore.Tpo $(DEPDIR)/librrd_th_la-rrd_restore.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_restore.c' object='librrd_th_la-rrd_restore.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_restore.lo `test -f 'rrd_restore.c' || echo '$(srcdir)/'`rrd_restore.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_restore.lo `test -f 'rrd_restore.c' || echo '$(srcdir)/'`rrd_restore.c
 
 librrd_th_la-rrd_xport.lo: rrd_xport.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_xport.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_xport.Tpo -c -o librrd_th_la-rrd_xport.lo `test -f 'rrd_xport.c' || echo '$(srcdir)/'`rrd_xport.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_xport.Tpo $(DEPDIR)/librrd_th_la-rrd_xport.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_xport.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_xport.Tpo -c -o librrd_th_la-rrd_xport.lo `test -f 'rrd_xport.c' || echo '$(srcdir)/'`rrd_xport.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_xport.Tpo $(DEPDIR)/librrd_th_la-rrd_xport.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_xport.c' object='librrd_th_la-rrd_xport.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_xport.lo `test -f 'rrd_xport.c' || echo '$(srcdir)/'`rrd_xport.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_xport.lo `test -f 'rrd_xport.c' || echo '$(srcdir)/'`rrd_xport.c
 
 librrd_th_la-rrd_gfx.lo: rrd_gfx.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_gfx.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_gfx.Tpo -c -o librrd_th_la-rrd_gfx.lo `test -f 'rrd_gfx.c' || echo '$(srcdir)/'`rrd_gfx.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_gfx.Tpo $(DEPDIR)/librrd_th_la-rrd_gfx.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_gfx.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_gfx.Tpo -c -o librrd_th_la-rrd_gfx.lo `test -f 'rrd_gfx.c' || echo '$(srcdir)/'`rrd_gfx.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_gfx.Tpo $(DEPDIR)/librrd_th_la-rrd_gfx.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_gfx.c' object='librrd_th_la-rrd_gfx.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_gfx.lo `test -f 'rrd_gfx.c' || echo '$(srcdir)/'`rrd_gfx.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_gfx.lo `test -f 'rrd_gfx.c' || echo '$(srcdir)/'`rrd_gfx.c
 
 librrd_th_la-rrd_dump.lo: rrd_dump.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_dump.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_dump.Tpo -c -o librrd_th_la-rrd_dump.lo `test -f 'rrd_dump.c' || echo '$(srcdir)/'`rrd_dump.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_dump.Tpo $(DEPDIR)/librrd_th_la-rrd_dump.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_dump.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_dump.Tpo -c -o librrd_th_la-rrd_dump.lo `test -f 'rrd_dump.c' || echo '$(srcdir)/'`rrd_dump.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_dump.Tpo $(DEPDIR)/librrd_th_la-rrd_dump.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_dump.c' object='librrd_th_la-rrd_dump.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_dump.lo `test -f 'rrd_dump.c' || echo '$(srcdir)/'`rrd_dump.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_dump.lo `test -f 'rrd_dump.c' || echo '$(srcdir)/'`rrd_dump.c
+
+librrd_th_la-rrd_flushcached.lo: rrd_flushcached.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_flushcached.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_flushcached.Tpo -c -o librrd_th_la-rrd_flushcached.lo `test -f 'rrd_flushcached.c' || echo '$(srcdir)/'`rrd_flushcached.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_flushcached.Tpo $(DEPDIR)/librrd_th_la-rrd_flushcached.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_flushcached.c' object='librrd_th_la-rrd_flushcached.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_flushcached.lo `test -f 'rrd_flushcached.c' || echo '$(srcdir)/'`rrd_flushcached.c
 
 librrd_th_la-rrd_fetch.lo: rrd_fetch.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_fetch.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_fetch.Tpo -c -o librrd_th_la-rrd_fetch.lo `test -f 'rrd_fetch.c' || echo '$(srcdir)/'`rrd_fetch.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_fetch.Tpo $(DEPDIR)/librrd_th_la-rrd_fetch.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_fetch.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_fetch.Tpo -c -o librrd_th_la-rrd_fetch.lo `test -f 'rrd_fetch.c' || echo '$(srcdir)/'`rrd_fetch.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_fetch.Tpo $(DEPDIR)/librrd_th_la-rrd_fetch.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_fetch.c' object='librrd_th_la-rrd_fetch.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_fetch.lo `test -f 'rrd_fetch.c' || echo '$(srcdir)/'`rrd_fetch.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_fetch.lo `test -f 'rrd_fetch.c' || echo '$(srcdir)/'`rrd_fetch.c
 
 librrd_th_la-rrd_resize.lo: rrd_resize.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_resize.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_resize.Tpo -c -o librrd_th_la-rrd_resize.lo `test -f 'rrd_resize.c' || echo '$(srcdir)/'`rrd_resize.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_resize.Tpo $(DEPDIR)/librrd_th_la-rrd_resize.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_resize.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_resize.Tpo -c -o librrd_th_la-rrd_resize.lo `test -f 'rrd_resize.c' || echo '$(srcdir)/'`rrd_resize.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_resize.Tpo $(DEPDIR)/librrd_th_la-rrd_resize.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_resize.c' object='librrd_th_la-rrd_resize.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_resize.lo `test -f 'rrd_resize.c' || echo '$(srcdir)/'`rrd_resize.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_resize.lo `test -f 'rrd_resize.c' || echo '$(srcdir)/'`rrd_resize.c
 
 librrd_th_la-rrd_tune.lo: rrd_tune.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_tune.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_tune.Tpo -c -o librrd_th_la-rrd_tune.lo `test -f 'rrd_tune.c' || echo '$(srcdir)/'`rrd_tune.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_tune.Tpo $(DEPDIR)/librrd_th_la-rrd_tune.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_tune.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_tune.Tpo -c -o librrd_th_la-rrd_tune.lo `test -f 'rrd_tune.c' || echo '$(srcdir)/'`rrd_tune.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_tune.Tpo $(DEPDIR)/librrd_th_la-rrd_tune.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_tune.c' object='librrd_th_la-rrd_tune.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_tune.lo `test -f 'rrd_tune.c' || echo '$(srcdir)/'`rrd_tune.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_tune.lo `test -f 'rrd_tune.c' || echo '$(srcdir)/'`rrd_tune.c
+
+librrd_th_la-rrd_fetch_libdbi.lo: rrd_fetch_libdbi.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_fetch_libdbi.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_fetch_libdbi.Tpo -c -o librrd_th_la-rrd_fetch_libdbi.lo `test -f 'rrd_fetch_libdbi.c' || echo '$(srcdir)/'`rrd_fetch_libdbi.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_fetch_libdbi.Tpo $(DEPDIR)/librrd_th_la-rrd_fetch_libdbi.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_fetch_libdbi.c' object='librrd_th_la-rrd_fetch_libdbi.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_fetch_libdbi.lo `test -f 'rrd_fetch_libdbi.c' || echo '$(srcdir)/'`rrd_fetch_libdbi.c
 
 librrd_th_la-rrd_thread_safe.lo: rrd_thread_safe.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_thread_safe.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_thread_safe.Tpo -c -o librrd_th_la-rrd_thread_safe.lo `test -f 'rrd_thread_safe.c' || echo '$(srcdir)/'`rrd_thread_safe.c
-@am__fastdepCC_TRUE@   mv -f $(DEPDIR)/librrd_th_la-rrd_thread_safe.Tpo $(DEPDIR)/librrd_th_la-rrd_thread_safe.Plo
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_thread_safe.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_thread_safe.Tpo -c -o librrd_th_la-rrd_thread_safe.lo `test -f 'rrd_thread_safe.c' || echo '$(srcdir)/'`rrd_thread_safe.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_thread_safe.Tpo $(DEPDIR)/librrd_th_la-rrd_thread_safe.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_thread_safe.c' object='librrd_th_la-rrd_thread_safe.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_thread_safe.lo `test -f 'rrd_thread_safe.c' || echo '$(srcdir)/'`rrd_thread_safe.c
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_thread_safe.lo `test -f 'rrd_thread_safe.c' || echo '$(srcdir)/'`rrd_thread_safe.c
+
+rrdcached-rrd_daemon.o: rrd_daemon.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rrdcached_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rrdcached-rrd_daemon.o -MD -MP -MF $(DEPDIR)/rrdcached-rrd_daemon.Tpo -c -o rrdcached-rrd_daemon.o `test -f 'rrd_daemon.c' || echo '$(srcdir)/'`rrd_daemon.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rrdcached-rrd_daemon.Tpo $(DEPDIR)/rrdcached-rrd_daemon.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_daemon.c' object='rrdcached-rrd_daemon.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rrdcached_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rrdcached-rrd_daemon.o `test -f 'rrd_daemon.c' || echo '$(srcdir)/'`rrd_daemon.c
+
+rrdcached-rrd_daemon.obj: rrd_daemon.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rrdcached_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rrdcached-rrd_daemon.obj -MD -MP -MF $(DEPDIR)/rrdcached-rrd_daemon.Tpo -c -o rrdcached-rrd_daemon.obj `if test -f 'rrd_daemon.c'; then $(CYGPATH_W) 'rrd_daemon.c'; else $(CYGPATH_W) '$(srcdir)/rrd_daemon.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/rrdcached-rrd_daemon.Tpo $(DEPDIR)/rrdcached-rrd_daemon.Po
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='rrd_daemon.c' object='rrdcached-rrd_daemon.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rrdcached_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rrdcached-rrd_daemon.obj `if test -f 'rrd_daemon.c'; then $(CYGPATH_W) 'rrd_daemon.c'; else $(CYGPATH_W) '$(srcdir)/rrd_daemon.c'; fi`
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -848,37 +1035,43 @@ clean-libtool:
 install-pkgconfigDATA: $(pkgconfig_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
-       @list='$(pkgconfig_DATA)'; for p in $$list; do \
+       @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
-         $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
        done
 
 uninstall-pkgconfigDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(pkgconfig_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
-       done
+       @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
 install-includeHEADERS: $(include_HEADERS)
        @$(NORMAL_INSTALL)
        test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
-       @list='$(include_HEADERS)'; for p in $$list; do \
+       @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
-         $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
        done
 
 uninstall-includeHEADERS:
        @$(NORMAL_UNINSTALL)
-       @list='$(include_HEADERS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
-         rm -f "$(DESTDIR)$(includedir)/$$f"; \
-       done
+       @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       test -n "$$files" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(includedir)" && rm -f $$files
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -892,7 +1085,7 @@ tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
+       set x; \
        here=`pwd`; \
        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
@@ -900,29 +1093,34 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
          done | \
          $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
          $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -943,13 +1141,17 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
@@ -982,6 +1184,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
@@ -1003,6 +1206,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -1011,18 +1216,28 @@ install-data-am: install-includeHEADERS install-pkgconfigDATA
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -1067,7 +1282,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
 
 
 librrd.sym: librrd.sym.in
-       grep -v LIBC_HAS_GETOPT_LONG librrd.sym.in >$@
+       $(AM_V_GEN)grep -v LIBC_HAS_GETOPT_LONG librrd.sym.in >$@
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/src/gettext.h b/src/gettext.h
new file mode 100644 (file)
index 0000000..209921e
--- /dev/null
@@ -0,0 +1,271 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU General Public
+   License along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+   USA.  */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option.  */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions.  */
+# include <libintl.h>
+
+/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
+   the gettext() and ngettext() macros.  This is an alternative to calling
+   textdomain(), and is useful for libraries.  */
+# ifdef DEFAULT_TEXT_DOMAIN
+#  undef gettext
+#  define gettext(Msgid) \
+     dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
+#  undef ngettext
+#  define ngettext(Msgid1, Msgid2, N) \
+     dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
+# endif
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+   chokes if dcgettext is defined as a macro.  So include it now, to make
+   later inclusions of <locale.h> a NOP.  We don't include <libintl.h>
+   as well because people using "gettext.h" will not include <libintl.h>,
+   and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+   is OK.  */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
+   <libintl.h>, which chokes if dcgettext is defined as a macro.  So include
+   it now, to make later inclusions of <libintl.h> a NOP.  */
+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+#  include <libintl.h>
+# endif
+#endif
+
+/* Disabled NLS.
+   The casts to 'const char *' serve the purpose of producing warnings
+   for invalid uses of the value returned from these functions.
+   On pre-ANSI systems without 'const', the config.h file is supposed to
+   contain "#define const".  */
+# define gettext(Msgid) ((const char *) (Msgid))
+# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# define dcgettext(Domainname, Msgid, Category) \
+    ((void) (Category), dgettext (Domainname, Msgid))
+# define ngettext(Msgid1, Msgid2, N) \
+    ((N) == 1 \
+     ? ((void) (Msgid2), (const char *) (Msgid1)) \
+     : ((void) (Msgid1), (const char *) (Msgid2)))
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+    ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+    ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
+# define textdomain(Domainname) ((const char *) (Domainname))
+# define bindtextdomain(Domainname, Dirname) \
+    ((void) (Domainname), (const char *) (Dirname))
+# define bind_textdomain_codeset(Domainname, Codeset) \
+    ((void) (Domainname), (const char *) (Codeset))
+
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+   extraction of messages, but does not call gettext().  The run-time
+   translation is done at a different place in the code.
+   The argument, String, should be a literal string.  Concatenated strings
+   and other string expressions won't work.
+   The macro's expansion is not parenthesized, so that it is suitable as
+   initializer for static 'char[]' or 'const char[]' variables.  */
+#define gettext_noop(String) String
+
+/* The separator between msgctxt and msgid in a .mo file.  */
+#define GETTEXT_CONTEXT_GLUE "\004"
+
+/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
+   MSGID.  MSGCTXT and MSGID must be string literals.  MSGCTXT should be
+   short and rarely need to change.
+   The letter 'p' stands for 'particular' or 'special'.  */
+#ifdef DEFAULT_TEXT_DOMAIN
+# define pgettext(Msgctxt, Msgid) \
+   pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#else
+# define pgettext(Msgctxt, Msgid) \
+   pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#endif
+#define dpgettext(Domainname, Msgctxt, Msgid) \
+  pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
+  pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
+#ifdef DEFAULT_TEXT_DOMAIN
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+   npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#else
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+   npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#endif
+#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
+  npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+pgettext_aux (const char *domain,
+             const char *msg_ctxt_id, const char *msgid,
+             int category)
+{
+  const char *translation = dcgettext (domain, msg_ctxt_id, category);
+  if (translation == msg_ctxt_id)
+    return msgid;
+  else
+    return translation;
+}
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+npgettext_aux (const char *domain,
+              const char *msg_ctxt_id, const char *msgid,
+              const char *msgid_plural, unsigned long int n,
+              int category)
+{
+  const char *translation =
+    dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+  if (translation == msg_ctxt_id || translation == msgid_plural)
+    return (n == 1 ? msgid : msgid_plural);
+  else
+    return translation;
+}
+
+/* The same thing extended for non-constant arguments.  Here MSGCTXT and MSGID
+   can be arbitrary expressions.  But for string literals these macros are
+   less efficient than those above.  */
+
+#include <string.h>
+
+#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
+  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
+   /* || __STDC_VERSION__ >= 199901L */ )
+
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+#include <stdlib.h>
+#endif
+
+#define pgettext_expr(Msgctxt, Msgid) \
+  dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
+#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
+  dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcpgettext_expr (const char *domain,
+                const char *msgctxt, const char *msgid,
+                int category)
+{
+  size_t msgctxt_len = strlen (msgctxt) + 1;
+  size_t msgid_len = strlen (msgid) + 1;
+  const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+  char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+  char buf[1024];
+  char *msg_ctxt_id =
+    (msgctxt_len + msgid_len <= sizeof (buf)
+     ? buf
+     : (char *) malloc (msgctxt_len + msgid_len));
+  if (msg_ctxt_id != NULL)
+#endif
+    {
+      memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+      msg_ctxt_id[msgctxt_len - 1] = '\004';
+      memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+      translation = dcgettext (domain, msg_ctxt_id, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+      if (msg_ctxt_id != buf)
+       free (msg_ctxt_id);
+#endif
+      if (translation != msg_ctxt_id)
+       return translation;
+    }
+  return msgid;
+}
+
+#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
+  dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcnpgettext_expr (const char *domain,
+                 const char *msgctxt, const char *msgid,
+                 const char *msgid_plural, unsigned long int n,
+                 int category)
+{
+  size_t msgctxt_len = strlen (msgctxt) + 1;
+  size_t msgid_len = strlen (msgid) + 1;
+  const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+  char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+  char buf[1024];
+  char *msg_ctxt_id =
+    (msgctxt_len + msgid_len <= sizeof (buf)
+     ? buf
+     : (char *) malloc (msgctxt_len + msgid_len));
+  if (msg_ctxt_id != NULL)
+#endif
+    {
+      memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+      msg_ctxt_id[msgctxt_len - 1] = '\004';
+      memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+      translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+      if (msg_ctxt_id != buf)
+       free (msg_ctxt_id);
+#endif
+      if (!(translation == msg_ctxt_id || translation == msgid_plural))
+       return translation;
+    }
+  return (n == 1 ? msgid : msgid_plural);
+}
+
+#endif /* _LIBGETTEXT_H */
index a178f5541ce40259534ba77509bc4f20c126306c..71ac3fb424b09c595f88ac55561fa24f6910c5ec 100644 (file)
@@ -1,3 +1,5 @@
+rrd_add_ptr
+rrd_add_strdup
 rrd_clear_error
 rrd_close
 rrd_create
@@ -7,11 +9,13 @@ rrd_dump
 rrd_dump_r
 rrd_fetch
 rrd_fetch_r
+rrd_flushcached
 rrd_first
 rrd_first_r
 rrd_flush
 rrd_free
 rrd_free_context
+rrd_free_ptrs
 rrd_freemem
 rrd_get_context
 rrd_get_error
@@ -21,15 +25,18 @@ rrd_info
 rrd_info_free
 rrd_info_print
 rrd_info_push
+rrd_info_r
 rrd_init
 rrd_last
 rrd_last_r
 rrd_lastupdate
+rrd_lastupdate_r
 rrd_lock
 rrd_new_context
 rrd_open
 rrd_parsetime
 rrd_proc_start_end
+rrd_random
 rrd_read
 rrd_resize
 rrd_restore
@@ -48,4 +55,11 @@ rrd_update_v
 rrd_version
 rrd_write
 rrd_xport
+rrdc_connect
+rrdc_is_connected
+rrdc_disconnect
+rrdc_flush
+rrdc_stats_free
+rrdc_stats_get
+rrdc_update
 @RRD_GETOPT_LONG@
index e4962b43fe8deaee8dc642b7012a8b36d06e186a..6e55238461ef6d6250a4a026820d24f58ab5db0e 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * pngsize.c  determine the size of a PNG image
  *****************************************************************************/
index c364c609086271c2bd2b22cd189ee7b4ee88cf9a..79d9c99f044abddf62e29a3dcaecb6fc34261f56 100644 (file)
--- a/src/rrd.h
+++ b/src/rrd.h
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrdlib.h   Public header file for librrd
  *****************************************************************************
- * $Id: rrd.h 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd.h 1812 2009-05-26 07:13:52Z oetiker $
  * $Log$
  * Revision 1.9  2005/02/13 16:13:33  oetiker
  * let rrd_graph return the actual value range it picked ...
@@ -57,14 +57,13 @@ extern    "C" {
 #ifndef WIN32
 #include <unistd.h>     /* for off_t */
 #else
-#include <string.h>
-typedef size_t ssize_t;
-typedef long off_t;
+       typedef size_t ssize_t;
+       typedef long off_t;
 #endif 
 
 #include <time.h>
 #include <stdio.h>      /* for FILE */
-
+#include <string.h>
 
 /* Formerly rrd_nan_inf.h */
 #ifndef DNAN
@@ -87,13 +86,22 @@ typedef long off_t;
 
 /* information about an rrd file */
     typedef struct rrd_file_t {
-        int       fd;   /* file descriptor if this rrd file */
-        char     *file_start;   /* start address of an open rrd file */
-        off_t     header_len;   /* length of the header of this rrd file */
-        off_t     file_len; /* total size of the rrd file */
-        off_t     pos;  /* current pos in file */
+        size_t     header_len;   /* length of the header of this rrd file */
+        size_t     file_len; /* total size of the rrd file */
+        size_t     pos;  /* current pos in file */
+        void      *pvt;
     } rrd_file_t;
 
+/* information used for the conventional file access methods */
+    typedef struct rrd_simple_file_t {
+        int       fd;  /* file descriptor of this rrd file */
+#ifdef HAVE_MMAP
+        char     *file_start;   /* start address of an open rrd file */
+        int       mm_prot;
+        int       mm_flags;
+#endif
+    } rrd_simple_file_t;
+
 /* rrd info interface */
     typedef struct rrd_blob_t {
         unsigned long size; /* size of the blob */
@@ -179,13 +187,7 @@ typedef long off_t;
     time_t    rrd_last(
     int,
     char **);
-    int       rrd_lastupdate(
-    int argc,
-    char **argv,
-    time_t *last_update,
-    unsigned long *ds_cnt,
-    char ***ds_namv,
-    char ***last_ds);
+    int rrd_lastupdate(int argc, char **argv);
     time_t    rrd_first(
     int,
     char **);
@@ -206,6 +208,7 @@ typedef long off_t;
     unsigned long *,
     char ***,
     rrd_value_t **);
+    int       rrd_flushcached (int argc, char **argv);
 
     void      rrd_freemem(
     void *mem);
@@ -217,6 +220,8 @@ typedef long off_t;
     time_t last_up,
     int argc,
     const char **argv);
+    rrd_info_t *rrd_info_r(
+    char *);
 /* NOTE: rrd_update_r are only thread-safe if no at-style time
    specifications get used!!! */
 
@@ -225,20 +230,24 @@ typedef long off_t;
     const char *_template,
     int argc,
     const char **argv);
-    int       rrd_fetch_r(
-    const char *filename,
-    const char *cf,
-    time_t *start,
-    time_t *end,
-    unsigned long *step,
-    unsigned long *ds_cnt,
-    char ***ds_namv,
-    rrd_value_t **data);
+    int rrd_fetch_r (
+            const char *filename,
+            const char *cf,
+            time_t *start,
+            time_t *end,
+            unsigned long *step,
+            unsigned long *ds_cnt,
+            char ***ds_namv,
+            rrd_value_t **data);
     int       rrd_dump_r(
     const char *filename,
     char *outname);
-    time_t    rrd_last_r(
-    const char *filename);
+    time_t    rrd_last_r (const char *filename);
+    int rrd_lastupdate_r (const char *filename,
+            time_t *ret_last_update,
+            unsigned long *ret_ds_count,
+            char ***ret_ds_names,
+            char ***ret_last_ds);
     time_t    rrd_first_r(
     const char *filename,
     int rraindex);
@@ -269,14 +278,14 @@ typedef long off_t;
     } rrd_context_t;
 
 /* returns the current per-thread rrd_context */
-    rrd_context_t *rrd_get_context(
-    void);
+    rrd_context_t *rrd_get_context(void);
 
 #ifdef WIN32
-rrd_context_t *rrd_force_new_context(void);
+/* this was added by the win32 porters Christof.Wegmann@exitgames.com */
+    rrd_context_t *rrd_force_new_context(void);
 #endif
 
-    int       rrd_proc_start_end(
+int       rrd_proc_start_end(
     rrd_time_value_t *,
     rrd_time_value_t *,
     time_t *,
@@ -310,6 +319,14 @@ rrd_context_t *rrd_force_new_context(void);
 /* int    rrd_test_error_r (rrd_context_t *); */
 /* char  *rrd_get_error_r  (rrd_context_t *); */
 
+/** UTILITY FUNCTIONS */
+
+    long rrd_random(void);
+
+    int rrd_add_ptr(void ***dest, size_t *dest_size, void *src);
+    int rrd_add_strdup(char ***dest, size_t *dest_size, char *src);
+    void rrd_free_ptrs(void ***src, size_t *cnt);
+
 /*
  * The following functions are _internal_ functions needed to read the raw RRD
  * files. Since they are _internal_ they may change with the file format and
@@ -379,6 +396,18 @@ rrd_context_t *rrd_force_new_context(void);
     int       rrd_lock(
     rrd_file_t *file)
               RRD_DEPRECATED;
+    void      rrd_notify_row(
+    rrd_file_t *rrd_file,
+    int rra_idx,
+    unsigned long rra_row,
+    time_t rra_time)
+              RRD_DEPRECATED;
+    unsigned long rrd_select_initial_row(
+    rrd_file_t *rrd_file,
+    int rra_idx,
+    rra_def_t *rra
+    )
+              RRD_DEPRECATED;
 #endif                  /* defined(_RRD_TOOL_H) || defined(RRD_EXPORT_DEPRECATED) */
 
 #endif                  /* _RRDLIB_H */
index 5fd9c359f045ae8cb0fe97cb8493b7eb44b0c1a8..27b4884b2e5b416c483f9ce598104d6911aa5203 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_cgi.c  RRD Web Page Generator
  *****************************************************************************/
@@ -374,7 +374,7 @@ static void calfree(
         if (calcpr) {
             free(calcpr);
         }
-        calcpr=NULL;
+        calcpr = NULL;
     }
 }
 
@@ -954,7 +954,6 @@ char     *drawgraph(
                         DS_NAM_SIZE) * sizeof(char));
             sprintf(err, "[ERROR: %s]", rrd_get_error());
             rrd_clear_error();
-            calfree();
             return err;
         }
     }
@@ -1388,7 +1387,8 @@ s_var   **rrdcgiReadVariables(
             length = atoi(ip);
             if ((line = (char *) malloc(length + 2)) == NULL)
                 return NULL;
-            fgets(line, length + 1, stdin);
+            if (fgets(line, length + 1, stdin) == NULL)
+                return NULL;
         } else
             return NULL;
     } else if (cp && !strcmp(cp, "GET")) {
diff --git a/src/rrd_client.c b/src/rrd_client.c
new file mode 100644 (file)
index 0000000..8e60664
--- /dev/null
@@ -0,0 +1,775 @@
+/**
+ * RRDTool - src/rrd_client.c
+ * Copyright (C) 2008 Florian octo Forster
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; only version 2 of the License is applicable.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ * Authors:
+ *   Florian octo Forster <octo at verplant.org>
+ **/
+
+#include "rrd.h"
+#include "rrd_client.h"
+#include "rrd_tool.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <assert.h>
+#include <pthread.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <netdb.h>
+
+#ifndef ENODATA
+#define ENODATA ENOENT
+#endif
+
+struct rrdc_response_s
+{
+  int status;
+  char *message;
+  char **lines;
+  size_t lines_num;
+};
+typedef struct rrdc_response_s rrdc_response_t;
+
+static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+static int sd = -1;
+static FILE *sh = NULL;
+static char *sd_path = NULL; /* cache the path for sd */
+
+/* One must hold `lock' when calling `close_connection'. */
+static void close_connection (void) /* {{{ */
+{
+  if (sh != NULL)
+  {
+    fclose (sh);
+    sh = NULL;
+    sd = -1;
+  }
+  else if (sd >= 0)
+  {
+    close (sd);
+    sd = -1;
+  }
+
+  if (sd_path != NULL)
+    free (sd_path);
+  sd_path = NULL;
+} /* }}} void close_connection */
+
+static int buffer_add_string (const char *str, /* {{{ */
+    char **buffer_ret, size_t *buffer_size_ret)
+{
+  char *buffer;
+  size_t buffer_size;
+  size_t buffer_pos;
+  size_t i;
+  int status;
+
+  buffer = *buffer_ret;
+  buffer_size = *buffer_size_ret;
+  buffer_pos = 0;
+
+  i = 0;
+  status = -1;
+  while (buffer_pos < buffer_size)
+  {
+    if (str[i] == 0)
+    {
+      buffer[buffer_pos] = ' ';
+      buffer_pos++;
+      status = 0;
+      break;
+    }
+    else if ((str[i] == ' ') || (str[i] == '\\'))
+    {
+      if (buffer_pos >= (buffer_size - 1))
+        break;
+      buffer[buffer_pos] = '\\';
+      buffer_pos++;
+      buffer[buffer_pos] = str[i];
+      buffer_pos++;
+    }
+    else
+    {
+      buffer[buffer_pos] = str[i];
+      buffer_pos++;
+    }
+    i++;
+  } /* while (buffer_pos < buffer_size) */
+
+  if (status != 0)
+    return (-1);
+
+  *buffer_ret = buffer + buffer_pos;
+  *buffer_size_ret = buffer_size - buffer_pos;
+
+  return (0);
+} /* }}} int buffer_add_string */
+
+static int buffer_add_value (const char *value, /* {{{ */
+    char **buffer_ret, size_t *buffer_size_ret)
+{
+  char temp[4096];
+
+  if (strncmp (value, "N:", 2) == 0)
+    snprintf (temp, sizeof (temp), "%lu:%s",
+        (unsigned long) time (NULL), value + 2);
+  else
+    strncpy (temp, value, sizeof (temp));
+  temp[sizeof (temp) - 1] = 0;
+
+  return (buffer_add_string (temp, buffer_ret, buffer_size_ret));
+} /* }}} int buffer_add_value */
+
+/* Remove trailing newline (NL) and carriage return (CR) characters. Similar to
+ * the Perl function `chomp'. Returns the number of characters that have been
+ * removed. */
+static int chomp (char *str) /* {{{ */
+{
+  size_t len;
+  int removed;
+
+  if (str == NULL)
+    return (-1);
+
+  len = strlen (str);
+  removed = 0;
+  while ((len > 0) && ((str[len - 1] == '\n') || (str[len - 1] == '\r')))
+  {
+    str[len - 1] = 0;
+    len--;
+    removed++;
+  }
+
+  return (removed);
+} /* }}} int chomp */
+
+static void response_free (rrdc_response_t *res) /* {{{ */
+{
+  if (res == NULL)
+    return;
+
+  if (res->lines != NULL)
+  {
+    size_t i;
+
+    for (i = 0; i < res->lines_num; i++)
+      if (res->lines[i] != NULL)
+        free (res->lines[i]);
+    free (res->lines);
+  }
+
+  free (res);
+} /* }}} void response_free */
+
+static int response_read (rrdc_response_t **ret_response) /* {{{ */
+{
+  rrdc_response_t *ret;
+
+  char buffer[4096];
+  char *buffer_ptr;
+
+  size_t i;
+
+  if (sh == NULL)
+    return (-1);
+
+  ret = (rrdc_response_t *) malloc (sizeof (rrdc_response_t));
+  if (ret == NULL)
+    return (-2);
+  memset (ret, 0, sizeof (*ret));
+  ret->lines = NULL;
+  ret->lines_num = 0;
+
+  buffer_ptr = fgets (buffer, sizeof (buffer), sh);
+  if (buffer_ptr == NULL)
+    return (-3);
+  chomp (buffer);
+
+  ret->status = strtol (buffer, &ret->message, 0);
+  if (buffer == ret->message)
+  {
+    response_free (ret);
+    return (-4);
+  }
+  /* Skip leading whitespace of the status message */
+  ret->message += strspn (ret->message, " \t");
+
+  if (ret->status <= 0)
+  {
+    if (ret->status < 0)
+      rrd_set_error("rrdcached: %s", ret->message);
+    *ret_response = ret;
+    return (0);
+  }
+
+  ret->lines = (char **) malloc (sizeof (char *) * ret->status);
+  if (ret->lines == NULL)
+  {
+    response_free (ret);
+    return (-5);
+  }
+  memset (ret->lines, 0, sizeof (char *) * ret->status);
+  ret->lines_num = (size_t) ret->status;
+
+  for (i = 0; i < ret->lines_num; i++)
+  {
+    buffer_ptr = fgets (buffer, sizeof (buffer), sh);
+    if (buffer_ptr == NULL)
+    {
+      response_free (ret);
+      return (-6);
+    }
+    chomp (buffer);
+
+    ret->lines[i] = strdup (buffer);
+    if (ret->lines[i] == NULL)
+    {
+      response_free (ret);
+      return (-7);
+    }
+  }
+
+  *ret_response = ret;
+  return (0);
+} /* }}} rrdc_response_t *response_read */
+
+static int request (const char *buffer, size_t buffer_size, /* {{{ */
+    rrdc_response_t **ret_response)
+{
+  int status;
+  rrdc_response_t *res;
+
+  pthread_mutex_lock (&lock);
+
+  if (sh == NULL)
+  {
+    pthread_mutex_unlock (&lock);
+    return (ENOTCONN);
+  }
+
+  status = (int) fwrite (buffer, buffer_size, /* nmemb = */ 1, sh);
+  if (status != 1)
+  {
+    close_connection ();
+    pthread_mutex_unlock (&lock);
+    rrd_set_error("request: socket error (%d) while talking to rrdcached",
+                  status);
+    return (-1);
+  }
+  fflush (sh);
+
+  res = NULL;
+  status = response_read (&res);
+
+  pthread_mutex_unlock (&lock);
+
+  if (status != 0)
+  {
+    if (status < 0)
+      rrd_set_error("request: internal error while talking to rrdcached");
+    return (status);
+  }
+
+  *ret_response = res;
+  return (0);
+} /* }}} int request */
+
+/* determine whether we are connected to the specified daemon_addr if
+ * NULL, return whether we are connected at all
+ */
+int rrdc_is_connected(const char *daemon_addr) /* {{{ */
+{
+  if (sd < 0)
+    return 0;
+  else if (daemon_addr == NULL)
+  {
+    /* here we have to handle the case i.e.
+     *   UPDATE --daemon ...; UPDATEV (no --daemon) ...
+     * In other words: we have a cached connection,
+     * but it is not specified in the current command.
+     * Daemon is only implied in this case if set in ENV
+     */
+    if (getenv(ENV_RRDCACHED_ADDRESS) != NULL)
+      return 1;
+    else
+      return 0;
+  }
+  else if (strcmp(daemon_addr, sd_path) == 0)
+    return 1;
+  else
+    return 0;
+
+} /* }}} int rrdc_is_connected */
+
+static int rrdc_connect_unix (const char *path) /* {{{ */
+{
+  struct sockaddr_un sa;
+  int status;
+
+  assert (path != NULL);
+  assert (sd == -1);
+
+  sd = socket (PF_UNIX, SOCK_STREAM, /* protocol = */ 0);
+  if (sd < 0)
+  {
+    status = errno;
+    return (status);
+  }
+
+  memset (&sa, 0, sizeof (sa));
+  sa.sun_family = AF_UNIX;
+  strncpy (sa.sun_path, path, sizeof (sa.sun_path) - 1);
+
+  status = connect (sd, (struct sockaddr *) &sa, sizeof (sa));
+  if (status != 0)
+  {
+    status = errno;
+    close_connection ();
+    return (status);
+  }
+
+  sh = fdopen (sd, "r+");
+  if (sh == NULL)
+  {
+    status = errno;
+    close_connection ();
+    return (status);
+  }
+
+  return (0);
+} /* }}} int rrdc_connect_unix */
+
+static int rrdc_connect_network (const char *addr_orig) /* {{{ */
+{
+  struct addrinfo ai_hints;
+  struct addrinfo *ai_res;
+  struct addrinfo *ai_ptr;
+  char addr_copy[NI_MAXHOST];
+  char *addr;
+  char *port;
+
+  assert (addr_orig != NULL);
+  assert (sd == -1);
+
+  strncpy(addr_copy, addr_orig, sizeof(addr_copy));
+  addr_copy[sizeof(addr_copy) - 1] = '\0';
+  addr = addr_copy;
+
+  int status;
+  memset (&ai_hints, 0, sizeof (ai_hints));
+  ai_hints.ai_flags = 0;
+#ifdef AI_ADDRCONFIG
+  ai_hints.ai_flags |= AI_ADDRCONFIG;
+#endif
+  ai_hints.ai_family = AF_UNSPEC;
+  ai_hints.ai_socktype = SOCK_STREAM;
+
+  port = NULL;
+  if (*addr == '[') /* IPv6+port format */
+  {
+    /* `addr' is something like "[2001:780:104:2:211:24ff:feab:26f8]:12345" */
+    addr++;
+
+    port = strchr (addr, ']');
+    if (port == NULL)
+    {
+      rrd_set_error("malformed address: %s", addr_orig);
+      return (-1);
+    }
+    *port = 0;
+    port++;
+
+    if (*port == ':')
+      port++;
+    else if (*port == 0)
+      port = NULL;
+    else
+    {
+      rrd_set_error("garbage after address: %s", port);
+      return (-1);
+    }
+  } /* if (*addr = ']') */
+  else if (strchr (addr, '.') != NULL) /* Hostname or IPv4 */
+  {
+    port = rindex(addr, ':');
+    if (port != NULL)
+    {
+      *port = 0;
+      port++;
+    }
+  }
+
+  ai_res = NULL;
+  status = getaddrinfo (addr,
+                        port == NULL ? RRDCACHED_DEFAULT_PORT : port,
+                        &ai_hints, &ai_res);
+  if (status != 0)
+    return (status);
+
+  for (ai_ptr = ai_res; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next)
+  {
+    sd = socket (ai_ptr->ai_family, ai_ptr->ai_socktype, ai_ptr->ai_protocol);
+    if (sd < 0)
+    {
+      status = errno;
+      sd = -1;
+      continue;
+    }
+
+    status = connect (sd, ai_ptr->ai_addr, ai_ptr->ai_addrlen);
+    if (status != 0)
+    {
+      status = errno;
+      close_connection();
+      continue;
+    }
+
+    sh = fdopen (sd, "r+");
+    if (sh == NULL)
+    {
+      status = errno;
+      close_connection ();
+      continue;
+    }
+
+    assert (status == 0);
+    break;
+  } /* for (ai_ptr) */
+
+  return (status);
+} /* }}} int rrdc_connect_network */
+
+int rrdc_connect (const char *addr) /* {{{ */
+{
+  int status = 0;
+
+  if (addr == NULL)
+    addr = getenv (ENV_RRDCACHED_ADDRESS);
+
+  if (addr == NULL)
+    return 0;
+
+  pthread_mutex_lock(&lock);
+
+  if (sd >= 0 && sd_path != NULL && strcmp(addr, sd_path) == 0)
+  {
+    /* connection to the same daemon; use cached connection */
+    pthread_mutex_unlock (&lock);
+    return (0);
+  }
+  else
+  {
+    close_connection();
+  }
+
+  if (strncmp ("unix:", addr, strlen ("unix:")) == 0)
+    status = rrdc_connect_unix (addr + strlen ("unix:"));
+  else if (addr[0] == '/')
+    status = rrdc_connect_unix (addr);
+  else
+    status = rrdc_connect_network(addr);
+
+  if (status == 0 && sd >= 0)
+    sd_path = strdup(addr);
+  else
+    rrd_set_error("Unable to connect to rrdcached: %s",
+                  (status < 0)
+                  ? "Internal error"
+                  : rrd_strerror (status));
+
+  pthread_mutex_unlock (&lock);
+  return (status);
+} /* }}} int rrdc_connect */
+
+int rrdc_disconnect (void) /* {{{ */
+{
+  pthread_mutex_lock (&lock);
+
+  close_connection();
+
+  pthread_mutex_unlock (&lock);
+
+  return (0);
+} /* }}} int rrdc_disconnect */
+
+int rrdc_update (const char *filename, int values_num, /* {{{ */
+               const char * const *values)
+{
+  char buffer[4096];
+  char *buffer_ptr;
+  size_t buffer_free;
+  size_t buffer_size;
+  rrdc_response_t *res;
+  int status;
+  int i;
+  char file_path[PATH_MAX];
+
+  memset (buffer, 0, sizeof (buffer));
+  buffer_ptr = &buffer[0];
+  buffer_free = sizeof (buffer);
+
+  status = buffer_add_string ("update", &buffer_ptr, &buffer_free);
+  if (status != 0)
+    return (ENOBUFS);
+
+  /* change to absolute path for rrdcached */
+  if (*filename != '/' && realpath(filename, file_path) != NULL)
+      filename = file_path;
+
+  status = buffer_add_string (filename, &buffer_ptr, &buffer_free);
+  if (status != 0)
+    return (ENOBUFS);
+
+  for (i = 0; i < values_num; i++)
+  {
+    status = buffer_add_value (values[i], &buffer_ptr, &buffer_free);
+    if (status != 0)
+      return (ENOBUFS);
+  }
+
+  assert (buffer_free < sizeof (buffer));
+  buffer_size = sizeof (buffer) - buffer_free;
+  assert (buffer[buffer_size - 1] == ' ');
+  buffer[buffer_size - 1] = '\n';
+
+  res = NULL;
+  status = request (buffer, buffer_size, &res);
+  if (status != 0)
+    return (status);
+
+  status = res->status;
+  response_free (res);
+
+  return (status);
+} /* }}} int rrdc_update */
+
+int rrdc_flush (const char *filename) /* {{{ */
+{
+  char buffer[4096];
+  char *buffer_ptr;
+  size_t buffer_free;
+  size_t buffer_size;
+  rrdc_response_t *res;
+  int status;
+  char file_path[PATH_MAX];
+
+  if (filename == NULL)
+    return (-1);
+
+  memset (buffer, 0, sizeof (buffer));
+  buffer_ptr = &buffer[0];
+  buffer_free = sizeof (buffer);
+
+  status = buffer_add_string ("flush", &buffer_ptr, &buffer_free);
+  if (status != 0)
+    return (ENOBUFS);
+
+  /* change to absolute path for rrdcached */
+  if (*filename != '/' && realpath(filename, file_path) != NULL)
+      filename = file_path;
+
+  status = buffer_add_string (filename, &buffer_ptr, &buffer_free);
+  if (status != 0)
+    return (ENOBUFS);
+
+  assert (buffer_free < sizeof (buffer));
+  buffer_size = sizeof (buffer) - buffer_free;
+  assert (buffer[buffer_size - 1] == ' ');
+  buffer[buffer_size - 1] = '\n';
+
+  res = NULL;
+  status = request (buffer, buffer_size, &res);
+  if (status != 0)
+    return (status);
+
+  status = res->status;
+  response_free (res);
+
+  return (status);
+} /* }}} int rrdc_flush */
+
+
+/* convenience function; if there is a daemon specified, or if we can
+ * detect one from the environment, then flush the file.  Otherwise, no-op
+ */
+int rrdc_flush_if_daemon (const char *opt_daemon, const char *filename) /* {{{ */
+{
+  int status = 0;
+
+  rrdc_connect(opt_daemon);
+
+  if (rrdc_is_connected(opt_daemon))
+  {
+    rrd_clear_error();
+    status = rrdc_flush (filename);
+
+    if (status != 0 && !rrd_test_error())
+    {
+      if (status > 0)
+      {
+        rrd_set_error("rrdc_flush (%s) failed: %s",
+                      filename, rrd_strerror(status));
+      }
+      else if (status < 0)
+      {
+        rrd_set_error("rrdc_flush (%s) failed with status %i.",
+                      filename, status);
+      }
+    }
+  } /* if (rrdc_is_connected(..)) */
+
+  return status;
+} /* }}} int rrdc_flush_if_daemon */
+
+
+int rrdc_stats_get (rrdc_stats_t **ret_stats) /* {{{ */
+{
+  rrdc_stats_t *head;
+  rrdc_stats_t *tail;
+
+  rrdc_response_t *res;
+
+  int status;
+  size_t i;
+
+  /* Protocol example: {{{
+   * ->  STATS
+   * <-  5 Statistics follow
+   * <-  QueueLength: 0
+   * <-  UpdatesWritten: 0
+   * <-  DataSetsWritten: 0
+   * <-  TreeNodesNumber: 0
+   * <-  TreeDepth: 0
+   * }}} */
+
+  res = NULL;
+  status = request ("STATS\n", strlen ("STATS\n"), &res);
+  if (status != 0)
+    return (status);
+
+  if (res->status <= 0)
+  {
+    response_free (res);
+    return (EIO);
+  }
+
+  head = NULL;
+  tail = NULL;
+  for (i = 0; i < res->lines_num; i++)
+  {
+    char *key;
+    char *value;
+    char *endptr;
+    rrdc_stats_t *s;
+
+    key = res->lines[i];
+    value = strchr (key, ':');
+    if (value == NULL)
+      continue;
+    *value = 0;
+    value++;
+
+    while ((value[0] == ' ') || (value[0] == '\t'))
+      value++;
+
+    s = (rrdc_stats_t *) malloc (sizeof (rrdc_stats_t));
+    if (s == NULL)
+      continue;
+    memset (s, 0, sizeof (*s));
+
+    s->name = strdup (key);
+
+    endptr = NULL;
+    if ((strcmp ("QueueLength", key) == 0)
+        || (strcmp ("TreeDepth", key) == 0)
+        || (strcmp ("TreeNodesNumber", key) == 0))
+    {
+      s->type = RRDC_STATS_TYPE_GAUGE;
+      s->value.gauge = strtod (value, &endptr);
+    }
+    else if ((strcmp ("DataSetsWritten", key) == 0)
+        || (strcmp ("FlushesReceived", key) == 0)
+        || (strcmp ("JournalBytes", key) == 0)
+        || (strcmp ("JournalRotate", key) == 0)
+        || (strcmp ("UpdatesReceived", key) == 0)
+        || (strcmp ("UpdatesWritten", key) == 0))
+    {
+      s->type = RRDC_STATS_TYPE_COUNTER;
+      s->value.counter = (uint64_t) strtoll (value, &endptr, /* base = */ 0);
+    }
+    else
+    {
+      free (s);
+      continue;
+    }
+
+    /* Conversion failed */
+    if (endptr == value)
+    {
+      free (s);
+      continue;
+    }
+
+    if (head == NULL)
+    {
+      head = s;
+      tail = s;
+      s->next = NULL;
+    }
+    else
+    {
+      tail->next = s;
+      tail = s;
+    }
+  } /* for (i = 0; i < res->lines_num; i++) */
+
+  response_free (res);
+
+  if (head == NULL)
+    return (EPROTO);
+
+  *ret_stats = head;
+  return (0);
+} /* }}} int rrdc_stats_get */
+
+void rrdc_stats_free (rrdc_stats_t *ret_stats) /* {{{ */
+{
+  rrdc_stats_t *this;
+
+  this = ret_stats;
+  while (this != NULL)
+  {
+    rrdc_stats_t *next;
+
+    next = this->next;
+
+    if (this->name != NULL)
+    {
+      free ((char *)this->name);
+      this->name = NULL;
+    }
+    free (this);
+
+    this = next;
+  } /* while (this != NULL) */
+} /* }}} void rrdc_stats_free */
+
+/*
+ * vim: set sw=2 sts=2 ts=8 et fdm=marker :
+ */
diff --git a/src/rrd_client.h b/src/rrd_client.h
new file mode 100644 (file)
index 0000000..90b78f8
--- /dev/null
@@ -0,0 +1,91 @@
+/**
+ * RRDTool - src/rrd_client.h
+ * Copyright (C) 2008 Florian octo Forster
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; only version 2 of the License is applicable.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ * Authors:
+ *   Florian octo Forster <octo at verplant.org>
+ **/
+
+#ifndef __RRD_CLIENT_H
+#define __RRD_CLIENT_H 1
+
+#ifndef WIN32
+#include <stdint.h>
+#else
+#      include <stdlib.h>
+       typedef signed char     int8_t;
+       typedef unsigned char   uint8_t;
+       typedef signed int      int16_t;
+       typedef unsigned int    uint16_t;
+       typedef signed long int         int32_t;
+       typedef unsigned long int       uint32_t;
+       typedef signed long long int    int64_t;
+       typedef unsigned long long int  uint64_t;
+#endif
+
+
+#ifndef RRDCACHED_DEFAULT_ADDRESS
+# define RRDCACHED_DEFAULT_ADDRESS "unix:/tmp/rrdcached.sock"
+#endif
+
+#define RRDCACHED_DEFAULT_PORT "42217"
+#define ENV_RRDCACHED_ADDRESS "RRDCACHED_ADDRESS"
+
+
+// Windows version has no daemon/client support
+
+#ifndef WIN32
+int rrdc_connect (const char *addr);
+int rrdc_is_connected(const char *daemon_addr);
+int rrdc_disconnect (void);
+
+int rrdc_update (const char *filename, int values_num,
+        const char * const *values);
+
+int rrdc_flush (const char *filename);
+int rrdc_flush_if_daemon (const char *opt_daemon, const char *filename);
+
+#else
+#      define rrdc_flush_if_daemon(a,b) 0
+#      define rrdc_connect(a) 0
+#      define rrdc_is_connected(a) 0
+#      define rrdc_flush(a) 0
+#      define rrdc_update(a,b,c) 0
+#endif
+
+struct rrdc_stats_s
+{
+  const char *name;
+  uint16_t type;
+#define RRDC_STATS_TYPE_GAUGE   0x0001
+#define RRDC_STATS_TYPE_COUNTER 0x0002
+  uint16_t flags;
+  union
+  {
+    uint64_t counter;
+    double   gauge;
+  } value;
+  struct rrdc_stats_s *next;
+};
+typedef struct rrdc_stats_s rrdc_stats_t;
+
+int rrdc_stats_get (rrdc_stats_t **ret_stats);
+void rrdc_stats_free (rrdc_stats_t *ret_stats);
+
+#endif /* __RRD_CLIENT_H */
+/*
+ * vim: set sw=2 sts=2 ts=8 et fdm=marker :
+ */
index 1f7c1ee2f17664e28792c2cdb3d5797cd07e27a9..f5dbd58db7690f30f066da9198de9ec58482de30 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_create.c  creates new rrds
  *****************************************************************************/
@@ -15,8 +15,7 @@
 #include "rrd_is_thread_safe.h"
 
 #ifdef WIN32
-#include <fcntl.h>
-#include <process.h>
+# include <process.h>
 #endif
 
 unsigned long FnvHash(
@@ -29,8 +28,6 @@ void      parseGENERIC_DS(
     const char *def,
     rrd_t *rrd,
     int ds_idx);
-long int  rra_random_row(
-    rra_def_t *);
 
 static void rrd_free2(
     rrd_t *rrd);        /* our onwn copy, immmune to mmap */
@@ -234,7 +231,7 @@ int rrd_create_r(
             rrd.stat_head->ds_cnt++;
         } else if (strncmp(argv[i], "RRA:", 4) == 0) {
             char     *argvcopy;
-            char     *tokptr;
+            char     *tokptr = "";
             size_t    old_size = sizeof(rra_def_t) * (rrd.stat_head->rra_cnt);
             int       row_cnt;
 
@@ -676,36 +673,35 @@ int rrd_create_fn(
     rrd_t *rrd)
 {
     unsigned long i, ii;
-    int       rrd_file;
     rrd_value_t *unknown;
     int       unkn_cnt;
     rrd_file_t *rrd_file_dn;
     rrd_t     rrd_dn;
-    unsigned  flags = O_WRONLY | O_CREAT | O_TRUNC;
+    unsigned  rrd_flags = RRD_READWRITE | RRD_CREAT;
 
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
-    flags |= O_BINARY;
-#endif
+    unkn_cnt = 0;
+    for (i = 0; i < rrd->stat_head->rra_cnt; i++)
+        unkn_cnt += rrd->stat_head->ds_cnt * rrd->rra_def[i].row_cnt;
 
-    if ((rrd_file = open(file_name, flags, 0666)) < 0) {
+    if ((rrd_file_dn = rrd_open(file_name, rrd, rrd_flags)) == NULL) {
         rrd_set_error("creating '%s': %s", file_name, rrd_strerror(errno));
         rrd_free2(rrd);
         return (-1);
     }
 
-    write(rrd_file, rrd->stat_head, sizeof(stat_head_t));
+    rrd_write(rrd_file_dn, rrd->stat_head, sizeof(stat_head_t));
 
-    write(rrd_file, rrd->ds_def, sizeof(ds_def_t) * rrd->stat_head->ds_cnt);
+    rrd_write(rrd_file_dn, rrd->ds_def, sizeof(ds_def_t) * rrd->stat_head->ds_cnt);
 
-    write(rrd_file, rrd->rra_def,
+    rrd_write(rrd_file_dn, rrd->rra_def,
           sizeof(rra_def_t) * rrd->stat_head->rra_cnt);
 
-    write(rrd_file, rrd->live_head, sizeof(live_head_t));
+    rrd_write(rrd_file_dn, rrd->live_head, sizeof(live_head_t));
 
     if ((rrd->pdp_prep = (pdp_prep_t*)calloc(1, sizeof(pdp_prep_t))) == NULL) {
         rrd_set_error("allocating pdp_prep");
         rrd_free2(rrd);
-        close(rrd_file);
+        rrd_close(rrd_file_dn);
         return (-1);
     }
 
@@ -716,12 +712,12 @@ int rrd_create_fn(
         rrd->live_head->last_up % rrd->stat_head->pdp_step;
 
     for (i = 0; i < rrd->stat_head->ds_cnt; i++)
-        write(rrd_file, rrd->pdp_prep, sizeof(pdp_prep_t));
+        rrd_write(rrd_file_dn, rrd->pdp_prep, sizeof(pdp_prep_t));
 
     if ((rrd->cdp_prep = (cdp_prep_t*)calloc(1, sizeof(cdp_prep_t))) == NULL) {
         rrd_set_error("allocating cdp_prep");
         rrd_free2(rrd);
-        close(rrd_file);
+        rrd_close(rrd_file_dn);
         return (-1);
     }
 
@@ -758,7 +754,7 @@ int rrd_create_fn(
         }
 
         for (ii = 0; ii < rrd->stat_head->ds_cnt; ii++) {
-            write(rrd_file, rrd->cdp_prep, sizeof(cdp_prep_t));
+            rrd_write(rrd_file_dn, rrd->cdp_prep, sizeof(cdp_prep_t));
         }
     }
 
@@ -768,7 +764,7 @@ int rrd_create_fn(
     if ((rrd->rra_ptr = (rra_ptr_t*)calloc(1, sizeof(rra_ptr_t))) == NULL) {
         rrd_set_error("allocating rra_ptr");
         rrd_free2(rrd);
-        close(rrd_file);
+        rrd_close(rrd_file_dn);
         return (-1);
     }
 
@@ -777,45 +773,43 @@ int rrd_create_fn(
      * would occur for cur_row = 1 because rrd_update increments
      * the pointer a priori. */
     for (i = 0; i < rrd->stat_head->rra_cnt; i++) {
-        rrd->rra_ptr->cur_row = rra_random_row(&rrd->rra_def[i]);
-        write(rrd_file, rrd->rra_ptr, sizeof(rra_ptr_t));
+        rrd->rra_ptr->cur_row = rrd_select_initial_row(rrd_file_dn, i, &rrd->rra_def[i]);
+        rrd_write(rrd_file_dn, rrd->rra_ptr, sizeof(rra_ptr_t));
     }
 
     /* write the empty data area */
     if ((unknown = (rrd_value_t *) malloc(512 * sizeof(rrd_value_t))) == NULL) {
         rrd_set_error("allocating unknown");
         rrd_free2(rrd);
-        close(rrd_file);
+        rrd_close(rrd_file_dn);
         return (-1);
     }
     for (i = 0; i < 512; ++i)
         unknown[i] = DNAN;
 
-    unkn_cnt = 0;
-    for (i = 0; i < rrd->stat_head->rra_cnt; i++)
-        unkn_cnt += rrd->stat_head->ds_cnt * rrd->rra_def[i].row_cnt;
-
     while (unkn_cnt > 0) {
-        write(rrd_file, unknown, sizeof(rrd_value_t) * min(unkn_cnt, 512));
+        if(rrd_write(rrd_file_dn, unknown, sizeof(rrd_value_t) * min(unkn_cnt, 512)) < 0)
+        {
+            rrd_set_error("creating rrd: %s", rrd_strerror(errno));
+            return -1;
+        }
 
         unkn_cnt -= 512;
     }
     free(unknown);
-
-#ifndef WIN32
-    fdatasync(rrd_file);
-#endif
-
     rrd_free2(rrd);
-    if (close(rrd_file) == -1) {
+    if (rrd_close(rrd_file_dn) == -1) {
         rrd_set_error("creating rrd: %s", rrd_strerror(errno));
         return -1;
     }
     /* flush all we don't need out of the cache */
-    rrd_file_dn = rrd_open(file_name, &rrd_dn, RRD_READONLY);
-    rrd_dontneed(rrd_file_dn, &rrd_dn);
-    rrd_free(&rrd_dn);
-    rrd_close(rrd_file_dn);
+    rrd_init(&rrd_dn);
+    if((rrd_file_dn = rrd_open(file_name, &rrd_dn, RRD_READONLY)) != NULL)
+    {
+        rrd_dontneed(rrd_file_dn, &rrd_dn);
+        /* rrd_free(&rrd_dn); */
+        rrd_close(rrd_file_dn);
+    }
     return (0);
 }
 
@@ -833,23 +827,3 @@ static void rrd_free2(
     free(rrd->rrd_value);
 }
 
-static int rand_init = 0;
-
-long int rra_random_row(
-    rra_def_t *rra)
-{
-    if (!rand_init) {
-#ifdef WIN32
-        srand((unsigned int) time(NULL) + (unsigned int) getpid());
-#else
-        srandom((unsigned int) time(NULL) + (unsigned int) getpid());
-#endif
-        rand_init++;
-    }
-
-#ifdef WIN32
-    return rand() % rra->row_cnt;
-#else
-    return random() % rra->row_cnt;
-#endif
-}
diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c
new file mode 100644 (file)
index 0000000..f997d3c
--- /dev/null
@@ -0,0 +1,2838 @@
+/**
+ * RRDTool - src/rrd_daemon.c
+ * Copyright (C) 2008 Florian octo Forster
+ * Copyright (C) 2008 Kevin Brintnall
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; only version 2 of the License is applicable.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ * Authors:
+ *   Florian octo Forster <octo at verplant.org>
+ *   kevin brintnall <kbrint@rufus.net>
+ **/
+
+#if 0
+/*
+ * First tell the compiler to stick to the C99 and POSIX standards as close as
+ * possible.
+ */
+#ifndef __STRICT_ANSI__ /* {{{ */
+# define __STRICT_ANSI__
+#endif
+
+#ifndef _ISOC99_SOURCE
+# define _ISOC99_SOURCE
+#endif
+
+#ifdef _POSIX_C_SOURCE
+# undef _POSIX_C_SOURCE
+#endif
+#define _POSIX_C_SOURCE 200112L
+
+/* Single UNIX needed for strdup. */
+#ifdef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
+#define _XOPEN_SOURCE 500
+
+#ifndef _REENTRANT
+# define _REENTRANT
+#endif
+
+#ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+#endif
+
+#ifdef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* }}} */
+#endif /* 0 */
+
+/*
+ * Now for some includes..
+ */
+/* {{{ */
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H)
+#include "../win32/config.h"
+#else
+#ifdef HAVE_CONFIG_H
+#include "../rrd_config.h"
+#endif
+#endif
+
+#include "rrd.h"
+#include "rrd_client.h"
+
+#include <stdlib.h>
+
+#ifndef WIN32
+#include <stdint.h>
+#include <unistd.h>
+#include <strings.h>
+#include <inttypes.h>
+#      include <sys/socket.h>
+
+#else
+
+#endif
+#include <stdio.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/un.h>
+#include <netdb.h>
+#include <poll.h>
+#include <syslog.h>
+#include <pthread.h>
+#include <errno.h>
+#include <assert.h>
+#include <sys/time.h>
+#include <time.h>
+
+#include <glib-2.0/glib.h>
+/* }}} */
+
+#define RRDD_LOG(severity, ...) syslog ((severity), __VA_ARGS__)
+
+#ifndef __GNUC__
+# define __attribute__(x) /**/
+#endif
+
+/*
+ * Types
+ */
+typedef enum
+{
+  PRIV_LOW,
+  PRIV_HIGH
+} socket_privilege;
+
+typedef enum { RESP_ERR = -1, RESP_OK = 0 } response_code;
+
+struct listen_socket_s
+{
+  int fd;
+  char addr[PATH_MAX + 1];
+  int family;
+  socket_privilege privilege;
+
+  /* state for BATCH processing */
+  time_t batch_start;
+  int batch_cmd;
+
+  /* buffered IO */
+  char *rbuf;
+  off_t next_cmd;
+  off_t next_read;
+
+  char *wbuf;
+  ssize_t wbuf_len;
+};
+typedef struct listen_socket_s listen_socket_t;
+
+struct command;
+/* note: guard against "unused" warnings in the handlers */
+#define DISPATCH_PROTO listen_socket_t *sock   __attribute__((unused)),\
+                       time_t now              __attribute__((unused)),\
+                       char  *buffer           __attribute__((unused)),\
+                       size_t buffer_size      __attribute__((unused))
+
+#define HANDLER_PROTO  struct command *cmd     __attribute__((unused)),\
+                       DISPATCH_PROTO
+
+struct command {
+  char   *cmd;
+  int (*handler)(HANDLER_PROTO);
+  socket_privilege min_priv;
+
+  char  context;               /* where we expect to see it */
+#define CMD_CONTEXT_CLIENT     (1<<0)
+#define CMD_CONTEXT_BATCH      (1<<1)
+#define CMD_CONTEXT_JOURNAL    (1<<2)
+#define CMD_CONTEXT_ANY                (0x7f)
+
+  char *syntax;
+  char *help;
+};
+
+struct cache_item_s;
+typedef struct cache_item_s cache_item_t;
+struct cache_item_s
+{
+  char *file;
+  char **values;
+  size_t values_num;
+  time_t last_flush_time;
+  time_t last_update_stamp;
+#define CI_FLAGS_IN_TREE  (1<<0)
+#define CI_FLAGS_IN_QUEUE (1<<1)
+  int flags;
+  pthread_cond_t  flushed;
+  cache_item_t *prev;
+  cache_item_t *next;
+};
+
+struct callback_flush_data_s
+{
+  time_t now;
+  time_t abs_timeout;
+  char **keys;
+  size_t keys_num;
+};
+typedef struct callback_flush_data_s callback_flush_data_t;
+
+enum queue_side_e
+{
+  HEAD,
+  TAIL
+};
+typedef enum queue_side_e queue_side_t;
+
+/* max length of socket command or response */
+#define CMD_MAX 4096
+#define RBUF_SIZE (CMD_MAX*2)
+
+/*
+ * Variables
+ */
+static int stay_foreground = 0;
+static uid_t daemon_uid;
+
+static listen_socket_t *listen_fds = NULL;
+static size_t listen_fds_num = 0;
+
+static int do_shutdown = 0;
+
+static pthread_t *queue_threads;
+static pthread_cond_t queue_cond = PTHREAD_COND_INITIALIZER;
+static int config_queue_threads = 4;
+
+static pthread_t flush_thread;
+static pthread_cond_t flush_cond = PTHREAD_COND_INITIALIZER;
+
+static pthread_mutex_t connection_threads_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_cond_t  connection_threads_done = PTHREAD_COND_INITIALIZER;
+static int connection_threads_num = 0;
+
+/* Cache stuff */
+static GTree          *cache_tree = NULL;
+static cache_item_t   *cache_queue_head = NULL;
+static cache_item_t   *cache_queue_tail = NULL;
+static pthread_mutex_t cache_lock = PTHREAD_MUTEX_INITIALIZER;
+
+static int config_write_interval = 300;
+static int config_write_jitter   = 0;
+static int config_flush_interval = 3600;
+static int config_flush_at_shutdown = 0;
+static char *config_pid_file = NULL;
+static char *config_base_dir = NULL;
+static size_t _config_base_dir_len = 0;
+static int config_write_base_only = 0;
+
+static listen_socket_t **config_listen_address_list = NULL;
+static size_t config_listen_address_list_len = 0;
+
+static uint64_t stats_queue_length = 0;
+static uint64_t stats_updates_received = 0;
+static uint64_t stats_flush_received = 0;
+static uint64_t stats_updates_written = 0;
+static uint64_t stats_data_sets_written = 0;
+static uint64_t stats_journal_bytes = 0;
+static uint64_t stats_journal_rotate = 0;
+static pthread_mutex_t stats_lock = PTHREAD_MUTEX_INITIALIZER;
+
+/* Journaled updates */
+static char *journal_cur = NULL;
+static char *journal_old = NULL;
+static FILE *journal_fh = NULL;
+static pthread_mutex_t journal_lock = PTHREAD_MUTEX_INITIALIZER;
+static int journal_write(char *cmd, char *args);
+static void journal_done(void);
+static void journal_rotate(void);
+
+/* prototypes for forward refernces */
+static int handle_request_help (HANDLER_PROTO);
+
+/* 
+ * Functions
+ */
+static void sig_common (const char *sig) /* {{{ */
+{
+  RRDD_LOG(LOG_NOTICE, "caught SIG%s", sig);
+  do_shutdown++;
+  pthread_cond_broadcast(&flush_cond);
+  pthread_cond_broadcast(&queue_cond);
+} /* }}} void sig_common */
+
+static void sig_int_handler (int s __attribute__((unused))) /* {{{ */
+{
+  sig_common("INT");
+} /* }}} void sig_int_handler */
+
+static void sig_term_handler (int s __attribute__((unused))) /* {{{ */
+{
+  sig_common("TERM");
+} /* }}} void sig_term_handler */
+
+static void sig_usr1_handler (int s __attribute__((unused))) /* {{{ */
+{
+  config_flush_at_shutdown = 1;
+  sig_common("USR1");
+} /* }}} void sig_usr1_handler */
+
+static void sig_usr2_handler (int s __attribute__((unused))) /* {{{ */
+{
+  config_flush_at_shutdown = 0;
+  sig_common("USR2");
+} /* }}} void sig_usr2_handler */
+
+static void install_signal_handlers(void) /* {{{ */
+{
+  /* These structures are static, because `sigaction' behaves weird if the are
+   * overwritten.. */
+  static struct sigaction sa_int;
+  static struct sigaction sa_term;
+  static struct sigaction sa_pipe;
+  static struct sigaction sa_usr1;
+  static struct sigaction sa_usr2;
+
+  /* Install signal handlers */
+  memset (&sa_int, 0, sizeof (sa_int));
+  sa_int.sa_handler = sig_int_handler;
+  sigaction (SIGINT, &sa_int, NULL);
+
+  memset (&sa_term, 0, sizeof (sa_term));
+  sa_term.sa_handler = sig_term_handler;
+  sigaction (SIGTERM, &sa_term, NULL);
+
+  memset (&sa_pipe, 0, sizeof (sa_pipe));
+  sa_pipe.sa_handler = SIG_IGN;
+  sigaction (SIGPIPE, &sa_pipe, NULL);
+
+  memset (&sa_pipe, 0, sizeof (sa_usr1));
+  sa_usr1.sa_handler = sig_usr1_handler;
+  sigaction (SIGUSR1, &sa_usr1, NULL);
+
+  memset (&sa_usr2, 0, sizeof (sa_usr2));
+  sa_usr2.sa_handler = sig_usr2_handler;
+  sigaction (SIGUSR2, &sa_usr2, NULL);
+
+} /* }}} void install_signal_handlers */
+
+static int open_pidfile(char *action, int oflag) /* {{{ */
+{
+  int fd;
+  char *file;
+
+  file = (config_pid_file != NULL)
+    ? config_pid_file
+    : LOCALSTATEDIR "/run/rrdcached.pid";
+
+  fd = open(file, oflag, S_IWUSR|S_IRUSR|S_IRGRP|S_IROTH);
+  if (fd < 0)
+    fprintf(stderr, "rrdcached: can't %s pid file '%s' (%s)\n",
+            action, file, rrd_strerror(errno));
+
+  return(fd);
+} /* }}} static int open_pidfile */
+
+/* check existing pid file to see whether a daemon is running */
+static int check_pidfile(void)
+{
+  int pid_fd;
+  pid_t pid;
+  char pid_str[16];
+
+  pid_fd = open_pidfile("open", O_RDWR);
+  if (pid_fd < 0)
+    return pid_fd;
+
+  if (read(pid_fd, pid_str, sizeof(pid_str)) <= 0)
+    return -1;
+
+  pid = atoi(pid_str);
+  if (pid <= 0)
+    return -1;
+
+  /* another running process that we can signal COULD be
+   * a competing rrdcached */
+  if (pid != getpid() && kill(pid, 0) == 0)
+  {
+    fprintf(stderr,
+            "FATAL: Another rrdcached daemon is running?? (pid %d)\n", pid);
+    close(pid_fd);
+    return -1;
+  }
+
+  lseek(pid_fd, 0, SEEK_SET);
+  if (ftruncate(pid_fd, 0) == -1)
+  {
+    fprintf(stderr,
+            "FATAL: Faild to truncate stale PID file. (pid %d)\n", pid);
+    close(pid_fd);
+    return -1;
+  }
+
+  fprintf(stderr,
+          "rrdcached: removed stale PID file (no rrdcached on pid %d)\n"
+          "rrdcached: starting normally.\n", pid);
+
+  return pid_fd;
+} /* }}} static int check_pidfile */
+
+static int write_pidfile (int fd) /* {{{ */
+{
+  pid_t pid;
+  FILE *fh;
+
+  pid = getpid ();
+
+  fh = fdopen (fd, "w");
+  if (fh == NULL)
+  {
+    RRDD_LOG (LOG_ERR, "write_pidfile: fdopen() failed.");
+    close(fd);
+    return (-1);
+  }
+
+  fprintf (fh, "%i\n", (int) pid);
+  fclose (fh);
+
+  return (0);
+} /* }}} int write_pidfile */
+
+static int remove_pidfile (void) /* {{{ */
+{
+  char *file;
+  int status;
+
+  file = (config_pid_file != NULL)
+    ? config_pid_file
+    : LOCALSTATEDIR "/run/rrdcached.pid";
+
+  status = unlink (file);
+  if (status == 0)
+    return (0);
+  return (errno);
+} /* }}} int remove_pidfile */
+
+static char *next_cmd (listen_socket_t *sock, ssize_t *len) /* {{{ */
+{
+  char *eol;
+
+  eol = memchr(sock->rbuf + sock->next_cmd, '\n',
+               sock->next_read - sock->next_cmd);
+
+  if (eol == NULL)
+  {
+    /* no commands left, move remainder back to front of rbuf */
+    memmove(sock->rbuf, sock->rbuf + sock->next_cmd,
+            sock->next_read - sock->next_cmd);
+    sock->next_read -= sock->next_cmd;
+    sock->next_cmd = 0;
+    *len = 0;
+    return NULL;
+  }
+  else
+  {
+    char *cmd = sock->rbuf + sock->next_cmd;
+    *eol = '\0';
+
+    sock->next_cmd = eol - sock->rbuf + 1;
+
+    if (eol > sock->rbuf && *(eol-1) == '\r')
+      *(--eol) = '\0'; /* handle "\r\n" EOL */
+
+    *len = eol - cmd;
+
+    return cmd;
+  }
+
+  /* NOTREACHED */
+  assert(1==0);
+}
+
+/* add the characters directly to the write buffer */
+static int add_to_wbuf(listen_socket_t *sock, char *str, size_t len) /* {{{ */
+{
+  char *new_buf;
+
+  assert(sock != NULL);
+
+  new_buf = rrd_realloc(sock->wbuf, sock->wbuf_len + len + 1);
+  if (new_buf == NULL)
+  {
+    RRDD_LOG(LOG_ERR, "add_to_wbuf: realloc failed");
+    return -1;
+  }
+
+  strncpy(new_buf + sock->wbuf_len, str, len + 1);
+
+  sock->wbuf = new_buf;
+  sock->wbuf_len += len;
+
+  return 0;
+} /* }}} static int add_to_wbuf */
+
+/* add the text to the "extra" info that's sent after the status line */
+static int add_response_info(listen_socket_t *sock, char *fmt, ...) /* {{{ */
+{
+  va_list argp;
+  char buffer[CMD_MAX];
+  int len;
+
+  if (sock == NULL) return 0; /* journal replay mode */
+  if (sock->batch_start) return 0; /* no extra info returned when in BATCH */
+
+  va_start(argp, fmt);
+#ifdef HAVE_VSNPRINTF
+  len = vsnprintf(buffer, sizeof(buffer), fmt, argp);
+#else
+  len = vsprintf(buffer, fmt, argp);
+#endif
+  va_end(argp);
+  if (len < 0)
+  {
+    RRDD_LOG(LOG_ERR, "add_response_info: vnsprintf failed");
+    return -1;
+  }
+
+  return add_to_wbuf(sock, buffer, len);
+} /* }}} static int add_response_info */
+
+static int count_lines(char *str) /* {{{ */
+{
+  int lines = 0;
+
+  if (str != NULL)
+  {
+    while ((str = strchr(str, '\n')) != NULL)
+    {
+      ++lines;
+      ++str;
+    }
+  }
+
+  return lines;
+} /* }}} static int count_lines */
+
+/* send the response back to the user.
+ * returns 0 on success, -1 on error
+ * write buffer is always zeroed after this call */
+static int send_response (listen_socket_t *sock, response_code rc,
+                          char *fmt, ...) /* {{{ */
+{
+  va_list argp;
+  char buffer[CMD_MAX];
+  int lines;
+  ssize_t wrote;
+  int rclen, len;
+
+  if (sock == NULL) return rc;  /* journal replay mode */
+
+  if (sock->batch_start)
+  {
+    if (rc == RESP_OK)
+      return rc; /* no response on success during BATCH */
+    lines = sock->batch_cmd;
+  }
+  else if (rc == RESP_OK)
+    lines = count_lines(sock->wbuf);
+  else
+    lines = -1;
+
+  rclen = sprintf(buffer, "%d ", lines);
+  va_start(argp, fmt);
+#ifdef HAVE_VSNPRINTF
+  len = vsnprintf(buffer+rclen, sizeof(buffer)-rclen, fmt, argp);
+#else
+  len = vsprintf(buffer+rclen, fmt, argp);
+#endif
+  va_end(argp);
+  if (len < 0)
+    return -1;
+
+  len += rclen;
+
+  /* append the result to the wbuf, don't write to the user */
+  if (sock->batch_start)
+    return add_to_wbuf(sock, buffer, len);
+
+  /* first write must be complete */
+  if (len != write(sock->fd, buffer, len))
+  {
+    RRDD_LOG(LOG_INFO, "send_response: could not write status message");
+    return -1;
+  }
+
+  if (sock->wbuf != NULL && rc == RESP_OK)
+  {
+    wrote = 0;
+    while (wrote < sock->wbuf_len)
+    {
+      ssize_t wb = write(sock->fd, sock->wbuf + wrote, sock->wbuf_len - wrote);
+      if (wb <= 0)
+      {
+        RRDD_LOG(LOG_INFO, "send_response: could not write results");
+        return -1;
+      }
+      wrote += wb;
+    }
+  }
+
+  free(sock->wbuf); sock->wbuf = NULL;
+  sock->wbuf_len = 0;
+
+  return 0;
+} /* }}} */
+
+static void wipe_ci_values(cache_item_t *ci, time_t when)
+{
+  ci->values = NULL;
+  ci->values_num = 0;
+
+  ci->last_flush_time = when;
+  if (config_write_jitter > 0)
+    ci->last_flush_time += (rrd_random() % config_write_jitter);
+}
+
+/* remove_from_queue
+ * remove a "cache_item_t" item from the queue.
+ * must hold 'cache_lock' when calling this
+ */
+static void remove_from_queue(cache_item_t *ci) /* {{{ */
+{
+  if (ci == NULL) return;
+  if ((ci->flags & CI_FLAGS_IN_QUEUE) == 0) return; /* not queued */
+
+  if (ci->prev == NULL)
+    cache_queue_head = ci->next; /* reset head */
+  else
+    ci->prev->next = ci->next;
+
+  if (ci->next == NULL)
+    cache_queue_tail = ci->prev; /* reset the tail */
+  else
+    ci->next->prev = ci->prev;
+
+  ci->next = ci->prev = NULL;
+  ci->flags &= ~CI_FLAGS_IN_QUEUE;
+
+  pthread_mutex_lock (&stats_lock);
+  assert (stats_queue_length > 0);
+  stats_queue_length--;
+  pthread_mutex_unlock (&stats_lock);
+
+} /* }}} static void remove_from_queue */
+
+/* free the resources associated with the cache_item_t
+ * must hold cache_lock when calling this function
+ */
+static void *free_cache_item(cache_item_t *ci) /* {{{ */
+{
+  if (ci == NULL) return NULL;
+
+  remove_from_queue(ci);
+
+  for (size_t i=0; i < ci->values_num; i++)
+    free(ci->values[i]);
+
+  free (ci->values);
+  free (ci->file);
+
+  /* in case anyone is waiting */
+  pthread_cond_broadcast(&ci->flushed);
+
+  free (ci);
+
+  return NULL;
+} /* }}} static void *free_cache_item */
+
+/*
+ * enqueue_cache_item:
+ * `cache_lock' must be acquired before calling this function!
+ */
+static int enqueue_cache_item (cache_item_t *ci, /* {{{ */
+    queue_side_t side)
+{
+  if (ci == NULL)
+    return (-1);
+
+  if (ci->values_num == 0)
+    return (0);
+
+  if (side == HEAD)
+  {
+    if (cache_queue_head == ci)
+      return 0;
+
+    /* remove if further down in queue */
+    remove_from_queue(ci);
+
+    ci->prev = NULL;
+    ci->next = cache_queue_head;
+    if (ci->next != NULL)
+      ci->next->prev = ci;
+    cache_queue_head = ci;
+
+    if (cache_queue_tail == NULL)
+      cache_queue_tail = cache_queue_head;
+  }
+  else /* (side == TAIL) */
+  {
+    /* We don't move values back in the list.. */
+    if (ci->flags & CI_FLAGS_IN_QUEUE)
+      return (0);
+
+    assert (ci->next == NULL);
+    assert (ci->prev == NULL);
+
+    ci->prev = cache_queue_tail;
+
+    if (cache_queue_tail == NULL)
+      cache_queue_head = ci;
+    else
+      cache_queue_tail->next = ci;
+
+    cache_queue_tail = ci;
+  }
+
+  ci->flags |= CI_FLAGS_IN_QUEUE;
+
+  pthread_cond_signal(&queue_cond);
+  pthread_mutex_lock (&stats_lock);
+  stats_queue_length++;
+  pthread_mutex_unlock (&stats_lock);
+
+  return (0);
+} /* }}} int enqueue_cache_item */
+
+/*
+ * tree_callback_flush:
+ * Called via `g_tree_foreach' in `flush_thread_main'. `cache_lock' is held
+ * while this is in progress.
+ */
+static gboolean tree_callback_flush (gpointer key, gpointer value, /* {{{ */
+    gpointer data)
+{
+  cache_item_t *ci;
+  callback_flush_data_t *cfd;
+
+  ci = (cache_item_t *) value;
+  cfd = (callback_flush_data_t *) data;
+
+  if (ci->flags & CI_FLAGS_IN_QUEUE)
+    return FALSE;
+
+  if ((ci->last_flush_time <= cfd->abs_timeout)
+      && (ci->values_num > 0))
+  {
+    enqueue_cache_item (ci, TAIL);
+  }
+  else if ((do_shutdown != 0)
+      && (ci->values_num > 0))
+  {
+    enqueue_cache_item (ci, TAIL);
+  }
+  else if (((cfd->now - ci->last_flush_time) >= config_flush_interval)
+      && (ci->values_num <= 0))
+  {
+    assert ((char *) key == ci->file);
+    if (!rrd_add_ptr((void ***)&cfd->keys, &cfd->keys_num, (void *)key))
+    {
+      RRDD_LOG (LOG_ERR, "tree_callback_flush: rrd_add_ptrs failed.");
+      return (FALSE);
+    }
+  }
+
+  return (FALSE);
+} /* }}} gboolean tree_callback_flush */
+
+static int flush_old_values (int max_age)
+{
+  callback_flush_data_t cfd;
+  size_t k;
+
+  memset (&cfd, 0, sizeof (cfd));
+  /* Pass the current time as user data so that we don't need to call
+   * `time' for each node. */
+  cfd.now = time (NULL);
+  cfd.keys = NULL;
+  cfd.keys_num = 0;
+
+  if (max_age > 0)
+    cfd.abs_timeout = cfd.now - max_age;
+  else
+    cfd.abs_timeout = cfd.now + 2*config_write_jitter + 1;
+
+  /* `tree_callback_flush' will return the keys of all values that haven't
+   * been touched in the last `config_flush_interval' seconds in `cfd'.
+   * The char*'s in this array point to the same memory as ci->file, so we
+   * don't need to free them separately. */
+  g_tree_foreach (cache_tree, tree_callback_flush, (gpointer) &cfd);
+
+  for (k = 0; k < cfd.keys_num; k++)
+  {
+    /* should never fail, since we have held the cache_lock
+     * the entire time */
+    assert( g_tree_remove(cache_tree, cfd.keys[k]) == TRUE );
+  }
+
+  if (cfd.keys != NULL)
+  {
+    free (cfd.keys);
+    cfd.keys = NULL;
+  }
+
+  return (0);
+} /* int flush_old_values */
+
+static void *flush_thread_main (void *args __attribute__((unused))) /* {{{ */
+{
+  struct timeval now;
+  struct timespec next_flush;
+  int status;
+
+  gettimeofday (&now, NULL);
+  next_flush.tv_sec = now.tv_sec + config_flush_interval;
+  next_flush.tv_nsec = 1000 * now.tv_usec;
+
+  pthread_mutex_lock(&cache_lock);
+
+  while (!do_shutdown)
+  {
+    gettimeofday (&now, NULL);
+    if ((now.tv_sec > next_flush.tv_sec)
+        || ((now.tv_sec == next_flush.tv_sec)
+          && ((1000 * now.tv_usec) > next_flush.tv_nsec)))
+    {
+      /* Flush all values that haven't been written in the last
+       * `config_write_interval' seconds. */
+      flush_old_values (config_write_interval);
+
+      /* Determine the time of the next cache flush. */
+      next_flush.tv_sec =
+        now.tv_sec + next_flush.tv_sec % config_flush_interval;
+
+      /* unlock the cache while we rotate so we don't block incoming
+       * updates if the fsync() blocks on disk I/O */
+      pthread_mutex_unlock(&cache_lock);
+      journal_rotate();
+      pthread_mutex_lock(&cache_lock);
+    }
+
+    status = pthread_cond_timedwait(&flush_cond, &cache_lock, &next_flush);
+    if (status != 0 && status != ETIMEDOUT)
+    {
+      RRDD_LOG (LOG_ERR, "flush_thread_main: "
+                "pthread_cond_timedwait returned %i.", status);
+    }
+  }
+
+  if (config_flush_at_shutdown)
+    flush_old_values (-1); /* flush everything */
+
+  pthread_mutex_unlock(&cache_lock);
+
+  return NULL;
+} /* void *flush_thread_main */
+
+static void *queue_thread_main (void *args __attribute__((unused))) /* {{{ */
+{
+  pthread_mutex_lock (&cache_lock);
+
+  while (!do_shutdown
+         || (cache_queue_head != NULL && config_flush_at_shutdown))
+  {
+    cache_item_t *ci;
+    char *file;
+    char **values;
+    size_t values_num;
+    int status;
+
+    /* Now, check if there's something to store away. If not, wait until
+     * something comes in.  if we are shutting down, do not wait around.  */
+    if (cache_queue_head == NULL && !do_shutdown)
+    {
+      status = pthread_cond_wait (&queue_cond, &cache_lock);
+      if ((status != 0) && (status != ETIMEDOUT))
+      {
+        RRDD_LOG (LOG_ERR, "queue_thread_main: "
+            "pthread_cond_wait returned %i.", status);
+      }
+    }
+
+    /* Check if a value has arrived. This may be NULL if we timed out or there
+     * was an interrupt such as a signal. */
+    if (cache_queue_head == NULL)
+      continue;
+
+    ci = cache_queue_head;
+
+    /* copy the relevant parts */
+    file = strdup (ci->file);
+    if (file == NULL)
+    {
+      RRDD_LOG (LOG_ERR, "queue_thread_main: strdup failed.");
+      continue;
+    }
+
+    assert(ci->values != NULL);
+    assert(ci->values_num > 0);
+
+    values = ci->values;
+    values_num = ci->values_num;
+
+    wipe_ci_values(ci, time(NULL));
+    remove_from_queue(ci);
+
+    pthread_mutex_unlock (&cache_lock);
+
+    rrd_clear_error ();
+    status = rrd_update_r (file, NULL, (int) values_num, (void *) values);
+    if (status != 0)
+    {
+      RRDD_LOG (LOG_NOTICE, "queue_thread_main: "
+          "rrd_update_r (%s) failed with status %i. (%s)",
+          file, status, rrd_get_error());
+    }
+
+    journal_write("wrote", file);
+    pthread_cond_broadcast(&ci->flushed);
+
+    rrd_free_ptrs((void ***) &values, &values_num);
+    free(file);
+
+    if (status == 0)
+    {
+      pthread_mutex_lock (&stats_lock);
+      stats_updates_written++;
+      stats_data_sets_written += values_num;
+      pthread_mutex_unlock (&stats_lock);
+    }
+
+    pthread_mutex_lock (&cache_lock);
+  }
+  pthread_mutex_unlock (&cache_lock);
+
+  return (NULL);
+} /* }}} void *queue_thread_main */
+
+static int buffer_get_field (char **buffer_ret, /* {{{ */
+    size_t *buffer_size_ret, char **field_ret)
+{
+  char *buffer;
+  size_t buffer_pos;
+  size_t buffer_size;
+  char *field;
+  size_t field_size;
+  int status;
+
+  buffer = *buffer_ret;
+  buffer_pos = 0;
+  buffer_size = *buffer_size_ret;
+  field = *buffer_ret;
+  field_size = 0;
+
+  if (buffer_size <= 0)
+    return (-1);
+
+  /* This is ensured by `handle_request'. */
+  assert (buffer[buffer_size - 1] == '\0');
+
+  status = -1;
+  while (buffer_pos < buffer_size)
+  {
+    /* Check for end-of-field or end-of-buffer */
+    if (buffer[buffer_pos] == ' ' || buffer[buffer_pos] == '\0')
+    {
+      field[field_size] = 0;
+      field_size++;
+      buffer_pos++;
+      status = 0;
+      break;
+    }
+    /* Handle escaped characters. */
+    else if (buffer[buffer_pos] == '\\')
+    {
+      if (buffer_pos >= (buffer_size - 1))
+        break;
+      buffer_pos++;
+      field[field_size] = buffer[buffer_pos];
+      field_size++;
+      buffer_pos++;
+    }
+    /* Normal operation */ 
+    else
+    {
+      field[field_size] = buffer[buffer_pos];
+      field_size++;
+      buffer_pos++;
+    }
+  } /* while (buffer_pos < buffer_size) */
+
+  if (status != 0)
+    return (status);
+
+  *buffer_ret = buffer + buffer_pos;
+  *buffer_size_ret = buffer_size - buffer_pos;
+  *field_ret = field;
+
+  return (0);
+} /* }}} int buffer_get_field */
+
+/* if we're restricting writes to the base directory,
+ * check whether the file falls within the dir
+ * returns 1 if OK, otherwise 0
+ */
+static int check_file_access (const char *file, listen_socket_t *sock) /* {{{ */
+{
+  assert(file != NULL);
+
+  if (!config_write_base_only
+      || sock == NULL /* journal replay */
+      || config_base_dir == NULL)
+    return 1;
+
+  if (strstr(file, "../") != NULL) goto err;
+
+  /* relative paths without "../" are ok */
+  if (*file != '/') return 1;
+
+  /* file must be of the format base + "/" + <1+ char filename> */
+  if (strlen(file) < _config_base_dir_len + 2) goto err;
+  if (strncmp(file, config_base_dir, _config_base_dir_len) != 0) goto err;
+  if (*(file + _config_base_dir_len) != '/') goto err;
+
+  return 1;
+
+err:
+  if (sock != NULL && sock->fd >= 0)
+    send_response(sock, RESP_ERR, "%s\n", rrd_strerror(EACCES));
+
+  return 0;
+} /* }}} static int check_file_access */
+
+/* when using a base dir, convert relative paths to absolute paths.
+ * if necessary, modifies the "filename" pointer to point
+ * to the new path created in "tmp".  "tmp" is provided
+ * by the caller and sizeof(tmp) must be >= PATH_MAX.
+ *
+ * this allows us to optimize for the expected case (absolute path)
+ * with a no-op.
+ */
+static void get_abs_path(char **filename, char *tmp)
+{
+  assert(tmp != NULL);
+  assert(filename != NULL && *filename != NULL);
+
+  if (config_base_dir == NULL || **filename == '/')
+    return;
+
+  snprintf(tmp, PATH_MAX, "%s/%s", config_base_dir, *filename);
+  *filename = tmp;
+} /* }}} static int get_abs_path */
+
+/* returns 1 if we have the required privilege level,
+ * otherwise issue an error to the user on sock */
+static int has_privilege (listen_socket_t *sock, /* {{{ */
+                          socket_privilege priv)
+{
+  if (sock == NULL) /* journal replay */
+    return 1;
+
+  if (sock->privilege >= priv)
+    return 1;
+
+  return send_response(sock, RESP_ERR, "%s\n", rrd_strerror(EACCES));
+} /* }}} static int has_privilege */
+
+static int flush_file (const char *filename) /* {{{ */
+{
+  cache_item_t *ci;
+
+  pthread_mutex_lock (&cache_lock);
+
+  ci = (cache_item_t *) g_tree_lookup (cache_tree, filename);
+  if (ci == NULL)
+  {
+    pthread_mutex_unlock (&cache_lock);
+    return (ENOENT);
+  }
+
+  if (ci->values_num > 0)
+  {
+    /* Enqueue at head */
+    enqueue_cache_item (ci, HEAD);
+    pthread_cond_wait(&ci->flushed, &cache_lock);
+  }
+
+  /* DO NOT DO ANYTHING WITH ci HERE!!  The entry
+   * may have been purged during our cond_wait() */
+
+  pthread_mutex_unlock(&cache_lock);
+
+  return (0);
+} /* }}} int flush_file */
+
+static int syntax_error(listen_socket_t *sock, struct command *cmd) /* {{{ */
+{
+  char *err = "Syntax error.\n";
+
+  if (cmd && cmd->syntax)
+    err = cmd->syntax;
+
+  return send_response(sock, RESP_ERR, "Usage: %s", err);
+} /* }}} static int syntax_error() */
+
+static int handle_request_stats (HANDLER_PROTO) /* {{{ */
+{
+  uint64_t copy_queue_length;
+  uint64_t copy_updates_received;
+  uint64_t copy_flush_received;
+  uint64_t copy_updates_written;
+  uint64_t copy_data_sets_written;
+  uint64_t copy_journal_bytes;
+  uint64_t copy_journal_rotate;
+
+  uint64_t tree_nodes_number;
+  uint64_t tree_depth;
+
+  pthread_mutex_lock (&stats_lock);
+  copy_queue_length       = stats_queue_length;
+  copy_updates_received   = stats_updates_received;
+  copy_flush_received     = stats_flush_received;
+  copy_updates_written    = stats_updates_written;
+  copy_data_sets_written  = stats_data_sets_written;
+  copy_journal_bytes      = stats_journal_bytes;
+  copy_journal_rotate     = stats_journal_rotate;
+  pthread_mutex_unlock (&stats_lock);
+
+  pthread_mutex_lock (&cache_lock);
+  tree_nodes_number = (uint64_t) g_tree_nnodes (cache_tree);
+  tree_depth        = (uint64_t) g_tree_height (cache_tree);
+  pthread_mutex_unlock (&cache_lock);
+
+  add_response_info(sock,
+                    "QueueLength: %"PRIu64"\n", copy_queue_length);
+  add_response_info(sock,
+                    "UpdatesReceived: %"PRIu64"\n", copy_updates_received);
+  add_response_info(sock,
+                    "FlushesReceived: %"PRIu64"\n", copy_flush_received);
+  add_response_info(sock,
+                    "UpdatesWritten: %"PRIu64"\n", copy_updates_written);
+  add_response_info(sock,
+                    "DataSetsWritten: %"PRIu64"\n", copy_data_sets_written);
+  add_response_info(sock, "TreeNodesNumber: %"PRIu64"\n", tree_nodes_number);
+  add_response_info(sock, "TreeDepth: %"PRIu64"\n", tree_depth);
+  add_response_info(sock, "JournalBytes: %"PRIu64"\n", copy_journal_bytes);
+  add_response_info(sock, "JournalRotate: %"PRIu64"\n", copy_journal_rotate);
+
+  send_response(sock, RESP_OK, "Statistics follow\n");
+
+  return (0);
+} /* }}} int handle_request_stats */
+
+static int handle_request_flush (HANDLER_PROTO) /* {{{ */
+{
+  char *file, file_tmp[PATH_MAX];
+  int status;
+
+  status = buffer_get_field (&buffer, &buffer_size, &file);
+  if (status != 0)
+  {
+    return syntax_error(sock,cmd);
+  }
+  else
+  {
+    pthread_mutex_lock(&stats_lock);
+    stats_flush_received++;
+    pthread_mutex_unlock(&stats_lock);
+
+    get_abs_path(&file, file_tmp);
+    if (!check_file_access(file, sock)) return 0;
+
+    status = flush_file (file);
+    if (status == 0)
+      return send_response(sock, RESP_OK, "Successfully flushed %s.\n", file);
+    else if (status == ENOENT)
+    {
+      /* no file in our tree; see whether it exists at all */
+      struct stat statbuf;
+
+      memset(&statbuf, 0, sizeof(statbuf));
+      if (stat(file, &statbuf) == 0 && S_ISREG(statbuf.st_mode))
+        return send_response(sock, RESP_OK, "Nothing to flush: %s.\n", file);
+      else
+        return send_response(sock, RESP_ERR, "No such file: %s.\n", file);
+    }
+    else if (status < 0)
+      return send_response(sock, RESP_ERR, "Internal error.\n");
+    else
+      return send_response(sock, RESP_ERR, "Failed with status %i.\n", status);
+  }
+
+  /* NOTREACHED */
+  assert(1==0);
+} /* }}} int handle_request_flush */
+
+static int handle_request_flushall(HANDLER_PROTO) /* {{{ */
+{
+  RRDD_LOG(LOG_DEBUG, "Received FLUSHALL");
+
+  pthread_mutex_lock(&cache_lock);
+  flush_old_values(-1);
+  pthread_mutex_unlock(&cache_lock);
+
+  return send_response(sock, RESP_OK, "Started flush.\n");
+} /* }}} static int handle_request_flushall */
+
+static int handle_request_pending(HANDLER_PROTO) /* {{{ */
+{
+  int status;
+  char *file, file_tmp[PATH_MAX];
+  cache_item_t *ci;
+
+  status = buffer_get_field(&buffer, &buffer_size, &file);
+  if (status != 0)
+    return syntax_error(sock,cmd);
+
+  get_abs_path(&file, file_tmp);
+
+  pthread_mutex_lock(&cache_lock);
+  ci = g_tree_lookup(cache_tree, file);
+  if (ci == NULL)
+  {
+    pthread_mutex_unlock(&cache_lock);
+    return send_response(sock, RESP_ERR, "%s\n", rrd_strerror(ENOENT));
+  }
+
+  for (size_t i=0; i < ci->values_num; i++)
+    add_response_info(sock, "%s\n", ci->values[i]);
+
+  pthread_mutex_unlock(&cache_lock);
+  return send_response(sock, RESP_OK, "updates pending\n");
+} /* }}} static int handle_request_pending */
+
+static int handle_request_forget(HANDLER_PROTO) /* {{{ */
+{
+  int status;
+  gboolean found;
+  char *file, file_tmp[PATH_MAX];
+
+  status = buffer_get_field(&buffer, &buffer_size, &file);
+  if (status != 0)
+    return syntax_error(sock,cmd);
+
+  get_abs_path(&file, file_tmp);
+  if (!check_file_access(file, sock)) return 0;
+
+  pthread_mutex_lock(&cache_lock);
+  found = g_tree_remove(cache_tree, file);
+  pthread_mutex_unlock(&cache_lock);
+
+  if (found == TRUE)
+  {
+    if (sock != NULL)
+      journal_write("forget", file);
+
+    return send_response(sock, RESP_OK, "Gone!\n");
+  }
+  else
+    return send_response(sock, RESP_ERR, "%s\n", rrd_strerror(ENOENT));
+
+  /* NOTREACHED */
+  assert(1==0);
+} /* }}} static int handle_request_forget */
+
+static int handle_request_queue (HANDLER_PROTO) /* {{{ */
+{
+  cache_item_t *ci;
+
+  pthread_mutex_lock(&cache_lock);
+
+  ci = cache_queue_head;
+  while (ci != NULL)
+  {
+    add_response_info(sock, "%d %s\n", ci->values_num, ci->file);
+    ci = ci->next;
+  }
+
+  pthread_mutex_unlock(&cache_lock);
+
+  return send_response(sock, RESP_OK, "in queue.\n");
+} /* }}} int handle_request_queue */
+
+static int handle_request_update (HANDLER_PROTO) /* {{{ */
+{
+  char *file, file_tmp[PATH_MAX];
+  int values_num = 0;
+  int status;
+  char orig_buf[CMD_MAX];
+
+  cache_item_t *ci;
+
+  /* save it for the journal later */
+  strncpy(orig_buf, buffer, sizeof(orig_buf)-1);
+
+  status = buffer_get_field (&buffer, &buffer_size, &file);
+  if (status != 0)
+    return syntax_error(sock,cmd);
+
+  pthread_mutex_lock(&stats_lock);
+  stats_updates_received++;
+  pthread_mutex_unlock(&stats_lock);
+
+  get_abs_path(&file, file_tmp);
+  if (!check_file_access(file, sock)) return 0;
+
+  pthread_mutex_lock (&cache_lock);
+  ci = g_tree_lookup (cache_tree, file);
+
+  if (ci == NULL) /* {{{ */
+  {
+    struct stat statbuf;
+
+    /* don't hold the lock while we setup; stat(2) might block */
+    pthread_mutex_unlock(&cache_lock);
+
+    memset (&statbuf, 0, sizeof (statbuf));
+    status = stat (file, &statbuf);
+    if (status != 0)
+    {
+      RRDD_LOG (LOG_NOTICE, "handle_request_update: stat (%s) failed.", file);
+
+      status = errno;
+      if (status == ENOENT)
+        return send_response(sock, RESP_ERR, "No such file: %s\n", file);
+      else
+        return send_response(sock, RESP_ERR,
+                             "stat failed with error %i.\n", status);
+    }
+    if (!S_ISREG (statbuf.st_mode))
+      return send_response(sock, RESP_ERR, "Not a regular file: %s\n", file);
+
+    if (access(file, R_OK|W_OK) != 0)
+      return send_response(sock, RESP_ERR, "Cannot read/write %s: %s\n",
+                           file, rrd_strerror(errno));
+
+    ci = (cache_item_t *) malloc (sizeof (cache_item_t));
+    if (ci == NULL)
+    {
+      RRDD_LOG (LOG_ERR, "handle_request_update: malloc failed.");
+
+      return send_response(sock, RESP_ERR, "malloc failed.\n");
+    }
+    memset (ci, 0, sizeof (cache_item_t));
+
+    ci->file = strdup (file);
+    if (ci->file == NULL)
+    {
+      free (ci);
+      RRDD_LOG (LOG_ERR, "handle_request_update: strdup failed.");
+
+      return send_response(sock, RESP_ERR, "strdup failed.\n");
+    }
+
+    wipe_ci_values(ci, now);
+    ci->flags = CI_FLAGS_IN_TREE;
+    pthread_cond_init(&ci->flushed, NULL);
+
+    pthread_mutex_lock(&cache_lock);
+    g_tree_replace (cache_tree, (void *) ci->file, (void *) ci);
+  } /* }}} */
+  assert (ci != NULL);
+
+  /* don't re-write updates in replay mode */
+  if (sock != NULL)
+    journal_write("update", orig_buf);
+
+  while (buffer_size > 0)
+  {
+    char *value;
+    time_t stamp;
+    char *eostamp;
+
+    status = buffer_get_field (&buffer, &buffer_size, &value);
+    if (status != 0)
+    {
+      RRDD_LOG (LOG_INFO, "handle_request_update: Error reading field.");
+      break;
+    }
+
+    /* make sure update time is always moving forward */
+    stamp = strtol(value, &eostamp, 10);
+    if (eostamp == value || eostamp == NULL || *eostamp != ':')
+    {
+      pthread_mutex_unlock(&cache_lock);
+      return send_response(sock, RESP_ERR,
+                           "Cannot find timestamp in '%s'!\n", value);
+    }
+    else if (stamp <= ci->last_update_stamp)
+    {
+      pthread_mutex_unlock(&cache_lock);
+      return send_response(sock, RESP_ERR,
+                           "illegal attempt to update using time %ld when last"
+                           " update time is %ld (minimum one second step)\n",
+                           stamp, ci->last_update_stamp);
+    }
+    else
+      ci->last_update_stamp = stamp;
+
+    if (!rrd_add_strdup(&ci->values, &ci->values_num, value))
+    {
+      RRDD_LOG (LOG_ERR, "handle_request_update: rrd_add_strdup failed.");
+      continue;
+    }
+
+    values_num++;
+  }
+
+  if (((now - ci->last_flush_time) >= config_write_interval)
+      && ((ci->flags & CI_FLAGS_IN_QUEUE) == 0)
+      && (ci->values_num > 0))
+  {
+    enqueue_cache_item (ci, TAIL);
+  }
+
+  pthread_mutex_unlock (&cache_lock);
+
+  if (values_num < 1)
+    return send_response(sock, RESP_ERR, "No values updated.\n");
+  else
+    return send_response(sock, RESP_OK,
+                         "errors, enqueued %i value(s).\n", values_num);
+
+  /* NOTREACHED */
+  assert(1==0);
+
+} /* }}} int handle_request_update */
+
+/* we came across a "WROTE" entry during journal replay.
+ * throw away any values that we have accumulated for this file
+ */
+static int handle_request_wrote (HANDLER_PROTO) /* {{{ */
+{
+  cache_item_t *ci;
+  const char *file = buffer;
+
+  pthread_mutex_lock(&cache_lock);
+
+  ci = g_tree_lookup(cache_tree, file);
+  if (ci == NULL)
+  {
+    pthread_mutex_unlock(&cache_lock);
+    return (0);
+  }
+
+  if (ci->values)
+    rrd_free_ptrs((void ***) &ci->values, &ci->values_num);
+
+  wipe_ci_values(ci, now);
+  remove_from_queue(ci);
+
+  pthread_mutex_unlock(&cache_lock);
+  return (0);
+} /* }}} int handle_request_wrote */
+
+/* start "BATCH" processing */
+static int batch_start (HANDLER_PROTO) /* {{{ */
+{
+  int status;
+  if (sock->batch_start)
+    return send_response(sock, RESP_ERR, "Already in BATCH\n");
+
+  status = send_response(sock, RESP_OK,
+                         "Go ahead.  End with dot '.' on its own line.\n");
+  sock->batch_start = time(NULL);
+  sock->batch_cmd = 0;
+
+  return status;
+} /* }}} static int batch_start */
+
+/* finish "BATCH" processing and return results to the client */
+static int batch_done (HANDLER_PROTO) /* {{{ */
+{
+  assert(sock->batch_start);
+  sock->batch_start = 0;
+  sock->batch_cmd  = 0;
+  return send_response(sock, RESP_OK, "errors\n");
+} /* }}} static int batch_done */
+
+static int handle_request_quit (HANDLER_PROTO) /* {{{ */
+{
+  return -1;
+} /* }}} static int handle_request_quit */
+
+struct command COMMANDS[] = {
+  {
+    "UPDATE",
+    handle_request_update,
+    PRIV_HIGH,
+    CMD_CONTEXT_ANY,
+    "UPDATE <filename> <values> [<values> ...]\n"
+    ,
+    "Adds the given file to the internal cache if it is not yet known and\n"
+    "appends the given value(s) to the entry. See the rrdcached(1) manpage\n"
+    "for details.\n"
+    "\n"
+    "Each <values> has the following form:\n"
+    "  <values> = <time>:<value>[:<value>[...]]\n"
+    "See the rrdupdate(1) manpage for details.\n"
+  },
+  {
+    "WROTE",
+    handle_request_wrote,
+    PRIV_HIGH,
+    CMD_CONTEXT_JOURNAL,
+    NULL,
+    NULL
+  },
+  {
+    "FLUSH",
+    handle_request_flush,
+    PRIV_LOW,
+    CMD_CONTEXT_CLIENT | CMD_CONTEXT_BATCH,
+    "FLUSH <filename>\n"
+    ,
+    "Adds the given filename to the head of the update queue and returns\n"
+    "after it has been dequeued.\n"
+  },
+  {
+    "FLUSHALL",
+    handle_request_flushall,
+    PRIV_HIGH,
+    CMD_CONTEXT_CLIENT,
+    "FLUSHALL\n"
+    ,
+    "Triggers writing of all pending updates.  Returns immediately.\n"
+  },
+  {
+    "PENDING",
+    handle_request_pending,
+    PRIV_HIGH,
+    CMD_CONTEXT_CLIENT,
+    "PENDING <filename>\n"
+    ,
+    "Shows any 'pending' updates for a file, in order.\n"
+    "The updates shown have not yet been written to the underlying RRD file.\n"
+  },
+  {
+    "FORGET",
+    handle_request_forget,
+    PRIV_HIGH,
+    CMD_CONTEXT_ANY,
+    "FORGET <filename>\n"
+    ,
+    "Removes the file completely from the cache.\n"
+    "Any pending updates for the file will be lost.\n"
+  },
+  {
+    "QUEUE",
+    handle_request_queue,
+    PRIV_LOW,
+    CMD_CONTEXT_CLIENT,
+    "QUEUE\n"
+    ,
+        "Shows all files in the output queue.\n"
+    "The output is zero or more lines in the following format:\n"
+    "(where <num_vals> is the number of values to be written)\n"
+    "\n"
+    "<num_vals> <filename>\n"
+  },
+  {
+    "STATS",
+    handle_request_stats,
+    PRIV_LOW,
+    CMD_CONTEXT_CLIENT,
+    "STATS\n"
+    ,
+    "Returns some performance counters, see the rrdcached(1) manpage for\n"
+    "a description of the values.\n"
+  },
+  {
+    "HELP",
+    handle_request_help,
+    PRIV_LOW,
+    CMD_CONTEXT_CLIENT,
+    "HELP [<command>]\n",
+    NULL, /* special! */
+  },
+  {
+    "BATCH",
+    batch_start,
+    PRIV_LOW,
+    CMD_CONTEXT_CLIENT,
+    "BATCH\n"
+    ,
+    "The 'BATCH' command permits the client to initiate a bulk load\n"
+    "   of commands to rrdcached.\n"
+    "\n"
+    "Usage:\n"
+    "\n"
+    "    client: BATCH\n"
+    "    server: 0 Go ahead.  End with dot '.' on its own line.\n"
+    "    client: command #1\n"
+    "    client: command #2\n"
+    "    client: ... and so on\n"
+    "    client: .\n"
+    "    server: 2 errors\n"
+    "    server: 7 message for command #7\n"
+    "    server: 9 message for command #9\n"
+    "\n"
+    "For more information, consult the rrdcached(1) documentation.\n"
+  },
+  {
+    ".",   /* BATCH terminator */
+    batch_done,
+    PRIV_LOW,
+    CMD_CONTEXT_BATCH,
+    NULL,
+    NULL
+  },
+  {
+    "QUIT",
+    handle_request_quit,
+    PRIV_LOW,
+    CMD_CONTEXT_CLIENT | CMD_CONTEXT_BATCH,
+    "QUIT\n"
+    ,
+    "Disconnect from rrdcached.\n"
+  },
+  {NULL,NULL,0,0,NULL,NULL}  /* LAST ENTRY */
+};
+
+static struct command *find_command(char *cmd)
+{
+  struct command *c = COMMANDS;
+
+  while (c->cmd != NULL)
+  {
+    if (strcasecmp(cmd, c->cmd) == 0)
+      break;
+    c++;
+  }
+
+  if (c->cmd == NULL)
+    return NULL;
+  else
+    return c;
+}
+
+/* check whether commands are received in the expected context */
+static int command_check_context(listen_socket_t *sock, struct command *cmd)
+{
+  if (sock == NULL)
+    return (cmd->context & CMD_CONTEXT_JOURNAL);
+  else if (sock->batch_start)
+    return (cmd->context & CMD_CONTEXT_BATCH);
+  else
+    return (cmd->context & CMD_CONTEXT_CLIENT);
+
+  /* NOTREACHED */
+  assert(1==0);
+}
+
+static int handle_request_help (HANDLER_PROTO) /* {{{ */
+{
+  int status;
+  char *cmd_str;
+  char *resp_txt;
+  struct command *help = NULL;
+
+  status = buffer_get_field (&buffer, &buffer_size, &cmd_str);
+  if (status == 0)
+    help = find_command(cmd_str);
+
+  if (help && (help->syntax || help->help))
+  {
+    char tmp[CMD_MAX];
+
+    snprintf(tmp, sizeof(tmp)-1, "Help for %s\n", help->cmd);
+    resp_txt = tmp;
+
+    if (help->syntax)
+      add_response_info(sock, "Usage: %s\n", help->syntax);
+
+    if (help->help)
+      add_response_info(sock, "%s\n", help->help);
+  }
+  else
+  {
+    help = COMMANDS;
+    resp_txt = "Command overview\n";
+
+    while (help->cmd)
+    {
+      if (help->syntax)
+        add_response_info(sock, "%s", help->syntax);
+      help++;
+    }
+  }
+
+  return send_response(sock, RESP_OK, resp_txt);
+} /* }}} int handle_request_help */
+
+/* if sock==NULL, we are in journal replay mode */
+static int handle_request (DISPATCH_PROTO) /* {{{ */
+{
+  char *buffer_ptr = buffer;
+  char *cmd_str = NULL;
+  struct command *cmd = NULL;
+  int status;
+
+  assert (buffer[buffer_size - 1] == '\0');
+
+  status = buffer_get_field (&buffer_ptr, &buffer_size, &cmd_str);
+  if (status != 0)
+  {
+    RRDD_LOG (LOG_INFO, "handle_request: Unable parse command.");
+    return (-1);
+  }
+
+  if (sock != NULL && sock->batch_start)
+    sock->batch_cmd++;
+
+  cmd = find_command(cmd_str);
+  if (!cmd)
+    return send_response(sock, RESP_ERR, "Unknown command: %s\n", cmd_str);
+
+  status = has_privilege(sock, cmd->min_priv);
+  if (status <= 0)
+    return status;
+
+  if (!command_check_context(sock, cmd))
+    return send_response(sock, RESP_ERR, "Can't use '%s' here.\n", cmd_str);
+
+  return cmd->handler(cmd, sock, now, buffer_ptr, buffer_size);
+} /* }}} int handle_request */
+
+/* MUST NOT hold journal_lock before calling this */
+static void journal_rotate(void) /* {{{ */
+{
+  FILE *old_fh = NULL;
+  int new_fd;
+
+  if (journal_cur == NULL || journal_old == NULL)
+    return;
+
+  pthread_mutex_lock(&journal_lock);
+
+  /* we rotate this way (rename before close) so that the we can release
+   * the journal lock as fast as possible.  Journal writes to the new
+   * journal can proceed immediately after the new file is opened.  The
+   * fclose can then block without affecting new updates.
+   */
+  if (journal_fh != NULL)
+  {
+    old_fh = journal_fh;
+    journal_fh = NULL;
+    rename(journal_cur, journal_old);
+    ++stats_journal_rotate;
+  }
+
+  new_fd = open(journal_cur, O_WRONLY|O_CREAT|O_APPEND,
+                S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
+  if (new_fd >= 0)
+  {
+    journal_fh = fdopen(new_fd, "a");
+    if (journal_fh == NULL)
+      close(new_fd);
+  }
+
+  pthread_mutex_unlock(&journal_lock);
+
+  if (old_fh != NULL)
+    fclose(old_fh);
+
+  if (journal_fh == NULL)
+  {
+    RRDD_LOG(LOG_CRIT,
+             "JOURNALING DISABLED: Cannot open journal file '%s' : (%s)",
+             journal_cur, rrd_strerror(errno));
+
+    RRDD_LOG(LOG_ERR,
+             "JOURNALING DISABLED: All values will be flushed at shutdown");
+    config_flush_at_shutdown = 1;
+  }
+
+} /* }}} static void journal_rotate */
+
+static void journal_done(void) /* {{{ */
+{
+  if (journal_cur == NULL)
+    return;
+
+  pthread_mutex_lock(&journal_lock);
+  if (journal_fh != NULL)
+  {
+    fclose(journal_fh);
+    journal_fh = NULL;
+  }
+
+  if (config_flush_at_shutdown)
+  {
+    RRDD_LOG(LOG_INFO, "removing journals");
+    unlink(journal_old);
+    unlink(journal_cur);
+  }
+  else
+  {
+    RRDD_LOG(LOG_INFO, "expedited shutdown; "
+             "journals will be used at next startup");
+  }
+
+  pthread_mutex_unlock(&journal_lock);
+
+} /* }}} static void journal_done */
+
+static int journal_write(char *cmd, char *args) /* {{{ */
+{
+  int chars;
+
+  if (journal_fh == NULL)
+    return 0;
+
+  pthread_mutex_lock(&journal_lock);
+  chars = fprintf(journal_fh, "%s %s\n", cmd, args);
+  pthread_mutex_unlock(&journal_lock);
+
+  if (chars > 0)
+  {
+    pthread_mutex_lock(&stats_lock);
+    stats_journal_bytes += chars;
+    pthread_mutex_unlock(&stats_lock);
+  }
+
+  return chars;
+} /* }}} static int journal_write */
+
+static int journal_replay (const char *file) /* {{{ */
+{
+  FILE *fh;
+  int entry_cnt = 0;
+  int fail_cnt = 0;
+  uint64_t line = 0;
+  char entry[CMD_MAX];
+  time_t now;
+
+  if (file == NULL) return 0;
+
+  {
+    char *reason = "unknown error";
+    int status = 0;
+    struct stat statbuf;
+
+    memset(&statbuf, 0, sizeof(statbuf));
+    if (stat(file, &statbuf) != 0)
+    {
+      if (errno == ENOENT)
+        return 0;
+
+      reason = "stat error";
+      status = errno;
+    }
+    else if (!S_ISREG(statbuf.st_mode))
+    {
+      reason = "not a regular file";
+      status = EPERM;
+    }
+    if (statbuf.st_uid != daemon_uid)
+    {
+      reason = "not owned by daemon user";
+      status = EACCES;
+    }
+    if (statbuf.st_mode & (S_IWGRP|S_IWOTH))
+    {
+      reason = "must not be user/group writable";
+      status = EACCES;
+    }
+
+    if (status != 0)
+    {
+      RRDD_LOG(LOG_ERR, "journal_replay: %s : %s (%s)",
+               file, rrd_strerror(status), reason);
+      return 0;
+    }
+  }
+
+  fh = fopen(file, "r");
+  if (fh == NULL)
+  {
+    if (errno != ENOENT)
+      RRDD_LOG(LOG_ERR, "journal_replay: cannot open journal file: '%s' (%s)",
+               file, rrd_strerror(errno));
+    return 0;
+  }
+  else
+    RRDD_LOG(LOG_NOTICE, "replaying from journal: %s", file);
+
+  now = time(NULL);
+
+  while(!feof(fh))
+  {
+    size_t entry_len;
+
+    ++line;
+    if (fgets(entry, sizeof(entry), fh) == NULL)
+      break;
+    entry_len = strlen(entry);
+
+    /* check \n termination in case journal writing crashed mid-line */
+    if (entry_len == 0)
+      continue;
+    else if (entry[entry_len - 1] != '\n')
+    {
+      RRDD_LOG(LOG_NOTICE, "Malformed journal entry at line %"PRIu64, line);
+      ++fail_cnt;
+      continue;
+    }
+
+    entry[entry_len - 1] = '\0';
+
+    if (handle_request(NULL, now, entry, entry_len) == 0)
+      ++entry_cnt;
+    else
+      ++fail_cnt;
+  }
+
+  fclose(fh);
+
+  RRDD_LOG(LOG_INFO, "Replayed %d entries (%d failures)",
+           entry_cnt, fail_cnt);
+
+  return entry_cnt > 0 ? 1 : 0;
+} /* }}} static int journal_replay */
+
+static void journal_init(void) /* {{{ */
+{
+  int had_journal = 0;
+
+  if (journal_cur == NULL) return;
+
+  pthread_mutex_lock(&journal_lock);
+
+  RRDD_LOG(LOG_INFO, "checking for journal files");
+
+  had_journal += journal_replay(journal_old);
+  had_journal += journal_replay(journal_cur);
+
+  /* it must have been a crash.  start a flush */
+  if (had_journal && config_flush_at_shutdown)
+    flush_old_values(-1);
+
+  pthread_mutex_unlock(&journal_lock);
+  journal_rotate();
+
+  RRDD_LOG(LOG_INFO, "journal processing complete");
+
+} /* }}} static void journal_init */
+
+static void free_listen_socket(listen_socket_t *sock) /* {{{ */
+{
+  assert(sock != NULL);
+
+  free(sock->rbuf);  sock->rbuf = NULL;
+  free(sock->wbuf);  sock->wbuf = NULL;
+  free(sock);
+} /* }}} void free_listen_socket */
+
+static void close_connection(listen_socket_t *sock) /* {{{ */
+{
+  if (sock->fd >= 0)
+  {
+    close(sock->fd);
+    sock->fd = -1;
+  }
+
+  free_listen_socket(sock);
+
+} /* }}} void close_connection */
+
+static void *connection_thread_main (void *args) /* {{{ */
+{
+  listen_socket_t *sock;
+  int fd;
+
+  sock = (listen_socket_t *) args;
+  fd = sock->fd;
+
+  /* init read buffers */
+  sock->next_read = sock->next_cmd = 0;
+  sock->rbuf = malloc(RBUF_SIZE);
+  if (sock->rbuf == NULL)
+  {
+    RRDD_LOG(LOG_ERR, "connection_thread_main: cannot malloc read buffer");
+    close_connection(sock);
+    return NULL;
+  }
+
+  pthread_mutex_lock (&connection_threads_lock);
+  connection_threads_num++;
+  pthread_mutex_unlock (&connection_threads_lock);
+
+  while (do_shutdown == 0)
+  {
+    char *cmd;
+    ssize_t cmd_len;
+    ssize_t rbytes;
+    time_t now;
+
+    struct pollfd pollfd;
+    int status;
+
+    pollfd.fd = fd;
+    pollfd.events = POLLIN | POLLPRI;
+    pollfd.revents = 0;
+
+    status = poll (&pollfd, 1, /* timeout = */ 500);
+    if (do_shutdown)
+      break;
+    else if (status == 0) /* timeout */
+      continue;
+    else if (status < 0) /* error */
+    {
+      status = errno;
+      if (status != EINTR)
+        RRDD_LOG (LOG_ERR, "connection_thread_main: poll(2) failed.");
+      continue;
+    }
+
+    if ((pollfd.revents & POLLHUP) != 0) /* normal shutdown */
+      break;
+    else if ((pollfd.revents & (POLLIN | POLLPRI)) == 0)
+    {
+      RRDD_LOG (LOG_WARNING, "connection_thread_main: "
+          "poll(2) returned something unexpected: %#04hx",
+          pollfd.revents);
+      break;
+    }
+
+    rbytes = read(fd, sock->rbuf + sock->next_read,
+                  RBUF_SIZE - sock->next_read);
+    if (rbytes < 0)
+    {
+      RRDD_LOG(LOG_ERR, "connection_thread_main: read() failed.");
+      break;
+    }
+    else if (rbytes == 0)
+      break; /* eof */
+
+    sock->next_read += rbytes;
+
+    if (sock->batch_start)
+      now = sock->batch_start;
+    else
+      now = time(NULL);
+
+    while ((cmd = next_cmd(sock, &cmd_len)) != NULL)
+    {
+      status = handle_request (sock, now, cmd, cmd_len+1);
+      if (status != 0)
+        goto out_close;
+    }
+  }
+
+out_close:
+  close_connection(sock);
+
+  /* Remove this thread from the connection threads list */
+  pthread_mutex_lock (&connection_threads_lock);
+  connection_threads_num--;
+  if (connection_threads_num <= 0)
+    pthread_cond_broadcast(&connection_threads_done);
+  pthread_mutex_unlock (&connection_threads_lock);
+
+  return (NULL);
+} /* }}} void *connection_thread_main */
+
+static int open_listen_socket_unix (const listen_socket_t *sock) /* {{{ */
+{
+  int fd;
+  struct sockaddr_un sa;
+  listen_socket_t *temp;
+  int status;
+  const char *path;
+
+  path = sock->addr;
+  if (strncmp(path, "unix:", strlen("unix:")) == 0)
+    path += strlen("unix:");
+
+  temp = (listen_socket_t *) rrd_realloc (listen_fds,
+      sizeof (listen_fds[0]) * (listen_fds_num + 1));
+  if (temp == NULL)
+  {
+    fprintf (stderr, "rrdcached: open_listen_socket_unix: realloc failed.\n");
+    return (-1);
+  }
+  listen_fds = temp;
+  memcpy (listen_fds + listen_fds_num, sock, sizeof (listen_fds[0]));
+
+  fd = socket (PF_UNIX, SOCK_STREAM, /* protocol = */ 0);
+  if (fd < 0)
+  {
+    fprintf (stderr, "rrdcached: unix socket(2) failed: %s\n",
+             rrd_strerror(errno));
+    return (-1);
+  }
+
+  memset (&sa, 0, sizeof (sa));
+  sa.sun_family = AF_UNIX;
+  strncpy (sa.sun_path, path, sizeof (sa.sun_path) - 1);
+
+  /* if we've gotten this far, we own the pid file.  any daemon started
+   * with the same args must not be alive.  therefore, ensure that we can
+   * create the socket...
+   */
+  unlink(path);
+
+  status = bind (fd, (struct sockaddr *) &sa, sizeof (sa));
+  if (status != 0)
+  {
+    fprintf (stderr, "rrdcached: bind(%s) failed: %s.\n",
+             path, rrd_strerror(errno));
+    close (fd);
+    return (-1);
+  }
+
+  status = listen (fd, /* backlog = */ 10);
+  if (status != 0)
+  {
+    fprintf (stderr, "rrdcached: listen(%s) failed: %s.\n",
+             path, rrd_strerror(errno));
+    close (fd);
+    unlink (path);
+    return (-1);
+  }
+
+  listen_fds[listen_fds_num].fd = fd;
+  listen_fds[listen_fds_num].family = PF_UNIX;
+  strncpy(listen_fds[listen_fds_num].addr, path,
+          sizeof (listen_fds[listen_fds_num].addr) - 1);
+  listen_fds_num++;
+
+  return (0);
+} /* }}} int open_listen_socket_unix */
+
+static int open_listen_socket_network(const listen_socket_t *sock) /* {{{ */
+{
+  struct addrinfo ai_hints;
+  struct addrinfo *ai_res;
+  struct addrinfo *ai_ptr;
+  char addr_copy[NI_MAXHOST];
+  char *addr;
+  char *port;
+  int status;
+
+  strncpy (addr_copy, sock->addr, sizeof(addr_copy)-1);
+  addr_copy[sizeof (addr_copy) - 1] = 0;
+  addr = addr_copy;
+
+  memset (&ai_hints, 0, sizeof (ai_hints));
+  ai_hints.ai_flags = 0;
+#ifdef AI_ADDRCONFIG
+  ai_hints.ai_flags |= AI_ADDRCONFIG;
+#endif
+  ai_hints.ai_family = AF_UNSPEC;
+  ai_hints.ai_socktype = SOCK_STREAM;
+
+  port = NULL;
+  if (*addr == '[') /* IPv6+port format */
+  {
+    /* `addr' is something like "[2001:780:104:2:211:24ff:feab:26f8]:12345" */
+    addr++;
+
+    port = strchr (addr, ']');
+    if (port == NULL)
+    {
+      fprintf (stderr, "rrdcached: Malformed address: %s\n", sock->addr);
+      return (-1);
+    }
+    *port = 0;
+    port++;
+
+    if (*port == ':')
+      port++;
+    else if (*port == 0)
+      port = NULL;
+    else
+    {
+      fprintf (stderr, "rrdcached: Garbage after address: %s\n", port);
+      return (-1);
+    }
+  } /* if (*addr = ']') */
+  else if (strchr (addr, '.') != NULL) /* Hostname or IPv4 */
+  {
+    port = rindex(addr, ':');
+    if (port != NULL)
+    {
+      *port = 0;
+      port++;
+    }
+  }
+  ai_res = NULL;
+  status = getaddrinfo (addr,
+                        port == NULL ? RRDCACHED_DEFAULT_PORT : port,
+                        &ai_hints, &ai_res);
+  if (status != 0)
+  {
+    fprintf (stderr, "rrdcached: getaddrinfo(%s) failed: %s\n",
+             addr, gai_strerror (status));
+    return (-1);
+  }
+
+  for (ai_ptr = ai_res; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next)
+  {
+    int fd;
+    listen_socket_t *temp;
+    int one = 1;
+
+    temp = (listen_socket_t *) rrd_realloc (listen_fds,
+        sizeof (listen_fds[0]) * (listen_fds_num + 1));
+    if (temp == NULL)
+    {
+      fprintf (stderr,
+               "rrdcached: open_listen_socket_network: realloc failed.\n");
+      continue;
+    }
+    listen_fds = temp;
+    memcpy (listen_fds + listen_fds_num, sock, sizeof (listen_fds[0]));
+
+    fd = socket (ai_ptr->ai_family, ai_ptr->ai_socktype, ai_ptr->ai_protocol);
+    if (fd < 0)
+    {
+      fprintf (stderr, "rrdcached: network socket(2) failed: %s.\n",
+               rrd_strerror(errno));
+      continue;
+    }
+
+    setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
+
+    status = bind (fd, ai_ptr->ai_addr, ai_ptr->ai_addrlen);
+    if (status != 0)
+    {
+      fprintf (stderr, "rrdcached: bind(%s) failed: %s.\n",
+               sock->addr, rrd_strerror(errno));
+      close (fd);
+      continue;
+    }
+
+    status = listen (fd, /* backlog = */ 10);
+    if (status != 0)
+    {
+      fprintf (stderr, "rrdcached: listen(%s) failed: %s\n.",
+               sock->addr, rrd_strerror(errno));
+      close (fd);
+      freeaddrinfo(ai_res);
+      return (-1);
+    }
+
+    listen_fds[listen_fds_num].fd = fd;
+    listen_fds[listen_fds_num].family = ai_ptr->ai_family;
+    listen_fds_num++;
+  } /* for (ai_ptr) */
+
+  freeaddrinfo(ai_res);
+  return (0);
+} /* }}} static int open_listen_socket_network */
+
+static int open_listen_socket (const listen_socket_t *sock) /* {{{ */
+{
+  assert(sock != NULL);
+  assert(sock->addr != NULL);
+
+  if (strncmp ("unix:", sock->addr, strlen ("unix:")) == 0
+      || sock->addr[0] == '/')
+    return (open_listen_socket_unix(sock));
+  else
+    return (open_listen_socket_network(sock));
+} /* }}} int open_listen_socket */
+
+static int close_listen_sockets (void) /* {{{ */
+{
+  size_t i;
+
+  for (i = 0; i < listen_fds_num; i++)
+  {
+    close (listen_fds[i].fd);
+
+    if (listen_fds[i].family == PF_UNIX)
+      unlink(listen_fds[i].addr);
+  }
+
+  free (listen_fds);
+  listen_fds = NULL;
+  listen_fds_num = 0;
+
+  return (0);
+} /* }}} int close_listen_sockets */
+
+static void *listen_thread_main (void *args __attribute__((unused))) /* {{{ */
+{
+  struct pollfd *pollfds;
+  int pollfds_num;
+  int status;
+  int i;
+
+  if (listen_fds_num < 1)
+  {
+    RRDD_LOG(LOG_ERR, "listen_thread_main: no listen_fds !");
+    return (NULL);
+  }
+
+  pollfds_num = listen_fds_num;
+  pollfds = (struct pollfd *) malloc (sizeof (*pollfds) * pollfds_num);
+  if (pollfds == NULL)
+  {
+    RRDD_LOG (LOG_ERR, "listen_thread_main: malloc failed.");
+    return (NULL);
+  }
+  memset (pollfds, 0, sizeof (*pollfds) * pollfds_num);
+
+  RRDD_LOG(LOG_INFO, "listening for connections");
+
+  while (do_shutdown == 0)
+  {
+    for (i = 0; i < pollfds_num; i++)
+    {
+      pollfds[i].fd = listen_fds[i].fd;
+      pollfds[i].events = POLLIN | POLLPRI;
+      pollfds[i].revents = 0;
+    }
+
+    status = poll (pollfds, pollfds_num, /* timeout = */ 1000);
+    if (do_shutdown)
+      break;
+    else if (status == 0) /* timeout */
+      continue;
+    else if (status < 0) /* error */
+    {
+      status = errno;
+      if (status != EINTR)
+      {
+        RRDD_LOG (LOG_ERR, "listen_thread_main: poll(2) failed.");
+      }
+      continue;
+    }
+
+    for (i = 0; i < pollfds_num; i++)
+    {
+      listen_socket_t *client_sock;
+      struct sockaddr_storage client_sa;
+      socklen_t client_sa_size;
+      pthread_t tid;
+      pthread_attr_t attr;
+
+      if (pollfds[i].revents == 0)
+        continue;
+
+      if ((pollfds[i].revents & (POLLIN | POLLPRI)) == 0)
+      {
+        RRDD_LOG (LOG_ERR, "listen_thread_main: "
+            "poll(2) returned something unexpected for listen FD #%i.",
+            pollfds[i].fd);
+        continue;
+      }
+
+      client_sock = (listen_socket_t *) malloc (sizeof (listen_socket_t));
+      if (client_sock == NULL)
+      {
+        RRDD_LOG (LOG_ERR, "listen_thread_main: malloc failed.");
+        continue;
+      }
+      memcpy(client_sock, &listen_fds[i], sizeof(listen_fds[0]));
+
+      client_sa_size = sizeof (client_sa);
+      client_sock->fd = accept (pollfds[i].fd,
+          (struct sockaddr *) &client_sa, &client_sa_size);
+      if (client_sock->fd < 0)
+      {
+        RRDD_LOG (LOG_ERR, "listen_thread_main: accept(2) failed.");
+        free(client_sock);
+        continue;
+      }
+
+      pthread_attr_init (&attr);
+      pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
+
+      status = pthread_create (&tid, &attr, connection_thread_main,
+                               client_sock);
+      if (status != 0)
+      {
+        RRDD_LOG (LOG_ERR, "listen_thread_main: pthread_create failed.");
+        close_connection(client_sock);
+        continue;
+      }
+    } /* for (pollfds_num) */
+  } /* while (do_shutdown == 0) */
+
+  RRDD_LOG(LOG_INFO, "starting shutdown");
+
+  close_listen_sockets ();
+
+  pthread_mutex_lock (&connection_threads_lock);
+  while (connection_threads_num > 0)
+    pthread_cond_wait(&connection_threads_done, &connection_threads_lock);
+  pthread_mutex_unlock (&connection_threads_lock);
+
+  free(pollfds);
+
+  return (NULL);
+} /* }}} void *listen_thread_main */
+
+static int daemonize (void) /* {{{ */
+{
+  int pid_fd;
+  char *base_dir;
+
+  daemon_uid = geteuid();
+
+  pid_fd = open_pidfile("create", O_CREAT|O_EXCL|O_WRONLY);
+  if (pid_fd < 0)
+    pid_fd = check_pidfile();
+  if (pid_fd < 0)
+    return pid_fd;
+
+  /* open all the listen sockets */
+  if (config_listen_address_list_len > 0)
+  {
+    for (size_t i = 0; i < config_listen_address_list_len; i++)
+      open_listen_socket (config_listen_address_list[i]);
+
+    rrd_free_ptrs((void ***) &config_listen_address_list,
+                  &config_listen_address_list_len);
+  }
+  else
+  {
+    listen_socket_t sock;
+    memset(&sock, 0, sizeof(sock));
+    strncpy(sock.addr, RRDCACHED_DEFAULT_ADDRESS, sizeof(sock.addr)-1);
+    open_listen_socket (&sock);
+  }
+
+  if (listen_fds_num < 1)
+  {
+    fprintf (stderr, "rrdcached: FATAL: cannot open any listen sockets\n");
+    goto error;
+  }
+
+  if (!stay_foreground)
+  {
+    pid_t child;
+
+    child = fork ();
+    if (child < 0)
+    {
+      fprintf (stderr, "daemonize: fork(2) failed.\n");
+      goto error;
+    }
+    else if (child > 0)
+      exit(0);
+
+    /* Become session leader */
+    setsid ();
+
+    /* Open the first three file descriptors to /dev/null */
+    close (2);
+    close (1);
+    close (0);
+
+    open ("/dev/null", O_RDWR);
+    if (dup(0) == -1 || dup(0) == -1){
+        RRDD_LOG (LOG_ERR, "faild to run dup.\n");
+    }
+  } /* if (!stay_foreground) */
+
+  /* Change into the /tmp directory. */
+  base_dir = (config_base_dir != NULL)
+    ? config_base_dir
+    : "/tmp";
+
+  if (chdir (base_dir) != 0)
+  {
+    fprintf (stderr, "daemonize: chdir (%s) failed.\n", base_dir);
+    goto error;
+  }
+
+  install_signal_handlers();
+
+  openlog ("rrdcached", LOG_PID, LOG_DAEMON);
+  RRDD_LOG(LOG_INFO, "starting up");
+
+  cache_tree = g_tree_new_full ((GCompareDataFunc) strcmp, NULL, NULL,
+                                (GDestroyNotify) free_cache_item);
+  if (cache_tree == NULL)
+  {
+    RRDD_LOG (LOG_ERR, "daemonize: g_tree_new failed.");
+    goto error;
+  }
+
+  return write_pidfile (pid_fd);
+
+error:
+  remove_pidfile();
+  return -1;
+} /* }}} int daemonize */
+
+static int cleanup (void) /* {{{ */
+{
+  do_shutdown++;
+
+  pthread_cond_broadcast (&flush_cond);
+  pthread_join (flush_thread, NULL);
+
+  pthread_cond_broadcast (&queue_cond);
+  for (int i = 0; i < config_queue_threads; i++)
+    pthread_join (queue_threads[i], NULL);
+
+  if (config_flush_at_shutdown)
+  {
+    assert(cache_queue_head == NULL);
+    RRDD_LOG(LOG_INFO, "clean shutdown; all RRDs flushed");
+  }
+
+  journal_done();
+  remove_pidfile ();
+
+  free(queue_threads);
+  free(config_base_dir);
+  free(config_pid_file);
+  free(journal_cur);
+  free(journal_old);
+
+  pthread_mutex_lock(&cache_lock);
+  g_tree_destroy(cache_tree);
+
+  RRDD_LOG(LOG_INFO, "goodbye");
+  closelog ();
+
+  return (0);
+} /* }}} int cleanup */
+
+static int read_options (int argc, char **argv) /* {{{ */
+{
+  int option;
+  int status = 0;
+
+  while ((option = getopt(argc, argv, "gl:L:f:w:z:t:Bb:p:Fj:h?")) != -1)
+  {
+    switch (option)
+    {
+      case 'g':
+        stay_foreground=1;
+        break;
+
+      case 'L':
+      case 'l':
+      {
+        listen_socket_t *new;
+
+        new = malloc(sizeof(listen_socket_t));
+        if (new == NULL)
+        {
+          fprintf(stderr, "read_options: malloc failed.\n");
+          return(2);
+        }
+        memset(new, 0, sizeof(listen_socket_t));
+
+        strncpy(new->addr, optarg, sizeof(new->addr)-1);
+        new->privilege = (option == 'l') ? PRIV_HIGH : PRIV_LOW;
+
+        if (!rrd_add_ptr((void ***)&config_listen_address_list,
+                         &config_listen_address_list_len, new))
+        {
+          fprintf(stderr, "read_options: rrd_add_ptr failed.\n");
+          return (2);
+        }
+      }
+      break;
+
+      case 'f':
+      {
+        int temp;
+
+        temp = atoi (optarg);
+        if (temp > 0)
+          config_flush_interval = temp;
+        else
+        {
+          fprintf (stderr, "Invalid flush interval: %s\n", optarg);
+          status = 3;
+        }
+      }
+      break;
+
+      case 'w':
+      {
+        int temp;
+
+        temp = atoi (optarg);
+        if (temp > 0)
+          config_write_interval = temp;
+        else
+        {
+          fprintf (stderr, "Invalid write interval: %s\n", optarg);
+          status = 2;
+        }
+      }
+      break;
+
+      case 'z':
+      {
+        int temp;
+
+        temp = atoi(optarg);
+        if (temp > 0)
+          config_write_jitter = temp;
+        else
+        {
+          fprintf (stderr, "Invalid write jitter: -z %s\n", optarg);
+          status = 2;
+        }
+
+        break;
+      }
+
+      case 't':
+      {
+        int threads;
+        threads = atoi(optarg);
+        if (threads >= 1)
+          config_queue_threads = threads;
+        else
+        {
+          fprintf (stderr, "Invalid thread count: -t %s\n", optarg);
+          return 1;
+        }
+      }
+      break;
+
+      case 'B':
+        config_write_base_only = 1;
+        break;
+
+      case 'b':
+      {
+        size_t len;
+        char base_realpath[PATH_MAX];
+
+        if (config_base_dir != NULL)
+          free (config_base_dir);
+        config_base_dir = strdup (optarg);
+        if (config_base_dir == NULL)
+        {
+          fprintf (stderr, "read_options: strdup failed.\n");
+          return (3);
+        }
+
+        /* make sure that the base directory is not resolved via
+         * symbolic links.  this makes some performance-enhancing
+         * assumptions possible (we don't have to resolve paths
+         * that start with a "/")
+         */
+        if (realpath(config_base_dir, base_realpath) == NULL)
+        {
+          fprintf (stderr, "Invalid base directory '%s'.\n", config_base_dir);
+          return 5;
+        }
+        else if (strncmp(config_base_dir,
+                         base_realpath, sizeof(base_realpath)) != 0)
+        {
+          fprintf(stderr,
+                  "Base directory (-b) resolved via file system links!\n"
+                  "Please consult rrdcached '-b' documentation!\n"
+                  "Consider specifying the real directory (%s)\n",
+                  base_realpath);
+          return 5;
+        }
+
+        len = strlen (config_base_dir);
+        while ((len > 0) && (config_base_dir[len - 1] == '/'))
+        {
+          config_base_dir[len - 1] = 0;
+          len--;
+        }
+
+        if (len < 1)
+        {
+          fprintf (stderr, "Invalid base directory: %s\n", optarg);
+          return (4);
+        }
+
+        _config_base_dir_len = len;
+      }
+      break;
+
+      case 'p':
+      {
+        if (config_pid_file != NULL)
+          free (config_pid_file);
+        config_pid_file = strdup (optarg);
+        if (config_pid_file == NULL)
+        {
+          fprintf (stderr, "read_options: strdup failed.\n");
+          return (3);
+        }
+      }
+      break;
+
+      case 'F':
+        config_flush_at_shutdown = 1;
+        break;
+
+      case 'j':
+      {
+        struct stat statbuf;
+        const char *dir = optarg;
+
+        status = stat(dir, &statbuf);
+        if (status != 0)
+        {
+          fprintf(stderr, "Cannot stat '%s' : %s\n", dir, rrd_strerror(errno));
+          return 6;
+        }
+
+        if (!S_ISDIR(statbuf.st_mode)
+            || access(dir, R_OK|W_OK|X_OK) != 0)
+        {
+          fprintf(stderr, "Must specify a writable directory with -j! (%s)\n",
+                  errno ? rrd_strerror(errno) : "");
+          return 6;
+        }
+
+        journal_cur = malloc(PATH_MAX + 1);
+        journal_old = malloc(PATH_MAX + 1);
+        if (journal_cur == NULL || journal_old == NULL)
+        {
+          fprintf(stderr, "malloc failure for journal files\n");
+          return 6;
+        }
+        else 
+        {
+          snprintf(journal_cur, PATH_MAX, "%s/rrd.journal", dir);
+          snprintf(journal_old, PATH_MAX, "%s/rrd.journal.old", dir);
+        }
+      }
+      break;
+
+      case 'h':
+      case '?':
+        printf ("RRDCacheD %s  Copyright (C) 2008 Florian octo Forster\n"
+            "\n"
+            "Usage: rrdcached [options]\n"
+            "\n"
+            "Valid options are:\n"
+            "  -l <address>  Socket address to listen to.\n"
+            "  -L <address>  Socket address to listen to ('FLUSH' only).\n"
+            "  -w <seconds>  Interval in which to write data.\n"
+            "  -z <delay>    Delay writes up to <delay> seconds to spread load\n"
+            "  -t <threads>  Number of write threads.\n"
+            "  -f <seconds>  Interval in which to flush dead data.\n"
+            "  -p <file>     Location of the PID-file.\n"
+            "  -b <dir>      Base directory to change to.\n"
+            "  -B            Restrict file access to paths within -b <dir>\n"
+            "  -g            Do not fork and run in the foreground.\n"
+            "  -j <dir>      Directory in which to create the journal files.\n"
+            "  -F            Always flush all updates at shutdown\n"
+            "\n"
+            "For more information and a detailed description of all options "
+            "please refer\n"
+            "to the rrdcached(1) manual page.\n",
+            VERSION);
+        status = -1;
+        break;
+    } /* switch (option) */
+  } /* while (getopt) */
+
+  /* advise the user when values are not sane */
+  if (config_flush_interval < 2 * config_write_interval)
+    fprintf(stderr, "WARNING: flush interval (-f) should be at least"
+            " 2x write interval (-w) !\n");
+  if (config_write_jitter > config_write_interval)
+    fprintf(stderr, "WARNING: write delay (-z) should NOT be larger than"
+            " write interval (-w) !\n");
+
+  if (config_write_base_only && config_base_dir == NULL)
+    fprintf(stderr, "WARNING: -B does not make sense without -b!\n"
+            "  Consult the rrdcached documentation\n");
+
+  if (journal_cur == NULL)
+    config_flush_at_shutdown = 1;
+
+  return (status);
+} /* }}} int read_options */
+
+int main (int argc, char **argv)
+{
+  int status;
+
+  status = read_options (argc, argv);
+  if (status != 0)
+  {
+    if (status < 0)
+      status = 0;
+    return (status);
+  }
+
+  status = daemonize ();
+  if (status != 0)
+  {
+    fprintf (stderr, "rrdcached: daemonize failed, exiting.\n");
+    return (1);
+  }
+
+  journal_init();
+
+  /* start the queue threads */
+  queue_threads = calloc(config_queue_threads, sizeof(*queue_threads));
+  if (queue_threads == NULL)
+  {
+    RRDD_LOG (LOG_ERR, "FATAL: cannot calloc queue threads");
+    cleanup();
+    return (1);
+  }
+  for (int i = 0; i < config_queue_threads; i++)
+  {
+    memset (&queue_threads[i], 0, sizeof (*queue_threads));
+    status = pthread_create (&queue_threads[i], NULL, queue_thread_main, NULL);
+    if (status != 0)
+    {
+      RRDD_LOG (LOG_ERR, "FATAL: cannot create queue thread");
+      cleanup();
+      return (1);
+    }
+  }
+
+  /* start the flush thread */
+  memset(&flush_thread, 0, sizeof(flush_thread));
+  status = pthread_create (&flush_thread, NULL, flush_thread_main, NULL);
+  if (status != 0)
+  {
+    RRDD_LOG (LOG_ERR, "FATAL: cannot create flush thread");
+    cleanup();
+    return (1);
+  }
+
+  listen_thread_main (NULL);
+  cleanup ();
+
+  return (0);
+} /* int main */
+
+/*
+ * vim: set sw=2 sts=2 ts=8 et fdm=marker :
+ */
index 43439fd0785693bba8cf6cfea331f774edaed9a8..0154e382ebc1108381b1d491b9981272b1512d38 100644 (file)
@@ -1,11 +1,11 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  * This code is stolen from rateup (mrtg-2.x) by Dave Rand
  *****************************************************************************
  * diff calculate the difference between two very long integers available as
  *      strings
  *****************************************************************************
- * $Id: rrd_diff.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_diff.c 1677 2008-11-18 17:19:17Z oetiker $
  * $Log$
  * Revision 1.4  2003/03/10 00:30:34  oetiker
  * handle cases with two negative numbers
  *
  *****************************************************************************/
 
-#include "rrd_tool.h"
-
-#ifdef WIN32
 #include <ctype.h>
-#endif
+#include "rrd_tool.h"
 
 double rrd_diff(
     char *a,
index bf3b79745e3741cd658114aeaae0d27a588b89e4..ab65a1a1e1b235fd71c59e19efa70d26937da754 100644 (file)
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_dump  Display a RRD
  *****************************************************************************
- * $Id: rrd_dump.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_dump.c 1772 2009-04-07 06:03:49Z oetiker $
  * $Log$
  * Revision 1.7  2004/05/25 20:53:21  oetiker
  * prevent small leak when resources are exhausted -- Mike Slifcak
  * checkin
  *
  *****************************************************************************/
-
-#ifdef WIN32
-#include <stdlib.h>
-#endif
-
-
 #include "rrd_tool.h"
 #include "rrd_rpncalc.h"
+#include "rrd_client.h"
 
 #ifdef HAVE_LOCALE_H
 #include <locale.h>
 #endif
 
+
 #if !(defined(NETWARE) || defined(WIN32))
 extern char *tzname[2];
 #endif
 
-
-int rrd_dump_opt_r(
+static int rrd_dump_opt_r(
     const char *filename,
     char *outname,
-    int opt_noheader)
+    int opt_header)
 {
     unsigned int i, ii, ix, iii = 0;
     time_t    now;
@@ -75,6 +70,8 @@ int rrd_dump_opt_r(
     rrd_value_t value;
     struct tm tm;
     char *old_locale = "";
+
+    rrd_init(&rrd);
     rrd_file = rrd_open(filename, &rrd, RRD_READONLY | RRD_READAHEAD);
     if (rrd_file == NULL) {
         rrd_free(&rrd);
@@ -92,20 +89,30 @@ int rrd_dump_opt_r(
 #ifdef HAVE_SETLOCALE
     old_locale = setlocale(LC_NUMERIC, "C");
 #endif
-    if (!opt_noheader) {
+
+    if (opt_header == 1) {
         fputs("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", out_file);
         fputs
             ("<!DOCTYPE rrd SYSTEM \"http://oss.oetiker.ch/rrdtool/rrdtool.dtd\">\n",
              out_file);
+       fputs("<!-- Round Robin Database Dump -->\n", out_file);
+       fputs("<rrd>\n", out_file);
+    } else if (opt_header == 2) {
+       fputs("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", out_file);
+       fputs("<!-- Round Robin Database Dump -->\n", out_file);
+       fputs("<rrd xmlns=\"http://oss.oetiker.ch/rrdtool/rrdtool-dump.xml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n", out_file);
+       fputs("\txsi:schemaLocation=\"http://oss.oetiker.ch/rrdtool/rrdtool-dump.xml http://oss.oetiker.ch/rrdtool/rrdtool-dump.xsd\">\n", out_file);
+    } else {
+       fputs("<!-- Round Robin Database Dump -->\n", out_file);
+       fputs("<rrd>\n", out_file);
     }
-    fputs("<!-- Round Robin Database Dump -->", out_file);
-    fputs("<rrd>", out_file);
+
     if (atoi(rrd.stat_head->version) <= 3) {
-        fprintf(out_file, "\t<version> %s </version>\n", RRD_VERSION3);
+        fprintf(out_file, "\t<version>%s</version>\n", RRD_VERSION3);
     } else {
-        fprintf(out_file, "\t<version> %s </version>\n", RRD_VERSION);
+        fprintf(out_file, "\t<version>%s</version>\n", RRD_VERSION);
     }
-    fprintf(out_file, "\t<step> %lu </step> <!-- Seconds -->\n",
+    fprintf(out_file, "\t<step>%lu</step> <!-- Seconds -->\n",
             rrd.stat_head->pdp_step);
 #ifdef HAVE_STRFTIME
     localtime_r(&rrd.live_head->last_up, &tm);
@@ -113,26 +120,26 @@ int rrd_dump_opt_r(
 #else
 # error "Need strftime"
 #endif
-    fprintf(out_file, "\t<lastupdate> %lu </lastupdate> <!-- %s -->\n\n",
-            (unsigned long) rrd.live_head->last_up, somestring);
+    fprintf(out_file, "\t<lastupdate>%lld</lastupdate> <!-- %s -->\n\n",
+            (long long) rrd.live_head->last_up, somestring);
     for (i = 0; i < rrd.stat_head->ds_cnt; i++) {
         fprintf(out_file, "\t<ds>\n");
-        fprintf(out_file, "\t\t<name> %s </name>\n", rrd.ds_def[i].ds_nam);
-        fprintf(out_file, "\t\t<type> %s </type>\n", rrd.ds_def[i].dst);
+        fprintf(out_file, "\t\t<name>%s</name>\n", rrd.ds_def[i].ds_nam);
+        fprintf(out_file, "\t\t<type>%s</type>\n", rrd.ds_def[i].dst);
         if (dst_conv(rrd.ds_def[i].dst) != DST_CDEF) {
             fprintf(out_file,
-                    "\t\t<minimal_heartbeat> %lu </minimal_heartbeat>\n",
+                    "\t\t<minimal_heartbeat>%lu</minimal_heartbeat>\n",
                     rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt);
             if (isnan(rrd.ds_def[i].par[DS_min_val].u_val)) {
-                fprintf(out_file, "\t\t<min> NaN </min>\n");
+                fprintf(out_file, "\t\t<min>NaN</min>\n");
             } else {
-                fprintf(out_file, "\t\t<min> %0.10e </min>\n",
+                fprintf(out_file, "\t\t<min>%0.10e</min>\n",
                         rrd.ds_def[i].par[DS_min_val].u_val);
             }
             if (isnan(rrd.ds_def[i].par[DS_max_val].u_val)) {
-                fprintf(out_file, "\t\t<max> NaN </max>\n");
+                fprintf(out_file, "\t\t<max>NaN</max>\n");
             } else {
-                fprintf(out_file, "\t\t<max> %0.10e </max>\n",
+                fprintf(out_file, "\t\t<max>%0.10e</max>\n",
                         rrd.ds_def[i].par[DS_max_val].u_val);
             }
         } else {        /* DST_CDEF */
@@ -140,25 +147,25 @@ int rrd_dump_opt_r(
 
             rpn_compact2str((rpn_cdefds_t *) &(rrd.ds_def[i].par[DS_cdef]),
                             rrd.ds_def, &str);
-            fprintf(out_file, "\t\t<cdef> %s </cdef>\n", str);
+            fprintf(out_file, "\t\t<cdef>%s</cdef>\n", str);
             free(str);
         }
         fprintf(out_file, "\n\t\t<!-- PDP Status -->\n");
-        fprintf(out_file, "\t\t<last_ds> %s </last_ds>\n",
+        fprintf(out_file, "\t\t<last_ds>%s</last_ds>\n",
                 rrd.pdp_prep[i].last_ds);
         if (isnan(rrd.pdp_prep[i].scratch[PDP_val].u_val)) {
-            fprintf(out_file, "\t\t<value> NaN </value>\n");
+            fprintf(out_file, "\t\t<value>NaN</value>\n");
         } else {
-            fprintf(out_file, "\t\t<value> %0.10e </value>\n",
+            fprintf(out_file, "\t\t<value>%0.10e</value>\n",
                     rrd.pdp_prep[i].scratch[PDP_val].u_val);
         }
-        fprintf(out_file, "\t\t<unknown_sec> %lu </unknown_sec>\n",
+        fprintf(out_file, "\t\t<unknown_sec>%lu</unknown_sec>\n",
                 rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt);
 
         fprintf(out_file, "\t</ds>\n\n");
     }
 
-    fputs("<!-- Round Robin Archives -->", out_file);
+    fputs("<!-- Round Robin Archives -->\n", out_file);
 
     rra_base = rrd_file->header_len;
     rra_next = rra_base;
@@ -171,9 +178,9 @@ int rrd_dump_opt_r(
         rra_next += (rrd.stat_head->ds_cnt
                      * rrd.rra_def[i].row_cnt * sizeof(rrd_value_t));
         fprintf(out_file, "\t<rra>\n");
-        fprintf(out_file, "\t\t<cf> %s </cf>\n", rrd.rra_def[i].cf_nam);
+        fprintf(out_file, "\t\t<cf>%s</cf>\n", rrd.rra_def[i].cf_nam);
         fprintf(out_file,
-                "\t\t<pdp_per_row> %lu </pdp_per_row> <!-- %lu seconds -->\n\n",
+                "\t\t<pdp_per_row>%lu</pdp_per_row> <!-- %lu seconds -->\n\n",
                 rrd.rra_def[i].pdp_cnt,
                 rrd.rra_def[i].pdp_cnt * rrd.stat_head->pdp_step);
         /* support for RRA parameters */
@@ -181,46 +188,46 @@ int rrd_dump_opt_r(
         switch (cf_conv(rrd.rra_def[i].cf_nam)) {
         case CF_HWPREDICT:
         case CF_MHWPREDICT:
-            fprintf(out_file, "\t\t<hw_alpha> %0.10e </hw_alpha>\n",
+            fprintf(out_file, "\t\t<hw_alpha>%0.10e</hw_alpha>\n",
                     rrd.rra_def[i].par[RRA_hw_alpha].u_val);
-            fprintf(out_file, "\t\t<hw_beta> %0.10e </hw_beta>\n",
+            fprintf(out_file, "\t\t<hw_beta>%0.10e</hw_beta>\n",
                     rrd.rra_def[i].par[RRA_hw_beta].u_val);
             fprintf(out_file,
-                    "\t\t<dependent_rra_idx> %lu </dependent_rra_idx>\n",
+                    "\t\t<dependent_rra_idx>%lu</dependent_rra_idx>\n",
                     rrd.rra_def[i].par[RRA_dependent_rra_idx].u_cnt);
             break;
         case CF_SEASONAL:
         case CF_DEVSEASONAL:
             fprintf(out_file,
-                    "\t\t<seasonal_gamma> %0.10e </seasonal_gamma>\n",
+                    "\t\t<seasonal_gamma>%0.10e</seasonal_gamma>\n",
                     rrd.rra_def[i].par[RRA_seasonal_gamma].u_val);
             fprintf(out_file,
-                    "\t\t<seasonal_smooth_idx> %lu </seasonal_smooth_idx>\n",
+                    "\t\t<seasonal_smooth_idx>%lu</seasonal_smooth_idx>\n",
                     rrd.rra_def[i].par[RRA_seasonal_smooth_idx].u_cnt);
             if (atoi(rrd.stat_head->version) >= 4) {
                 fprintf(out_file,
-                        "\t\t<smoothing_window> %0.10e </smoothing_window>\n",
+                        "\t\t<smoothing_window>%0.10e</smoothing_window>\n",
                         rrd.rra_def[i].par[RRA_seasonal_smoothing_window].
                         u_val);
             }
             fprintf(out_file,
-                    "\t\t<dependent_rra_idx> %lu </dependent_rra_idx>\n",
+                    "\t\t<dependent_rra_idx>%lu</dependent_rra_idx>\n",
                     rrd.rra_def[i].par[RRA_dependent_rra_idx].u_cnt);
             break;
         case CF_FAILURES:
-            fprintf(out_file, "\t\t<delta_pos> %0.10e </delta_pos>\n",
+            fprintf(out_file, "\t\t<delta_pos>%0.10e</delta_pos>\n",
                     rrd.rra_def[i].par[RRA_delta_pos].u_val);
-            fprintf(out_file, "\t\t<delta_neg> %0.10e </delta_neg>\n",
+            fprintf(out_file, "\t\t<delta_neg>%0.10e</delta_neg>\n",
                     rrd.rra_def[i].par[RRA_delta_neg].u_val);
-            fprintf(out_file, "\t\t<window_len> %lu </window_len>\n",
+            fprintf(out_file, "\t\t<window_len>%lu</window_len>\n",
                     rrd.rra_def[i].par[RRA_window_len].u_cnt);
             fprintf(out_file,
-                    "\t\t<failure_threshold> %lu </failure_threshold>\n",
+                    "\t\t<failure_threshold>%lu</failure_threshold>\n",
                     rrd.rra_def[i].par[RRA_failure_threshold].u_cnt);
             /* fall thru */
         case CF_DEVPREDICT:
             fprintf(out_file,
-                    "\t\t<dependent_rra_idx> %lu </dependent_rra_idx>\n",
+                    "\t\t<dependent_rra_idx>%lu</dependent_rra_idx>\n",
                     rrd.rra_def[i].par[RRA_dependent_rra_idx].u_cnt);
             break;
         case CF_AVERAGE:
@@ -228,7 +235,7 @@ int rrd_dump_opt_r(
         case CF_MINIMUM:
         case CF_LAST:
         default:
-            fprintf(out_file, "\t\t<xff> %0.10e </xff>\n",
+            fprintf(out_file, "\t\t<xff>%0.10e</xff>\n",
                     rrd.rra_def[i].par[RRA_cdp_xff_val].u_val);
             break;
         }
@@ -247,10 +254,10 @@ int rrd_dump_opt_r(
                                  + ii].scratch[CDP_primary_val].u_val;
             if (isnan(value)) {
                 fprintf(out_file,
-                        "\t\t\t<primary_value> NaN </primary_value>\n");
+                        "\t\t\t<primary_value>NaN</primary_value>\n");
             } else {
                 fprintf(out_file,
-                        "\t\t\t<primary_value> %0.10e </primary_value>\n",
+                        "\t\t\t<primary_value>%0.10e</primary_value>\n",
                         value);
             }
             value =
@@ -258,10 +265,10 @@ int rrd_dump_opt_r(
                              ii].scratch[CDP_secondary_val].u_val;
             if (isnan(value)) {
                 fprintf(out_file,
-                        "\t\t\t<secondary_value> NaN </secondary_value>\n");
+                        "\t\t\t<secondary_value>NaN</secondary_value>\n");
             } else {
                 fprintf(out_file,
-                        "\t\t\t<secondary_value> %0.10e </secondary_value>\n",
+                        "\t\t\t<secondary_value>%0.10e</secondary_value>\n",
                         value);
             }
             switch (cf_conv(rrd.rra_def[i].cf_nam)) {
@@ -271,29 +278,29 @@ int rrd_dump_opt_r(
                     rrd.cdp_prep[i * rrd.stat_head->ds_cnt +
                                  ii].scratch[CDP_hw_intercept].u_val;
                 if (isnan(value)) {
-                    fprintf(out_file, "\t\t\t<intercept> NaN </intercept>\n");
+                    fprintf(out_file, "\t\t\t<intercept>NaN</intercept>\n");
                 } else {
                     fprintf(out_file,
-                            "\t\t\t<intercept> %0.10e </intercept>\n", value);
+                            "\t\t\t<intercept>%0.10e</intercept>\n", value);
                 }
                 value =
                     rrd.cdp_prep[i * rrd.stat_head->ds_cnt +
                                  ii].scratch[CDP_hw_last_intercept].u_val;
                 if (isnan(value)) {
                     fprintf(out_file,
-                            "\t\t\t<last_intercept> NaN </last_intercept>\n");
+                            "\t\t\t<last_intercept>NaN</last_intercept>\n");
                 } else {
                     fprintf(out_file,
-                            "\t\t\t<last_intercept> %0.10e </last_intercept>\n",
+                            "\t\t\t<last_intercept>%0.10e</last_intercept>\n",
                             value);
                 }
                 value =
                     rrd.cdp_prep[i * rrd.stat_head->ds_cnt +
                                  ii].scratch[CDP_hw_slope].u_val;
                 if (isnan(value)) {
-                    fprintf(out_file, "\t\t\t<slope> NaN </slope>\n");
+                    fprintf(out_file, "\t\t\t<slope>NaN</slope>\n");
                 } else {
-                    fprintf(out_file, "\t\t\t<slope> %0.10e </slope>\n",
+                    fprintf(out_file, "\t\t\t<slope>%0.10e</slope>\n",
                             value);
                 }
                 value =
@@ -301,22 +308,22 @@ int rrd_dump_opt_r(
                                  ii].scratch[CDP_hw_last_slope].u_val;
                 if (isnan(value)) {
                     fprintf(out_file,
-                            "\t\t\t<last_slope> NaN </last_slope>\n");
+                            "\t\t\t<last_slope>NaN</last_slope>\n");
                 } else {
                     fprintf(out_file,
-                            "\t\t\t<last_slope> %0.10e </last_slope>\n",
+                            "\t\t\t<last_slope>%0.10e</last_slope>\n",
                             value);
                 }
                 ivalue =
                     rrd.cdp_prep[i * rrd.stat_head->ds_cnt +
                                  ii].scratch[CDP_null_count].u_cnt;
-                fprintf(out_file, "\t\t\t<nan_count> %lu </nan_count>\n",
+                fprintf(out_file, "\t\t\t<nan_count>%lu</nan_count>\n",
                         ivalue);
                 ivalue =
                     rrd.cdp_prep[i * rrd.stat_head->ds_cnt +
                                  ii].scratch[CDP_last_null_count].u_cnt;
                 fprintf(out_file,
-                        "\t\t\t<last_nan_count> %lu </last_nan_count>\n",
+                        "\t\t\t<last_nan_count>%lu</last_nan_count>\n",
                         ivalue);
                 break;
             case CF_SEASONAL:
@@ -325,9 +332,9 @@ int rrd_dump_opt_r(
                     rrd.cdp_prep[i * rrd.stat_head->ds_cnt +
                                  ii].scratch[CDP_hw_seasonal].u_val;
                 if (isnan(value)) {
-                    fprintf(out_file, "\t\t\t<seasonal> NaN </seasonal>\n");
+                    fprintf(out_file, "\t\t\t<seasonal>NaN</seasonal>\n");
                 } else {
-                    fprintf(out_file, "\t\t\t<seasonal> %0.10e </seasonal>\n",
+                    fprintf(out_file, "\t\t\t<seasonal>%0.10e</seasonal>\n",
                             value);
                 }
                 value =
@@ -335,16 +342,16 @@ int rrd_dump_opt_r(
                                  ii].scratch[CDP_hw_last_seasonal].u_val;
                 if (isnan(value)) {
                     fprintf(out_file,
-                            "\t\t\t<last_seasonal> NaN </last_seasonal>\n");
+                            "\t\t\t<last_seasonal>NaN</last_seasonal>\n");
                 } else {
                     fprintf(out_file,
-                            "\t\t\t<last_seasonal> %0.10e </last_seasonal>\n",
+                            "\t\t\t<last_seasonal>%0.10e</last_seasonal>\n",
                             value);
                 }
                 ivalue =
                     rrd.cdp_prep[i * rrd.stat_head->ds_cnt +
                                  ii].scratch[CDP_init_seasonal].u_cnt;
-                fprintf(out_file, "\t\t\t<init_flag> %lu </init_flag>\n",
+                fprintf(out_file, "\t\t\t<init_flag>%lu</init_flag>\n",
                         ivalue);
                 break;
             case CF_DEVPREDICT:
@@ -377,13 +384,13 @@ int rrd_dump_opt_r(
                     rrd.cdp_prep[i * rrd.stat_head->ds_cnt +
                                  ii].scratch[CDP_val].u_val;
                 if (isnan(value)) {
-                    fprintf(out_file, "\t\t\t<value> NaN </value>\n");
+                    fprintf(out_file, "\t\t\t<value>NaN</value>\n");
                 } else {
-                    fprintf(out_file, "\t\t\t<value> %0.10e </value>\n",
+                    fprintf(out_file, "\t\t\t<value>%0.10e</value>\n",
                             value);
                 }
                 fprintf(out_file,
-                        "\t\t\t<unknown_datapoints> %lu </unknown_datapoints>\n",
+                        "\t\t\t<unknown_datapoints>%lu</unknown_datapoints>\n",
                         rrd.cdp_prep[i * rrd.stat_head->ds_cnt +
                                      ii].scratch[CDP_unkn_pdp_cnt].u_cnt);
                 break;
@@ -396,7 +403,7 @@ int rrd_dump_opt_r(
         rrd_seek(rrd_file, (rra_start + (rrd.rra_ptr[i].cur_row + 1)
                             * rrd.stat_head->ds_cnt
                             * sizeof(rrd_value_t)), SEEK_SET);
-        timer = - (long)(rrd.rra_def[i].row_cnt - 1);
+        timer = -(long)(rrd.rra_def[i].row_cnt - 1);
         ii = rrd.rra_ptr[i].cur_row;
         for (ix = 0; ix < rrd.rra_def[i].row_cnt; ix++) {
             ii++;
@@ -416,14 +423,14 @@ int rrd_dump_opt_r(
 #else
 # error "Need strftime"
 #endif
-            fprintf(out_file, "\t\t\t<!-- %s / %d --> <row>", somestring,
-                    (int) now);
+            fprintf(out_file, "\t\t\t<!-- %s / %lld --> <row>", somestring,
+                    (long long) now);
             for (iii = 0; iii < rrd.stat_head->ds_cnt; iii++) {
                 rrd_read(rrd_file, &my_cdp, sizeof(rrd_value_t) * 1);
                 if (isnan(my_cdp)) {
-                    fprintf(out_file, "<v> NaN </v>");
+                    fprintf(out_file, "<v>NaN</v>");
                 } else {
-                    fprintf(out_file, "<v> %0.10e </v>", my_cdp);
+                    fprintf(out_file, "<v>%0.10e</v>", my_cdp);
                 };
             }
             fprintf(out_file, "</row>\n");
@@ -455,33 +462,62 @@ int rrd_dump(
     char **argv)
 {
     int       rc;
-    int       opt_noheader = 0;
+    /** 
+     * 0 = no header
+     * 1 = dtd header
+     * 2 = xsd header
+     */
+    int       opt_header = 1;
+    char     *opt_daemon = NULL;
 
     /* init rrd clean */
 
     optind = 0;
     opterr = 0;         /* initialize getopt */
 
-    while (42) {
+    while (42) {/* ha ha */
         int       opt;
         int       option_index = 0;
         static struct option long_options[] = {
+            {"daemon", required_argument, 0, 'd'},
+            {"header", required_argument, 0, 'h'},
             {"no-header", no_argument, 0, 'n'},
             {0, 0, 0, 0}
         };
 
-        opt = getopt_long(argc, argv, "n", long_options, &option_index);
+        opt = getopt_long(argc, argv, "d:h:n", long_options, &option_index);
 
         if (opt == EOF)
             break;
 
         switch (opt) {
-        case 'n':
-            opt_noheader = 1;
+        case 'd':
+            if (opt_daemon != NULL)
+                    free (opt_daemon);
+            opt_daemon = strdup (optarg);
+            if (opt_daemon == NULL)
+            {
+                rrd_set_error ("strdup failed.");
+                return (-1);
+            }
             break;
 
+        case 'n':
+           opt_header = 0;
+           break;
+
+        case 'h':
+          if (strcmp(optarg, "dtd") == 0) {
+               opt_header = 1;
+          } else if (strcmp(optarg, "xsd") == 0) {
+               opt_header = 2;
+          } else if (strcmp(optarg, "none") == 0) {
+               opt_header = 0;
+          }
+          break;
+
         default:
-            rrd_set_error("usage rrdtool %s [--no-header|-n] "
+            rrd_set_error("usage rrdtool %s [--header|-h {none,xsd,dtd}] [--no-header]"
                           "file.rrd [file.xml]", argv[0]);
             return (-1);
             break;
@@ -489,15 +525,19 @@ int rrd_dump(
     }                   /* while (42) */
 
     if ((argc - optind) < 1 || (argc - optind) > 2) {
-        rrd_set_error("usage rrdtool %s [--no-header|-n] "
+        rrd_set_error("usage rrdtool %s [--header|-h {none,xsd,dtd}] [--no-header]"
                       "file.rrd [file.xml]", argv[0]);
         return (-1);
     }
 
+    rc = rrdc_flush_if_daemon(opt_daemon, argv[optind]);
+    if (opt_daemon) free(opt_daemon);
+    if (rc) return (rc);
+
     if ((argc - optind) == 2) {
-        rc = rrd_dump_opt_r(argv[optind], argv[optind + 1], opt_noheader);
+        rc = rrd_dump_opt_r(argv[optind], argv[optind + 1], opt_header);
     } else {
-        rc = rrd_dump_opt_r(argv[optind], NULL, opt_noheader);
+        rc = rrd_dump_opt_r(argv[optind], NULL, opt_header);
     }
 
     return rc;
index 954358bc2d32808037b983f9a10795db5e4b412e..7ced9a92b7adc0618704f47c1c7f663e1c965e14 100644 (file)
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_error.c   Common Header File
  *****************************************************************************
- * $Id: rrd_error.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_error.c 1677 2008-11-18 17:19:17Z oetiker $
  * $Log$
  * Revision 1.4  2003/02/22 21:57:03  oetiker
  * a patch to avoid a memory leak and a Makefile.am patch to
  *
  *************************************************************************** */
 
-#include "rrd_tool.h"
+#include <stdlib.h>
 #include <stdarg.h>
 
-#ifdef WIN32
-#include <stdlib.h>
-#endif
+#include "rrd_tool.h"
 
 #define MAXLEN 4096
 #define ERRBUFLEN 256
index 7c7234dbedb82789a2f1472a6ee7324425048162..ac426e8fdf83a1ad5161379b703748bfece54915 100644 (file)
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_fetch.c  read date from an rrd to use for further processing
  *****************************************************************************
- * $Id: rrd_fetch.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_fetch.c 1849 2009-06-07 14:12:28Z oetiker $
  * $Log$
  * Revision 1.8  2004/05/18 18:53:03  oetiker
  * big spell checking patch -- slif@bellsouth.net
  *
  *****************************************************************************/
 
-#ifdef WIN32
-#include <stdlib.h>
-#endif
-
 #include "rrd_tool.h"
+#include "rrd_client.h"
 
 #include "rrd_is_thread_safe.h"
-/*#define DEBUG*/
+/* #define DEBUG */
 
 int rrd_fetch(
     int argc,
@@ -76,6 +73,8 @@ int rrd_fetch(
     long      step_tmp = 1;
     time_t    start_tmp = 0, end_tmp = 0;
     const char *cf;
+    char *opt_daemon = NULL;
+    int status;
 
     rrd_time_value_t start_tv, end_tv;
     char     *parsetime_error = NULL;
@@ -83,6 +82,7 @@ int rrd_fetch(
         {"resolution", required_argument, 0, 'r'},
         {"start", required_argument, 0, 's'},
         {"end", required_argument, 0, 'e'},
+        {"daemon", required_argument, 0, 'd'},
         {0, 0, 0, 0}
     };
 
@@ -97,7 +97,7 @@ int rrd_fetch(
         int       option_index = 0;
         int       opt;
 
-        opt = getopt_long(argc, argv, "r:s:e:", long_options, &option_index);
+        opt = getopt_long(argc, argv, "r:s:e:d:", long_options, &option_index);
 
         if (opt == EOF)
             break;
@@ -118,6 +118,18 @@ int rrd_fetch(
         case 'r':
             step_tmp = atol(optarg);
             break;
+
+        case 'd':
+            if (opt_daemon != NULL)
+                    free (opt_daemon);
+            opt_daemon = strdup (optarg);
+            if (opt_daemon == NULL)
+            {
+                rrd_set_error ("strdup failed.");
+                return (-1);
+            }
+            break;
+
         case '?':
             rrd_set_error("unknown option '-%c'", optopt);
             return (-1);
@@ -155,10 +167,15 @@ int rrd_fetch(
         return -1;
     }
 
+    status = rrdc_flush_if_daemon(opt_daemon, argv[optind]);
+    if (opt_daemon) free (opt_daemon);
+    if (status) return (-1);
+
     cf = argv[optind + 1];
 
-    if (rrd_fetch_r(argv[optind], cf, start, end, step, ds_cnt, ds_namv, data)
-        != 0)
+    status = rrd_fetch_r(argv[optind], cf, start, end, step,
+            ds_cnt, ds_namv, data);
+    if (status != 0)
         return (-1);
     return (0);
 }
@@ -183,7 +200,7 @@ int rrd_fetch_r(
 
     return (rrd_fetch_fn
             (filename, cf_idx, start, end, step, ds_cnt, ds_namv, data));
-}
+} /* int rrd_fetch_r */
 
 int rrd_fetch_fn(
     const char *filename,   /* name of the rrd */
@@ -204,7 +221,7 @@ int rrd_fetch_fn(
     long      best_full_step_diff = 0, best_part_step_diff =
         0, tmp_step_diff = 0, tmp_match = 0, best_match = 0;
     long      full_match, rra_base;
-    long      start_offset, end_offset;
+    off_t     start_offset, end_offset;
     int       first_full = 1;
     int       first_part = 1;
     rrd_t     rrd;
@@ -218,6 +235,16 @@ int rrd_fetch_fn(
             *start, *end, *step);
 #endif
 
+#ifdef HAVE_LIBDBI
+    /* handle libdbi datasources */
+    if (strncmp("sql",filename,3)==0) {
+      if (filename[3]==filename[4]) {
+       return rrd_fetch_fn_libdbi(filename,cf_idx,start,end,step,ds_cnt,ds_namv,data);
+      }
+    }
+#endif
+
+    rrd_init(&rrd);
     rrd_file = rrd_open(filename, &rrd, RRD_READONLY);
     if (rrd_file == NULL)
         goto err_free;
@@ -331,7 +358,7 @@ int rrd_fetch_fn(
 ** database is the one with time stamp (t+s) which means t to t+s.
 */
     *ds_cnt = rrd.stat_head->ds_cnt;
-    if (((*data) = (rrd_value_t *)malloc(*ds_cnt * rows * sizeof(rrd_value_t))) == NULL) {
+    if (((*data) = (rrd_value_t*)malloc(*ds_cnt * rows * sizeof(rrd_value_t))) == NULL) {
         rrd_set_error("malloc fetch data area");
         goto err_free_all_ds_namv;
     }
@@ -356,11 +383,8 @@ int rrd_fetch_fn(
             "rra_start %lu, rra_end %lu, start_off %li, end_off %li\n",
             rra_start_time, rra_end_time, start_offset, end_offset);
 #endif
-
-    /* fill the gap at the start if needs be */
-
-    if (*start <= rra_end_time && *end >= rra_start_time - *step){
-        
+    /* only seek if the start time is before the end time */
+    if (*start <= rra_end_time && *end >= rra_start_time - (off_t)*step ){
         if (start_offset <= 0)
             rra_pointer = rrd.rra_ptr[chosen_rra].cur_row + 1;
         else
@@ -369,14 +393,14 @@ int rrd_fetch_fn(
         rra_pointer = rra_pointer % (signed) rrd.rra_def[chosen_rra].row_cnt;
          
         if (rrd_seek(rrd_file, (rra_base + (rra_pointer * (*ds_cnt)
-                                            * sizeof(rrd_value_t))),
+                                        * sizeof(rrd_value_t))),
                  SEEK_SET) != 0) {
             rrd_set_error("seek error in RRA");
             goto err_free_data;
-        }        
+        }
 #ifdef DEBUG
         fprintf(stderr, "First Seek: rra_base %lu rra_pointer %lu\n",
-            rra_base, rra_pointer);
+                rra_base, rra_pointer);
 #endif
     }
     
@@ -444,7 +468,6 @@ int rrd_fetch_fn(
 
     rrd_close(rrd_file);
     rrd_free(&rrd);
-
     return (0);
   err_free_data:
     free(*data);
diff --git a/src/rrd_fetch_libdbi.c b/src/rrd_fetch_libdbi.c
new file mode 100644 (file)
index 0000000..ad9a766
--- /dev/null
@@ -0,0 +1,649 @@
+#include "rrd_tool.h"
+#include <dbi/dbi.h>
+#include <time.h>
+
+/* the structures */
+struct sql_table_helper {
+  dbi_conn conn;
+  int connected;
+  dbi_result result;
+  char const* filename;
+  char const* dbdriver;
+  char* table_start;
+  char* table_next;
+  char const* where;
+  char * timestamp;
+  char * value;
+};
+
+/* the prototypes */
+void _sql_close(struct sql_table_helper* th);
+int _sql_setparam(struct sql_table_helper* th,char* key, char* value);
+int _sql_fetchrow(struct sql_table_helper* th,time_t *timestamp, rrd_value_t *value,int ordered);
+char* _find_next_separator(char* start,char separator);
+char* _find_next_separator_twice(char*start,char separator);
+char _hexcharhelper(char c);
+int _inline_unescape (char* string);
+double rrd_fetch_dbi_double(dbi_result *result,int idx);
+long rrd_fetch_dbi_long(dbi_result *result,int idx);
+
+/* the real code */
+
+/* helpers to get correctly converted values from DB*/
+long rrd_fetch_dbi_long(dbi_result *result,int idx) {
+  char *ptmp="";
+  long value=DNAN;
+  /* get the attributes for this filed */
+  unsigned int attr=dbi_result_get_field_attribs_idx(result,idx);
+  unsigned int type=dbi_result_get_field_type_idx(result,idx);
+  /* return NAN if NULL */
+  if(dbi_result_field_is_null_idx(result,idx)) { return DNAN; }
+  /* do some conversions */
+  switch (type) {
+    case DBI_TYPE_STRING:
+      ptmp=(char*)dbi_result_get_string_idx(result,idx);
+      value=atoi(ptmp);
+      break;
+    case DBI_TYPE_INTEGER:
+      if        (attr & DBI_INTEGER_SIZE1) { value=dbi_result_get_char_idx(result,idx);
+      } else if (attr & DBI_INTEGER_SIZE2) { value=dbi_result_get_short_idx(result,idx);
+      } else if (attr & DBI_INTEGER_SIZE3) { value=dbi_result_get_int_idx(result,idx);
+      } else if (attr & DBI_INTEGER_SIZE4) { value=dbi_result_get_int_idx(result,idx);
+      } else if (attr & DBI_INTEGER_SIZE8) { value=dbi_result_get_longlong_idx(result,idx);
+      } else {                               value=DNAN;
+        if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: column %i unsupported attribute flags %i for type INTEGER\n",time(NULL),idx,attr ); }
+      }
+      break;
+    case DBI_TYPE_DECIMAL:
+      if        (attr & DBI_DECIMAL_SIZE4) { value=floor(dbi_result_get_float_idx(result,idx));
+      } else if (attr & DBI_DECIMAL_SIZE8) { value=floor(dbi_result_get_double_idx(result,idx));
+      } else {                               value=DNAN;
+        if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: column %i unsupported attribute flags %i for type DECIMAL\n",time(NULL),idx,attr ); }
+      }
+      break;
+    case DBI_TYPE_BINARY:
+      attr=dbi_result_get_field_length_idx(result,idx);
+      ptmp=(char*)dbi_result_get_binary_copy_idx(result,idx);
+      ptmp[attr-1]=0;
+      /* check for "known" libdbi error */
+      if (strncmp("ERROR",ptmp,5)==0) {
+       if (!getenv("RRD_NO_LIBDBI_BUG_WARNING")) {
+         fprintf(stderr,"rrdtool_fetch_libDBI: you have possibly triggered a bug in libDBI by using a (TINY,MEDIUM,LONG) TEXT field with mysql\n  this may trigger a core dump in at least one version of libdbi\n  if you are not touched by this bug and you find this message annoying\n  please set the environment-variable RRD_NO_LIBDBI_BUG_WARNING to ignore this message\n");
+       }
+      }
+      /* convert to number */
+      value=atoi(ptmp);
+      /* free pointer */
+      free(ptmp);
+      break;
+    case DBI_TYPE_DATETIME:
+       value=dbi_result_get_datetime_idx(result,idx);
+       break;
+    default:
+      if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: column %i unsupported type: %i with attribute %i\n",time(NULL),idx,type,attr ); }
+      value=DNAN;
+      break;
+  }
+  return value;
+}
+
+double rrd_fetch_dbi_double(dbi_result *result,int idx) {
+  char *ptmp="";
+  double value=DNAN;
+  /* get the attributes for this filed */
+  unsigned int attr=dbi_result_get_field_attribs_idx(result,idx);
+  unsigned int type=dbi_result_get_field_type_idx(result,idx);
+  /* return NAN if NULL */
+  if(dbi_result_field_is_null_idx(result,idx)) { return DNAN; }
+  /* do some conversions */
+  switch (type) {
+    case DBI_TYPE_STRING:
+      ptmp=(char*)dbi_result_get_string_idx(result,idx);
+      value=strtod(ptmp,NULL);
+      break;
+    case DBI_TYPE_INTEGER:
+      if        (attr & DBI_INTEGER_SIZE1) { value=dbi_result_get_char_idx(result,idx);
+      } else if (attr & DBI_INTEGER_SIZE2) { value=dbi_result_get_short_idx(result,idx);
+      } else if (attr & DBI_INTEGER_SIZE3) { value=dbi_result_get_int_idx(result,idx);
+      } else if (attr & DBI_INTEGER_SIZE4) { value=dbi_result_get_int_idx(result,idx);
+      } else if (attr & DBI_INTEGER_SIZE8) { value=dbi_result_get_longlong_idx(result,idx);
+      } else {                               value=DNAN;
+        if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: column %i unsupported attribute flags %i for type INTEGER\n",time(NULL),idx,attr ); }
+      }
+      break;
+    case DBI_TYPE_DECIMAL:
+      if        (attr & DBI_DECIMAL_SIZE4) { value=dbi_result_get_float_idx(result,idx);
+      } else if (attr & DBI_DECIMAL_SIZE8) { value=dbi_result_get_double_idx(result,idx);
+      } else {                               value=DNAN;
+        if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: column %i unsupported attribute flags %i for type DECIMAL\n",time(NULL),idx,attr ); }
+      }
+      break;
+    case DBI_TYPE_BINARY:
+      attr=dbi_result_get_field_length_idx(result,idx);
+      ptmp=(char*)dbi_result_get_binary_copy_idx(result,idx);
+      ptmp[attr-1]=0;
+      /* check for "known" libdbi error */
+      if (strncmp("ERROR",ptmp,5)==0) {
+       if (!getenv("RRD_NO_LIBDBI_BUG_WARNING")) {
+         fprintf(stderr,"rrdtool_fetch_libDBI: you have possibly triggered a bug in libDBI by using a (TINY,MEDIUM,LONG) TEXT field with mysql\n  this may trigger a core dump in at least one version of libdbi\n  if you are not touched by this bug and you find this message annoying\n  please set the environment-variable RRD_NO_LIBDBI_BUG_WARNING to ignore this message\n");
+       }
+      }
+      /* convert to number */
+      value=strtod(ptmp,NULL);
+      /* free pointer */
+      free(ptmp);
+      break;
+    case DBI_TYPE_DATETIME:
+       value=dbi_result_get_datetime_idx(result,idx);
+       break;
+    default:
+      if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: column %i unsupported type: %i with attribute %i\n",time(NULL),idx,type,attr ); }
+      value=DNAN;
+      break;
+  }
+  return value;
+}
+
+void _sql_close(struct sql_table_helper* th) {
+  /* close only if connected */
+  if (th->conn) {
+    if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: close connection\n",time(NULL) ); }
+    /* shutdown dbi */
+    dbi_conn_close(th->conn);
+    if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: shutting down libdbi\n",time(NULL) ); }
+    dbi_shutdown();
+    /* and assign empty */
+    th->conn=NULL;
+    th->connected=0;
+  }
+}
+
+int _sql_setparam(struct sql_table_helper* th,char* key, char* value) {
+  char* dbi_errstr=NULL;
+  dbi_driver driver;
+  /* if not connected */
+  if (! th->conn) {
+    /* initialize some stuff */
+    th->table_next=th->table_start;
+    th->result=NULL;
+    th->connected=0;
+    /* initialize db */
+    if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: initialize libDBI\n",time(NULL) ); }
+    dbi_initialize(NULL);
+    /* load the driver */
+    driver=dbi_driver_open(th->dbdriver);
+    if (! driver) {
+      rrd_set_error( "libdbi - no such driver: %s (possibly a dynamic link problem of the driver being linked without -ldbi)",th->dbdriver); 
+      return -1; 
+    }
+    /* and connect to driver */
+    th->conn=dbi_conn_open(driver);
+    /* and handle errors */
+    if (! th->conn) { 
+      rrd_set_error( "libdbi - could not open connection to driver %s",th->dbdriver); 
+      dbi_shutdown();
+      return -1;
+    }
+  }
+  if (th->connected) {
+    rrd_set_error( "we are already connected - can not set parameter %s=%s",key,value);
+    _sql_close(th);
+    return -1; 
+  }
+  if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: setting option %s to %s\n",time(NULL),key,value ); }
+  if (dbi_conn_set_option(th->conn,key,value)) {
+    dbi_conn_error(th->conn,(const char**)&dbi_errstr);
+    rrd_set_error( "libdbi: problems setting %s to %s - %s",key,value,dbi_errstr);
+    _sql_close(th);
+    return -1;
+  }
+  return 0;
+}
+
+int _sql_fetchrow(struct sql_table_helper* th,time_t *timestamp, rrd_value_t *value,int ordered) {
+  char* dbi_errstr=NULL;
+  char sql[10240];
+  time_t startt=0,endt=0;
+  /*connect to the database if needed */
+  if (! th->conn) {
+      rrd_set_error( "libdbi no parameters set for libdbi",th->filename,dbi_errstr);
+      return -1;
+  }
+  if (! th->connected) {
+    /* and now connect */
+    if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: connect to DB\n",time(NULL) ); }
+    if (dbi_conn_connect(th->conn) <0) {
+      dbi_conn_error(th->conn,(const char**)&dbi_errstr);
+      rrd_set_error( "libdbi: problems connecting to db with connect string %s - error: %s",th->filename,dbi_errstr);
+      _sql_close(th);
+      return -1;
+    }
+    th->connected=1;
+  }
+  /* now find out regarding an existing result-set */
+  if (! th->result) {
+    /* return if table_next is NULL */
+    if (th->table_next==NULL) { 
+    if (getenv("RRDDEBUGSQL")) { fprintf(stderr,"RRDDEBUGSQL: %li: reached last table to connect to\n",time(NULL) ); }
+      /* but first close connection */
+      _sql_close(th);
+      /* and return with end of data */
+      return 0;
+    }
+    /* calculate the table to use next */
+    th->table_start=th->table_next;
+    th->table_next=_find_next_separator(th->table_start,'+');
+    _inline_unescape(th->table_start);
+    /* and prepare FULL SQL Statement */
+    if (ordered) {
+      snprintf(sql,sizeof(sql)-1,"SELECT %s as rrd_time, %s as rrd_value FROM %s WHERE %s ORDER BY %s",
+              th->timestamp,th->value,th->table_start,th->where,th->timestamp);
+    } else {
+      snprintf(sql,sizeof(sql)-1,"SELECT %s as rrd_time, %s as rrd_value FROM %s WHERE %s",
+              th->timestamp,th->value,th->table_start,th->where);
+    }
+    /* and execute sql */
+    if (getenv("RRDDEBUGSQL")) { startt=time(NULL); fprintf(stderr,"RRDDEBUGSQL: %li: executing %s\n",startt,sql); }
+    th->result=dbi_conn_query(th->conn,sql);
+    if (startt) { endt=time(NULL);fprintf(stderr,"RRDDEBUGSQL: %li: timing %li\n",endt,endt-startt); }
+    /* handle error case */
+    if (! th->result) {
+      dbi_conn_error(th->conn,(const char**)&dbi_errstr);      
+      if (startt) { fprintf(stderr,"RRDDEBUGSQL: %li: error %s\n",endt,dbi_errstr); }
+      rrd_set_error("libdbi: problems with query: %s - errormessage: %s",sql,dbi_errstr);
+      _sql_close(th);
+      return -1;
+    }
+  }
+  /* and now fetch key and value */
+  if (! dbi_result_next_row(th->result)) {
+    /* free result */
+    dbi_result_free(th->result);
+    th->result=NULL;
+    /* and call recursively - this will open the next table or close connection as a whole*/
+    return _sql_fetchrow(th,timestamp,value,ordered);
+  } 
+  /* and return with flag for one value */
+  *timestamp=rrd_fetch_dbi_long(th->result,1);
+  *value=rrd_fetch_dbi_double(th->result,2);
+  return 1;
+}
+
+char* _find_next_separator(char* start,char separator) {
+  char* found=strchr(start,separator);
+  /* have we found it */
+  if (found) {
+    /* then 0 terminate current string */
+    *found=0; 
+    /* and return the pointer past the separator */
+    return (found+1);
+  }
+  /* not found, so return NULL */
+  return NULL;
+}
+
+char* _find_next_separator_twice(char*start,char separator) {
+  char *found=start;
+  /* find next separator in string*/
+  while (found) {
+    /* if found and the next one is also a separator */
+    if (found[1] == separator) {
+      /* then 0 terminate current string */
+      *found=0;
+      /* and return the pointer past the current one*/
+      return (found+2);
+    }
+    /* find next occurance */
+    found=strchr(found+1,separator);
+  }
+  /* not found, so return NULL */
+  return NULL;
+}
+
+char _hexcharhelper(char c) {
+  switch (c) {
+  case '0': return 0 ; break;
+  case '1': return 1 ; break;
+  case '2': return 2 ; break;
+  case '3': return 3 ; break;
+  case '4': return 4 ; break;
+  case '5': return 5 ; break;
+  case '6': return 6 ; break;
+  case '7': return 7 ; break;
+  case '8': return 8 ; break;
+  case '9': return 9 ; break;
+  case 'a': return 10 ; break;
+  case 'b': return 11 ; break;
+  case 'c': return 12 ; break;
+  case 'd': return 13 ; break;
+  case 'e': return 14 ; break;
+  case 'f': return 15 ; break;
+  case 'A': return 10 ; break;
+  case 'B': return 11 ; break;
+  case 'C': return 12 ; break;
+  case 'D': return 13 ; break;
+  case 'E': return 14 ; break;
+  case 'F': return 15 ; break;
+  }
+  return -1;
+}
+
+int _inline_unescape (char* string) {
+  char *src=string;
+  char *dst=string;
+  char c,h1,h2;
+  while((c= *src)) {
+    src++;
+    if (c == '%') {
+      if (*src == '%') { 
+       /* increase src pointer by 1 skiping second % */
+       src+=1;
+      } else {
+       /* try to calculate hex value from the next 2 values*/
+       h1=_hexcharhelper(*src);
+       if (h1<0) { rrd_set_error( "string escape error at: %s\n",string);return(1); }
+       h2=_hexcharhelper(*(src+1));
+       if (h2<0) { rrd_set_error( "string escape error at: %s\n",string);return(1); }
+       c=h2+(h1<<4);
+       /* increase src pointer by 2 skiping 2 chars */
+       src+=2;
+      } 
+    }
+    *dst=c;
+    dst++;
+  }
+  *dst=0;
+  return 0;
+}
+
+int
+rrd_fetch_fn_libdbi(
+    char           *filename,  /* name of the rrd */
+    enum cf_en     cf_idx,     /* which consolidation function ?*/
+    time_t         *start,
+    time_t         *end,       /* which time frame do you want ?
+                               * will be changed to represent reality */
+    unsigned long  *step,      /* which stepsize do you want? 
+                               * will be changed to represent reality */
+    unsigned long  *ds_cnt,    /* number of data sources in file */
+    char           ***ds_namv, /* names of data_sources */
+    rrd_value_t    **data)     /* two dimensional array containing the data */
+{
+  /* the separator used */
+  char separator='/';
+  /* a local copy of the filename - used for copying plus some pointer variables */
+  char filenameworkcopy[10240];
+  char *tmpptr=filenameworkcopy;
+  char *nextptr=NULL;
+  char *libdbiargs=NULL;
+  char *sqlargs=NULL;
+  /* the settings for the "works" of rrd */
+  int fillmissing=0;
+  unsigned long minstepsize=300;
+  /* by default assume unixtimestamp */
+  int isunixtime=1;
+  /* the result-set */
+  long r_timestamp,l_timestamp,d_timestamp;
+  double r_value,l_value,d_value;
+  int r_status;
+  int rows;
+  long idx;
+  int derive=0;
+  /* the libdbi connection data and the table_help structure */
+  struct sql_table_helper table_help;
+  char where[10240];
+  table_help.conn=NULL;
+  table_help.where=where;
+
+  /* some loop variables */
+  int i=0;
+
+  /* check header */
+  if (strncmp("sql",filename,3)!=0) { 
+    rrd_set_error( "formatstring wrong - %s",filename );return -1; 
+  }
+  if (filename[3]!=filename[4]) { 
+    rrd_set_error( "formatstring wrong - %s",filename );return -1; 
+  }
+
+  /* now make this the separator */
+  separator=filename[3];
+
+  /* copy filename for local modifications during parsing */
+  strncpy(filenameworkcopy,filename+5,sizeof(filenameworkcopy));
+
+  /* get the driver */
+  table_help.dbdriver=tmpptr;
+  libdbiargs=_find_next_separator(tmpptr,separator);
+  if (! libdbiargs) { 
+    /* error in argument */
+    rrd_set_error( "formatstring wrong as we did not find \"%c\"- %s",separator,table_help.dbdriver);
+    return -1; 
+  }
+
+  /* now find the next double separator - this defines the args to the database */
+  sqlargs=_find_next_separator_twice(libdbiargs,separator);
+  if (!sqlargs) {
+    rrd_set_error( "formatstring wrong for db arguments as we did not find \"%c%c\" in \"%s\"",separator,separator,libdbiargs);
+    return 1;
+  }
+
+  /* now we can start with the SQL Statement - best to start with this first, 
+     as then the error-handling is easier, as we do not have to handle libdbi shutdown as well */
+
+  /* parse the table(s) */
+  table_help.table_start=sqlargs;
+  nextptr=_find_next_separator(table_help.table_start,separator);
+  if (! nextptr) { 
+    /* error in argument */
+    rrd_set_error( "formatstring wrong - %s",tmpptr);
+    return -1; 
+  }
+  /* hex-unescape the value */
+  if(_inline_unescape(table_help.table_start)) { return -1; }
+
+  /* parse the unix timestamp column */
+  table_help.timestamp=nextptr;
+  nextptr=_find_next_separator(nextptr,separator);
+  if (! nextptr) { 
+    /* error in argument */
+    rrd_set_error( "formatstring wrong - %s",tmpptr);
+    return -1; 
+  }
+  /* if we have leading '*', then we have a TIMEDATE Field*/
+  if (table_help.timestamp[0]=='*') { isunixtime=0; table_help.timestamp++; }
+  /* hex-unescape the value */
+  if(_inline_unescape(table_help.timestamp)) { return -1; }
+
+  /* parse the value column */
+  table_help.value=nextptr;
+  nextptr=_find_next_separator(nextptr,separator);
+  if (! nextptr) { 
+    /* error in argument */
+    rrd_set_error( "formatstring wrong - %s",tmpptr);
+    return -1; 
+  }
+  /* hex-unescape the value */
+  if(_inline_unescape(table_help.value)) { return -1; }
+  
+  /* now prepare WHERE clause as empty string*/
+  where[0]=0;
+
+  /* and the where clause */
+  sqlargs=nextptr;
+  while(sqlargs) {
+    /* find next separator */
+    nextptr=_find_next_separator(sqlargs,separator);
+    /* now handle fields */
+    if (strcmp(sqlargs,"derive")==0) { /* the derive option with the default allowed max delta */
+      derive=600;
+    } else if (strcmp(sqlargs,"prediction")==0) {
+      rrd_set_error("argument prediction is no longer supported in a DEF - use new generic CDEF-functions instead");
+      return -1;
+    } else if (strcmp(sqlargs,"sigma")==0) {
+      rrd_set_error("argument sigma is no longer supported in a DEF - use new generic CDEF-functions instead");
+      return -1;
+    } else if (*sqlargs==0) { /* ignore empty */
+    } else { /* else add to where string */
+      if (where[0]) {strcat(where," AND ");}
+      strcat(where,sqlargs);
+    }
+    /* and continue loop with next pointer */
+    sqlargs=nextptr;
+  }
+  /* and unescape */
+  if(_inline_unescape(where)) { return -1; }
+
+  /* now parse LIBDBI options - this start initializing libdbi and beyond this point we need to reset the db as well in case of errors*/
+  while (libdbiargs) {
+    /* find separator */
+    nextptr=_find_next_separator(libdbiargs,separator);
+    /* now find =, separating key from value*/
+    tmpptr=_find_next_separator(libdbiargs,'=');
+    if (! tmpptr) { 
+      rrd_set_error( "formatstring wrong for db arguments as we did not find \"=\" in \"%s\"",libdbiargs);
+      _sql_close(&table_help);
+      return 1;
+    }
+    /* hex-unescape the value */
+    if(_inline_unescape(tmpptr)) { return -1; }
+    /* now handle the key/value pair */
+    if (strcmp(libdbiargs,"rrdminstepsize")==0) { /* allow override for minstepsize */
+      i=atoi(tmpptr);if (i>0) { minstepsize=i; }
+    } else if (strcmp(libdbiargs,"rrdfillmissing")==0) { /* allow override for minstepsize */
+      i=atoi(tmpptr);if (i>0) { fillmissing=i; }
+    } else if (strcmp(libdbiargs,"rrdderivemaxstep")==0) { /* allow override for derived max delta */
+      i=atoi(tmpptr);if (i>0) { if (derive) { derive=i; }}
+    } else { /* store in libdbi, as these are parameters */
+      if (_sql_setparam(&table_help,libdbiargs,tmpptr)) { return -1; }
+    }
+    /* and continue loop with next pointer */
+    libdbiargs=nextptr;
+  }
+  
+  /* and modify step if given */
+  if (*step<minstepsize) {*step=minstepsize;}
+  *start-=(*start)%(*step);
+  *end-=(*end)%(*step);
+
+  /* and append the SQL WHERE Clause for the timeframe calculated above (adding AND if required) */
+  if (where[0]) {strcat(where," AND ");}
+  i=strlen(where);
+  if (isunixtime) {
+    snprintf(where+i,sizeof(where)-1-i,"%li < %s AND %s < %li",*start,table_help.timestamp,table_help.timestamp,*end);
+  } else {
+    char tsstart[64];strftime(tsstart,sizeof(tsstart),"%Y-%m-%d %H:%M:%S",localtime(start));
+    char tsend[64];strftime(tsend,sizeof(tsend),"%Y-%m-%d %H:%M:%S",localtime(end));
+    snprintf(where+i,sizeof(where)-1-i,"'%s' < %s AND %s < '%s'",tsstart,table_help.timestamp,table_help.timestamp,tsend);
+  }
+
+  /* and now calculate the number of rows in the resultset... */
+  rows=((*end)-(*start))/(*step)+2;
+  
+  /* define the result set variables/columns returned */
+  *ds_cnt=5;
+  *ds_namv=(char**)malloc((*ds_cnt)*sizeof(char*));
+  for (i=0;i<(int)(*ds_cnt);i++) {
+    tmpptr=(char*)malloc(sizeof(char) * DS_NAM_SIZE);
+    (*ds_namv)[i]=tmpptr;
+    /* now copy what is required */
+    switch (i) {
+    case 0: strncpy(tmpptr,"min",DS_NAM_SIZE-1); break;
+    case 1: strncpy(tmpptr,"avg",DS_NAM_SIZE-1); break;
+    case 2: strncpy(tmpptr,"max",DS_NAM_SIZE-1); break;
+    case 3: strncpy(tmpptr,"count",DS_NAM_SIZE-1); break;
+    case 4: strncpy(tmpptr,"sigma",DS_NAM_SIZE-1); break;
+    }
+  }
+
+  /* allocate memory for resultset (with the following columns: min,avg,max,count,sigma) */
+  i=rows * sizeof(rrd_value_t)*(*ds_cnt);
+  if (((*data) = malloc(i))==NULL){
+    /* and return error */
+    rrd_set_error("malloc failed for %i bytes",i);
+    return(-1);
+  }
+  /* and fill with NAN */
+  for(i=0;i<rows;i++) {
+    (*data)[i*(*ds_cnt)+0]=DNAN; /* MIN */
+    (*data)[i*(*ds_cnt)+1]=DNAN; /* AVG */
+    (*data)[i*(*ds_cnt)+2]=DNAN; /* MAX */
+    (*data)[i*(*ds_cnt)+3]=0;    /* COUNT */
+    (*data)[i*(*ds_cnt)+4]=DNAN; /* SIGMA */
+  }
+  /* and assign undefined values for last - in case of derived calculation */
+  l_value=DNAN;l_timestamp=0;
+  /* here goes the real work processing all data */
+  while((r_status=_sql_fetchrow(&table_help,&r_timestamp,&r_value,derive))>0) {
+    /* processing of value */
+    /* calculate index for the timestamp */
+    idx=(r_timestamp-(*start))/(*step);
+    /* some out of bounds checks on idx */
+    if (idx<0) { idx=0;}
+    if (idx>rows) { idx=rows;}
+    /* and calculate derivative if necessary */
+    if (derive) {
+      /* calc deltas */
+      d_timestamp=r_timestamp-l_timestamp;
+      d_value=r_value-l_value;
+      /* assign current as last values */
+      l_timestamp=r_timestamp;
+      l_value=r_value;
+      /* assign DNAN by default for value */
+      r_value=DNAN;
+      /* check for timestamp delta to be within an acceptable range */
+      if ((d_timestamp>0)&&(d_timestamp<2*derive)) {
+       /* only handle positive delta - avoid wrap-arrounds/counter resets showing up as spikes */
+       if (d_value>0) {
+         /* and normalize to per second */
+         r_value=d_value/d_timestamp;
+       }
+      }
+    }
+    /* only add value if we have a value that is not NAN */
+    if (! isnan(r_value)) {
+      if ((*data)[idx*(*ds_cnt)+3]==0) { /* count is 0 so assign to overwrite DNAN */
+       (*data)[idx*(*ds_cnt)+0]=r_value; /* MIN */
+       (*data)[idx*(*ds_cnt)+1]=r_value; /* AVG */
+       (*data)[idx*(*ds_cnt)+2]=r_value; /* MAX */
+       (*data)[idx*(*ds_cnt)+3]=1;       /* COUNT */
+       (*data)[idx*(*ds_cnt)+4]=r_value; /* SIGMA */
+      } else {
+       /* MIN */
+       if ((*data)[idx*(*ds_cnt)+0]>r_value) { (*data)[idx*(*ds_cnt)+0]=r_value; }
+        /* AVG - at this moment still sum - corrected in post processing */
+       (*data)[idx*(*ds_cnt)+1]+=r_value;
+        /* MAX */
+       if ((*data)[idx*(*ds_cnt)+2]<r_value) { (*data)[idx*(*ds_cnt)+2]=r_value; }
+        /* COUNT */
+       (*data)[idx*(*ds_cnt)+3]++;
+        /* SIGMA - at this moment still sum of squares - corrected in post processing */
+       (*data)[idx*(*ds_cnt)+4]+=r_value*r_value;
+      }
+    }
+  }
+  /* and check for negativ status, pass back immediately */
+  if (r_status==-1) { return -1; }
+
+  /* post processing */
+  for(idx=0;idx<rows;idx++) {
+    long count=(*data)[idx*(*ds_cnt)+3];
+    if (count>0) {
+      /* calc deviation first */
+      if (count>2) {
+       r_value=count*(*data)[idx*(*ds_cnt)+4]-(*data)[idx*(*ds_cnt)+1]*(*data)[idx*(*ds_cnt)+1];
+       if (r_value<0) { 
+         r_value=DNAN; 
+       } else {
+         r_value=sqrt(r_value/(count*(count-1)));
+       }
+      }
+      (*data)[idx*(*ds_cnt)+4]=r_value;
+      /* now the average */
+      (*data)[idx*(*ds_cnt)+1]/=count;
+    }
+  }
+
+  /* and return OK */
+  return 0;
+}
index 4c4fd906a84c969a82234a70c0c212738affabc7..4da1b3aa1f3574c7324edf82b877927c6fb76ac4 100644 (file)
@@ -1,16 +1,14 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_first Return
  *****************************************************************************
  * Initial version by Burton Strauss, ntopSupport.com - 3/2005
  *****************************************************************************/
 
+#include <stdlib.h>
 #include "rrd_tool.h"
 
-#ifdef WIN32
-#include <stdlib.h>
-#endif
 
 time_t rrd_first(
     int argc,
@@ -68,6 +66,7 @@ time_t rrd_first_r(
     rrd_t     rrd;
     rrd_file_t *rrd_file;
 
+    rrd_init(&rrd);
     rrd_file = rrd_open(filename, &rrd, RRD_READONLY);
     if (rrd_file == NULL) {
         goto err_free;
diff --git a/src/rrd_flushcached.c b/src/rrd_flushcached.c
new file mode 100644 (file)
index 0000000..f7a715e
--- /dev/null
@@ -0,0 +1,115 @@
+/**
+ * RRDTool - src/rrd_flushcached.c
+ * Copyright (C) 2008 Florian octo Forster
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; only version 2 of the License is applicable.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ * Authors:
+ *   Florian octo Forster <octo at verplant.org>
+ **/
+
+#include "rrd_tool.h"
+#include "rrd_client.h"
+
+int rrd_flushcached (int argc, char **argv)
+{
+    char *opt_daemon = NULL;
+    int status;
+    int i;
+
+    /* initialize getopt */
+    optind = 0;
+    opterr = 0;
+
+    while (42)
+    {
+        int opt;
+        static struct option long_options[] =
+        {
+            {"daemon", required_argument, 0, 'd'},
+            {0, 0, 0, 0}
+        };
+
+        opt = getopt_long(argc, argv, "d:", long_options, NULL);
+
+        if (opt == -1)
+            break;
+
+        switch (opt)
+        {
+            case 'd':
+                if (opt_daemon != NULL)
+                    free (opt_daemon);
+                opt_daemon = strdup (optarg);
+                if (opt_daemon == NULL)
+                {
+                    rrd_set_error ("strdup failed.");
+                    return (-1);
+                }
+                break;
+
+            default:
+                rrd_set_error ("Usage: rrdtool %s [--daemon <addr>] <file>",
+                        argv[0]);
+                return (-1);
+        }
+    } /* while (42) */
+
+    if ((argc - optind) < 1)
+    {
+        rrd_set_error ("Usage: rrdtool %s [--daemon <addr>] <file> [<file> ...]", argv[0]);
+        return (-1);
+    }
+
+    /* try to connect to rrdcached */
+    status = rrdc_connect(opt_daemon);
+    if (opt_daemon) free(opt_daemon);
+    if (status != 0) return status;
+
+    if (! rrdc_is_connected(opt_daemon))
+    {
+        rrd_set_error ("Daemon address unknown. Please use the \"--daemon\" "
+                "option to set an address on the command line or set the "
+                "\"%s\" environment variable.",
+                ENV_RRDCACHED_ADDRESS);
+        return (-1);
+    }
+
+    status = 0;
+    for (i = optind; i < argc; i++)
+    {
+        status = rrdc_flush(argv[i]);
+        if (status)
+        {
+            char *error;
+            int   remaining;
+
+            error     = strdup(rrd_get_error());
+            remaining = argc - optind - 1;
+
+            rrd_set_error("Flushing of file \"%s\" failed: %s. Skipping "
+                    "remaining %i file%s.", argv[i],
+                    ((! error) || (*error == '\0')) ? "unknown error" : error,
+                    remaining, (remaining == 1) ? "" : "s");
+            free(error);
+            break;
+        }
+    }
+
+    return ((status == 0) ? 0 : -1);
+} /* int rrd_flush */
+
+/*
+ * vim: set sw=4 sts=4 et fdm=marker :
+ */
index 548a3d1e496af66eee8efda337c94429368a6cf8..912373faf6e4a7f1bb2356ab55ec3b7a0ce2513e 100644 (file)
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_format.c  RRD Database Format helper functions
  *****************************************************************************
- * $Id: rrd_format.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_format.c 1795 2009-04-20 06:46:47Z oetiker $
  * $Log$
  * Revision 1.5  2004/05/18 18:53:03  oetiker
  * big spell checking patch -- slif@bellsouth.net
@@ -98,3 +98,16 @@ long ds_match(
     rrd_set_error("unknown data source name '%s'", ds_nam);
     return -1;
 }
+
+off_t rrd_get_header_size(
+    rrd_t *rrd)
+{
+    return sizeof(stat_head_t) + \
+        sizeof(ds_def_t) * rrd->stat_head->ds_cnt + \
+        sizeof(rra_def_t) * rrd->stat_head->rra_cnt + \
+        sizeof(time_t) + \
+        sizeof(live_head_t) + \
+        sizeof(pdp_prep_t) * rrd->stat_head->ds_cnt + \
+        sizeof(cdp_prep_t) * rrd->stat_head->ds_cnt * rrd->stat_head->rra_cnt + \
+        sizeof(rra_ptr_t) * rrd->stat_head->rra_cnt;
+}
index 2d3127e63ff1c55bd9eaed3edc89776593f902c4..e9e6f11ab5a6a45c37ef3453daff06a92ade17e8 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_format.h  RRD Database Format header
  *****************************************************************************/
index d206af0bf62e84242099dedaf2c14c925525606a..f973471c0f016e3c11da534f6a22969c300260d1 100644 (file)
@@ -30,9 +30,8 @@
 #define _NO_PROTO
 #endif
 
-#ifndef WIN32
 
-#if !defined (__STDC__) || !__STDC__
+#if !defined WIN32 && (!defined (__STDC__) || !__STDC__)
 /* This is a separate conditional since some stdc systems
    reject `defined (const)'.  */
 #ifndef const
@@ -40,7 +39,6 @@
 #endif
 #endif
 
-#endif // WIN32
 
 #ifdef HAVE_CONFIG_H
 #include "../rrd_config.h"
@@ -227,15 +225,7 @@ static char *posixly_correct;
 char     *getenv(
     );
 
-#ifdef WIN32
 static char* my_index(const char* str, int chr)
-#else // WIN32
-static char *my_index(
-    str,
-    chr)
-    const char *str;
-    int chr;
-#endif // wIN32
 {
     while (*str) {
         if (*str == chr)
@@ -312,13 +302,7 @@ static void exchange(
     char **);
 #endif
 
-#ifdef WIN32
 static void exchange(char** argv)
-#else // WIN32
-static void exchange(
-    argv)
-    char    **argv;
-#endif // WIN32
 {
     int       bottom = first_nonopt;
     int       middle = last_nonopt;
@@ -374,20 +358,9 @@ static const char *_getopt_initialize(
     char *const *,
     const char *);
 #endif
-
-#ifdef WIN32
 static const char* _getopt_initialize(int argc,
                                       char** argv,
                                       const char* optstring)
-#else // WIN32
-static const char *_getopt_initialize(
-    argc,
-    argv,
-    optstring)
-    int argc;
-    char     *const *argv;
-    const char *optstring;
-#endif // WIN32
 {
     /* Start processing options with ARGV-element 1 (since ARGV-element 0
        is the program name); the sequence of previously skipped
@@ -490,28 +463,12 @@ static const char *_getopt_initialize(
    If LONG_ONLY is nonzero, '-' as well as '--' can introduce
    long-named options.  */
 
-#ifdef WIN32
 int _getopt_internal(int argc,
                      char** argv,
                      const char *optstring,
                      const struct option *longopts,
                      int* longind,
                      int long_only)
-#else // WIN32
-int _getopt_internal(
-    argc,
-    argv,
-    optstring,
-    longopts,
-    longind,
-    long_only)
-    int argc;
-    char     *const *argv;
-    const char *optstring;
-    const struct option *longopts;
-    int      *longind;
-    int long_only;
-#endif // WIN32
 {
     optarg = NULL;
 
@@ -911,20 +868,10 @@ int _getopt_internal(
     }
 }
 
-#ifdef WIN32
 int getopt(
     int argc,
     char** argv,
     const char* optstring)
-#else // WIN32
-int getopt(
-    argc,
-    argv,
-    optstring)
-    int argc;
-    char     *const *argv;
-    const char *optstring;
-#endif // WIN32
 {
     return _getopt_internal(argc, argv, optstring,
                             (const struct option *) 0, (int *) 0, 0);
index 89a5da6dbefb452bd318083c463a2ef0e4269869..1d443f194f0fa18cef6bf4613054c6327fe3a318 100644 (file)
@@ -132,8 +132,6 @@ extern    "C" {
     int *longind,
     int long_only);
 #else                   /* not __STDC__ */
-
-#ifdef WIN32
     int getopt_long(int argc,
                     char **argv,
                     const char *options,
@@ -145,18 +143,6 @@ extern    "C" {
                          const struct option *longopts,
                          int *longind,
                          int long_only);
-#else // WIN32
-    extern int getopt(
-        );
-    extern int getopt_long(
-        );
-    extern int getopt_long_only(
-        );
-
-    extern int _getopt_internal(
-        );
-#endif // WIN32
-
 #endif                  /* __STDC__ */
 
 #ifdef __cplusplus
index 724e1a5d9319ab1ae9cbc49dbf848d4a48df4dba..1ace77e24c9157e5254a485d0866b417bc5411e8 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 \f
-#ifndef WIN32
-#if !defined (__STDC__) || !__STDC__
+
+#if !defined WIN32 && (!defined (__STDC__) || !__STDC__)
 /* This is a separate conditional since some stdc systems
    reject `defined (const)'.  */
 #ifndef const
 #define const
 #endif
 #endif
-#endif // WIN32
 
 #ifdef HAVE_CONFIG_H
 #include "../rrd_config.h"
 #define NULL 0
 #endif
 
-#ifdef WIN32
 int getopt_long(int argc,
                 char** argv,
                 const char* options,
                 const struct option* long_options,
                 int* opt_index)
-#else // WIN32
-int getopt_long(
-    argc,
-    argv,
-    options,
-    long_options,
-    opt_index)
-    int argc;
-    char     *const *argv;
-    const char *options;
-    const struct option *long_options;
-    int      *opt_index;
-#endif // WIN32
 {
     return _getopt_internal(argc, argv, options, long_options, opt_index, 0);
 }
@@ -94,25 +79,11 @@ int getopt_long(
    but does match a short option, it is parsed as a short option
    instead.  */
 
-#ifdef WIN32
 int getopt_long_only(int argc,
                      char** argv,
                      const char* options,
                      const struct option* long_options,
                      int* opt_index)
-#else // WIN32
-int getopt_long_only(
-    argc,
-    argv,
-    options,
-    long_options,
-    opt_index)
-    int argc;
-    char     *const *argv;
-    const char *options;
-    const struct option *long_options;
-    int      *opt_index;
-#endif // WIN32
 {
     return _getopt_internal(argc, argv, options, long_options, opt_index, 1);
 }
index bb19776434e0afe5d149909945a89bbf5671ec35..421332f103ecfffc919726e1a7882c36c16b9089 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  ****************************************************************************
  * rrd_gfx.c  graphics wrapper for rrdtool
   **************************************************************************/
@@ -124,7 +124,7 @@ static PangoLayout *gfx_prep_text(
     const char *text)
 {
     PangoLayout  *layout = im->layout;
-    PangoFontDescription *pfd;
+    const PangoFontDescription *pfd;
     cairo_t  *cr = im->cr;
 
     static double last_tabwidth = -1;
@@ -154,7 +154,7 @@ static PangoLayout *gfx_prep_text(
         pango_layout_set_tabs(layout, tab_array);
         pango_tab_array_free(tab_array);
     }
-   pfd = (PangoFontDescription*)(pango_layout_get_font_description(layout));
+   pfd = pango_layout_get_font_description(layout);
 
    if (!pfd || !pango_font_description_equal (pfd,font_desc)){
         pango_layout_set_font_description(layout, font_desc);
index 1ccbdf87951b059c0009e9b67de0b4c8b79acb51..594c9f6df525375f6dda0d5deea4d780c21172c2 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  ****************************************************************************
  * rrd__graph.c  produce graphs from data in rrdfiles
  ****************************************************************************/
@@ -7,9 +7,15 @@
 
 #include <sys/stat.h>
 
+/* for basename */
+#ifdef HAVE_LIBGEN_H
+#  include <libgen.h>
+#eles
+#include "plbasename.h"
+#endif
+
 #ifdef WIN32
 #include "strftime.h"
-#include "plbasename.h"
 #endif
 
 #include "rrd_tool.h"
@@ -28,6 +34,7 @@
 #endif
 
 #include "rrd_graph.h"
+#include "rrd_client.h"
 
 /* some constant definitions */
 
@@ -303,10 +310,14 @@ int im_free(
     image_desc_t *im)
 {
     unsigned long i, ii;
-    cairo_status_t status = CAIRO_STATUS_SUCCESS;
+    cairo_status_t status = (cairo_status_t) 0;
 
     if (im == NULL)
         return 0;
+
+    if (im->daemon_addr != NULL)
+      free(im->daemon_addr);
+
     for (i = 0; i < (unsigned) im->gdes_c; i++) {
         if (im->gdes[i].data_first) {
             /* careful here, because a single pointer can occur several times */
@@ -835,6 +846,36 @@ int data_fetch(
         if (!skip) {
             unsigned long ft_step = im->gdes[i].step;   /* ft_step will record what we got from fetch */
 
+            /* Flush the file if
+             * - a connection to the daemon has been established
+             * - this is the first occurrence of that RRD file
+             */
+            if (rrdc_is_connected(im->daemon_addr))
+            {
+                int status;
+
+                status = 0;
+                for (ii = 0; ii < i; ii++)
+                {
+                    if (strcmp (im->gdes[i].rrd, im->gdes[ii].rrd) == 0)
+                    {
+                        status = 1;
+                        break;
+                    }
+                }
+
+                if (status == 0)
+                {
+                    status = rrdc_flush (im->gdes[i].rrd);
+                    if (status != 0)
+                    {
+                        rrd_set_error ("rrdc_flush (%s) failed with status %i.",
+                                im->gdes[i].rrd, status);
+                        return (-1);
+                    }
+                }
+            } /* if (rrdc_is_connected()) */
+
             if ((rrd_fetch_fn(im->gdes[i].rrd,
                               im->gdes[i].cf,
                               &im->gdes[i].start,
@@ -905,7 +946,7 @@ long find_var(
     return -1;
 }
 
-/* find the largest common denominator for all the numbers
+/* find the greatest common divisor for all the numbers
    in the 0 terminated num array */
 long lcd(
     long *num)
@@ -1019,9 +1060,9 @@ int data_calc(
                         /* add one entry to the array that keeps track of the step sizes of the
                          * data sources going into the CDEF. */
                         if ((steparray =
-                                         (long*)(rrd_realloc(steparray,
+                             (long*)rrd_realloc(steparray,
                                          (++stepcnt +
-                                          1) * sizeof(*steparray)))) == NULL) {
+                                          1) * sizeof(*steparray))) == NULL) {
                             rrd_set_error("realloc steparray");
                             rpnstack_free(&rpnstack);
                             return -1;
@@ -1087,10 +1128,10 @@ int data_calc(
              */
             im->gdes[gdi].step = lcd(steparray);
             free(steparray);
-            if ((im->gdes[gdi].data = (rrd_value_t*)(malloc(((im->gdes[gdi].end -
+            if ((im->gdes[gdi].data = (rrd_value_t*)malloc(((im->gdes[gdi].end -
                                                im->gdes[gdi].start)
                                               / im->gdes[gdi].step)
-                                             * sizeof(double)))) == NULL) {
+                                             * sizeof(double))) == NULL) {
                 rrd_set_error("malloc im->gdes[gdi].data");
                 rpnstack_free(&rpnstack);
                 return -1;
@@ -1177,8 +1218,8 @@ int data_proc(
     for (i = 0; i < im->gdes_c; i++) {
         if ((im->gdes[i].gf == GF_LINE) ||
             (im->gdes[i].gf == GF_AREA) || (im->gdes[i].gf == GF_TICK)) {
-            if ((im->gdes[i].p_data = (rrd_value_t*)(malloc((im->xsize + 1)
-                                             * sizeof(rrd_value_t)))) == NULL) {
+            if ((im->gdes[i].p_data = (rrd_value_t*)malloc((im->xsize + 1)
+                                             * sizeof(rrd_value_t))) == NULL) {
                 rrd_set_error("malloc data_proc");
                 return -1;
             }
@@ -1534,7 +1575,7 @@ int print_calc(
                 rrd_infoval_t prline;
 
                 if (im->gdes[i].strftm) {
-                    prline.u_str = (char*)(malloc((FMT_LEG_LEN + 2) * sizeof(char)));
+                    prline.u_str = (char*)malloc((FMT_LEG_LEN + 2) * sizeof(char));
                     strftime(prline.u_str,
                              FMT_LEG_LEN, im->gdes[i].format, &tmvdef);
                 } else if (bad_format(im->gdes[i].format)) {
@@ -1613,34 +1654,49 @@ int print_calc(
 }
 
 
+
 /* place legends with color spots */
 int leg_place(
     image_desc_t *im,
-    int *gY)
+    int calc_width)
 {
     /* graph labels */
     int       interleg = im->text_prop[TEXT_PROP_LEGEND].size * 2.0;
     int       border = im->text_prop[TEXT_PROP_LEGEND].size * 2.0;
     int       fill = 0, fill_last;
+    double    legendwidth; // = im->ximg - 2 * border;
     int       leg_c = 0;
     double    leg_x = border;
-    int       leg_y = im->yimg;
-    int       leg_y_prev = im->yimg;
+    int       leg_y = 0; //im->yimg;
+    int       leg_y_prev = 0; // im->yimg;
     int       leg_cc;
     double    glue = 0;
     int       i, ii, mark = 0;
     char      default_txtalign = TXA_JUSTIFIED; /*default line orientation */
     int      *legspace;
     char     *tab;
+    char      saved_legend[FMT_LEG_LEN + 5];
+
+    if(calc_width){
+        legendwidth = 0;
+    }
+    else{
+        legendwidth = im->legendwidth - 2 * border;
+    }
+
 
     if (!(im->extra_flags & NOLEGEND) & !(im->extra_flags & ONLY_GRAPH)) {
-        if ((legspace = (int*)(malloc(im->gdes_c * sizeof(int)))) == NULL) {
+        if ((legspace = (int*)malloc(im->gdes_c * sizeof(int))) == NULL) {
             rrd_set_error("malloc for legspace");
             return -1;
         }
 
         for (i = 0; i < im->gdes_c; i++) {
             char      prt_fctn; /*special printfunctions */
+            if(calc_width){
+                strcpy(saved_legend, im->gdes[i].legend);
+            }
+
             fill_last = fill;
             /* hide legends for rules which are not displayed */
             if (im->gdes[i].gf == GF_TEXTALIGN) {
@@ -1663,6 +1719,7 @@ int leg_place(
                 memmove(tab, tab + 1, strlen(tab));
                 tab[0] = (char) 9;
             }
+
             leg_cc = strlen(im->gdes[i].legend);
             /* is there a controle code at the end of the legend string ? */
             if (leg_cc >= 2 && im->gdes[i].legend[leg_cc - 2] == '\\') {
@@ -1721,7 +1778,10 @@ int leg_place(
             }
 
             if (prt_fctn == '\0') {
-                if (i == im->gdes_c - 1 || fill > im->ximg - 2 * border) {
+                if(calc_width && (fill > legendwidth)){
+                    legendwidth = fill;
+                }
+                if (i == im->gdes_c - 1 || fill > legendwidth) {
                     /* just one legend item is left right or center */
                     switch (default_txtalign) {
                     case TXA_RIGHT:
@@ -1739,7 +1799,7 @@ int leg_place(
                     }
                 }
                 /* is it time to place the legends ? */
-                if (fill > im->ximg - 2 * border) {
+                if (fill > legendwidth) {
                     if (leg_c > 1) {
                         /* go back one */
                         i--;
@@ -1752,23 +1812,22 @@ int leg_place(
                 }
             }
 
-
             if (prt_fctn != '\0') {
                 leg_x = border;
                 if (leg_c >= 2 && prt_fctn == 'j') {
-                    glue = (double)(im->ximg - fill - 2 * border) / (double)(leg_c - 1);
+                    glue = (double)(legendwidth - fill) / (double)(leg_c - 1);
                 } else {
                     glue = 0;
                 }
                 if (prt_fctn == 'c')
-                    leg_x = (double)(im->ximg - fill) / 2.0;
+                    leg_x = (double)(legendwidth - fill) / 2.0;
                 if (prt_fctn == 'r')
-                    leg_x = im->ximg - fill - border;
+                    leg_x = legendwidth - fill - border;
                 for (ii = mark; ii <= i; ii++) {
                     if (im->gdes[ii].legend[0] == '\0')
                         continue;   /* skip empty legends */
                     im->gdes[ii].leg_x = leg_x;
-                    im->gdes[ii].leg_y = leg_y;
+                    im->gdes[ii].leg_y = leg_y + border;
                     leg_x +=
                         (double)gfx_get_text_width(im, leg_x,
                                            im->
@@ -1784,26 +1843,25 @@ int leg_place(
                     leg_y += im->text_prop[TEXT_PROP_LEGEND].size * 1.8;
                 if (prt_fctn == 's')
                     leg_y -= im->text_prop[TEXT_PROP_LEGEND].size;
+
+                if(calc_width && (fill > legendwidth)){
+                    legendwidth = fill;
+                }
                 fill = 0;
                 leg_c = 0;
                 mark = ii;
             }
-        }
 
-        if (im->extra_flags & FULL_SIZE_MODE) {
-            /* now for some backpaddeling. We have to shift up all the
-               legend items into the graph and tell the caller about the
-               space we used up. */
-            long shift_up = leg_y - im->yimg - im->text_prop[TEXT_PROP_LEGEND].size * 1.8 + border * 0.7;
-            for (i = 0; i < im->gdes_c; i++) {
-                im->gdes[i].leg_y -= shift_up;
+            if(calc_width){
+                strcpy(im->gdes[i].legend, saved_legend);
             }
-            im->yorigin = im->yorigin - leg_y + im->yimg - im->text_prop[TEXT_PROP_LEGEND].size * 1.8 - border;            
-            *gY = im->yorigin;
-        } else {
-            im->yimg =
-                leg_y - im->text_prop[TEXT_PROP_LEGEND].size * 1.8 +
-                border * 0.6;
+        }
+
+        if(calc_width){
+            im->legendwidth = legendwidth + 2 * border;
+        }
+        else{
+            im->legendheight = leg_y + border * 0.6;
         }
         free(legspace);
     }
@@ -2058,7 +2116,7 @@ double frexp10(
     double    mnt;
     int       iexp;
 
-    iexp = floor(log((double)(fabs(x))) / log(10.0));
+    iexp = floor(log((double)fabs(x)) / log((double)10));
     mnt = x / pow(10.0, iexp);
     if (mnt >= 10.0) {
         iexp++;
@@ -2590,24 +2648,20 @@ void grid_paint(
     /* yaxis unit description */
     if (im->ylegend[0] != '\0'){
         gfx_text(im,
-                 10,
-                 (im->yorigin -
-                  im->ysize / 2),
+                 im->xOriginLegendY+10,
+                 im->yOriginLegendY,
                  im->graph_col[GRC_FONT],
                  im->
                  text_prop[TEXT_PROP_UNIT].
                  font_desc,
                  im->tabwidth,
                  RRDGRAPH_YLEGEND_ANGLE, GFX_H_CENTER, GFX_V_CENTER, im->ylegend);
+
     }
     if (im->second_axis_legend[0] != '\0'){
-            double Xylabel=gfx_get_text_width(im, 0,
-                        im->text_prop[TEXT_PROP_AXIS].font_desc,
-                        im->tabwidth,
-                        "0") * im->unitslength
-                    + im->text_prop[TEXT_PROP_UNIT].size *2;
             gfx_text( im,
-                  im->xorigin+im->xsize+Xylabel+8, (im->yorigin - im->ysize/2),
+                  im->xOriginLegendY2+10, 
+                  im->yOriginLegendY2,
                   im->graph_col[GRC_FONT],
                   im->text_prop[TEXT_PROP_UNIT].font_desc,
                   im->tabwidth, 
@@ -2618,7 +2672,7 @@ void grid_paint(
  
     /* graph title */
     gfx_text(im,
-             im->ximg / 2, 6,
+             im->xOriginTitle, im->yOriginTitle+6,
              im->graph_col[GRC_FONT],
              im->
              text_prop[TEXT_PROP_TITLE].
@@ -2628,7 +2682,8 @@ void grid_paint(
     if (!(im->extra_flags & NO_RRDTOOL_TAG)){
         water_color = im->graph_col[GRC_FONT];
         water_color.alpha = 0.3;
-        gfx_text(im, im->ximg - 4, 5,
+        double xpos = im->legendposition == EAST ? im->xOriginLegendY : im->ximg - 4;
+        gfx_text(im, xpos, 5,
                  water_color,
                  im->
                  text_prop[TEXT_PROP_WATERMARK].
@@ -2637,6 +2692,8 @@ void grid_paint(
     }    
     /* graph watermark */
     if (im->watermark[0] != '\0') {
+        water_color = im->graph_col[GRC_FONT];
+        water_color.alpha = 0.3;
         gfx_text(im,
                  im->ximg / 2, im->yimg - 6,
                  water_color,
@@ -2652,8 +2709,8 @@ void grid_paint(
             if (im->gdes[i].legend[0] == '\0')
                 continue;
             /* im->gdes[i].leg_y is the bottom of the legend */
-            X0 = im->gdes[i].leg_x;
-            Y0 = im->gdes[i].leg_y;
+            X0 = im->xOriginLegend + im->gdes[i].leg_x;
+            Y0 = im->legenddirection == TOP_DOWN ? im->yOriginLegend + im->gdes[i].leg_y : im->yOriginLegend + im->legendheight - im->gdes[i].leg_y;
             gfx_text(im, X0, Y0,
                      im->graph_col[GRC_FONT],
                      im->
@@ -2770,22 +2827,12 @@ int graph_size_location(
     /* The actual size of the image to draw is determined from
      ** several sources.  The size given on the command line is
      ** the graph area but we need more as we have to draw labels
-     ** and other things outside the graph area
+     ** and other things outside the graph area. If the option 
+     ** --full-size-mode is selected the size defines the total 
+     ** image size and the size available for the graph is 
+     ** calculated.
      */
 
-    int       Xvertical = 0, Ytitle =
-        0, Xylabel = 0, Xmain = 0, Ymain =
-        0, Yxlabel = 0, Xspacing = 15, Yspacing = 15, Ywatermark = 4;
-
-    if (im->extra_flags & ONLY_GRAPH) {
-        im->xorigin = 0;
-        im->ximg = im->xsize;
-        im->yimg = im->ysize;
-        im->yorigin = im->ysize;
-        ytr(im, DNAN);
-        return 0;
-    }
-
     /** +---+-----------------------------------+
      ** | y |...............graph title.........|
      ** |   +---+-------------------------------+
@@ -2806,10 +2853,37 @@ int graph_size_location(
      ** +---------------------------------------+
      */
 
+    int       Xvertical = 0, Xvertical2 = 0, Ytitle =
+        0, Xylabel = 0, Xmain = 0, Ymain =
+        0, Yxlabel = 0, Xspacing = 15, Yspacing = 15, Ywatermark = 4;
+
+    // no legends and no the shall be plotted it's easy
+    if (im->extra_flags & ONLY_GRAPH) {
+        im->xorigin = 0;
+        im->ximg = im->xsize;
+        im->yimg = im->ysize;
+        im->yorigin = im->ysize;
+        ytr(im, DNAN);
+        return 0;
+    }
+
+    if(im->watermark[0] != '\0') {
+        Ywatermark = im->text_prop[TEXT_PROP_WATERMARK].size * 2;
+    }
+
+    // calculate the width of the left vertical legend
     if (im->ylegend[0] != '\0') {
         Xvertical = im->text_prop[TEXT_PROP_UNIT].size * 2;
     }
 
+    // calculate the width of the right vertical legend
+    if (im->second_axis_legend[0] != '\0') {
+        Xvertical2 = im->text_prop[TEXT_PROP_UNIT].size * 2;
+    }
+    else{
+        Xvertical2 = Xspacing;
+    }
+
     if (im->title[0] != '\0') {
         /* The title is placed "inbetween" two text lines so it
          ** automatically has some vertical spacing.  The horizontal
@@ -2818,92 +2892,112 @@ int graph_size_location(
         /* if necessary, reduce the font size of the title until it fits the image width */
         Ytitle = im->text_prop[TEXT_PROP_TITLE].size * 2.6 + 10;
     }
+    else{
+        // we have no title; get a little clearing from the top
+        Ytitle = 1.5 * Yspacing;
+    }
 
     if (elements) {
         if (im->draw_x_grid) {
+            // calculate the height of the horizontal labelling
             Yxlabel = im->text_prop[TEXT_PROP_AXIS].size * 2.5;
         }
         if (im->draw_y_grid || im->forceleftspace) {
+            // calculate the width of the vertical labelling
             Xylabel =
                 gfx_get_text_width(im, 0,
-                                   im->
-                                   text_prop
-                                   [TEXT_PROP_AXIS].
-                                   font_desc,
+                                   im->text_prop[TEXT_PROP_AXIS].font_desc,
                                    im->tabwidth, "0") * im->unitslength;
         }
     }
 
+    // add some space to the labelling
+    Xylabel += Xspacing;
+
+    /* If the legend is printed besides the graph the width has to be
+     ** calculated first. Placing the legend north or south of the 
+     ** graph requires the width calculation first, so the legend is 
+     ** skipped for the moment.
+     */
+    im->legendheight = 0;
+    im->legendwidth = 0;
+    if (!(im->extra_flags & NOLEGEND)) {
+        if(im->legendposition == WEST || im->legendposition == EAST){
+            if (leg_place(im, 1) == -1){
+                return -1;
+            }
+        }
+    }
+
     if (im->extra_flags & FULL_SIZE_MODE) {
+
         /* The actual size of the image to draw has been determined by the user.
          ** The graph area is the space remaining after accounting for the legend,
          ** the watermark, the axis labels, and the title.
          */
-        im->xorigin = 0;
         im->ximg = im->xsize;
         im->yimg = im->ysize;
-        im->yorigin = im->ysize;
         Xmain = im->ximg;
         Ymain = im->yimg;
+
         /* Now calculate the total size.  Insert some spacing where
            desired.  im->xorigin and im->yorigin need to correspond
            with the lower left corner of the main graph area or, if
            this one is not set, the imaginary box surrounding the
            pie chart area. */
         /* Initial size calculation for the main graph area */
-        Xmain = im->ximg - Xylabel - 3 * Xspacing;
 
-        im->xorigin = Xspacing + Xylabel;
-
-        if (Xvertical) {    /* unit description */
-            Xmain -= Xvertical;
-            im->xorigin += Xvertical;
+        Xmain -= Xylabel;// + Xspacing;
+        if((im->legendposition == WEST || im->legendposition == EAST) && !(im->extra_flags & NOLEGEND) ){
+            Xmain -= im->legendwidth;// + Xspacing;
         }
-
-        /* adjust space for second axis */
         if (im->second_axis_scale != 0){
-            Xmain -= Xylabel + Xspacing;
-        }
-        if (im->extra_flags & NO_RRDTOOL_TAG){
-            Xmain += Xspacing;
+            Xmain -= Xylabel;
         }
-        if (im->second_axis_legend[0] != '\0' ) {
-            Xmain -= im->text_prop[TEXT_PROP_UNIT].size * 1.5;
+        if (!(im->extra_flags & NO_RRDTOOL_TAG)){
+            Xmain -= Xspacing;
         }
 
-        im->xsize = Xmain;
+        Xmain -= Xvertical + Xvertical2;
 
-        xtr(im, 0);
-        /* The vertical size of the image is known in advance.  The main graph area
-         ** (Ymain) and im->yorigin must be set according to the space requirements
-         ** of the legend and the axis labels.
-         */
-        if (im->extra_flags & NOLEGEND) {
-            im->yorigin = im->yimg -
-                im->text_prop[TEXT_PROP_AXIS].size * 2.5 - Yspacing;
-            Ymain = im->yorigin;
+        /* limit the remaining space to 0 */
+        if(Xmain < 1){
+            Xmain = 1;
         }
-        else {            
-            /* Determine where to place the legends onto the image.
-             ** Set Ymain and adjust im->yorigin to match the space requirements.
-             */
-            if (leg_place(im, &Ymain) == -1)
-                return -1;
+        im->xsize = Xmain;
+
+        /* Putting the legend north or south, the height can now be calculated */
+        if (!(im->extra_flags & NOLEGEND)) {
+            if(im->legendposition == NORTH || im->legendposition == SOUTH){
+                im->legendwidth = im->ximg;
+                if (leg_place(im, 0) == -1){
+                    return -1;
+                }
+            }
         }
 
+        if( (im->legendposition == NORTH || im->legendposition == SOUTH)  && !(im->extra_flags & NOLEGEND) ){
+            Ymain -=  Yxlabel + im->legendheight;
+        }
+        else{
+            Ymain -= Yxlabel;
+        }
+        
+        /* reserve space for the title *or* some padding above the graph */
+        Ymain -= Ytitle;
 
-        /* remove title space *or* some padding above the graph from the main graph area */
-        if (Ytitle) {
-            Ymain -= Ytitle;
-        } else {
-            Ymain -= 1.5 * Yspacing;
+            /* reserve space for padding below the graph */
+        if (im->extra_flags & NOLEGEND) {
+            Ymain -= Yspacing;
         }
 
-        /* watermark doesn't seem to effect the vertical size of the main graph area, oh well! */
         if (im->watermark[0] != '\0') {
             Ymain -= Ywatermark;
         }
-
+        /* limit the remaining height to 0 */
+        if(Ymain < 1){
+            Ymain = 1;
+        }
         im->ysize = Ymain;
     } else {            /* dimension options -width and -height refer to the dimensions of the main graph area */
 
@@ -2913,94 +3007,171 @@ int graph_size_location(
          ** and other things outside the graph area.
          */
 
-        if (im->ylegend[0] != '\0') {
-            Xvertical = im->text_prop[TEXT_PROP_UNIT].size * 2;
-        }
-
-
-        if (im->title[0] != '\0') {
-            /* The title is placed "inbetween" two text lines so it
-             ** automatically has some vertical spacing.  The horizontal
-             ** spacing is added here, on each side.
-             */
-            /* don't care for the with of the title
-               Xtitle = gfx_get_text_width(im->canvas, 0,
-               im->text_prop[TEXT_PROP_TITLE].font_desc,
-               im->tabwidth,
-               im->title, 0) + 2*Xspacing; */
-            Ytitle = im->text_prop[TEXT_PROP_TITLE].size * 2.6 + 10;
-        }
-
         if (elements) {
-            Xmain = im->xsize;
+            Xmain = im->xsize; // + Xspacing;
             Ymain = im->ysize;
         }
-        /* Now calculate the total size.  Insert some spacing where
-           desired.  im->xorigin and im->yorigin need to correspond
-           with the lower left corner of the main graph area or, if
-           this one is not set, the imaginary box surrounding the
-           pie chart area. */
-
-        /* The legend width cannot yet be determined, as a result we
-         ** have problems adjusting the image to it.  For now, we just
-         ** forget about it at all; the legend will have to fit in the
-         ** size already allocated.
-         */
-        im->ximg = Xylabel + Xmain + 2 * Xspacing;
 
-        if (im->second_axis_scale != 0){
-            im->ximg += Xylabel + Xspacing;
+        im->ximg = Xmain + Xylabel;
+        if (!(im->extra_flags & NO_RRDTOOL_TAG)){
+            im->ximg += Xspacing;
         }
-        if (im->extra_flags & NO_RRDTOOL_TAG){
-            im->ximg -= Xspacing;
+
+        if( (im->legendposition == WEST || im->legendposition == EAST) && !(im->extra_flags & NOLEGEND) ){
+            im->ximg += im->legendwidth;// + Xspacing;
         }
-        
-        if (Xmain)
-            im->ximg += Xspacing;
-        im->xorigin = Xspacing + Xylabel;
-        /* the length of the title should not influence with width of the graph
-           if (Xtitle > im->ximg) im->ximg = Xtitle; */
-        if (Xvertical) {    /* unit description */
-            im->ximg += Xvertical;
-            im->xorigin += Xvertical;
+        if (im->second_axis_scale != 0){
+            im->ximg += Xylabel;
         }
-        if (im->second_axis_legend[0] != '\0' ) {
-            im->ximg += Xvertical;
+
+        im->ximg += Xvertical + Xvertical2;
+
+        if (!(im->extra_flags & NOLEGEND)) {
+            if(im->legendposition == NORTH || im->legendposition == SOUTH){
+                im->legendwidth = im->ximg;
+                if (leg_place(im, 0) == -1){
+                    return -1;
+                }
+            }
         }
       
-        xtr(im, 0);
-        /* The vertical size is interesting... we need to compare
-         ** the sum of {Ytitle, Ymain, Yxlabel, Ylegend, Ywatermark} with 
-         ** Yvertical however we need to know {Ytitle+Ymain+Yxlabel}
-         ** in order to start even thinking about Ylegend or Ywatermark.
-         **
-         ** Do it in three portions: First calculate the inner part,
-         ** then do the legend, then adjust the total height of the img,
-         ** adding space for a watermark if one exists;
-         */
-        /* reserve space for main and/or pie */
         im->yimg = Ymain + Yxlabel;
-        im->yorigin = im->yimg - Yxlabel;
+        if( (im->legendposition == NORTH || im->legendposition == SOUTH)  && !(im->extra_flags & NOLEGEND) ){
+             im->yimg += im->legendheight;
+        }
+        
         /* reserve space for the title *or* some padding above the graph */
         if (Ytitle) {
             im->yimg += Ytitle;
-            im->yorigin += Ytitle;
         } else {
             im->yimg += 1.5 * Yspacing;
-            im->yorigin += 1.5 * Yspacing;
         }
         /* reserve space for padding below the graph */
-        im->yimg += Yspacing;
-        /* Determine where to place the legends onto the image.
-         ** Adjust im->yimg to match the space requirements.
-         */
-        if (leg_place(im, 0) == -1)
-            return -1;
+        if (im->extra_flags & NOLEGEND) {
+            im->yimg += Yspacing;
+        }
+
         if (im->watermark[0] != '\0') {
             im->yimg += Ywatermark;
         }
     }
 
+
+    /* In case of putting the legend in west or east position the first 
+     ** legend calculation might lead to wrong positions if some items 
+     ** are not aligned on the left hand side (e.g. centered) as the 
+     ** legendwidth wight have been increased after the item was placed.
+     ** In this case the positions have to be recalculated.
+     */
+    if (!(im->extra_flags & NOLEGEND)) {
+        if(im->legendposition == WEST || im->legendposition == EAST){
+            if (leg_place(im, 0) == -1){
+                return -1;
+            }
+        }
+    }
+
+    /* After calculating all dimensions
+     ** it is now possible to calculate 
+     ** all offsets.
+     */
+    switch(im->legendposition){
+        case NORTH:
+            im->xOriginTitle   = Xvertical + Xylabel + (im->xsize / 2);
+            im->yOriginTitle   = 0;
+
+            im->xOriginLegend  = 0;
+            im->yOriginLegend  = Ytitle;
+
+            im->xOriginLegendY = 0;
+            im->yOriginLegendY = Ytitle + im->legendheight + (Ymain / 2) + Yxlabel;
+
+            im->xorigin        = Xvertical + Xylabel;
+            im->yorigin        = Ytitle + im->legendheight + Ymain;
+
+            im->xOriginLegendY2 = Xvertical + Xylabel + Xmain;
+            if (im->second_axis_scale != 0){
+                im->xOriginLegendY2 += Xylabel;
+            }
+            im->yOriginLegendY2 = Ytitle + im->legendheight + (Ymain / 2) + Yxlabel;
+
+            break;
+
+        case WEST:
+            im->xOriginTitle   = im->legendwidth + Xvertical + Xylabel + im->xsize / 2;
+            im->yOriginTitle   = 0;
+
+            im->xOriginLegend  = 0;
+            im->yOriginLegend  = Ytitle;
+
+            im->xOriginLegendY = im->legendwidth;
+            im->yOriginLegendY = Ytitle + (Ymain / 2);
+
+            im->xorigin        = im->legendwidth + Xvertical + Xylabel;
+            im->yorigin        = Ytitle + Ymain;
+
+            im->xOriginLegendY2 = im->legendwidth + Xvertical + Xylabel + Xmain;
+            if (im->second_axis_scale != 0){
+                im->xOriginLegendY2 += Xylabel;
+            }
+            im->yOriginLegendY2 = Ytitle + (Ymain / 2);
+
+            break;
+
+        case SOUTH:
+            im->xOriginTitle   = Xvertical + Xylabel + im->xsize / 2;
+            im->yOriginTitle   = 0;
+
+            im->xOriginLegend  = 0;
+            im->yOriginLegend  = Ytitle + Ymain + Yxlabel;
+
+            im->xOriginLegendY = 0;
+            im->yOriginLegendY = Ytitle + (Ymain / 2);
+
+            im->xorigin        = Xvertical + Xylabel;
+            im->yorigin        = Ytitle + Ymain;
+
+            im->xOriginLegendY2 = Xvertical + Xylabel + Xmain;
+            if (im->second_axis_scale != 0){
+                im->xOriginLegendY2 += Xylabel;
+            }
+            im->yOriginLegendY2 = Ytitle + (Ymain / 2);
+
+            break;
+
+        case EAST:
+            im->xOriginTitle   = Xvertical + Xylabel + im->xsize / 2;
+            im->yOriginTitle   = 0;
+
+            im->xOriginLegend  = Xvertical + Xylabel + Xmain + Xvertical2;
+            if (im->second_axis_scale != 0){
+                im->xOriginLegend += Xylabel;
+            }
+            im->yOriginLegend  = Ytitle;
+
+            im->xOriginLegendY = 0;
+            im->yOriginLegendY = Ytitle + (Ymain / 2);
+
+            im->xorigin        = Xvertical + Xylabel;
+            im->yorigin        = Ytitle + Ymain;
+
+            im->xOriginLegendY2 = Xvertical + Xylabel + Xmain;
+            if (im->second_axis_scale != 0){
+                im->xOriginLegendY2 += Xylabel;
+            }
+            im->yOriginLegendY2 = Ytitle + (Ymain / 2);
+
+            if (!(im->extra_flags & NO_RRDTOOL_TAG)){
+                im->xOriginTitle    += Xspacing;
+                im->xOriginLegend   += Xspacing;
+                im->xOriginLegendY  += Xspacing;
+                im->xorigin         += Xspacing;
+                im->xOriginLegendY2 += Xspacing;
+            }
+            break;
+    }
+
+    xtr(im, 0);
     ytr(im, DNAN);
     return 0;
 }
@@ -3011,10 +3182,10 @@ static cairo_status_t cairo_output(
     *data,
     unsigned int length)
 {
-    image_desc_t *im = (image_desc_t*)(closure);
+    image_desc_t *im = (image_desc_t*)closure;
 
     im->rendered_image =
-        (unsigned char*)(realloc(im->rendered_image, im->rendered_image_size + length));
+        (unsigned char*)realloc(im->rendered_image, im->rendered_image_size + length);
     if (im->rendered_image == NULL)
         return CAIRO_STATUS_WRITE_ERROR;
     memcpy(im->rendered_image + im->rendered_image_size, data, length);
@@ -3032,6 +3203,7 @@ int graph_paint(
     graph_desc_t *lastgdes = NULL;
     rrd_infoval_t info;
 
+//    PangoFontMap *font_map = pango_cairo_font_map_get_default();
 
     /* pull the data from the rrd files ... */
     if (data_fetch(im) == -1)
@@ -3048,6 +3220,7 @@ int graph_paint(
     if (i < 0)
         return -1;
 
+    /* if we want and can be lazy ... quit now */
     if (i == 0)
         return 0;
 
@@ -3096,6 +3269,7 @@ int graph_paint(
     info.u_val = im->maxval;
     grinfo_push(im, sprintf_alloc("value_max"), RD_I_VAL, info);
 
+
     if (!calc_horizontal_grid(im))
         return -1;
     /* reset precalc */
@@ -3632,14 +3806,14 @@ int rrd_graph(
         if (strcmp(walker->key, "image_info") == 0) {
             prlines++;
             if (((*prdata) =
-                 (char**)(rrd_realloc((*prdata),
-                             (prlines + 1) * sizeof(char *)))) == NULL) {
+                 (char**)rrd_realloc((*prdata),
+                             (prlines + 1) * sizeof(char *))) == NULL) {
                 rrd_set_error("realloc prdata");
                 return 0;
             }
             /* imginfo goes to position 0 in the prdata array */
-            (*prdata)[prlines - 1] = (char*)(malloc((strlen(walker->value.u_str)
-                                             + 2) * sizeof(char)));
+            (*prdata)[prlines - 1] = (char*)malloc((strlen(walker->value.u_str)
+                                             + 2) * sizeof(char));
             strcpy((*prdata)[prlines - 1], walker->value.u_str);
             (*prdata)[prlines] = NULL;
         }
@@ -3663,18 +3837,21 @@ int rrd_graph(
         } else if (strncmp(walker->key, "print", 5) == 0) { /* keys are prdate[0..] */
             prlines++;
             if (((*prdata) =
-                 (char**)(rrd_realloc((*prdata),
-                             (prlines + 1) * sizeof(char *)))) == NULL) {
+                 (char**)rrd_realloc((*prdata),
+                             (prlines + 1) * sizeof(char *))) == NULL) {
                 rrd_set_error("realloc prdata");
                 return 0;
             }
-            (*prdata)[prlines - 1] = (char*)(malloc((strlen(walker->value.u_str)
-                                             + 2) * sizeof(char)));
+            (*prdata)[prlines - 1] = (char*)malloc((strlen(walker->value.u_str)
+                                             + 2) * sizeof(char));
             (*prdata)[prlines] = NULL;
             strcpy((*prdata)[prlines - 1], walker->value.u_str);
         } else if (strcmp(walker->key, "image") == 0) {
-            fwrite(walker->value.u_blo.ptr, walker->value.u_blo.size, 1,
-                   (stream ? stream : stdout));
+            if ( fwrite(walker->value.u_blo.ptr, walker->value.u_blo.size, 1,
+                   (stream ? stream : stdout)) == 0 && ferror(stream ? stream : stdout)){
+                rrd_set_error("writing image");
+                return 0;
+            }
         }
         /* skip anything else */
         walker = walker->next;
@@ -3810,6 +3987,7 @@ void rrd_graph_init(
 #endif
 #endif
     im->base = 1000;
+    im->daemon_addr = NULL;
     im->draw_x_grid = 1;
     im->draw_y_grid = 1;
     im->extra_flags = 0;
@@ -3826,6 +4004,10 @@ void rrd_graph_init(
     im->imgformat = IF_PNG;
     im->imginfo = NULL;
     im->lazy = 0;
+    im->legenddirection = TOP_DOWN;
+    im->legendheight = 0;
+    im->legendposition = SOUTH;
+    im->legendwidth = 0;
     im->logarithmic = 0;
     im->maxval = DNAN;
     im->minval = 0;
@@ -3847,6 +4029,10 @@ void rrd_graph_init(
     im->ximg = 0;
     im->xlab_user.minsec = -1;
     im->xorigin = 0;
+    im->xOriginLegend = 0;
+    im->xOriginLegendY = 0;
+    im->xOriginLegendY2 = 0;
+    im->xOriginTitle = 0;
     im->xsize = 400;
     im->ygridstep = DNAN;
     im->yimg = 0;
@@ -3856,6 +4042,10 @@ void rrd_graph_init(
     im->second_axis_legend[0] = '\0';
     im->second_axis_format[0] = '\0'; 
     im->yorigin = 0;
+    im->yOriginLegend = 0;
+    im->yOriginLegendY = 0;
+    im->yOriginLegendY2 = 0;
+    im->yOriginTitle = 0;
     im->ysize = 100;
     im->zoom = 1;
 
@@ -3940,6 +4130,8 @@ void rrd_graph_options(
         { "lazy",               no_argument,       0, 'z'},
         { "zoom",               required_argument, 0, 'm'},
         { "no-legend",          no_argument,       0, 'g'},
+        { "legend-position",    required_argument, 0, 1005},
+        { "legend-direction",   required_argument, 0, 1006},
         { "force-rules-legend", no_argument,       0, 'F'},
         { "only-graph",         no_argument,       0, 'j'},
         { "alt-y-grid",         no_argument,       0, 'Y'},
@@ -3964,6 +4156,7 @@ void rrd_graph_options(
         { "watermark",          required_argument, 0, 'W'},
         { "alt-y-mrtg",         no_argument,       0, 1000},    /* this has no effect it is just here to save old apps from crashing when they use it */
         { "pango-markup",       no_argument,       0, 'P'},
+        { "daemon",             required_argument, 0, 'd'},
         {  0, 0, 0, 0}
 };
 /* *INDENT-ON* */
@@ -3978,7 +4171,7 @@ void rrd_graph_options(
         int       col_start, col_end;
 
         opt = getopt_long(argc, argv,
-                          "s:e:x:y:v:w:h:D:iu:l:rb:oc:n:m:t:f:a:I:zgjFYAMEX:L:S:T:NR:B:W:kP",
+                          "s:e:x:y:v:w:h:D:iu:l:rb:oc:n:m:t:f:a:I:zgjFYAMEX:L:S:T:NR:B:W:kPd:",
                           long_options, &option_index);
         if (opt == EOF)
             break;
@@ -4004,6 +4197,30 @@ void rrd_graph_options(
         case 'g':
             im->extra_flags |= NOLEGEND;
             break;
+        case 1005:
+            if (strcmp(optarg, "north") == 0) {
+                im->legendposition = NORTH;
+            } else if (strcmp(optarg, "west") == 0) {
+                im->legendposition = WEST;
+            } else if (strcmp(optarg, "south") == 0) {
+                im->legendposition = SOUTH;
+            } else if (strcmp(optarg, "east") == 0) {
+                im->legendposition = EAST;
+            } else {
+                rrd_set_error("unknown legend-position '%s'", optarg);
+                return;
+            }
+            break;
+        case 1006:
+            if (strcmp(optarg, "topdown") == 0) {
+                im->legenddirection = TOP_DOWN;
+            } else if (strcmp(optarg, "bottomup") == 0) {
+                im->legenddirection = BOTTOM_UP;
+            } else {
+                rrd_set_error("unknown legend-position '%s'", optarg);
+                return;
+            }
+            break;
         case 'F':
             im->extra_flags |= FORCE_RULES_LEGEND;
             break;
@@ -4350,6 +4567,24 @@ void rrd_graph_options(
             strncpy(im->watermark, optarg, 100);
             im->watermark[99] = '\0';
             break;
+        case 'd':
+        {
+            if (im->daemon_addr != NULL)
+            {
+                rrd_set_error ("You cannot specify --daemon "
+                        "more than once.");
+                return;
+            }
+
+            im->daemon_addr = strdup(optarg);
+            if (im->daemon_addr == NULL)
+            {
+              rrd_set_error("strdup failed");
+              return;
+            }
+
+            break;
+        }
         case '?':
             if (optopt != 0)
                 rrd_set_error("unknown option '%c'", optopt);
@@ -4357,6 +4592,11 @@ void rrd_graph_options(
                 rrd_set_error("unknown option '%s'", argv[optind - 1]);
             return;
         }
+    } /* while (1) */
+
+    {   /* try to connect to rrdcached */
+        int status = rrdc_connect(im->daemon_addr);
+        if (status != 0) return;
     }
     
     pango_cairo_context_set_font_options(pango_layout_get_context(im->layout), im->font_options);
@@ -4524,6 +4764,8 @@ int vdef_parse(
     }
     if (!strcmp("PERCENT", func))
         gdes->vf.op = VDEF_PERCENT;
+    else if (!strcmp("PERCENTNAN", func))
+        gdes->vf.op = VDEF_PERCENTNAN;
     else if (!strcmp("MAXIMUM", func))
         gdes->vf.op = VDEF_MAXIMUM;
     else if (!strcmp("AVERAGE", func))
@@ -4551,6 +4793,7 @@ int vdef_parse(
     };
     switch (gdes->vf.op) {
     case VDEF_PERCENT:
+    case VDEF_PERCENTNAN:
         if (isnan(param)) { /* no parameter given */
             rrd_set_error
                 ("Function '%s' needs parameter in VDEF '%s'\n",
@@ -4616,7 +4859,7 @@ int vdef_calc(
     case VDEF_PERCENT:{
         rrd_value_t *array;
         int       field;
-        if ((array = (rrd_value_t*)(malloc(steps * sizeof(double)))) == NULL) {
+        if ((array = (rrd_value_t*)malloc(steps * sizeof(double))) == NULL) {
             rrd_set_error("malloc VDEV_PERCENT");
             return -1;
         }
@@ -4633,6 +4876,34 @@ int vdef_calc(
             printf("DEBUG: %3li:%10.2f %c\n",
                    step, array[step], step == field ? '*' : ' ');
 #endif
+    }
+        break;
+    case VDEF_PERCENTNAN:{
+        rrd_value_t *array;
+        int       field;
+       /* count number of "valid" values */
+       int nancount=0;
+       for (step = 0; step < steps; step++) {
+         if (!isnan(data[step * src->ds_cnt])) { nancount++; }
+       }
+       /* and allocate it */
+        if ((array = (rrd_value_t*)malloc(nancount * sizeof(double))) == NULL) {
+            rrd_set_error("malloc VDEV_PERCENT");
+            return -1;
+        }
+       /* and fill it in */
+       field=0;
+        for (step = 0; step < steps; step++) {
+           if (!isnan(data[step * src->ds_cnt])) {
+                array[field] = data[step * src->ds_cnt];
+               field++;
+            }
+        }
+        qsort(array, nancount, sizeof(double), vdef_percent_compar);
+        field = (nancount - 1) * dst->vf.param / 100;
+        dst->vf.val = array[field];
+        dst->vf.when = 0;   /* no time component */
+        free(array);
     }
         break;
     case VDEF_MAXIMUM:
index 1cab51e2242d1d6b04ad59e9efab63ff91966f7e..0593d4a931207c1351c3d235c121d160c99a298c 100644 (file)
 #include <cairo-ps.h>
 #include <pango/pangocairo.h>
 
-#ifdef HAVE_LIBGEN_H
-/* for basename */
-#  include <libgen.h>
-#endif
 
 #include "rrd_tool.h"
 #include "rrd_rpncalc.h"
@@ -70,6 +66,7 @@ enum vdef_op_en {
         , VDEF_LSLSLOPE /* least squares line slope */
         , VDEF_LSLINT   /* least squares line y_intercept */
         , VDEF_LSLCORREL    /* least squares line correlation coefficient */
+        , VDEF_PERCENTNAN  /* Nth percentile ignoring NAN*/
 };
 enum text_prop_en { 
     TEXT_PROP_DEFAULT = 0,  /* default settings */
@@ -81,6 +78,8 @@ enum text_prop_en {
     TEXT_PROP_LAST
 };
 
+enum legend_pos{ NORTH = 0, WEST, SOUTH, EAST };
+enum legend_direction { TOP_DOWN = 0, BOTTOM_UP };
 
 enum gfx_if_en { IF_PNG = 0, IF_SVG, IF_EPS, IF_PDF };
 enum gfx_en { GFX_LINE = 0, GFX_AREA, GFX_TEXT };
@@ -227,10 +226,13 @@ typedef struct image_desc_t {
     char     *imginfo;  /* construct an <IMG ... tag and return 
                            as first retval */
     enum gfx_if_en imgformat;   /* image format */
+    char     *daemon_addr;  /* rrdcached connection string */
     int       lazy;     /* only update the image if there is
                            reasonable probablility that the
                            existing one is out of date */
     int       slopemode;    /* connect the dots of the curve directly, not using a stair */
+    enum legend_pos legendposition; /* the position of the legend: north, west, south or east */
+    enum legend_direction legenddirection; /* The direction of the legend topdown or bottomup */
     int       logarithmic;  /* scale the yaxis logarithmic */
     double    force_scale_min;  /* Force a scale--min */
     double    force_scale_max;  /* Force a scale--max */
@@ -238,7 +240,12 @@ typedef struct image_desc_t {
     /* status information */
     int       with_markup;
     long      xorigin, yorigin; /* where is (0,0) of the graph */
+    long      xOriginTitle, yOriginTitle; /* where is the origin of the title */
+    long      xOriginLegendY, yOriginLegendY; /* where is the origin of the y legend */
+    long      xOriginLegendY2, yOriginLegendY2; /* where is the origin of the second y legend */
+    long      xOriginLegend, yOriginLegend; /* where is the origin of the legend */
     long      ximg, yimg;   /* total size of the image */
+    long      legendwidth, legendheight; /* the calculated height and width of the legend */
     size_t    rendered_image_size;
     double    zoom;
     double    magfact;  /* numerical magnitude */
@@ -329,7 +336,7 @@ int       print_calc(
     image_desc_t *);
 int       leg_place(
     image_desc_t *,
-    int *);
+    int);
 int       calc_horizontal_grid(
     image_desc_t *);
 int       draw_horizontal_grid(
index 06309f522a3f49f2c35b211d4f89d01d92a57d1c..456ab95b022fb05f54f09c0e0f5b2f1dd8f8eadd 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  ****************************************************************************
  * rrd_graph_helper.c  commandline parser functions 
  *                     this code initially written by Alex van den Bogaerdt
index 4397f5bad8899db3701dec96957dc3b792be4310..af224fd016717fbc6924cb6088caf671d41a9db6 100644 (file)
@@ -1,20 +1,18 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_hw.c : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection
  *****************************************************************************
  * Initial version by Jake Brutlag, WebTV Networks, 5/1/00
  *****************************************************************************/
 
+#include <stdlib.h>
+
 #include "rrd_tool.h"
 #include "rrd_hw.h"
 #include "rrd_hw_math.h"
 #include "rrd_hw_update.h"
 
-#ifdef WIN32
-#include <stdlib.h>
-#endif
-
 #define hw_dep_idx(rrd, rra_idx) rrd->rra_def[rra_idx].par[RRA_dependent_rra_idx].u_cnt
 
 /* #define DEBUG */
index 58e064542770c9141be1a41d67317a3a2391cbdd..2d2112d35730caf562fb0b0cf814ac982dd6f0a1 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_hw.h : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection
  *****************************************************************************/
index 5aa2895e38b4c68b8fc307202a54f019054e9158..05fbf0231c42a6fe31cf1cd7677029ead0bfb93c 100644 (file)
@@ -4,9 +4,6 @@
 
 #include "rrd_tool.h"
 #include "rrd_hw_math.h"
-#ifndef WIN32
-#include "rrd_config.h"
-#endif
 
 /*****************************************************************************
  * RRDtool supports both the additive and multiplicative Holt-Winters methods. 
index 8a5f700306835280cad2c9bf9801e990c0ab7f94..90a8a5203dcf12b4a21368feb139c4ff70a73cd9 100644 (file)
@@ -4,9 +4,6 @@
 
 #include "rrd_tool.h"
 #include "rrd_format.h"
-#ifndef WIN32
-#include "rrd_config.h"
-#endif
 #include "rrd_hw_math.h"
 #include "rrd_hw_update.h"
 
index adeed3795cb2b976ec987f1ac4c91c6df0ac8de2..36d79e7b79b045323621440f3f880f2df118e955 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Takao Fujiwara, 2008
+ * RRDtool 1.3.2  Copyright by Takao Fujiwara, 2008
  *****************************************************************************
  * rrd_i18n.h   Common Header File
  *****************************************************************************/
@@ -11,18 +11,18 @@ extern    "C" {
 #ifndef _RRD_I18N_H
 #define _RRD_I18N_H
 
-#ifndef _
-/* This is for other GNU distributions with internationalized messages.
-   When compiling libc, the _ macro is predefined.  */
-#if defined(HAVE_LIBINTL_H) && defined(BUILD_LIBINTL)
-#  include <libintl.h>
-#define _(String) gettext (String)
+#ifdef ENABLE_NLS
+#  ifdef _LIBC
+#    include <libintl.h>
+#  else
+#    include "gettext.h"
+#    define _(String) gettext (String)
+#  endif
 #else
-#define _(String) (String)
-#endif
-#define N_(String) (String)
+#  define _(String) (String)
 #endif
 
+#define N_(String) String
 
 #endif
 
index 83364d20688714a006575862bd1bda413ac28f06..3ab1b592da1a323594689713a5b1654ed53318dd 100644 (file)
@@ -1,17 +1,14 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_info  Get Information about the configuration of an RRD
  *****************************************************************************/
 
 #include "rrd_tool.h"
 #include "rrd_rpncalc.h"
+#include "rrd_client.h"
 #include <stdarg.h>
 
-#ifdef WIN32
-#include <stdlib.h>
-#endif
-
 /* proto */
 rrd_info_t *rrd_info(
     int,
@@ -24,10 +21,18 @@ char     *sprintf_alloc(
     char *fmt,
     ...)
 {
-    int       maxlen = 1024 + strlen(fmt);
     char     *str = NULL;
     va_list   argp;
-    str = (char*)(malloc(sizeof(char) * (maxlen + 1)));
+#ifdef HAVE_VASPRINTF
+    va_start( argp, fmt );
+    if (vasprintf( &str, fmt, argp ) == -1){
+        va_end(argp);
+        rrd_set_error ("vasprintf failed.");
+        return(NULL);
+    }
+#else
+    int       maxlen = 1024 + strlen(fmt);
+    str = (char*)malloc(sizeof(char) * (maxlen + 1));
     if (str != NULL) {
         va_start(argp, fmt);
 #ifdef HAVE_VSNPRINTF
@@ -36,6 +41,7 @@ char     *sprintf_alloc(
         vsprintf(str, fmt, argp);
 #endif
     }
+#endif /* HAVE_VASPRINTF */
     va_end(argp);
     return str;
 }
@@ -48,7 +54,7 @@ rrd_info_t
 {
     rrd_info_t *next;
 
-    next = (rrd_info_t*)(malloc(sizeof(*next)));
+    next = (rrd_info_t*)malloc(sizeof(*next));
     next->next = (rrd_info_t *) 0;
     if (info)
         info->next = next;
@@ -65,13 +71,13 @@ rrd_info_t
         next->value.u_int = value.u_int;
         break;
     case RD_I_STR:
-        next->value.u_str = (char*)(malloc(sizeof(char) * (strlen(value.u_str) + 1)));
+        next->value.u_str = (char*)malloc(sizeof(char) * (strlen(value.u_str) + 1));
         strcpy(next->value.u_str, value.u_str);
         break;
     case RD_I_BLO:
         next->value.u_blo.size = value.u_blo.size;
         next->value.u_blo.ptr =
-            (unsigned char*)malloc(sizeof(unsigned char) * value.u_blo.size);
+            (unsigned char *)malloc(sizeof(unsigned char) * value.u_blo.size);
         memcpy(next->value.u_blo.ptr, value.u_blo.ptr, value.u_blo.size);
         break;
     }
@@ -84,18 +90,59 @@ rrd_info_t *rrd_info(
     char **argv)
 {
     rrd_info_t *info;
+    char *opt_daemon = NULL;
+    int status;
 
-    if (argc < 2) {
-        rrd_set_error("please specify an rrd");
-        return NULL;
-    }
+    optind = 0;
+    opterr = 0;         /* initialize getopt */
 
-    info = rrd_info_r(argv[1]);
+    while (42) {
+        int       opt;
+        int       option_index = 0;
+        static struct option long_options[] = {
+            {"daemon", required_argument, 0, 'd'},
+            {0, 0, 0, 0}
+        };
 
-    return (info);
-}
+        opt = getopt_long(argc, argv, "d:", long_options, &option_index);
+
+        if (opt == EOF)
+            break;
+
+        switch (opt) {
+        case 'd':
+            if (opt_daemon != NULL)
+                    free (opt_daemon);
+            opt_daemon = strdup (optarg);
+            if (opt_daemon == NULL)
+            {
+                rrd_set_error ("strdup failed.");
+                return (NULL);
+            }
+            break;
+
+        default:
+            rrd_set_error ("Usage: rrdtool %s [--daemon <addr>] <file>",
+                    argv[0]);
+            return (NULL);
+            break;
+        }
+    }                   /* while (42) */
+
+    if ((argc - optind) != 1) {
+        rrd_set_error ("Usage: rrdtool %s [--daemon <addr>] <file>",
+                argv[0]);
+        return (NULL);
+    }
 
+    status = rrdc_flush_if_daemon(opt_daemon, argv[optind]);
+    if (opt_daemon) free (opt_daemon);
+    if (status) return (NULL);
 
+    info = rrd_info_r(argv[optind]);
+
+    return (info);
+} /* rrd_info_t *rrd_info */
 
 rrd_info_t *rrd_info_r(
     char *filename)
@@ -108,6 +155,7 @@ rrd_info_t *rrd_info_r(
     enum cf_en current_cf;
     enum dst_en current_ds;
 
+    rrd_init(&rrd);
     rrd_file = rrd_open(filename, &rrd, RRD_READONLY);
     if (rrd_file == NULL)
         goto err_free;
@@ -125,6 +173,9 @@ rrd_info_t *rrd_info_r(
     info.u_cnt = rrd.live_head->last_up;
     cd = rrd_info_push(cd, sprintf_alloc("last_update"), RD_I_CNT, info);
 
+    info.u_cnt = rrd_get_header_size(&rrd);
+    cd = rrd_info_push(cd, sprintf_alloc("header_size"), RD_I_CNT, info);
+
     for (i = 0; i < rrd.stat_head->ds_cnt; i++) {
 
         info.u_str = rrd.ds_def[i].dst;
index fa26663a34071f42ca2a427b5ebbcf2d757b3ad6..7e588fbef29cfe9f824a4346e17890992e12e7ee 100644 (file)
@@ -1,12 +1,12 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  * This file:     Copyright 2003 Peter Stamfest <peter@stamfest.at> 
  *                             & Tobias Oetiker
  * Distributed under the GPL
  *****************************************************************************
  * rrd_is_thread_safe.c   Poisons some nasty function calls using GNU cpp
  *****************************************************************************
- * $Id: rrd_is_thread_safe.h 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_is_thread_safe.h 1484 2008-09-06 14:24:43Z oetiker $
  *************************************************************************** */
 
 #ifndef _RRD_IS_THREAD_SAFE_H
index 96d2d09cadef5bb10bb8adc2fdb713a0878384c0..09879c1ba09c13f7fe8d53ef799108aaeb276f64 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_last.c
  *****************************************************************************
@@ -7,19 +7,63 @@
  *****************************************************************************/
 
 #include "rrd_tool.h"
+#include "rrd_client.h"
 
 time_t rrd_last(
     int argc,
     char **argv)
 {
-    if (argc < 2) {
-        rrd_set_error("please specify an rrd");
+    char *opt_daemon = NULL;
+    int status;
+
+    optind = 0;
+    opterr = 0;         /* initialize getopt */
+
+    while (42) {
+        int       opt;
+        int       option_index = 0;
+        static struct option long_options[] = {
+            {"daemon", required_argument, 0, 'd'},
+            {0, 0, 0, 0}
+        };
+
+        opt = getopt_long(argc, argv, "d:", long_options, &option_index);
+
+        if (opt == EOF)
+            break;
+
+        switch (opt) {
+        case 'd':
+            if (opt_daemon != NULL)
+                    free (opt_daemon);
+            opt_daemon = strdup (optarg);
+            if (opt_daemon == NULL)
+            {
+                rrd_set_error ("strdup failed.");
+                return (-1);
+            }
+            break;
+
+        default:
+            rrd_set_error ("Usage: rrdtool %s [--daemon <addr>] <file>",
+                    argv[0]);
+            return (-1);
+            break;
+        }
+    }                   /* while (42) */
+
+    if ((argc - optind) != 1) {
+        rrd_set_error ("Usage: rrdtool %s [--daemon <addr>] <file>",
+                argv[0]);
         return (-1);
     }
 
-    return (rrd_last_r(argv[1]));
-}
+    status = rrdc_flush_if_daemon(opt_daemon, argv[optind]);
+    if (opt_daemon) free(opt_daemon);
+    if (status) return (-1);
 
+    return (rrd_last_r (argv[optind]));
+}
 
 time_t rrd_last_r(
     const char *filename)
@@ -29,6 +73,7 @@ time_t rrd_last_r(
 
     rrd_t     rrd;
 
+    rrd_init(&rrd);
     rrd_file = rrd_open(filename, &rrd, RRD_READONLY);
     if (rrd_file != NULL) {
         lastup = rrd.live_head->last_up;
index 661c5c22daf34e2af45559befea5cc9ddae66a25..1546f6a148237abfe28ee3af68df3bd02f72b955 100644 (file)
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
+ *                Copyright by Florian Forster, 2008
  *****************************************************************************
  * rrd_lastupdate  Get the last datum entered for each DS
  *****************************************************************************/
 
 #include "rrd_tool.h"
 #include "rrd_rpncalc.h"
+#include "rrd_client.h"
 #include <stdarg.h>
 
-#ifdef WIN32
-#include <stdlib.h>
-#endif
-
-int rrd_lastupdate(
-    int argc,
-    char **argv,
-    time_t *last_update,
-    unsigned long *ds_cnt,
-    char ***ds_namv,
-    char ***last_ds)
+int rrd_lastupdate (int argc, char **argv)
+{
+    time_t    last_update;
+    char    **ds_names;
+    char    **last_ds;
+    unsigned long ds_count, i;
+    int status;
+
+    char *opt_daemon = NULL;
+
+    optind = 0;
+    opterr = 0;         /* initialize getopt */
+
+    while (42) {
+        int       opt;
+        int       option_index = 0;
+        static struct option long_options[] = {
+            {"daemon", required_argument, 0, 'd'},
+            {0, 0, 0, 0}
+        };
+
+        opt = getopt_long (argc, argv, "d:", long_options, &option_index);
+
+        if (opt == EOF)
+            break;
+
+        switch (opt) {
+        case 'd':
+            if (opt_daemon != NULL)
+                    free (opt_daemon);
+            opt_daemon = strdup (optarg);
+            if (opt_daemon == NULL)
+            {
+                rrd_set_error ("strdup failed.");
+                return (-1);
+            }
+            break;
+
+        default:
+            rrd_set_error ("Usage: rrdtool %s [--daemon <addr>] <file>",
+                    argv[0]);
+            return (-1);
+            break;
+        }
+    }                   /* while (42) */
+
+    if ((argc - optind) != 1) {
+        rrd_set_error ("Usage: rrdtool %s [--daemon <addr>] <file>",
+                argv[0]);
+        return (-1);
+    }
+
+    status = rrdc_flush_if_daemon(opt_daemon, argv[optind]);
+    if (opt_daemon) free (opt_daemon);
+    if (status) return (-1);
+
+    status = rrd_lastupdate_r (argv[optind],
+            &last_update, &ds_count, &ds_names, &last_ds);
+    if (status != 0)
+        return (status);
+
+    for (i = 0; i < ds_count; i++)
+        printf(" %s", ds_names[i]);
+    printf ("\n\n");
+
+    printf ("%10lu:", last_update);
+    for (i = 0; i < ds_count; i++) {
+        printf(" %s", last_ds[i]);
+        free(last_ds[i]);
+        free(ds_names[i]);
+    }
+    printf("\n");
+
+    free(last_ds);
+    free(ds_names);
+
+    return (0);
+} /* int rrd_lastupdate */
+
+int rrd_lastupdate_r(const char *filename,
+        time_t *ret_last_update,
+        unsigned long *ret_ds_count,
+        char ***ret_ds_names,
+        char ***ret_last_ds)
 {
     unsigned long i = 0;
-    char     *filename;
     rrd_t     rrd;
     rrd_file_t *rrd_file;
 
-    if (argc < 2) {
-        rrd_set_error("please specify an rrd");
-        goto err_out;
+    rrd_init(&rrd);
+    rrd_file = rrd_open(filename, &rrd, RRD_READONLY);
+    if (rrd_file == NULL) {
+        rrd_free(&rrd);
+        return (-1);
     }
-    filename = argv[1];
 
-    rrd_file = rrd_open(filename, &rrd, RRD_READONLY);
-    if (rrd_file == NULL)
-        goto err_free;
-
-    *last_update = rrd.live_head->last_up;
-    *ds_cnt = rrd.stat_head->ds_cnt;
-    if (((*ds_namv) =
-         (char **) malloc(rrd.stat_head->ds_cnt * sizeof(char *))) == NULL) {
-        rrd_set_error("malloc fetch ds_namv array");
-        goto err_close;
+    *ret_last_update = rrd.live_head->last_up;
+    *ret_ds_count = rrd.stat_head->ds_cnt;
+    *ret_ds_names = (char **) malloc (rrd.stat_head->ds_cnt * sizeof(char *));
+    if (*ret_ds_names == NULL) {
+        rrd_set_error ("malloc fetch ret_ds_names array");
+        rrd_close (rrd_file);
+        rrd_free (&rrd);
+        return (-1);
     }
+    memset (*ret_ds_names, 0, rrd.stat_head->ds_cnt * sizeof(char *));
 
-    if (((*last_ds) =
-         (char **) malloc(rrd.stat_head->ds_cnt * sizeof(char *))) == NULL) {
-        rrd_set_error("malloc fetch last_ds array");
-        goto err_free_ds_namv;
+    *ret_last_ds = (char **) malloc (rrd.stat_head->ds_cnt * sizeof(char *));
+    if (*ret_last_ds == NULL) {
+        rrd_set_error ("malloc fetch ret_last_ds array");
+        free (*ret_ds_names);
+        *ret_ds_names = NULL;
+        rrd_close (rrd_file);
+        rrd_free (&rrd);
+        return (-1);
     }
+    memset (*ret_last_ds, 0, rrd.stat_head->ds_cnt * sizeof(char *));
 
     for (i = 0; i < rrd.stat_head->ds_cnt; i++) {
-        (*ds_namv)[i] = sprintf_alloc("%s", rrd.ds_def[i].ds_nam);
-        (*last_ds)[i] = sprintf_alloc("%s", rrd.pdp_prep[i].last_ds);
+        (*ret_ds_names)[i] = sprintf_alloc("%s", rrd.ds_def[i].ds_nam);
+        (*ret_last_ds)[i] = sprintf_alloc("%s", rrd.pdp_prep[i].last_ds);
+
+        if (((*ret_ds_names)[i] == NULL) || ((*ret_last_ds)[i] == NULL))
+            break;
+    }
+
+    /* Check if all names and values could be copied and free everything if
+     * not. */
+    if (i < rrd.stat_head->ds_cnt) {
+        rrd_set_error ("sprintf_alloc failed");
+        for (i = 0; i < rrd.stat_head->ds_cnt; i++) {
+            if ((*ret_ds_names)[i] != NULL)
+            {
+                free ((*ret_ds_names)[i]);
+                (*ret_ds_names)[i] = NULL;
+            }
+            if ((*ret_last_ds)[i] != NULL)
+            {
+                free ((*ret_last_ds)[i]);
+                (*ret_last_ds)[i] = NULL;
+            }
+        }
+        free (*ret_ds_names);
+        *ret_ds_names = NULL;
+        free (*ret_last_ds);
+        *ret_last_ds = NULL;
+        rrd_close (rrd_file);
+        rrd_free (&rrd);
+        return (-1);
     }
 
     rrd_free(&rrd);
     rrd_close(rrd_file);
     return (0);
-
-  err_free_ds_namv:
-    free(*ds_namv);
-  err_close:
-    rrd_close(rrd_file);
-  err_free:
-    rrd_free(&rrd);
-  err_out:
-    return (-1);
-}
+} /* int rrd_lastupdate_r */
index 982738fdc500e3b50b9eab7ce9d613db9e60e3c4..89832039aeef70918595b2cfe39bbe0498553eda 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  * This file:     Copyright 2003 Peter Stamfest <peter@stamfest.at> 
  *                             & Tobias Oetiker
  * Distributed under the GPL
@@ -7,7 +7,7 @@
  * rrd_not_thread_safe.c   Contains routines used when thread safety is not
  *                         an issue
  *****************************************************************************
- * $Id: rrd_not_thread_safe.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_not_thread_safe.c 1484 2008-09-06 14:24:43Z oetiker $
  *************************************************************************** */
 #include "rrd.h"
 #include "rrd_tool.h"
index d4730e363ae1dbfe56a3743d0adee7e9a72fa663..8710dad69b1de20501622197a69420b9a6372ccb 100644 (file)
@@ -1,23 +1,41 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_open.c  Open an RRD File
  *****************************************************************************
- * $Id: rrd_open.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_open.c 1851 2009-06-07 14:27:52Z oetiker $
  *****************************************************************************/
 
-#include "rrd_tool.h"
-#include "unused.h"
-
 #ifdef WIN32
 #include <stdlib.h>
 #include <fcntl.h>
 #include <sys/stat.h>
+#endif
+
+#ifdef HAVE_BROKEN_MS_ASYNC
+#include <sys/types.h>
 #include <utime.h>
 #endif
 
+#include "rrd_tool.h"
+#include "unused.h"
 #define MEMBLK 8192
 
+#ifdef WIN32
+#define        _LK_UNLCK       0       /* Unlock */
+#define        _LK_LOCK        1       /* Lock */
+#define        _LK_NBLCK       2       /* Non-blocking lock */
+#define        _LK_RLCK        3       /* Lock for read only */
+#define        _LK_NBRLCK      4       /* Non-blocking lock for read only */
+
+
+#define        LK_UNLCK        _LK_UNLCK
+#define        LK_LOCK         _LK_LOCK
+#define        LK_NBLCK        _LK_NBLCK
+#define        LK_RLCK         _LK_RLCK
+#define        LK_NBRLCK       _LK_NBRLCK
+#endif
+
 /* DEBUG 2 prints information obtained via mincore(2) */
 #define DEBUG 1
 /* do not calculate exact madvise hints but assume 1 page for headers and
@@ -46,7 +64,7 @@
                rrd_set_error(#dst " malloc"); \
                goto out_nullify_head; \
        } \
-        got = read (rrd_file->fd, dst, wanted); \
+        got = read (rrd_simple_file->fd, dst, wanted); \
        if (got != wanted) { \
                rrd_set_error("short read while reading header " #dst); \
                 goto out_nullify_head; \
  * positioned to the first cdp in the first rra.
  * In the error path of rrd_open, only rrd_free(&rrd) has to be called
  * before returning an error. Do not call rrd_close upon failure of rrd_open.
+ * If creating a new file, the parameter rrd must be initialised with
+ * details of the file content.
+ * If opening an existing file, then use rrd must be initialised by
+ * rrd_init(rrd) prior to invoking rrd_open
  */
 
 rrd_file_t *rrd_open(
@@ -73,33 +95,35 @@ rrd_file_t *rrd_open(
     rrd_t *rrd,
     unsigned rdwr)
 {
+    unsigned long ui;
     int       flags = 0;
-
-/* Win32 can't use S_IRUSR flag */
-#ifndef WIN32
-    mode_t    mode = S_IRUSR;
-#else
-    int mode = 0;
-#endif
     int       version;
 
 #ifdef HAVE_MMAP
     ssize_t   _page_size = sysconf(_SC_PAGESIZE);
-    int       mm_prot = PROT_READ, mm_flags = 0;
     char     *data = MAP_FAILED;
 #endif
     off_t     offset = 0;
     struct stat statb;
     rrd_file_t *rrd_file = NULL;
-    off_t     newfile_size = 0;
+    rrd_simple_file_t *rrd_simple_file = NULL;
+    size_t     newfile_size = 0;
+    size_t header_len, value_cnt, data_len;
 
-    if (rdwr & RRD_CREAT) {
-        /* yes bad inline signaling alert, we are using the
-           floatcookie to pass the size in ... only used in resize */
-        newfile_size = (off_t) rrd->stat_head->float_cookie;
-        free(rrd->stat_head);
+    /* Are we creating a new file? */
+    if((rdwr & RRD_CREAT) && (rrd->stat_head != NULL))
+    {
+        header_len = rrd_get_header_size(rrd);
+
+        value_cnt = 0;
+        for (ui = 0; ui < rrd->stat_head->rra_cnt; ui++)
+            value_cnt += rrd->stat_head->ds_cnt * rrd->rra_def[ui].row_cnt;
+
+        data_len = sizeof(rrd_value_t) * value_cnt;
+
+        newfile_size = header_len + data_len;
     }
-    rrd_init(rrd);
+    
     rrd_file = (rrd_file_t*)malloc(sizeof(rrd_file_t));
     if (rrd_file == NULL) {
         rrd_set_error("allocating rrd_file descriptor for '%s'", file_name);
@@ -107,6 +131,14 @@ rrd_file_t *rrd_open(
     }
     memset(rrd_file, 0, sizeof(rrd_file_t));
 
+    rrd_file->pvt = malloc(sizeof(rrd_simple_file_t));
+    if(rrd_file->pvt == NULL) {
+        rrd_set_error("allocating rrd_simple_file for '%s'", file_name);
+        return NULL;
+    }
+    memset(rrd_file->pvt, 0, sizeof(rrd_simple_file_t));
+    rrd_simple_file = (rrd_simple_file_t *)rrd_file->pvt;
+
 #ifdef DEBUG
     if ((rdwr & (RRD_READONLY | RRD_READWRITE)) ==
         (RRD_READONLY | RRD_READWRITE)) {
@@ -115,24 +147,27 @@ rrd_file_t *rrd_open(
         exit(-1);
     }
 #endif
+
+#ifdef HAVE_MMAP
+    rrd_simple_file->mm_prot = PROT_READ;
+    rrd_simple_file->mm_flags = 0;
+#endif
+
     if (rdwr & RRD_READONLY) {
         flags |= O_RDONLY;
 #ifdef HAVE_MMAP
-        mm_flags = MAP_PRIVATE;
+        rrd_simple_file->mm_flags = MAP_PRIVATE;
 # ifdef MAP_NORESERVE
-        mm_flags |= MAP_NORESERVE;  /* readonly, so no swap backing needed */
+        rrd_simple_file->mm_flags |= MAP_NORESERVE;  /* readonly, so no swap backing needed */
 # endif
 #endif
     } else {
         if (rdwr & RRD_READWRITE) {
-#ifndef WIN32 // Win32 can't use this mode
-            mode |= S_IWUSR;
-#endif
             flags |= O_RDWR;
-#ifdef HAVE_MMAP
-            mm_flags = MAP_SHARED;
-            mm_prot |= PROT_WRITE;
-#endif
+#ifdef HAVE_MMAP 
+            rrd_simple_file->mm_flags = MAP_SHARED; 
+            rrd_simple_file->mm_prot |= PROT_WRITE; 
+#endif 
         }
         if (rdwr & RRD_CREAT) {
             flags |= (O_CREAT | O_TRUNC);
@@ -140,39 +175,39 @@ rrd_file_t *rrd_open(
     }
     if (rdwr & RRD_READAHEAD) {
 #ifdef MAP_POPULATE
-        mm_flags |= MAP_POPULATE;   /* populate ptes and data */
+        rrd_simple_file->mm_flags |= MAP_POPULATE;   /* populate ptes and data */
 #endif
 #if defined MAP_NONBLOCK
-        mm_flags |= MAP_NONBLOCK;   /* just populate ptes */
+        rrd_simple_file->mm_flags |= MAP_NONBLOCK;   /* just populate ptes */
 #endif
     }
 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
     flags |= O_BINARY;
 #endif
 
-    if ((rrd_file->fd = open(file_name, flags, mode)) < 0) {
+    if ((rrd_simple_file->fd = open(file_name, flags, 0666)) < 0) {
         rrd_set_error("opening '%s': %s", file_name, rrd_strerror(errno));
         goto out_free;
     }
 
 #ifdef HAVE_MMAP
 #ifdef HAVE_BROKEN_MS_ASYNC
-    if (rdwr & RRD_READWRITE) {
-        /* some unices, the files mtime does not get update
-           on msync MS_ASYNC, in order to help them,
-           we update the the timestamp at this point.
-           The thing happens pretty 'close' to the open
-           call so the chances of a race should be minimal.
-              
-           Maybe ask your vendor to fix your OS ... */
-           utime(file_name,NULL);
+    if (rdwr & RRD_READWRITE) {    
+        /* some unices, the files mtime does not get update    
+           on msync MS_ASYNC, in order to help them,     
+           we update the the timestamp at this point.      
+           The thing happens pretty 'close' to the open    
+           call so the chances of a race should be minimal.    
+                
+           Maybe ask your vendor to fix your OS ... */    
+           utime(file_name,NULL);  
     }
 #endif    
 #endif
 
     /* Better try to avoid seeks as much as possible. stat may be heavy but
      * many concurrent seeks are even worse.  */
-    if (newfile_size == 0 && ((fstat(rrd_file->fd, &statb)) < 0)) {
+    if (newfile_size == 0 && ((fstat(rrd_simple_file->fd, &statb)) < 0)) {
         rrd_set_error("fstat '%s': %s", file_name, rrd_strerror(errno));
         goto out_close;
     }
@@ -180,30 +215,35 @@ rrd_file_t *rrd_open(
         rrd_file->file_len = statb.st_size;
     } else {
         rrd_file->file_len = newfile_size;
-        lseek(rrd_file->fd, newfile_size - 1, SEEK_SET);
-        write(rrd_file->fd, "\0", 1);   /* poke */
-        lseek(rrd_file->fd, 0, SEEK_SET);
+        lseek(rrd_simple_file->fd, newfile_size - 1, SEEK_SET);
+        if ( write(rrd_simple_file->fd, "\0", 1) == -1){    /* poke */
+            rrd_set_error("write '%s': %s", file_name, rrd_strerror(errno));
+            goto out_close;
+        }
+        lseek(rrd_simple_file->fd, 0, SEEK_SET);
     }
 #ifdef HAVE_POSIX_FADVISE
     /* In general we need no read-ahead when dealing with rrd_files.
        When we stop reading, it is highly unlikely that we start up again.
        In this manner we actually save time and diskaccess (and buffer cache).
        Thanks to Dave Plonka for the Idea of using POSIX_FADV_RANDOM here. */
-    posix_fadvise(rrd_file->fd, 0, 0, POSIX_FADV_RANDOM);
+    posix_fadvise(rrd_simple_file->fd, 0, 0, POSIX_FADV_RANDOM);
 #endif
 
 /*
         if (rdwr & RRD_READWRITE)
         {
-           if (setvbuf((rrd_file->fd),NULL,_IONBF,2)) {
+           if (setvbuf((rrd_simple_file->fd),NULL,_IONBF,2)) {
                   rrd_set_error("failed to disable the stream buffer\n");
                   return (-1);
            }
         }
 */
+
 #ifdef HAVE_MMAP
-    data = mmap(0, rrd_file->file_len, mm_prot, mm_flags,
-                rrd_file->fd, offset);
+    data = mmap(0, rrd_file->file_len, 
+        rrd_simple_file->mm_prot, rrd_simple_file->mm_flags,
+        rrd_simple_file->fd, offset);
 
     /* lets see if the first read worked */
     if (data == MAP_FAILED) {
@@ -211,7 +251,7 @@ rrd_file_t *rrd_open(
                       rrd_strerror(errno));
         goto out_close;
     }
-    rrd_file->file_start = data;
+    rrd_simple_file->file_start = data;
     if (rdwr & RRD_CREAT) {
         memset(data, DNAN, newfile_size - 1);
         goto out_done;
@@ -222,12 +262,14 @@ rrd_file_t *rrd_open(
 #ifdef USE_MADVISE
     if (rdwr & RRD_COPY) {
         /* We will read everything in a moment (copying) */
-        madvise(data, rrd_file->file_len, MADV_WILLNEED | MADV_SEQUENTIAL);
+        madvise(data, rrd_file->file_len, MADV_WILLNEED );
+        madvise(data, rrd_file->file_len, MADV_SEQUENTIAL );
     } else {
         /* We do not need to read anything in for the moment */
         madvise(data, rrd_file->file_len, MADV_RANDOM);
         /* the stat_head will be needed soonish, so hint accordingly */
-        madvise(data, sizeof(stat_head_t), MADV_WILLNEED | MADV_RANDOM);
+        madvise(data, sizeof(stat_head_t), MADV_WILLNEED);
+        madvise(data, sizeof(stat_head_t), MADV_RANDOM);
     }
 #endif
 
@@ -305,12 +347,11 @@ rrd_file_t *rrd_open(
 
     {
       unsigned long row_cnt = 0;
-      unsigned long i;
 
-      for (i=0; i<rrd->stat_head->rra_cnt; i++)
-        row_cnt += rrd->rra_def[i].row_cnt;
+      for (ui=0; ui<rrd->stat_head->rra_cnt; ui++)
+        row_cnt += rrd->rra_def[ui].row_cnt;
 
-      off_t correct_len = rrd_file->header_len +
+      size_t  correct_len = rrd_file->header_len +
         sizeof(rrd_value_t) * row_cnt * rrd->stat_head->ds_cnt;
 
       if (correct_len > rrd_file->file_len)
@@ -330,8 +371,10 @@ rrd_file_t *rrd_open(
     if (data != MAP_FAILED)
       munmap(data, rrd_file->file_len);
 #endif
-    close(rrd_file->fd);
+
+    close(rrd_simple_file->fd);
   out_free:
+    free(rrd_file->pvt);
     free(rrd_file);
     return NULL;
 }
@@ -344,9 +387,11 @@ void mincore_print(
     rrd_file_t *rrd_file,
     char *mark)
 {
+    rrd_simple_file_t *rrd_simple_file;
+    rrd_simple_file = (rrd_simple_file_t *)rrd_file->pvt;
 #ifdef HAVE_MMAP
     /* pretty print blocks in core */
-    off_t     off;
+    size_t     off;
     unsigned char *vec;
     ssize_t   _page_size = sysconf(_SC_PAGESIZE);
 
@@ -355,7 +400,7 @@ void mincore_print(
     vec = malloc(off);
     if (vec != NULL) {
         memset(vec, 0, off);
-        if (mincore(rrd_file->file_start, rrd_file->file_len, vec) == 0) {
+        if (mincore(rrd_simple_file->file_start, rrd_file->file_len, vec) == 0) {
             int       prev;
             unsigned  is_in = 0, was_in = 0;
 
@@ -382,17 +427,55 @@ void mincore_print(
 }
 #endif                          /* defined DEBUG && DEBUG > 1 */
 
+/*
+ * get exclusive lock to whole file.
+ * lock gets removed when we close the file
+ *
+ * returns 0 on success
+ */
+int rrd_lock(
+    rrd_file_t *rrd_file)
+{
+    int       rcstat;
+    rrd_simple_file_t *rrd_simple_file;
+    rrd_simple_file = (rrd_simple_file_t *)rrd_file->pvt;
+
+    {
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
+        struct _stat st;
+
+        if (_fstat(rrd_simple_file->fd, &st) == 0) {
+            rcstat = _locking(rrd_simple_file->fd, _LK_NBLCK, st.st_size);
+        } else {
+            rcstat = -1;
+        }
+#else
+        struct flock lock;
+
+        lock.l_type = F_WRLCK;  /* exclusive write lock */
+        lock.l_len = 0; /* whole file */
+        lock.l_start = 0;   /* start of file */
+        lock.l_whence = SEEK_SET;   /* end of file */
+
+        rcstat = fcntl(rrd_simple_file->fd, F_SETLK, &lock);
+#endif
+    }
+
+    return (rcstat);
+}
+
 
 /* drop cache except for the header and the active pages */
 void rrd_dontneed(
     rrd_file_t *rrd_file,
     rrd_t *rrd)
 {
+    rrd_simple_file_t *rrd_simple_file = (rrd_simple_file_t *)rrd_file->pvt;
 #if defined USE_MADVISE || defined HAVE_POSIX_FADVISE
-    unsigned long dontneed_start;
-    unsigned long rra_start;
-    unsigned long active_block;
-    unsigned long i;
+    size_t dontneed_start;
+    size_t rra_start;
+    size_t active_block;
+    size_t i;
     ssize_t   _page_size = sysconf(_SC_PAGESIZE);
 
     if (rrd_file == NULL) {
@@ -416,12 +499,12 @@ void rrd_dontneed(
                        * rrd->stat_head->ds_cnt * sizeof(rrd_value_t));
         if (active_block > dontneed_start) {
 #ifdef USE_MADVISE
-            madvise(rrd_file->file_start + dontneed_start,
+            madvise(rrd_simple_file->file_start + dontneed_start,
                     active_block - dontneed_start - 1, MADV_DONTNEED);
 #endif
 /* in linux at least only fadvise DONTNEED seems to purge pages from cache */
 #ifdef HAVE_POSIX_FADVISE
-            posix_fadvise(rrd_file->fd, dontneed_start,
+            posix_fadvise(rrd_simple_file->fd, dontneed_start,
                           active_block - dontneed_start - 1,
                           POSIX_FADV_DONTNEED);
 #endif
@@ -441,11 +524,11 @@ void rrd_dontneed(
 
     if (dontneed_start < rrd_file->file_len) {
 #ifdef USE_MADVISE
-           madvise(rrd_file->file_start + dontneed_start,
+           madvise(rrd_simple_file->file_start + dontneed_start,
                    rrd_file->file_len - dontneed_start, MADV_DONTNEED);
 #endif
 #ifdef HAVE_POSIX_FADVISE
-           posix_fadvise(rrd_file->fd, dontneed_start,
+           posix_fadvise(rrd_simple_file->fd, dontneed_start,
                          rrd_file->file_len - dontneed_start,
                          POSIX_FADV_DONTNEED);
 #endif
@@ -454,7 +537,7 @@ void rrd_dontneed(
 #if defined DEBUG && DEBUG > 1
     mincore_print(rrd_file, "after");
 #endif
-#endif                          /* without madvise and posix_fadvise ist does not make much sense todo anything */
+#endif                          /* without madvise and posix_fadvise it does not make much sense todo anything */
 }
 
 
@@ -464,19 +547,22 @@ void rrd_dontneed(
 int rrd_close(
     rrd_file_t *rrd_file)
 {
+    rrd_simple_file_t *rrd_simple_file;
+    rrd_simple_file = (rrd_simple_file_t *)rrd_file->pvt;
     int       ret;
 
 #ifdef HAVE_MMAP
-    ret = msync(rrd_file->file_start, rrd_file->file_len, MS_ASYNC);
+    ret = msync(rrd_simple_file->file_start, rrd_file->file_len, MS_ASYNC);
     if (ret != 0)
         rrd_set_error("msync rrd_file: %s", rrd_strerror(errno));
-    ret = munmap(rrd_file->file_start, rrd_file->file_len);
+    ret = munmap(rrd_simple_file->file_start, rrd_file->file_len);
     if (ret != 0)
         rrd_set_error("munmap rrd_file: %s", rrd_strerror(errno));
 #endif
-    ret = close(rrd_file->fd);
+    ret = close(rrd_simple_file->fd);
     if (ret != 0)
         rrd_set_error("closing file: %s", rrd_strerror(errno));
+    free(rrd_file->pvt);
     free(rrd_file);
     rrd_file = NULL;
     return ret;
@@ -491,6 +577,8 @@ off_t rrd_seek(
     int whence)
 {
     off_t     ret = 0;
+    rrd_simple_file_t *rrd_simple_file;
+    rrd_simple_file = (rrd_simple_file_t *)rrd_file->pvt;
 
 #ifdef HAVE_MMAP
     if (whence == SEEK_SET)
@@ -500,7 +588,7 @@ off_t rrd_seek(
     else if (whence == SEEK_END)
         rrd_file->pos = rrd_file->file_len + off;
 #else
-    ret = lseek(rrd_file->fd, off, whence);
+    ret = lseek(rrd_simple_file->fd, off, whence);
     if (ret < 0)
         rrd_set_error("lseek: %s", rrd_strerror(errno));
     rrd_file->pos = ret;
@@ -527,6 +615,7 @@ ssize_t rrd_read(
     void *buf,
     size_t count)
 {
+    rrd_simple_file_t *rrd_simple_file = (rrd_simple_file_t *)rrd_file->pvt;
 #ifdef HAVE_MMAP
     size_t    _cnt = count;
     ssize_t   _surplus;
@@ -541,14 +630,14 @@ ssize_t rrd_read(
     }
     if (_cnt == 0)
         return 0;       /* EOF */
-    buf = memcpy(buf, rrd_file->file_start + rrd_file->pos, _cnt);
+    buf = memcpy(buf, rrd_simple_file->file_start + rrd_file->pos, _cnt);
 
     rrd_file->pos += _cnt;  /* mimmic read() semantics */
     return _cnt;
 #else
     ssize_t   ret;
 
-    ret = read(rrd_file->fd, buf, count);
+    ret = read(rrd_simple_file->fd, buf, count);
     if (ret > 0)
         rrd_file->pos += ret;   /* mimmic read() semantics */
     return ret;
@@ -557,7 +646,7 @@ ssize_t rrd_read(
 
 
 /* Write count bytes from buffer buf to the current position
- * rrd_file->pos of rrd_file->fd.
+ * rrd_file->pos of rrd_simple_file->fd.
  * Returns the number of bytes written or <0 on error.  */
 
 ssize_t rrd_write(
@@ -565,16 +654,24 @@ ssize_t rrd_write(
     const void *buf,
     size_t count)
 {
+    rrd_simple_file_t *rrd_simple_file = (rrd_simple_file_t *)rrd_file->pvt;
 #ifdef HAVE_MMAP
+    size_t old_size = rrd_file->file_len;
     if (count == 0)
         return 0;
     if (buf == NULL)
         return -1;      /* EINVAL */
-    memcpy(rrd_file->file_start + rrd_file->pos, buf, count);
+    
+    if((rrd_file->pos + count) > old_size)
+    {
+        rrd_set_error("attempting to write beyond end of file");
+        return -1;
+    }
+    memcpy(rrd_simple_file->file_start + rrd_file->pos, buf, count);
     rrd_file->pos += count;
     return count;       /* mimmic write() semantics */
 #else
-    ssize_t   _sz = write(rrd_file->fd, buf, count);
+    ssize_t   _sz = write(rrd_simple_file->fd, buf, count);
 
     if (_sz > 0)
         rrd_file->pos += _sz;
@@ -583,24 +680,13 @@ ssize_t rrd_write(
 }
 
 
-/* flush all data pending to be written to FD.  */
-
+/* this is a leftover from the old days, it serves no purpose
+   and is therefore turned into a no-op */
 void rrd_flush(
-    rrd_file_t *rrd_file)
+    rrd_file_t *rrd_file  __attribute__((unused)))
 {
-/*
- * Win32 can only flush files by FlushFileBuffers function, 
- * but it works with HANDLE hFile, not FILE. So skipping
- */
-#ifndef WIN32
-    if (fdatasync(rrd_file->fd) != 0) {
-        rrd_set_error("flushing fd %d: %s", rrd_file->fd,
-                      rrd_strerror(errno));
-    }
-#endif
 }
 
-
 /* Initialize RRD header.  */
 
 void rrd_init(
@@ -652,3 +738,32 @@ void rrd_freemem(
 {
     free(mem);
 }
+
+/*
+ * rra_update informs us about the RRAs being updated
+ * The low level storage API may use this information for
+ * aligning RRAs within stripes, or other performance enhancements
+ */
+void rrd_notify_row(
+    rrd_file_t *rrd_file  __attribute__((unused)),
+    int rra_idx  __attribute__((unused)),
+    unsigned long rra_row  __attribute__((unused)),
+    time_t rra_time  __attribute__((unused)))
+{
+}
+
+/*
+ * This function is called when creating a new RRD
+ * The storage implementation can use this opportunity to select
+ * a sensible starting row within the file.
+ * The default implementation is random, to ensure that all RRAs
+ * don't change to a new disk block at the same time
+ */
+unsigned long rrd_select_initial_row(
+    rrd_file_t *rrd_file  __attribute__((unused)),
+    int rra_idx  __attribute__((unused)),
+    rra_def_t *rra
+    )
+{
+    return rrd_random() % rra->row_cnt;
+}
index 6bf7d68f846d3d822bcb30a397516479cf85d2c9..f3a8e2ec094b8d049303b3a4655c2c4bc35b200a 100644 (file)
 
 /* Local headers */
 
-#include "rrd_tool.h"
 #include <stdarg.h>
-
-#ifdef WIN32
 #include <stdlib.h>
 #include <ctype.h>
-#endif
+
+#include "rrd_tool.h"
 
 /* Structures and unions */
 
index 771209f438f37d679b65a97e3e7db234bcb31a63..2dc47b0ce058cbde9de263f101a7bb87e46b226e 100644 (file)
@@ -1,16 +1,14 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_resize.c Alters size of an RRA
  *****************************************************************************
  * Initial version by Alex van den Bogaerdt
  *****************************************************************************/
 
-#include "rrd_tool.h"
-
-#ifdef WIN32
 #include <stdlib.h>
-#endif
+
+#include "rrd_tool.h"
 
 int rrd_resize(
     int argc,
@@ -59,6 +57,7 @@ int rrd_resize(
         modify = -modify;
 
 
+    rrd_init(&rrdold);
     rrd_file = rrd_open(infilename, &rrdold, RRD_READWRITE | RRD_COPY);
     if (rrd_file == NULL) {
         rrd_free(&rrdold);
@@ -87,16 +86,31 @@ int rrd_resize(
             rrd_close(rrd_file);
             return (-1);
         }
-    /* the size of the new file */
-    /* yes we are abusing the float cookie for this, aargh */
+
+    rrd_init(&rrdnew);
+    /* These need to be initialised before calling rrd_open() with 
+       the RRD_CREATE flag */
+
     if ((rrdnew.stat_head = (stat_head_t*)calloc(1, sizeof(stat_head_t))) == NULL) {
         rrd_set_error("allocating stat_head for new RRD");
         rrd_free(&rrdold);
         rrd_close(rrd_file);
         return (-1);
     }
-    rrdnew.stat_head->float_cookie = rrd_file->file_len +
-        (rrdold.stat_head->ds_cnt * sizeof(rrd_value_t) * modify);
+    memcpy(rrdnew.stat_head,rrdold.stat_head,sizeof(stat_head_t));
+
+    if ((rrdnew.rra_def = (rra_def_t *)malloc(sizeof(rra_def_t) * rrdold.stat_head->rra_cnt)) == NULL) {
+        rrd_set_error("allocating rra_def for new RRD");
+        rrd_free(&rrdnew);
+        rrd_free(&rrdold);
+        rrd_close(rrd_file);
+        return (-1);
+    }
+    memcpy(rrdnew.rra_def,rrdold.rra_def,sizeof(rra_def_t) * rrdold.stat_head->rra_cnt);
+
+    /* Set this so that the file will be created with the correct size */
+    rrdnew.rra_def[target_rra].row_cnt += modify;
+
     rrd_out_file = rrd_open(outfilename, &rrdnew, RRD_READWRITE | RRD_CREAT);
     if (rrd_out_file == NULL) {
         rrd_set_error("Can't create '%s': %s", outfilename,
@@ -116,16 +130,7 @@ int rrd_resize(
         return (-1);
     }
 /*XXX: do one write for those parts of header that are unchanged */
-    if ((rrdnew.stat_head = (stat_head_t*)malloc(sizeof(stat_head_t))) == NULL) {
-        rrd_set_error("allocating stat_head for new RRD");
-        rrd_free(&rrdnew);
-        rrd_free(&rrdold);
-        rrd_close(rrd_file);
-        rrd_close(rrd_out_file);
-        return (-1);
-    }
-
-    if ((rrdnew.rra_ptr = (rra_ptr_t*)malloc(sizeof(rra_ptr_t) * rrdold.stat_head->rra_cnt)) == NULL) {
+    if ((rrdnew.rra_ptr = (rra_ptr_t *)malloc(sizeof(rra_ptr_t) * rrdold.stat_head->rra_cnt)) == NULL) {
         rrd_set_error("allocating rra_ptr for new RRD");
         rrd_free(&rrdnew);
         rrd_free(&rrdold);
@@ -134,71 +139,16 @@ int rrd_resize(
         return (-1);
     }
 
-    if ((rrdnew.rra_def = (rra_def_t*)malloc(sizeof(rra_def_t) * rrdold.stat_head->rra_cnt)) == NULL) {
-        rrd_set_error("allocating rra_def for new RRD");
-        rrd_free(&rrdnew);
-        rrd_free(&rrdold);
-        rrd_close(rrd_file);
-        rrd_close(rrd_out_file);
-        return (-1);
-    }
-     
-#ifndef WIN32
-    memcpy(rrdnew.stat_head,rrdold.stat_head,sizeof(stat_head_t));
+    /* Put this back the way it was so that the rest of the algorithm
+       below remains unchanged, it will be corrected later */
+    rrdnew.rra_def[target_rra].row_cnt -= modify;
+
     rrdnew.ds_def = rrdold.ds_def;
-    memcpy(rrdnew.rra_def,rrdold.rra_def,sizeof(rra_def_t) * rrdold.stat_head->rra_cnt);    
     rrdnew.live_head = rrdold.live_head;
     rrdnew.pdp_prep = rrdold.pdp_prep;
     rrdnew.cdp_prep = rrdold.cdp_prep;
     memcpy(rrdnew.rra_ptr,rrdold.rra_ptr,sizeof(rra_ptr_t) * rrdold.stat_head->rra_cnt);
-#else // WIN32
-       /*
-        * For windows Other fields also should be allocated. Crashes otherwise
-        */
-
-    if ((rrdnew.ds_def = (ds_def_t*)malloc(sizeof(ds_def_t) * rrdold.stat_head->ds_cnt)) == NULL) {
-        rrd_set_error("allocating ds_def for new RRD");
-        rrd_free(&rrdnew);
-        rrd_free(&rrdold);
-        rrd_close(rrd_file);
-        rrd_close(rrd_out_file);
-        return (-1);
-    }
-
-    if ((rrdnew.live_head = (live_head_t*)malloc(sizeof(live_head_t))) == NULL) {
-        rrd_set_error("allocating live_head for new RRD");
-        rrd_free(&rrdnew);
-        rrd_free(&rrdold);
-        rrd_close(rrd_file);
-        rrd_close(rrd_out_file);
-        return (-1);
-    }
 
-    if ((rrdnew.pdp_prep = (pdp_prep_t*)malloc(sizeof(pdp_prep_t))) == NULL) {
-        rrd_set_error("allocating pdp_prep for new RRD");
-        rrd_free(&rrdnew);
-        rrd_free(&rrdold);
-        rrd_close(rrd_file);
-        rrd_close(rrd_out_file);
-        return (-1);
-    }
-
-    if ((rrdnew.cdp_prep = (cdp_prep_t*)malloc(sizeof(cdp_prep_t))) == NULL) {
-        rrd_set_error("allocating cdp_prep for new RRD");
-        rrd_free(&rrdnew);
-        rrd_free(&rrdold);
-        rrd_close(rrd_file);
-        rrd_close(rrd_out_file);
-        return (-1);
-    }
-    memcpy(rrdnew.stat_head,rrdold.stat_head,sizeof(stat_head_t));
-    memcpy(rrdnew.ds_def,rrdold.ds_def,sizeof(ds_def_t) * rrdold.stat_head->ds_cnt);
-    memcpy(rrdnew.rra_def,rrdold.rra_def,sizeof(rra_def_t) * rrdold.stat_head->rra_cnt);    
-    memcpy(rrdnew.live_head,rrdold.live_head,sizeof(live_head_t));
-    memcpy(rrdnew.pdp_prep,rrdold.pdp_prep,sizeof(pdp_prep_t));
-    memcpy(rrdnew.cdp_prep,rrdold.cdp_prep,sizeof(cdp_prep_t));
-    memcpy(rrdnew.rra_ptr,rrdold.rra_ptr,sizeof(rra_ptr_t) * rrdold.stat_head->rra_cnt);
-#endif // WIN32
 
     version = atoi(rrdold.stat_head->version);
     switch (version) {
index 3bd2d6c62e6875dcabbd19694d284ee510b36d45..74e2da433bbcaf1993da03342103ea53001b09a7 100644 (file)
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
- * This file:     Copyright 2008 Florian octo Forster
- * Distributed under the GPL
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2009                    
  *****************************************************************************
- * rrd_restore.c   Contains logic to parse XML input and create an RRD file
+ * rrd_restore.c  Contains logic to parse XML input and create an RRD file
+ *                initial libxml2 version of rrd_restore (c) by Florian octo Forster
  *****************************************************************************
- * $Id: rrd_restore.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_restore.c 1815 2009-05-26 15:20:05Z oetiker $
  *************************************************************************** */
 
-/*
- * This program is free software; you can redistribute it and / or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (t your option)
- * any later version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110 - 1301 USA
- *
- * Authors:
- *   Florian octo Forster <octo at verplant.org>
- **/
-
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
+#include <libxml/parser.h>
+#include <libxml/xmlreader.h>
+
 
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
-#include <math.h>
+#ifndef WIN32
+#      include <unistd.h>     /* for off_t */
+#else
+       typedef size_t ssize_t;
+       typedef long off_t;
+#endif 
+
+#include <fcntl.h>
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
 # include <io.h>
 # define open _open
 # define close _close
-#else
-# include <unistd.h>
 #endif
 
-#include <libxml/parser.h>
 #include "rrd_tool.h"
 #include "rrd_rpncalc.h"
+
 #define ARRAY_LENGTH(a) (sizeof (a) / sizeof ((a)[0]))
+
 static int opt_range_check = 0;
 static int opt_force_overwrite = 0;
 
 /*
- * Auxiliary functions
+ * Helpers
  */
-static int get_string_from_node(
-    xmlDoc * doc,
-    xmlNode * node,
-    char *buffer,
-    size_t buffer_size)
-{
-    xmlChar  *temp0;
-    char     *begin_ptr;
-    char     *end_ptr;
 
-    temp0 = xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
-    if (temp0 == NULL) {
-        rrd_set_error("get_string_from_node: xmlNodeListGetString failed.");
-        return (-1);
+/* skip all but tags. complain if we do not get the right tag */
+/* dept -1 causes depth to be ignored */
+static xmlChar* get_xml_element (
+    xmlTextReaderPtr reader
+    )
+{
+    while(xmlTextReaderRead(reader)){
+        int type;
+        xmlChar *name;
+        type = xmlTextReaderNodeType(reader);
+        if (type == XML_READER_TYPE_TEXT){
+            xmlChar *value;
+            value = xmlTextReaderValue(reader);
+            rrd_set_error("line %d: expected element but found text '%s'",
+                          xmlTextReaderGetParserLineNumber(reader),value);
+            xmlFree(value);
+            return NULL;
+        }
+        /* skip all other non-elements */
+        if (type != XML_READER_TYPE_ELEMENT && type != XML_READER_TYPE_END_ELEMENT)
+            continue;
+
+        name = xmlTextReaderName(reader);
+        if (type == XML_READER_TYPE_END_ELEMENT){
+            xmlChar *temp;
+            xmlChar *temp2;            
+            temp = (xmlChar*)sprintf_alloc("/%s",name);
+            temp2 = xmlStrdup(temp);
+            free(temp);
+            xmlFree(name);            
+            return temp2;            
+        }
+        /* all seems well, return the happy news */
+        return name;
     }
-
-    begin_ptr = (char *) temp0;
-    while ((begin_ptr[0] != 0) && (isspace(begin_ptr[0])))
-        begin_ptr++;
-
-    if (begin_ptr[0] == 0) {
-        xmlFree(temp0);
-        buffer[0] = 0;
-        return (0);
+    rrd_set_error("the xml ended while we were looking for an element");
+    return NULL;
+} /* get_xml_element */
+
+static void local_rrd_free (rrd_t *rrd)
+{    
+    free(rrd->live_head);
+    free(rrd->stat_head);
+    free(rrd->ds_def);
+    free(rrd->rra_def); 
+    free(rrd->rra_ptr);
+    free(rrd->pdp_prep);
+    free(rrd->cdp_prep);
+    free(rrd->rrd_value);
+    free(rrd);
+}
+
+
+static int expect_element (
+    xmlTextReaderPtr reader,
+    char *exp_name)
+{
+    xmlChar *name;
+    name = get_xml_element(reader);
+    if (!name)
+        return -1;    
+    if (xmlStrcasecmp(name,(xmlChar *)exp_name) != 0){
+        rrd_set_error("line %d: expected <%s> element but found <%s>",
+                      xmlTextReaderGetParserLineNumber(reader),name,exp_name);
+        xmlFree(name);            
+        return -1;            
     }
+    xmlFree(name);    
+    return 0;    
+} /* expect_element */
 
-    end_ptr = begin_ptr;
-    while ((end_ptr[0] != 0) && (!isspace(end_ptr[0])))
-        end_ptr++;
-    end_ptr[0] = 0;
-
-    strncpy(buffer, begin_ptr, buffer_size);
-    buffer[buffer_size - 1] = 0;
-
-    xmlFree(temp0);
-
-    return (0);
-}                       /* int get_string_from_node */
-
-static int get_long_from_node(
-    xmlDoc * doc,
-    xmlNode * node,
-    long *value)
+static int expect_element_end (
+    xmlTextReaderPtr reader,
+    char *exp_name)
 {
-    long       temp;
-    char     *str_ptr;
-    char     *end_ptr;
-
-    str_ptr = (char *) xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
-    if (str_ptr == NULL) {
-        rrd_set_error("get_long_from_node: xmlNodeListGetString failed.");
-        return (-1);
+    xmlChar *name;
+    name = get_xml_element(reader);
+    if (name == NULL)
+        return -1;    
+    if (xmlStrcasecmp(name+1,(xmlChar *)exp_name) != 0 || name[0] != '/'){
+        rrd_set_error("line %d: expected </%s> end element but found <%s>",
+                      xmlTextReaderGetParserLineNumber(reader),exp_name,name);
+        xmlFree(name);            
+        return -1;            
     }
+    xmlFree(name);    
+    return 0;    
+} /* expect_element_end */
 
-    end_ptr = NULL;
-    temp = strtol(str_ptr, &end_ptr, 0);
-    xmlFree(str_ptr);
 
-    if (str_ptr == end_ptr) {
-        rrd_set_error("get_long_from_node: Cannot parse buffer as long: %s",
-                      str_ptr);
-        return (-1);
+static xmlChar* get_xml_text (
+    xmlTextReaderPtr reader
+    )
+{
+    while(xmlTextReaderRead(reader)){
+        xmlChar  *ret;    
+        xmlChar  *text;
+        xmlChar  *begin_ptr;
+        xmlChar  *end_ptr;
+        int type;        
+        type = xmlTextReaderNodeType(reader);
+        if (type == XML_READER_TYPE_ELEMENT){
+            xmlChar *name;
+            name = xmlTextReaderName(reader);
+            rrd_set_error("line %d: expected a value but found an <%s> element",
+                          xmlTextReaderGetParserLineNumber(reader),
+                          name);
+            xmlFree(name);            
+            return NULL;            
+        }
+        /* skip all other non-text */
+        if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_TEXT)
+            continue;
+        
+        text = xmlTextReaderValue(reader);
+
+        begin_ptr = text;
+        while ((begin_ptr[0] != 0) && (isspace(begin_ptr[0])))
+            begin_ptr++;
+        if (begin_ptr[0] == 0) {
+            xmlFree(text);
+            return xmlStrdup(BAD_CAST "");
+        }        
+        end_ptr = begin_ptr;
+        while ((end_ptr[0] != 0) && (!isspace(end_ptr[0])))
+            end_ptr++;
+        end_ptr[0] = 0;
+        
+        ret = xmlStrdup(begin_ptr);
+        xmlFree(text);
+        return ret;
     }
+    rrd_set_error("file ended while looking for text");
+    return NULL;
+}  /* get_xml_text */ 
 
-    *value = temp;
-
-    return (0);
-}                       /* int get_long_from_node */
 
-static int get_ulong_from_node(
-    xmlDoc * doc,
-    xmlNode * node,
-    unsigned long *value)
+static int get_xml_string(
+    xmlTextReaderPtr reader,
+    char *value,
+    int max_len)
 {
-    unsigned long       temp;
-    char     *str_ptr;
-    char     *end_ptr;
-
-    str_ptr = (char *) xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
-    if (str_ptr == NULL) {
-        rrd_set_error("get_ulong_from_node: xmlNodeListGetString failed.");
-        return (-1);
+    xmlChar *str;
+    str = get_xml_text(reader);
+    if (str != NULL){
+        strncpy(value,(char *)str,max_len);
+        xmlFree(str);
+        return 0;        
     }
+    else
+        return -1;    
+}
 
-    end_ptr = NULL;
-    temp = strtoul(str_ptr, &end_ptr, 0);
-    xmlFree(str_ptr);
-
-    if (str_ptr == end_ptr) {
-        rrd_set_error("get_ulong_from_node: Cannot parse buffer as unsigned long: %s",
-                      str_ptr);
-        return (-1);
+static int get_xml_long(
+    xmlTextReaderPtr reader,
+    long *value)
+{    
+    xmlChar *text;
+    long temp;    
+    if ((text = get_xml_text(reader)) != NULL){
+        errno = 0;        
+        temp = strtol((char *)text,NULL, 0);
+        if (errno>0){
+            rrd_set_error("ling %d: get_xml_long from '%s' %s",
+                          xmlTextReaderGetParserLineNumber(reader),
+                          text,rrd_strerror(errno));
+            xmlFree(text);            
+            return -1;
+        }
+        xmlFree(text);            
+        *value = temp;
+        return 0;
     }
+    return -1;
+} /* get_xml_long */
 
-    *value = temp;
-
-    return (0);
-}                       /* int get_ulong_from_node */
-
-static int get_double_from_node(
-    xmlDoc * doc,
-    xmlNode * node,
-    double *value)
+static int get_xml_ulong(
+    xmlTextReaderPtr reader,
+    unsigned long *value)
 {
-    double    temp;
-    char     *str_ptr;
-    char     *end_ptr;
-
-    str_ptr = (char *) xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
-    if (str_ptr == NULL) {
-        rrd_set_error("get_double_from_node: xmlNodeListGetString failed.");
-        return (-1);
-    }
-
-    if (strstr(str_ptr, "NaN") != NULL)
-    {
-        *value = DNAN;
-        xmlFree(str_ptr);
+    
+    xmlChar *text;
+    unsigned long temp;    
+    if ((text = get_xml_text(reader)) != NULL){
+        errno = 0;        
+        temp = strtoul((char *)text,NULL, 0);        
+        if (errno>0){
+            rrd_set_error("ling %d: get_xml_ulong from '%s' %s",
+                          xmlTextReaderGetParserLineNumber(reader),
+                          text,rrd_strerror(errno));
+            xmlFree(text);            
+            return -1;
+        }
+        xmlFree(text);
+        *value = temp;        
         return 0;
     }
+    return -1;
+} /* get_xml_ulong */
 
-    end_ptr = NULL;
-    temp = strtod(str_ptr, &end_ptr);
-    xmlFree(str_ptr);
-
-    if (str_ptr == end_ptr) {
-        rrd_set_error
-            ("get_double_from_node: Cannot parse buffer as double: %s",
-             str_ptr);
-        return (-1);
+static int get_xml_double(
+    xmlTextReaderPtr reader,
+    double *value)
+{
+    
+    char *text;
+    double temp;    
+    if ((text = (char *)get_xml_text(reader))!= NULL){
+        if (strcasestr(text,"nan")){
+            *value = DNAN;
+            xmlFree(text);
+            return 0;            
+        }
+        else if (strcasestr(text,"-inf")){
+            *value = -DINF;
+            xmlFree(text);
+            return 0;            
+        }
+        else if (strcasestr(text,"+inf")
+                 || strcasestr(text,"inf")){
+            *value = DINF;
+            xmlFree(text);
+            return 0;            
+        }        
+        errno = 0;
+        temp = strtod((char *)text,NULL);
+        xmlFree(text);        
+        if (errno>0){
+            rrd_set_error("ling %d: get_xml_double from '%s' %s",
+                          xmlTextReaderGetParserLineNumber(reader),
+                          text,rrd_strerror(errno));
+            return -1;
+        }
+        *value = temp;
+        return 0;
     }
+    return -1;
+} /* get_xml_double */
 
-    *value = temp;
-
-    return (0);
-}                       /* int get_double_from_node */
 
 static int value_check_range(
     rrd_value_t *rrd_value,
@@ -207,67 +299,47 @@ static int value_check_range(
         *rrd_value = DNAN;
 
     return (0);
-}                       /* int value_check_range */
+} /* int value_check_range */
 
 /*
  * Parse the <database> block within an RRA definition
  */
+
 static int parse_tag_rra_database_row(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     rrd_t *rrd,
     rrd_value_t *rrd_value)
 {
     unsigned int values_count = 0;
-    xmlNode  *child;
     int       status;
-
+    
     status = 0;
-    for (child = node->xmlChildrenNode; child != NULL; child = child->next) {
-        if ((xmlStrcmp(child->name, (const xmlChar *) "comment") == 0)
-            || (xmlStrcmp(child->name, (const xmlChar *) "text") == 0))
-            /* ignore */ ;
-        else if (xmlStrcmp(child->name, (const xmlChar *) "v") == 0) {
-            if (values_count < rrd->stat_head->ds_cnt) {
-                status =
-                    get_double_from_node(doc, child,
-                                         rrd_value + values_count);
-                if (status == 0)
-                    value_check_range(rrd_value + values_count,
-                                      rrd->ds_def + values_count);
-            }
-
-            values_count++;
-        } else {
-            rrd_set_error("parse_tag_rra_database_row: Unknown tag: %s",
-                          child->name);
-            status = -1;
+    for (values_count = 0;values_count <  rrd->stat_head->ds_cnt;values_count++){
+        if (expect_element(reader,"v") == 0){
+            status = get_xml_double(reader,rrd_value + values_count);
+            if (status == 0)
+                value_check_range(rrd_value + values_count,
+                                  rrd->ds_def + values_count);
+            else
+                break;            
+        } else
+            return -1;
+        if (expect_element(reader,"/v") == -1){
+            return -1;
         }
-
-        if (status != 0)
-            break;
-    }                   /* for (child = node->xmlChildrenNode) */
-
-    if (values_count != rrd->stat_head->ds_cnt) {
-        rrd_set_error("parse_tag_rra_database_row: Row has %u values "
-                      "and RRD has %lu data sources.",
-                      values_count, rrd->stat_head->ds_cnt);
-        status = -1;
     }
-
-    return (status);
+    return status;
 }                       /* int parse_tag_rra_database_row */
 
 static int parse_tag_rra_database(
-    xmlDoc * doc,
-    xmlNode * node,
-    rrd_t *rrd)
+    xmlTextReaderPtr reader,
+    rrd_t *rrd )
 {
     rra_def_t *cur_rra_def;
     unsigned int total_row_cnt;
-    xmlNode  *child;
     int       status;
     int       i;
+    xmlChar *element;
 
     total_row_cnt = 0;
     for (i = 0; i < (((int) rrd->stat_head->rra_cnt) - 1); i++)
@@ -276,15 +348,12 @@ static int parse_tag_rra_database(
     cur_rra_def = rrd->rra_def + i;
 
     status = 0;
-    for (child = node->xmlChildrenNode; child != NULL; child = child->next) {
-        if ((xmlStrcmp(child->name, (const xmlChar *) "comment") == 0)
-            || (xmlStrcmp(child->name, (const xmlChar *) "text") == 0))
-            /* ignore */ ;
-        else if (xmlStrcmp(child->name, (const xmlChar *) "row") == 0) {
-            rrd_value_t *temp;
-            rrd_value_t *cur_rrd_value;
-            unsigned int total_values_count = rrd->stat_head->ds_cnt
-                * (total_row_cnt + 1);
+    while ((element = get_xml_element(reader)) != NULL){        
+        if (xmlStrcasecmp(element,(const xmlChar *)"row") == 0){
+           rrd_value_t *temp;
+           rrd_value_t *cur_rrd_value;
+           unsigned int total_values_count = rrd->stat_head->ds_cnt
+               * (total_row_cnt + 1);
 
             /* Allocate space for the new values.. */
             temp = (rrd_value_t *) realloc(rrd->rrd_value,
@@ -293,7 +362,7 @@ static int parse_tag_rra_database(
             if (temp == NULL) {
                 rrd_set_error("parse_tag_rra_database: realloc failed.");
                 status = -1;
-                break;
+               break;
             }
             rrd->rrd_value = temp;
             cur_rrd_value = rrd->rrd_value
@@ -304,18 +373,25 @@ static int parse_tag_rra_database(
             cur_rra_def->row_cnt++;
 
             status =
-                parse_tag_rra_database_row(doc, child, rrd, cur_rrd_value);
-        } /* if (xmlStrcmp (child->name, (const xmlChar *) "row") == 0) */
+                parse_tag_rra_database_row(reader, rrd, cur_rrd_value);
+            if (status == 0)
+                status =  expect_element(reader,"/row");
+        } /* if (xmlStrcasecmp(element,"row")) */
         else {
-            rrd_set_error("parse_tag_rra_database: Unknown tag: %s",
-                          child->name);
-            status = -1;
+            if ( xmlStrcasecmp(element,(const xmlChar *)"/database") == 0){
+                xmlFree(element);                
+                break;
+            }
+            else {
+                rrd_set_error("line %d: found unexpected tag: %s",
+                              xmlTextReaderGetParserLineNumber(reader),element);
+                status = -1;
+            }
         }
-
+        xmlFree(element);        
         if (status != 0)
-            break;
-    }                   /* for (child = node->xmlChildrenNode) */
-
+            break;        
+    }
     return (status);
 }                       /* int parse_tag_rra_database */
 
@@ -323,167 +399,146 @@ static int parse_tag_rra_database(
  * Parse the <cdp_prep> block within an RRA definition
  */
 static int parse_tag_rra_cdp_prep_ds_history(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     cdp_prep_t *cdp_prep)
 {
     /* Make `history_buffer' the same size as the scratch area, plus the
      * terminating NULL byte. */
-    char      history_buffer[sizeof(((cdp_prep_t *)0)->scratch) + 1];
+    xmlChar  *history;    
     char     *history_ptr;
-    int       status;
     int       i;
-
-    status = get_string_from_node(doc, node,
-                                  history_buffer, sizeof(history_buffer));
-    if (status != 0)
-        return (-1);
-
-    history_ptr = (char *) (&cdp_prep->scratch[0]);
-    for (i = 0; history_buffer[i] != '\0'; i++)
-        history_ptr[i] = (history_buffer[i] == '1') ? 1 : 0;
-
-    return (0);
-}                       /* int parse_tag_rra_cdp_prep_ds_history */
+    if ((history = get_xml_text(reader)) != NULL){
+        history_ptr = (char *) (&cdp_prep->scratch[0]);
+        for (i = 0; history[i] != '\0'; i++)
+            history_ptr[i] = (history[i] == '1') ? 1 : 0;
+        xmlFree(history);        
+        return 0;        
+    }    
+    return -1;    
+}  /* int parse_tag_rra_cdp_prep_ds_history */
 
 static int parse_tag_rra_cdp_prep_ds(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     rrd_t *rrd,
     cdp_prep_t *cdp_prep)
 {
-    xmlNode  *child;
     int       status;
-
+    xmlChar *element;
     memset(cdp_prep, '\0', sizeof(cdp_prep_t));
 
-    status = 0;
-    for (child = node->xmlChildrenNode; child != NULL; child = child->next) {
-        if (atoi(rrd->stat_head->version) == 1) {
-            cdp_prep->scratch[CDP_primary_val].u_val = 0.0;
-            cdp_prep->scratch[CDP_secondary_val].u_val = 0.0;
-        }
-        if ((xmlStrcmp(child->name, (const xmlChar *) "comment") == 0)
-            || (xmlStrcmp(child->name, (const xmlChar *) "text") == 0))
-            /* ignore */ ;
-        else if (xmlStrcmp(child->name, (const xmlChar *) "primary_value") ==
-                 0)
+    status = -1;
+    
+    if (atoi(rrd->stat_head->version) == 1) {
+        cdp_prep->scratch[CDP_primary_val].u_val = 0.0;
+        cdp_prep->scratch[CDP_secondary_val].u_val = 0.0;
+    }
+
+    while ((element = get_xml_element(reader)) != NULL){
+        if (xmlStrcasecmp(element, (const xmlChar *) "primary_value") == 0)
             status =
-                get_double_from_node(doc, child,
-                                     &cdp_prep->scratch[CDP_primary_val].
-                                     u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "secondary_value")
-                 == 0)
+                get_xml_double(reader,&cdp_prep->scratch[CDP_primary_val].u_val);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "secondary_value") == 0)
             status =
-                get_double_from_node(doc, child,
-                                     &cdp_prep->scratch[CDP_secondary_val].
-                                     u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "intercept") == 0)
-            status = get_double_from_node(doc, child,
+                get_xml_double(reader,&cdp_prep->scratch[CDP_secondary_val].u_val);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "intercept") == 0)
+            status = get_xml_double(reader,
                                           &cdp_prep->
                                           scratch[CDP_hw_intercept].u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "last_intercept") ==
+        else if (xmlStrcasecmp(element, (const xmlChar *) "last_intercept") ==
                  0)
             status =
-                get_double_from_node(doc, child,
+                get_xml_double(reader,
                                      &cdp_prep->
                                      scratch[CDP_hw_last_intercept].u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "slope") == 0)
-            status = get_double_from_node(doc, child,
-                                          &cdp_prep->scratch[CDP_hw_slope].
-                                          u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "last_slope") == 0)
-            status = get_double_from_node(doc, child,
-                                          &cdp_prep->
-                                          scratch[CDP_hw_last_slope].u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "nan_count") == 0)
-            status = get_ulong_from_node(doc, child,
-                                        &cdp_prep->
-                                       scratch[CDP_null_count].u_cnt);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "last_nan_count") ==
+        else if (xmlStrcasecmp(element, (const xmlChar *) "slope") == 0)
+            status = get_xml_double(reader,
+                                    &cdp_prep->scratch[CDP_hw_slope].
+                                    u_val);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "last_slope") == 0)
+            status = get_xml_double(reader,
+                                    &cdp_prep->
+                                    scratch[CDP_hw_last_slope].u_val);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "nan_count") == 0)
+            status = get_xml_ulong(reader,
+                                   &cdp_prep->
+                                   scratch[CDP_null_count].u_cnt);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "last_nan_count") ==
                  0)
             status =
-                get_ulong_from_node(doc, child,
-                                   &cdp_prep->
-                                  scratch[CDP_last_null_count].u_cnt);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "seasonal") == 0)
-            status = get_double_from_node(doc, child,
-                                          &cdp_prep->scratch[CDP_hw_seasonal].
-                                          u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "last_seasonal") ==
+                get_xml_ulong(reader,
+                              &cdp_prep->
+                              scratch[CDP_last_null_count].u_cnt);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "seasonal") == 0)
+            status = get_xml_double(reader,
+                                    &cdp_prep->scratch[CDP_hw_seasonal].
+                                    u_val);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "last_seasonal") ==
                  0)
             status =
-                get_double_from_node(doc, child,
+                get_xml_double(reader,
                                      &cdp_prep->scratch[CDP_hw_last_seasonal].
                                      u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "init_flag") == 0)
-            status = get_ulong_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "init_flag") == 0)
+            status = get_xml_ulong(reader,
                                         &cdp_prep->
                                        scratch[CDP_init_seasonal].u_cnt);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "history") == 0)
-            status = parse_tag_rra_cdp_prep_ds_history(doc, child, cdp_prep);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "value") == 0)
-            status = get_double_from_node(doc, child,
-                                          &cdp_prep->scratch[CDP_val].u_val);
-        else if (xmlStrcmp(child->name,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "history") == 0)
+            status = parse_tag_rra_cdp_prep_ds_history(reader, cdp_prep);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "value") == 0)
+            status = get_xml_double(reader,
+                                    &cdp_prep->scratch[CDP_val].u_val);
+        else if (xmlStrcasecmp(element,
                            (const xmlChar *) "unknown_datapoints") == 0)
-            status = get_ulong_from_node(doc, child,
+            status = get_xml_ulong(reader,
                                         &cdp_prep->
                                        scratch[CDP_unkn_pdp_cnt].u_cnt);
+        else if (xmlStrcasecmp(element,
+                               (const xmlChar *) "/ds") == 0){
+            xmlFree(element);            
+            break;
+        }        
         else {
             rrd_set_error("parse_tag_rra_cdp_prep: Unknown tag: %s",
-                          child->name);
+                          element);
             status = -1;
+            xmlFree(element);            
+            break;            
         }
-
+        if (status != 0){
+            xmlFree(element);
+            break;
+        }
+        status = expect_element_end(reader,(char *)element);
+        xmlFree(element);        
         if (status != 0)
             break;
-    }
-
+    }    
     return (status);
 }                       /* int parse_tag_rra_cdp_prep_ds */
 
 static int parse_tag_rra_cdp_prep(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     rrd_t *rrd,
     cdp_prep_t *cdp_prep)
 {
-    xmlNode  *child;
     int       status;
 
-    unsigned int ds_count = 0;
+    unsigned int ds_count;
 
     status = 0;
-    for (child = node->xmlChildrenNode; child != NULL; child = child->next) {
-        if ((xmlStrcmp(child->name, (const xmlChar *) "comment") == 0)
-            || (xmlStrcmp(child->name, (const xmlChar *) "text") == 0))
-            /* ignore */ ;
-        else if (xmlStrcmp(child->name, (const xmlChar *) "ds") == 0) {
-            if (ds_count >= rrd->stat_head->ds_cnt)
-                status = -1;
-            else {
-                status = parse_tag_rra_cdp_prep_ds(doc, child, rrd,
-                                                   cdp_prep + ds_count);
-                ds_count++;
-            }
+    for ( ds_count = 0; ds_count < rrd->stat_head->ds_cnt;ds_count++){
+        if (expect_element(reader,"ds") == 0) {
+            status = parse_tag_rra_cdp_prep_ds(reader, rrd,
+                                               cdp_prep + ds_count);
+            if (status != 0)
+                break;
         } else {
-            rrd_set_error("parse_tag_rra_cdp_prep: Unknown tag: %s",
-                          child->name);
-            status = -1;
-        }
-
-        if (status != 0)
+            status = -1;            
             break;
+        }        
     }
-
-    if (ds_count != rrd->stat_head->ds_cnt) {
-        rrd_set_error("parse_tag_rra_cdp_prep: There are %i data sources in "
-                      "the RRD file, but %i in this cdp_prep block!",
-                      (int) rrd->stat_head->ds_cnt, ds_count);
-        status = -1;
-    }
-
+    if (status == 0)
+        status =  expect_element(reader,"/cdp_prep");
     return (status);
 }                       /* int parse_tag_rra_cdp_prep */
 
@@ -491,50 +546,46 @@ static int parse_tag_rra_cdp_prep(
  * Parse the <params> block within an RRA definition
  */
 static int parse_tag_rra_params(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     rra_def_t *rra_def)
 {
-    xmlNode  *child;
+    xmlChar *element;
     int       status;
 
-    status = 0;
-    for (child = node->xmlChildrenNode; child != NULL; child = child->next) {
-        if ((xmlStrcmp(child->name, (const xmlChar *) "comment") == 0)
-            || (xmlStrcmp(child->name, (const xmlChar *) "text") == 0))
-            /* ignore */ ;
+    status = -1;
+    while ((element = get_xml_element(reader)) != NULL){
         /*
          * Parameters for CF_HWPREDICT
          */
-        else if (xmlStrcmp(child->name, (const xmlChar *) "hw_alpha") == 0)
-            status = get_double_from_node(doc, child,
+        if (xmlStrcasecmp(element, (const xmlChar *) "hw_alpha") == 0)
+            status = get_xml_double(reader,
                                           &rra_def->par[RRA_hw_alpha].u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "hw_beta") == 0)
-            status = get_double_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "hw_beta") == 0)
+            status = get_xml_double(reader,
                                           &rra_def->par[RRA_hw_beta].u_val);
-        else if (xmlStrcmp(child->name,
+        else if (xmlStrcasecmp(element,
                            (const xmlChar *) "dependent_rra_idx") == 0)
-            status = get_ulong_from_node(doc, child,
+            status = get_xml_ulong(reader,
                                         &rra_def->
                                        par[RRA_dependent_rra_idx].u_cnt);
         /*
          * Parameters for CF_SEASONAL and CF_DEVSEASONAL
          */
-        else if (xmlStrcmp(child->name, (const xmlChar *) "seasonal_gamma") ==
+        else if (xmlStrcasecmp(element, (const xmlChar *) "seasonal_gamma") ==
                  0)
             status =
-                get_double_from_node(doc, child,
+                get_xml_double(reader,
                                      &rra_def->par[RRA_seasonal_gamma].u_val);
-        else if (xmlStrcmp
-                 (child->name, (const xmlChar *) "seasonal_smooth_idx") == 0)
+        else if (xmlStrcasecmp
+                 (element, (const xmlChar *) "seasonal_smooth_idx") == 0)
             status =
-                get_ulong_from_node(doc, child,
+                get_xml_ulong(reader,
                                    &rra_def->
                                   par[RRA_seasonal_smooth_idx].u_cnt);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "smoothing_window")
+        else if (xmlStrcasecmp(element, (const xmlChar *) "smoothing_window")
                  == 0)
             status =
-                get_double_from_node(doc, child,
+                get_xml_double(reader,
                                      &rra_def->
                                      par[RRA_seasonal_smoothing_window].
                                      u_val);
@@ -542,75 +593,73 @@ static int parse_tag_rra_params(
         /*
          * Parameters for CF_FAILURES
          */
-        else if (xmlStrcmp(child->name, (const xmlChar *) "delta_pos") == 0)
-            status = get_double_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "delta_pos") == 0)
+            status = get_xml_double(reader,
                                           &rra_def->par[RRA_delta_pos].u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "delta_neg") == 0)
-            status = get_double_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "delta_neg") == 0)
+            status = get_xml_double(reader,
                                           &rra_def->par[RRA_delta_neg].u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "window_len") == 0)
-            status = get_ulong_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "window_len") == 0)
+            status = get_xml_ulong(reader,
                                         &rra_def->par[RRA_window_len].
                                        u_cnt);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "failure_threshold")
+        else if (xmlStrcasecmp(element, (const xmlChar *) "failure_threshold")
                  == 0)
             status =
-                get_ulong_from_node(doc, child,
+                get_xml_ulong(reader,
                                    &rra_def->
                                   par[RRA_failure_threshold].u_cnt);
         /*
          * Parameters for CF_AVERAGE, CF_MAXIMUM, CF_MINIMUM, and CF_LAST
          */
-        else if (xmlStrcmp(child->name, (const xmlChar *) "xff") == 0)
-            status = get_double_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "xff") == 0)
+            status = get_xml_double(reader,
                                           &rra_def->par[RRA_cdp_xff_val].
                                           u_val);
         /*
          * Compatibility code for 1.0.49
          */
-        else if (xmlStrcmp(child->name, (const xmlChar *) "value") == 0) {  /* {{{ */
+        else if (xmlStrcasecmp(element, (const xmlChar *) "value") == 0) {  /* {{{ */
             unsigned int i = 0;
 
-            while (42) {
-                if (i >= ARRAY_LENGTH(rra_def->par)) {
-                    status = -1;
-                    break;
-                }
-
+            for (i=0;i<ARRAY_LENGTH(rra_def->par);i++){
                 if ((i == RRA_dependent_rra_idx)
                     || (i == RRA_seasonal_smooth_idx)
                     || (i == RRA_failure_threshold))
-                    status = get_ulong_from_node(doc, child,
+                    status = get_xml_ulong(reader,
                                                 &rra_def->par[i].
                                                u_cnt);
                 else
-                    status = get_double_from_node(doc, child,
+                    status = get_xml_double(reader,
                                                   &rra_def->par[i].u_val);
 
                 if (status != 0)
                     break;
-
-                /* When this loops exits (sucessfully) `child' points to the last
-                 * `value' tag in the list. */
-                if ((child->next == NULL)
-                    || (xmlStrcmp(child->name, (const xmlChar *) "value") !=
-                        0))
-                    break;
-
-                child = child->next;
-                i++;
+                if ( i-1 < ARRAY_LENGTH(rra_def->par)){
+                    status = expect_element(reader,"/value");
+                    if (status == 0){
+                        status  = expect_element(reader,"value");
+                    }
+                }
+                if (status != 0){
+                    break;                    
+                }
             }
-        } /* }}} */
+        }  /* }}} */        
+        else if (xmlStrcasecmp(element,(const xmlChar *) "/params") == 0){
+            xmlFree(element);            
+            return status;
+        }  /* }}} */        
         else {
-            rrd_set_error("parse_tag_rra_params: Unknown tag: %s",
-                          child->name);
+            rrd_set_error("line %d: parse_tag_rra_params: Unknown tag: %s",
+                          xmlTextReaderGetParserLineNumber(reader),element);
             status = -1;
         }
-
+        status = expect_element_end(reader,(char *)element);
+        xmlFree(element);        
         if (status != 0)
             break;
     }
-
     return (status);
 }                       /* int parse_tag_rra_params */
 
@@ -618,35 +667,33 @@ static int parse_tag_rra_params(
  * Parse an RRA definition
  */
 static int parse_tag_rra_cf(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     rra_def_t *rra_def)
 {
     int       status;
 
-    status = get_string_from_node(doc, node,
+    status = get_xml_string(reader,
                                   rra_def->cf_nam, sizeof(rra_def->cf_nam));
     if (status != 0)
-        return (-1);
+        return status;
 
     status = cf_conv(rra_def->cf_nam);
     if (status == -1) {
         rrd_set_error("parse_tag_rra_cf: Unknown consolidation function: %s",
                       rra_def->cf_nam);
-        return (-1);
+        return -1;
     }
 
-    return (0);
+    return 0;
 }                       /* int parse_tag_rra_cf */
 
 static int parse_tag_rra(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     rrd_t *rrd)
 {
-    xmlNode  *child;
     int       status;
-
+    xmlChar *element;
+    
     rra_def_t *cur_rra_def;
     cdp_prep_t *cur_cdp_prep;
     rra_ptr_t *cur_rra_ptr;
@@ -705,42 +752,63 @@ static int parse_tag_rra(
     rrd->stat_head->rra_cnt++;
 
     status = 0;
-    for (child = node->xmlChildrenNode; child != NULL; child = child->next) {
-        if ((xmlStrcmp(child->name, (const xmlChar *) "comment") == 0)
-            || (xmlStrcmp(child->name, (const xmlChar *) "text") == 0))
-            /* ignore */ ;
-        else if (xmlStrcmp(child->name, (const xmlChar *) "cf") == 0)
-            status = parse_tag_rra_cf(doc, child, cur_rra_def);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "pdp_per_row") == 0)
-            status = get_ulong_from_node(doc, child,
+    while ((element = get_xml_element(reader)) != NULL){
+        if (xmlStrcasecmp(element, (const xmlChar *) "cf") == 0)
+            status = parse_tag_rra_cf(reader, cur_rra_def);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "pdp_per_row") == 0)
+            status = get_xml_ulong(reader,
                                         &cur_rra_def->pdp_cnt);
         else if (atoi(rrd->stat_head->version) == 1
-                 && xmlStrcmp(child->name, (const xmlChar *) "xff") == 0)
-            status = get_double_from_node(doc, child,
+                 && xmlStrcasecmp(element, (const xmlChar *) "xff") == 0)
+            status = get_xml_double(reader,
                                           (double *) &cur_rra_def->
                                           par[RRA_cdp_xff_val].u_val);
         else if (atoi(rrd->stat_head->version) >= 2
-                 && xmlStrcmp(child->name, (const xmlChar *) "params") == 0)
-            status = parse_tag_rra_params(doc, child, cur_rra_def);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "cdp_prep") == 0)
-            status = parse_tag_rra_cdp_prep(doc, child, rrd, cur_cdp_prep);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "database") == 0)
-            status = parse_tag_rra_database(doc, child, rrd);
-        else {
-            rrd_set_error("parse_tag_rra: Unknown tag: %s", child->name);
-            status = -1;
+                 && xmlStrcasecmp(element, (const xmlChar *) "params") == 0){            
+            xmlFree(element);
+            status = parse_tag_rra_params(reader, cur_rra_def);
+            if (status == 0)
+                continue;
+            else
+                return status;
         }
-
-        if (status != 0)
-            break;
-    }
-
+        else if (xmlStrcasecmp(element, (const xmlChar *) "cdp_prep") == 0){
+            xmlFree(element);
+            status = parse_tag_rra_cdp_prep(reader, rrd, cur_cdp_prep);
+            if (status == 0)
+                continue;
+            else
+                return status;
+        }        
+        else if (xmlStrcasecmp(element, (const xmlChar *) "database") == 0){            
+            xmlFree(element);
+            status = parse_tag_rra_database(reader, rrd);
+            if (status == 0)
+                continue;
+            else
+                return status;
+        }
+        else if (xmlStrcasecmp(element,(const xmlChar *) "/rra") == 0){
+            xmlFree(element);            
+            return status;
+        }  /* }}} */        
+       else {
+            rrd_set_error("line %d: parse_tag_rra: Unknown tag: %s",
+                          xmlTextReaderGetParserLineNumber(reader), element);
+            status = -1;            
+        }
+        if (status != 0) {
+            xmlFree(element);
+            return status;
+        }        
+        status = expect_element_end(reader,(char *)element);
+        xmlFree(element);
+        if (status != 0) {
+            return status;
+        }        
+    }    
     /* Set the RRA pointer to a random location */
-#ifdef WIN32
-    cur_rra_ptr->cur_row = rand() % cur_rra_def->row_cnt;
-#else
-    cur_rra_ptr->cur_row = random() % cur_rra_def->row_cnt;
-#endif
+    cur_rra_ptr->cur_row = rrd_random() % cur_rra_def->row_cnt;
 
     return (status);
 }                       /* int parse_tag_rra */
@@ -749,54 +817,54 @@ static int parse_tag_rra(
  * Parse a DS definition
  */
 static int parse_tag_ds_cdef(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     rrd_t *rrd)
 {
-    char      buffer[1024];
-    int       status;
-
-    status = get_string_from_node(doc, node, buffer, sizeof(buffer));
-    if (status != 0)
-        return (-1);
-
-    /* We're always working on the last DS that has been added to the structure
-     * when we get here */
-    parseCDEF_DS(buffer, rrd, rrd->stat_head->ds_cnt - 1);
-
-    return (0);
+    xmlChar *cdef;
+
+    cdef = get_xml_text(reader);
+    if (cdef != NULL){
+        /* We're always working on the last DS that has been added to the structure
+         * when we get here */
+        parseCDEF_DS((char *)cdef, rrd, rrd->stat_head->ds_cnt - 1);
+        xmlFree(cdef);
+        if (rrd_test_error())
+            return -1;
+        else            
+            return 0;        
+    }
+    return -1;
 }                       /* int parse_tag_ds_cdef */
 
 static int parse_tag_ds_type(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     ds_def_t *ds_def)
 {
-    int       status;
-
-    status = get_string_from_node(doc, node,
-                                  ds_def->dst, sizeof(ds_def->dst));
-    if (status != 0)
-        return (-1);
-
-    status = dst_conv(ds_def->dst);
-    if (status == -1) {
-        rrd_set_error("parse_tag_ds_type: Unknown data source type: %s",
-                      ds_def->dst);
-        return (-1);
+    char *dst;
+    dst = (char *)get_xml_text(reader);
+    if (dst != NULL){
+        int status;
+        status = dst_conv(dst);
+        if (status == -1) {
+            rrd_set_error("parse_tag_ds_type: Unknown data source type: %s",
+                          dst);
+            return -1;
+        }
+        strncpy(ds_def->dst,dst,sizeof(ds_def->dst)-1);
+        ds_def->dst[sizeof(ds_def->dst)-1] = '\0';
+        xmlFree(dst);
+        return 0;        
     }
-
-    return (0);
+    return -1;
 }                       /* int parse_tag_ds_type */
 
 static int parse_tag_ds(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     rrd_t *rrd)
 {
-    xmlNode  *child;
     int       status;
-
+    xmlChar  *element;
+    
     ds_def_t *cur_ds_def;
     pdp_prep_t *cur_pdp_prep;
 
@@ -847,50 +915,55 @@ static int parse_tag_ds(
     rrd->stat_head->ds_cnt++;
 
     status = 0;
-    for (child = node->xmlChildrenNode; child != NULL; child = child->next) {
-        if ((xmlStrcmp(child->name, (const xmlChar *) "comment") == 0)
-            || (xmlStrcmp(child->name, (const xmlChar *) "text") == 0))
-            /* ignore */ ;
-        else if (xmlStrcmp(child->name, (const xmlChar *) "name") == 0)
-            status = get_string_from_node(doc, child,
-                                          cur_ds_def->ds_nam,
-                                          sizeof(cur_ds_def->ds_nam));
-        else if (xmlStrcmp(child->name, (const xmlChar *) "type") == 0)
-            status = parse_tag_ds_type(doc, child, cur_ds_def);
-        else if (xmlStrcmp(child->name,
+    while ((element = get_xml_element(reader)) != NULL){
+        if (xmlStrcasecmp(element, (const xmlChar *) "name") == 0){
+            status = get_xml_string(reader,cur_ds_def->ds_nam,sizeof(cur_ds_def->ds_nam));
+        }
+        else if (xmlStrcasecmp(element, (const xmlChar *) "type") == 0)
+            status = parse_tag_ds_type(reader, cur_ds_def);
+        else if (xmlStrcasecmp(element,
                            (const xmlChar *) "minimal_heartbeat") == 0)
-            status = get_ulong_from_node(doc, child,
+            status = get_xml_ulong(reader,
                                         &cur_ds_def->par[DS_mrhb_cnt].
                                        u_cnt);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "min") == 0)
-            status = get_double_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "min") == 0)
+            status = get_xml_double(reader,
                                           &cur_ds_def->par[DS_min_val].u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "max") == 0)
-            status = get_double_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "max") == 0)
+            status = get_xml_double(reader,
                                           &cur_ds_def->par[DS_max_val].u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "cdef") == 0)
-            status = parse_tag_ds_cdef(doc, child, rrd);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "last_ds") == 0)
-            status = get_string_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "cdef") == 0)
+            status = parse_tag_ds_cdef(reader, rrd);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "last_ds") == 0)
+            status = get_xml_string(reader,
                                           cur_pdp_prep->last_ds,
                                           sizeof(cur_pdp_prep->last_ds));
-        else if (xmlStrcmp(child->name, (const xmlChar *) "value") == 0)
-            status = get_double_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "value") == 0)
+            status = get_xml_double(reader,
                                           &cur_pdp_prep->scratch[PDP_val].
                                           u_val);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "unknown_sec") == 0)
-            status = get_ulong_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "unknown_sec") == 0)
+            status = get_xml_ulong(reader,
                                         &cur_pdp_prep->
                                        scratch[PDP_unkn_sec_cnt].u_cnt);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "/ds") == 0) {
+            xmlFree(element);            
+            break;
+        }        
         else {
-            rrd_set_error("parse_tag_ds: Unknown tag: %s", child->name);
+            rrd_set_error("parse_tag_ds: Unknown tag: %s", element);
             status = -1;
+        }        
+        if (status != 0) {            
+            xmlFree(element);        
+            break;
         }
-
+        status = expect_element_end(reader,(char *)element);
+        xmlFree(element);        
         if (status != 0)
-            break;
+            break;        
     }
-
+    
     return (status);
 }                       /* int parse_tag_ds */
 
@@ -898,77 +971,85 @@ static int parse_tag_ds(
  * Parse root nodes
  */
 static int parse_tag_rrd(
-    xmlDoc * doc,
-    xmlNode * node,
+    xmlTextReaderPtr reader,
     rrd_t *rrd)
 {
-    xmlNode  *child;
     int       status;
-
+    xmlChar *element;
+    
     status = 0;
-    for (child = node->xmlChildrenNode; child != NULL; child = child->next) {
-        if ((xmlStrcmp(child->name, (const xmlChar *) "comment") == 0)
-            || (xmlStrcmp(child->name, (const xmlChar *) "text") == 0))
-            /* ignore */ ;
-        else if (xmlStrcmp(child->name, (const xmlChar *) "version") == 0)
-            status = get_string_from_node(doc, child,
+    while ((element = get_xml_element(reader)) != NULL ){
+        if (xmlStrcasecmp(element, (const xmlChar *) "version") == 0)
+            status = get_xml_string(reader,
                                           rrd->stat_head->version,
                                           sizeof(rrd->stat_head->version));
-        else if (xmlStrcmp(child->name, (const xmlChar *) "step") == 0)
-            status = get_ulong_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "step") == 0)
+            status = get_xml_ulong(reader,
                                         &rrd->stat_head->pdp_step);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "lastupdate") == 0)
-            status = get_long_from_node(doc, child,
+        else if (xmlStrcasecmp(element, (const xmlChar *) "lastupdate") == 0)
+            status = get_xml_long(reader,
                                         &rrd->live_head->last_up);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "ds") == 0)
-            status = parse_tag_ds(doc, child, rrd);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "rra") == 0)
-            status = parse_tag_rra(doc, child, rrd);
+        else if (xmlStrcasecmp(element, (const xmlChar *) "ds") == 0){            
+            xmlFree(element);
+            status = parse_tag_ds(reader, rrd);
+            /* as we come back the </ds> tag is already gone */
+            if (status == 0)
+                continue;
+            else
+                return status;
+        }        
+        else if (xmlStrcasecmp(element, (const xmlChar *) "rra") == 0){            
+            xmlFree(element);
+            status = parse_tag_rra(reader, rrd);
+            if (status == 0)
+                continue;
+            else
+                return status;
+        }
+        else if (xmlStrcasecmp(element, (const xmlChar *) "/rrd") == 0) {
+            xmlFree(element);
+            return status;
+        }
         else {
-            rrd_set_error("parse_tag_rrd: Unknown tag: %s", child->name);
+            rrd_set_error("parse_tag_rrd: Unknown tag: %s", element);
             status = -1;
         }
 
-        if (status != 0)
+        if (status != 0){
+            xmlFree(element);
             break;
+        }        
+        status = expect_element_end(reader,(char *)element);
+        xmlFree(element);        
+        if (status != 0)
+            break;        
     }
-
     return (status);
 }                       /* int parse_tag_rrd */
 
 static rrd_t *parse_file(
     const char *filename)
 {
-    xmlDoc   *doc;
-    xmlNode  *cur;
+    xmlTextReaderPtr reader;
     int       status;
 
     rrd_t    *rrd;
 
-    doc = xmlParseFile(filename);
-    if (doc == NULL) {
-        rrd_set_error("Document not parsed successfully.");
-        return (NULL);
-    }
-
-    cur = xmlDocGetRootElement(doc);
-    if (cur == NULL) {
-        rrd_set_error("Document is empty.");
-        xmlFreeDoc(doc);
+    reader = xmlNewTextReaderFilename(filename);
+    if (reader == NULL) {
+        rrd_set_error("Could not create xml reader for: %s",filename);
         return (NULL);
     }
 
-    if (xmlStrcmp(cur->name, (const xmlChar *) "rrd") != 0) {
-        rrd_set_error
-            ("Document of the wrong type, root node is not \"rrd\".");
-        xmlFreeDoc(doc);
+    if (expect_element(reader,"rrd") != 0) {
+        xmlFreeTextReader(reader);
         return (NULL);
     }
 
     rrd = (rrd_t *) malloc(sizeof(rrd_t));
     if (rrd == NULL) {
         rrd_set_error("parse_file: malloc failed.");
-        xmlFreeDoc(doc);
+        xmlFreeTextReader(reader);
         return (NULL);
     }
     memset(rrd, '\0', sizeof(rrd_t));
@@ -976,7 +1057,7 @@ static rrd_t *parse_file(
     rrd->stat_head = (stat_head_t *) malloc(sizeof(stat_head_t));
     if (rrd->stat_head == NULL) {
         rrd_set_error("parse_tag_rrd: malloc failed.");
-        xmlFreeDoc(doc);
+        xmlFreeTextReader(reader);
         free(rrd);
         return (NULL);
     }
@@ -988,18 +1069,19 @@ static rrd_t *parse_file(
     rrd->live_head = (live_head_t *) malloc(sizeof(live_head_t));
     if (rrd->live_head == NULL) {
         rrd_set_error("parse_tag_rrd: malloc failed.");
-        xmlFreeDoc(doc);
+        xmlFreeTextReader(reader);
         free(rrd->stat_head);
         free(rrd);
         return (NULL);
     }
     memset(rrd->live_head, '\0', sizeof(live_head_t));
 
-    status = parse_tag_rrd(doc, cur, rrd);
+    status = parse_tag_rrd(reader, rrd);
+
+    xmlFreeTextReader(reader);
 
-    xmlFreeDoc(doc);
     if (status != 0) {
-        rrd_free(rrd);
+        local_rrd_free(rrd);
         rrd = NULL;
     }
 
@@ -1088,11 +1170,6 @@ int rrd_restore(
 {
     rrd_t    *rrd;
 
-#ifdef WIN32
-    srand((unsigned int) time(NULL));
-#else
-    srandom((unsigned int) time(NULL) + (unsigned int) getpid());
-#endif
     /* init rrd clean */
     optind = 0;
     opterr = 0;         /* initialize getopt */
@@ -1137,13 +1214,14 @@ int rrd_restore(
     rrd = parse_file(argv[optind]);
     if (rrd == NULL)
         return (-1);
-
+    
     if (write_file(argv[optind + 1], rrd) != 0) {
-        rrd_free(rrd);
+        local_rrd_free(rrd);
         return (-1);
     }
+    local_rrd_free(rrd);
+
 
-    rrd_free(rrd);
     return (0);
 }                       /* int rrd_restore */
 
index b2d7adc59c2392b6d4a928d6c172588d68b85700..b5f6bccbce91f3b6d9375976e0be7bf6cadaeeee 100644 (file)
@@ -1,18 +1,16 @@
 /****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  ****************************************************************************
  * rrd_rpncalc.c  RPN calculator functions
  ****************************************************************************/
 
-#include "rrd_tool.h"
-#include "rrd_rpncalc.h"
-// #include "rrd_graph.h"
 #include <limits.h>
 #include <locale.h>
-
-#ifdef WIN32
 #include <stdlib.h>
-#endif
+
+#include "rrd_tool.h"
+#include "rrd_rpncalc.h"
+// #include "rrd_graph.h"
 
 short     addop2str(
     enum op_en op,
@@ -77,7 +75,7 @@ rpnp_t   *rpn_expand(
     if (rpnp == NULL)
         return NULL;
     for (i = 0; rpnc[i].op != OP_END; ++i) {
-        rpnp[i].op = (enum op_en) rpnc[i].op;
+        rpnp[i].op = rpnc[i].op;
         if (rpnp[i].op == OP_NUMBER) {
             rpnp[i].val = (double) rpnc[i].val;
         } else if (rpnp[i].op == OP_VARIABLE || rpnp[i].op == OP_PREV_OTHER) {
@@ -178,6 +176,8 @@ void rpn_compact2str(
             add_op(OP_REV, REV)
             add_op(OP_TREND, TREND)
             add_op(OP_TRENDNAN, TRENDNAN)
+            add_op(OP_PREDICT, PREDICT)
+            add_op(OP_PREDICTSIGMA, PREDICTSIGMA)
             add_op(OP_RAD2DEG, RAD2DEG)
             add_op(OP_DEG2RAD, DEG2RAD)
             add_op(OP_AVG, AVG)
@@ -375,6 +375,8 @@ rpnp_t   *rpn_parse(
             match_op(OP_REV, REV)
             match_op(OP_TREND, TREND)
             match_op(OP_TRENDNAN, TRENDNAN)
+            match_op(OP_PREDICT, PREDICT)
+            match_op(OP_PREDICTSIGMA, PREDICTSIGMA)
             match_op(OP_RAD2DEG, RAD2DEG)
             match_op(OP_DEG2RAD, DEG2RAD)
             match_op(OP_AVG, AVG)
@@ -465,9 +467,9 @@ short rpn_calc(
         if (stptr + 5 > rpnstack->dc_stacksize) {
             /* could move this to a separate function */
             rpnstack->dc_stacksize += rpnstack->dc_stackblock;
-            rpnstack->s = (double*)(rrd_realloc(rpnstack->s,
+            rpnstack->s = (double*)rrd_realloc(rpnstack->s,
                                       (rpnstack->dc_stacksize) *
-                                                            sizeof(*(rpnstack->s))));
+                                      sizeof(*(rpnstack->s)));
             if (rpnstack->s == NULL) {
                 rrd_set_error("RPN stack overflow");
                 return -1;
@@ -788,6 +790,84 @@ short rpn_calc(
                 }
             }
             break;
+        case OP_PREDICT:
+        case OP_PREDICTSIGMA:
+            stackunderflow(2);
+           {
+               /* the local averaging window (similar to trend, but better here, as we get better statistics thru numbers)*/
+               int   locstepsize = rpnstack->s[--stptr];
+               /* the number of shifts and range-checking*/
+               int     shifts = rpnstack->s[--stptr];
+                stackunderflow(shifts);
+               // handle negative shifts special
+               if (shifts<0) {
+                   stptr--;
+               } else {
+                   stptr-=shifts;
+               }
+               /* the real calculation */
+               double val=DNAN;
+               /* the info on the datasource */
+               time_t  dsstep = (time_t) rpnp[rpi - 1].step;
+               int    dscount = rpnp[rpi - 1].ds_cnt;
+               int   locstep = (int)ceil((float)locstepsize/(float)dsstep);
+
+               /* the sums */
+                double    sum = 0;
+               double    sum2 = 0;
+                int       count = 0;
+               /* now loop for each position */
+               int doshifts=shifts;
+               if (shifts<0) { doshifts=-shifts; }
+               for(int loop=0;loop<doshifts;loop++) {
+                   /* calculate shift step */
+                   int shiftstep=1;
+                   if (shifts<0) {
+                       shiftstep = loop*rpnstack->s[stptr];
+                   } else { 
+                       shiftstep = rpnstack->s[stptr+loop]; 
+                   }
+                   if(shiftstep <0) {
+                       rrd_set_error("negative shift step not allowed: %i",shiftstep);
+                       return -1;
+                   }
+                   shiftstep=(int)ceil((float)shiftstep/(float)dsstep);
+                   /* loop all local shifts */
+                   for(int i=0;i<=locstep;i++) {
+                       /* now calculate offset into data-array - relative to output_idx*/
+                       int offset=shiftstep+i;
+                       /* and process if we have index 0 of above */
+                       if ((offset>=0)&&(offset<output_idx)) {
+                           /* get the value */
+                           val =rpnp[rpi - 1].data[-dscount * offset];
+                           /* and handle the non NAN case only*/
+                           if (! isnan(val)) {
+                               sum+=val;
+                               sum2+=val*val;
+                               count++;
+                           }
+                       }
+                   }
+               }
+               /* do the final calculations */
+               val=DNAN;
+               if (rpnp[rpi].op == OP_PREDICT) {  /* the average */
+                   if (count>0) {
+                       val = sum/(double)count;
+                   } 
+               } else {
+                   if (count>1) { /* the sigma case */
+                       val=count*sum2-sum*sum;
+                       if (val<0) {
+                           val=DNAN;
+                       } else {
+                           val=sqrt(val/((float)count*((float)count-1.0)));
+                       }
+                   }
+               }
+               rpnstack->s[stptr] = val;
+           }
+            break;
         case OP_TREND:
         case OP_TRENDNAN:
             stackunderflow(1);
index 317ffbd2bbfdd0bc4364faec66ba922b811736c8..10c8edd4b3244d9abd41d378400aebb02fb83a1b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  ****************************************************************************
  * rrd_rpncalc.h  RPN calculator functions
  ****************************************************************************/
@@ -18,6 +18,7 @@ enum op_en { OP_NUMBER = 0, OP_VARIABLE, OP_INF, OP_PREV, OP_NEGINF,
     OP_UN, OP_END, OP_LTIME, OP_NE, OP_ISINF, OP_PREV_OTHER, OP_COUNT,
     OP_ATAN, OP_SQRT, OP_SORT, OP_REV, OP_TREND, OP_TRENDNAN,
     OP_ATAN2, OP_RAD2DEG, OP_DEG2RAD,
+    OP_PREDICT,OP_PREDICTSIGMA,
     OP_AVG, OP_ABS, OP_ADDNAN
 };
 
index 9268d0c295abaff0dbeb0e59fdaa997aae8ee0a0..993e3e7b038e7dbfa92af921dfb1f608c6806eb9 100644 (file)
@@ -1,12 +1,12 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  * This file:     Copyright 2003 Peter Stamfest <peter@stamfest.at> 
  *                             & Tobias Oetiker
  * Distributed under the GPL
  *****************************************************************************
  * rrd_thread_safe.c   Contains routines used when thread safety is required
  *****************************************************************************
- * $Id: rrd_thread_safe.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_thread_safe.c 1752 2009-03-06 05:39:37Z oetiker $
  *************************************************************************** */
 
 #include <pthread.h>
index 92e6ba5c165b07d45c80820a4e33915293d3b8ee..ce669b80ee214bfd0e49030eeea93a2290380e3b 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  * This file:     Copyright 2003 Peter Stamfest <peter@stamfest.at> 
  *                             & Tobias Oetiker
  * Distributed under the GPL
@@ -7,7 +7,7 @@
  * rrd_thread_safe.c   Contains routines used when thread safety is required
  *                     for win32
  *****************************************************************************
- * $Id: rrd_thread_safe_nt.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_thread_safe_nt.c 1677 2008-11-18 17:19:17Z oetiker $
  *************************************************************************** */
 
 #include <windows.h>
@@ -22,7 +22,7 @@ static CRITICAL_SECTION CriticalSection;
 
 
 /* Once-only initialisation of the key */
-static volatile LONG context_key_once = 0;
+static DWORD context_key_once = 0;
 
 
 /* Free the thread-specific rrd_context - we might actually use
@@ -38,7 +38,7 @@ static void context_destroy_context(
 static void context_init_context(
     void)
 {
-    if (!InterlockedExchange(&context_key_once, 1)) {
+    if (!InterlockedExchange((LONG*)(&context_key_once), 1)) {
         context_key = TlsAlloc();
         InitializeCriticalSection(&CriticalSection);
         atexit(context_destroy_context);
@@ -51,7 +51,7 @@ rrd_context_t *rrd_get_context(
 
     context_init_context();
 
-    ctx = (rrd_context_t*)(TlsGetValue(context_key));
+    ctx = (rrd_context_t*)TlsGetValue(context_key);
     if (!ctx) {
         ctx = rrd_new_context();
         TlsSetValue(context_key, ctx);
@@ -59,19 +59,22 @@ rrd_context_t *rrd_get_context(
     return ctx;
 }
 
-#ifdef WIN32
-       rrd_context_t *rrd_force_new_context(void)
-       {
-               rrd_context_t *ctx;
 
-               context_init_context();
+/* this was added by the win32 porters Christof.Wegmann@exitgames.com */
 
-               ctx = rrd_new_context();
-               TlsSetValue(context_key, ctx);
+rrd_context_t *rrd_force_new_context(
+    void)
+{
+    rrd_context_t *ctx;
+
+    context_init_context();
+
+    ctx = rrd_new_context();
+    TlsSetValue(context_key, ctx);
+
+    return ctx;
+}
 
-               return ctx;
-       }
-#endif
 
 #undef strerror
 const char *rrd_strerror(
index 673598790e1d1849fa74eeea806e13607aaabe47..8f233268f3fe46d5cb5b1387f5868d81cc6af829 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_tool.c  Startup wrapper
  *****************************************************************************/
@@ -49,7 +49,7 @@ void PrintUsage(
 
     const char *help_main =
         N_("RRDtool %s"
-           "  Copyright 1997-2009 by Tobias Oetiker <tobi@oetiker.ch>\n"
+           "  Copyright 1997-2008 by Tobias Oetiker <tobi@oetiker.ch>\n"
            "               Compiled %s %s\n\n"
            "Usage: rrdtool [options] command command_options\n\n");
 
@@ -57,7 +57,7 @@ void PrintUsage(
         N_
         ("Valid commands: create, update, updatev, graph, graphv,  dump, restore,\n"
          "\t\tlast, lastupdate, first, info, fetch, tune,\n"
-         "\t\tresize, xport\n\n");
+         "\t\tresize, xport, flushcached\n\n");
 
     const char *help_listremote =
         N_("Valid remote commands: quit, ls, cd, mkdir, pwd\n\n");
@@ -97,7 +97,8 @@ void PrintUsage(
     const char *help_update =
         N_("* update - update an RRD\n\n"
            "\trrdtool update filename\n"
-           "\t\t--template|-t ds-name:ds-name:...\n"
+           "\t\t[--template|-t ds-name:ds-name:...]\n"
+          "\t\t[--daemon <address>]\n"
            "\t\ttime|N:value[:value...]\n\n"
            "\t\tat-time@value[:value...]\n\n"
            "\t\t[ time:value[:value...] ..]\n\n");
@@ -106,7 +107,7 @@ void PrintUsage(
         N_("* updatev - a verbose version of update\n"
            "\treturns information about values, RRAs, and datasources updated\n\n"
            "\trrdtool updatev filename\n"
-           "\t\t--template|-t ds-name:ds-name:...\n"
+           "\t\t[--template|-t ds-name:ds-name:...]\n"
            "\t\ttime|N:value[:value...]\n\n"
            "\t\tat-time@value[:value...]\n\n"
            "\t\t[ time:value[:value...] ..]\n\n");
@@ -115,7 +116,13 @@ void PrintUsage(
         N_("* fetch - fetch data out of an RRD\n\n"
            "\trrdtool fetch filename.rrd CF\n"
            "\t\t[-r|--resolution resolution]\n"
-           "\t\t[-s|--start start] [-e|--end end]\n\n");
+           "\t\t[-s|--start start] [-e|--end end]\n"
+          "\t\t[--daemon <address>]\n\n");
+
+    const char *help_flushcached =
+        N_("* flushcached - flush cached data out to an RRD file\n\n"
+           "\trrdtool flushcached filename.rrd\n"
+          "\t\t[--daemon <address>]\n\n");
 
 /* break up very large strings (help_graph, help_tune) for ISO C89 compliance*/
 
@@ -128,7 +135,7 @@ void PrintUsage(
            "\trrdtool graphv filename [-s|--start seconds] [-e|--end seconds]\n");
     const char *help_graph1 =
         N_("\t\t[-x|--x-grid x-axis grid and label]\n"
-           "\t\t[-Y|--alt-y-grid]\n"
+           "\t\t[-Y|--alt-y-grid] [--full-size-mode]\n"
            "\t\t[-y|--y-grid y-axis grid and label]\n"
            "\t\t[-v|--vertical-label string] [-w|--width pixels]\n"
            "\t\t[--right-axis scale:shift] [--right-axis-label label]\n"
@@ -136,7 +143,7 @@ void PrintUsage(
            "\t\t[-h|--height pixels] [-o|--logarithmic]\n"
            "\t\t[-u|--upper-limit value] [-z|--lazy]\n"
            "\t\t[-l|--lower-limit value] [-r|--rigid]\n"
-           "\t\t[-g|--no-legend] [--full-size-mode]\n"
+           "\t\t[-g|--no-legend] [--daemon <address>]\n"
            "\t\t[-F|--force-rules-legend]\n" "\t\t[-j|--only-graph]\n");
     const char *help_graph2 =
         N_("\t\t[-n|--font FONTTAG:size:font]\n"
@@ -222,7 +229,7 @@ void PrintUsage(
         C_LASTUPDATE, C_FIRST, C_UPDATE, C_FETCH, C_GRAPH, C_GRAPHV,
         C_TUNE,
         C_RESIZE, C_XPORT, C_QUIT, C_LS, C_CD, C_MKDIR, C_PWD,
-        C_UPDATEV
+        C_UPDATEV, C_FLUSHCACHED
     };
     int       help_cmd = C_NONE;
 
@@ -247,6 +254,8 @@ void PrintUsage(
             help_cmd = C_UPDATEV;
         else if (!strcmp(cmd, "fetch"))
             help_cmd = C_FETCH;
+        else if (!strcmp(cmd, "flushcached"))
+            help_cmd = C_FLUSHCACHED;
         else if (!strcmp(cmd, "graph"))
             help_cmd = C_GRAPH;
         else if (!strcmp(cmd, "graphv"))
@@ -307,6 +316,9 @@ void PrintUsage(
     case C_FETCH:
         fputs(_(help_fetch), stdout);
         break;
+    case C_FLUSHCACHED:
+        fputs(_(help_flushcached), stdout);
+        break;
     case C_GRAPH:
         fputs(_(help_graph0), stdout);
         fputs(_(help_graph1), stdout);
@@ -517,7 +529,6 @@ int HandleInputLine(
 #if defined(HAVE_SYS_STAT_H)
     struct stat st;
 #endif
-    char     *cwd;      /* To hold current working dir on call to pwd */
 
     /* Reset errno to 0 before we start.
      */
@@ -550,6 +561,7 @@ int HandleInputLine(
             return (0);
         }
         if (argc > 1 && strcmp("pwd", argv[1]) == 0) {
+            char     *cwd;      /* To hold current working dir on call to pwd */
             if (argc > 2) {
                 printf("ERROR: invalid parameter count for pwd\n");
                 return (1);
@@ -652,26 +664,7 @@ int HandleInputLine(
     else if (strcmp("last", argv[1]) == 0)
         printf("%ld\n", rrd_last(argc - 1, &argv[1]));
     else if (strcmp("lastupdate", argv[1]) == 0) {
-        time_t    last_update;
-        char    **ds_namv;
-        char    **last_ds;
-        unsigned long ds_cnt, i;
-
-        if (rrd_lastupdate(argc - 1, &argv[1], &last_update,
-                           &ds_cnt, &ds_namv, &last_ds) == 0) {
-            for (i = 0; i < ds_cnt; i++)
-                printf(" %s", ds_namv[i]);
-            printf("\n\n");
-            printf("%10lu:", last_update);
-            for (i = 0; i < ds_cnt; i++) {
-                printf(" %s", last_ds[i]);
-                free(last_ds[i]);
-                free(ds_namv[i]);
-            }
-            printf("\n");
-            free(last_ds);
-            free(ds_namv);
-        }
+        rrd_lastupdate(argc - 1, &argv[1]);
     } else if (strcmp("first", argv[1]) == 0)
         printf("%ld\n", rrd_first(argc - 1, &argv[1]));
     else if (strcmp("update", argv[1]) == 0)
@@ -820,6 +813,8 @@ int HandleInputLine(
 
     } else if (strcmp("tune", argv[1]) == 0)
         rrd_tune(argc - 1, &argv[1]);
+    else if (strcmp("flushcached", argv[1]) == 0)
+        rrd_flushcached(argc - 1, &argv[1]);
     else {
         rrd_set_error("unknown function '%s'", argv[1]);
     }
index fbe55f54447474f9659d7e76ec71bb0a5b26e085..c1c9728436a327ea5f4d924eb207f4fbb9a7c359 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_tool.h   Common Header File
  *****************************************************************************/
@@ -83,15 +83,24 @@ extern    "C" {
     int       rrd_create_fn(
     const char *file_name,
     rrd_t *rrd);
-    int       rrd_fetch_fn(
-    const char *filename,
-    enum cf_en cf_idx,
-    time_t *start,
-    time_t *end,
-    unsigned long *step,
-    unsigned long *ds_cnt,
-    char ***ds_namv,
-    rrd_value_t **data);
+    int rrd_fetch_fn (const char *filename,
+            enum cf_en cf_idx,
+            time_t *start,
+            time_t *end,
+            unsigned long *step,
+            unsigned long *ds_cnt,
+            char ***ds_namv,
+            rrd_value_t **data);
+
+
+#ifdef HAVE_LIBDBI
+int rrd_fetch_fn_libdbi(char *filename, enum cf_en cf_idx,
+                       time_t *start,time_t *end,
+                       unsigned long *step,
+                       unsigned long *ds_cnt,
+                       char        ***ds_namv,
+                       rrd_value_t **data);
+#endif
 
 #define RRD_READONLY    (1<<0)
 #define RRD_READWRITE   (1<<1)
@@ -106,11 +115,13 @@ extern    "C" {
     long      ds_match(
     rrd_t *rrd,
     char *ds_nam);
+    off_t rrd_get_header_size(
+    rrd_t *rrd);
     double    rrd_diff(
     char *a,
     char *b);
 
-#endif
+#endif /* _RRD_TOOL_H */
 
 #ifdef  __cplusplus
 }
index e97dac5de03cb6df4aa6669f7c04c7fdff4878d0..a919657b20bd8a874ad6530efe3c6022c82ef3a1 100644 (file)
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * change header parameters of an rrd
  *****************************************************************************
- * $Id: rrd_tune.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_tune.c 1677 2008-11-18 17:19:17Z oetiker $
  * $Log$
  * Revision 1.6  2004/05/26 22:11:12  oetiker
  * reduce compiler warnings. Many small fixes. -- Mike Slifcak <slif@bellsouth.net>
  *
  *****************************************************************************/
 
+#include <stdlib.h>
+#include <locale.h>
+
 #include "rrd_tool.h"
 #include "rrd_rpncalc.h"
 #include "rrd_hw.h"
-#include <locale.h>
-
-#ifdef WIN32
-#include <stdlib.h>
-#endif
 
 int       set_hwarg(
     rrd_t *rrd,
@@ -102,6 +100,7 @@ int rrd_tune(
     opterr = 0;         /* initialize getopt */
 
 
+    rrd_init(&rrd);
     rrd_file = rrd_open(argv[1], &rrd, RRD_READWRITE);
     if (rrd_file == NULL) {
         rrd_free(&rrd);
index 998b2acfb96ff2173fc36f9cff124a1f2f7f24c2..6459e64dc35c13f7406a42f29cea43ad72d8d237 100644 (file)
@@ -1,10 +1,10 @@
-
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
+ *                Copyright by Florian Forster, 2008
  *****************************************************************************
  * rrd_update.c  RRD Update Function
  *****************************************************************************
- * $Id: rrd_update.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrd_update.c 1836 2009-06-01 13:58:58Z oetiker $
  *****************************************************************************/
 
 #include "rrd_tool.h"
 
 #include <locale.h>
 
-#ifdef WIN32
-#include <stdlib.h>
-#endif
-
 #include "rrd_hw.h"
 #include "rrd_rpncalc.h"
 
 #include "rrd_is_thread_safe.h"
 #include "unused.h"
 
+#include "rrd_client.h"
+
 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
 /*
  * WIN32 does not have gettimeofday    and struct timeval. This is a quick and dirty
@@ -284,7 +282,7 @@ static int write_changes_to_disk(
  * normalize time as returned by gettimeofday. usec part must
  * be always >= 0
  */
-static inline void normalize_time(
+static void normalize_time(
     struct timeval *t)
 {
     if (t->tv_usec < 0) {
@@ -297,7 +295,7 @@ static inline void normalize_time(
  * Sets current_time and current_time_usec based on the current time.
  * current_time_usec is set to 0 if the version number is 1 or 2.
  */
-static inline void initialize_time(
+static void initialize_time(
     time_t *current_time,
     unsigned long *current_time_usec,
     int version)
@@ -323,6 +321,7 @@ rrd_info_t *rrd_update_v(
     char     *tmplt = NULL;
     rrd_info_t *result = NULL;
     rrd_infoval_t rc;
+    char *opt_daemon = NULL;
     struct option long_options[] = {
         {"template", required_argument, 0, 't'},
         {0, 0, 0, 0}
@@ -352,6 +351,15 @@ rrd_info_t *rrd_update_v(
         }
     }
 
+    opt_daemon = getenv (ENV_RRDCACHED_ADDRESS);
+    if (opt_daemon != NULL) {
+        rrd_set_error ("The \"%s\" environment variable is defined, "
+                "but \"%s\" cannot work with rrdcached. Either unset "
+                "the environment variable or use \"update\" instead.",
+                ENV_RRDCACHED_ADDRESS, argv[0]);
+        goto end_tag;
+    }
+
     /* need at least 2 arguments: filename, data. */
     if (argc - optind < 2) {
         rrd_set_error("Not enough arguments");
@@ -373,18 +381,20 @@ int rrd_update(
 {
     struct option long_options[] = {
         {"template", required_argument, 0, 't'},
+        {"daemon",   required_argument, 0, 'd'},
         {0, 0, 0, 0}
     };
     int       option_index = 0;
     int       opt;
     char     *tmplt = NULL;
     int       rc = -1;
+    char     *opt_daemon = NULL;
 
     optind = 0;
     opterr = 0;         /* initialize getopt */
 
     while (1) {
-        opt = getopt_long(argc, argv, "t:", long_options, &option_index);
+        opt = getopt_long(argc, argv, "t:d:", long_options, &option_index);
 
         if (opt == EOF)
             break;
@@ -394,6 +404,17 @@ int rrd_update(
             tmplt = strdup(optarg);
             break;
 
+        case 'd':
+            if (opt_daemon != NULL)
+                free (opt_daemon);
+            opt_daemon = strdup (optarg);
+            if (opt_daemon == NULL)
+            {
+                rrd_set_error("strdup failed.");
+                goto out;
+            }
+            break;
+
         case '?':
             rrd_set_error("unknown option '%s'", argv[optind - 1]);
             goto out;
@@ -406,10 +427,44 @@ int rrd_update(
         goto out;
     }
 
-    rc = rrd_update_r(argv[optind], tmplt,
-                      argc - optind - 1, (const char **) (argv + optind + 1));
+    {   /* try to connect to rrdcached */
+        int status = rrdc_connect(opt_daemon);
+        if (status != 0) return status;
+    }
+
+    if ((tmplt != NULL) && rrdc_is_connected(opt_daemon))
+    {
+        rrd_set_error("The caching daemon cannot be used together with "
+                "templates yet.");
+        goto out;
+    }
+
+    if (! rrdc_is_connected(opt_daemon))
+    {
+      rc = rrd_update_r(argv[optind], tmplt,
+                        argc - optind - 1, (const char **) (argv + optind + 1));
+    }
+    else /* we are connected */
+    {
+        rc = rrdc_update (argv[optind], /* file */
+                          argc - optind - 1, /* values_num */
+                          (const char *const *) (argv + optind + 1)); /* values */
+        if (rc > 0)
+            rrd_set_error("Failed sending the values to rrdcached: %s",
+                          rrd_strerror (rc));
+    }
+
   out:
-    free(tmplt);
+    if (tmplt != NULL)
+    {
+        free(tmplt);
+        tmplt = NULL;
+    }
+    if (opt_daemon != NULL)
+    {
+        free (opt_daemon);
+        opt_daemon = NULL;
+    }
     return rc;
 }
 
@@ -463,6 +518,7 @@ int _rrd_update(
         goto err_out;
     }
 
+    rrd_init(&rrd);
     if ((rrd_file = rrd_open(filename, &rrd, RRD_READWRITE)) == NULL) {
         goto err_free;
     }
@@ -560,41 +616,6 @@ int _rrd_update(
     return -1;
 }
 
-/*
- * get exclusive lock to whole file.
- * lock gets removed when we close the file
- *
- * returns 0 on success
- */
-int rrd_lock(
-    rrd_file_t *file)
-{
-    int       rcstat;
-
-    {
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
-        struct _stat st;
-
-        if (_fstat(file->fd, &st) == 0) {
-            rcstat = _locking(file->fd, _LK_NBLCK, st.st_size);
-        } else {
-            rcstat = -1;
-        }
-#else
-        struct flock lock;
-
-        lock.l_type = F_WRLCK;  /* exclusive write lock */
-        lock.l_len = 0; /* whole file */
-        lock.l_start = 0;   /* start of file */
-        lock.l_whence = SEEK_SET;   /* end of file */
-
-        rcstat = fcntl(file->fd, F_SETLK, &lock);
-#endif
-    }
-
-    return (rcstat);
-}
-
 /*
  * Allocate some important arrays used, and initialize the template.
  *
@@ -943,8 +964,19 @@ static int get_time_from_reading(
         *current_time_usec = tmp_time.tv_usec;
     } else {
         old_locale = setlocale(LC_NUMERIC, "C");
+        errno = 0;
         tmp = strtod(updvals[0], 0);
+        if (errno > 0) {
+            rrd_set_error("converting '%s' to float: %s",
+                updvals[0], rrd_strerror(errno));
+            return -1;
+        };
         setlocale(LC_NUMERIC, old_locale);
+        if (tmp < 0.0){
+            gettimeofday(&tmp_time, 0);
+            tmp = (double)tmp_time.tv_sec + (double)tmp_time.tv_usec * 1e-6f + tmp;
+        }
+
         *current_time = floor(tmp);
         *current_time_usec = (long) ((tmp - (double) *current_time) * 1e6f);
     }
@@ -1039,12 +1071,12 @@ static int update_pdp_prep(
                 old_locale = setlocale(LC_NUMERIC, "C");
                 errno = 0;
                 pdp_new[ds_idx] = strtod(updvals[ds_idx + 1], &endptr);
-                setlocale(LC_NUMERIC, old_locale);
                 if (errno > 0) {
                     rrd_set_error("converting '%s' to float: %s",
                                   updvals[ds_idx + 1], rrd_strerror(errno));
                     return -1;
                 };
+                setlocale(LC_NUMERIC, old_locale);
                 if (endptr[0] != '\0') {
                     rrd_set_error
                         ("conversion of '%s' to float not complete: tail '%s'",
@@ -1054,16 +1086,16 @@ static int update_pdp_prep(
                 rate = pdp_new[ds_idx] / interval;
                 break;
             case DST_GAUGE:
-                errno = 0;
                 old_locale = setlocale(LC_NUMERIC, "C");
+                errno = 0;
                 pdp_new[ds_idx] =
                     strtod(updvals[ds_idx + 1], &endptr) * interval;
-                setlocale(LC_NUMERIC, old_locale);
                 if (errno) {
                     rrd_set_error("converting '%s' to float: %s",
                                   updvals[ds_idx + 1], rrd_strerror(errno));
                     return -1;
                 };
+                setlocale(LC_NUMERIC, old_locale);
                 if (endptr[0] != '\0') {
                     rrd_set_error
                         ("conversion of '%s' to float not complete: tail '%s'",
@@ -1500,7 +1532,7 @@ static int update_cdp_prep(
             if (elapsed_pdp_st > 2) {
                 reset_cdp(rrd, elapsed_pdp_st, pdp_temp, last_seasonal_coef,
                           seasonal_coef, rra_idx, ds_idx, cdp_idx,
-                          (enum cf_en)current_cf);
+                          current_cf);
             }
         }
 
@@ -1869,7 +1901,7 @@ static int write_to_rras(
                  scratch_idx = CDP_secondary_val,
                  step_subtract = 2) {
 
-            off_t rra_pos_new;
+            size_t rra_pos_new;
 #ifdef DEBUG
             fprintf(stderr, "  -- RRA Preseek %ld\n", rrd_file->pos);
 #endif
@@ -1882,7 +1914,7 @@ static int write_to_rras(
               + ds_cnt * rra_ptr->cur_row * sizeof(rrd_value_t);
 
             /* re-seek if the position is wrong or we wrapped around */
-            if (rra_pos_new != rrd_file->pos) {
+            if ((size_t)rra_pos_new != rrd_file->pos) {
                 if (rrd_seek(rrd_file, rra_pos_new, SEEK_SET) != 0) {
                     rrd_set_error("seek error in rrd");
                     return -1;
@@ -1906,6 +1938,8 @@ static int write_to_rras(
                 (rrd_file, rrd, rra_idx, scratch_idx,
                  pcdp_summary, rra_time) == -1)
                 return -1;
+
+            rrd_notify_row(rrd_file, rra_idx, rra_pos_new, rra_time);
         }
 
         rra_start += rra_def->row_cnt * ds_cnt * sizeof(rrd_value_t);
@@ -1943,12 +1977,14 @@ static int write_RRA_row(
             /* append info to the return hash */
             *pcdp_summary = rrd_info_push(*pcdp_summary,
                                           sprintf_alloc
-                                          ("[%lli]RRA[%s][%lu]DS[%s]", (long long)rra_time,
+                                          ("[%lli]RRA[%s][%lu]DS[%s]", 
+                                           (long long)rra_time,
                                            rrd->rra_def[rra_idx].cf_nam,
                                            rrd->rra_def[rra_idx].pdp_cnt,
                                            rrd->ds_def[ds_idx].ds_nam),
-                                          RD_I_VAL, iv);
+                                           RD_I_VAL, iv);
         }
+        errno = 0;
         if (rrd_write(rrd_file,
                       &(rrd->cdp_prep[cdp_idx].scratch[CDP_scratch_idx].
                         u_val), sizeof(rrd_value_t)) != sizeof(rrd_value_t)) {
diff --git a/src/rrd_utils.c b/src/rrd_utils.c
new file mode 100644 (file)
index 0000000..9ac3e8a
--- /dev/null
@@ -0,0 +1,97 @@
+/**
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; only version 2 of the License is applicable.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ **/
+
+#include "rrd_tool.h"
+
+#include <stdlib.h>
+#include <assert.h>
+
+#ifdef WIN32
+#      define random() rand()
+#      define srandom(x) srand(x)
+#      define getpid() 0
+#endif /* WIN32 */
+
+/* make sure that the random number generator seeded EXACTLY ONCE */
+long rrd_random(void)
+{
+    static int rand_init = 0;
+    if (!rand_init) {
+        srandom((unsigned int) time(NULL) + (unsigned int) getpid());
+        rand_init++;
+    }
+
+    return random();
+}
+
+/* rrd_add_ptr: add a pointer to a dynamically sized array of pointers,
+ * realloc as necessary.  returns 1 on success, 0 on failure.
+ */
+
+int rrd_add_ptr(void ***dest, size_t *dest_size, void *src)
+{
+    void **temp;
+
+    assert(dest != NULL);
+
+    temp = (void **) rrd_realloc(*dest, (*dest_size+1) * sizeof(*dest));
+    if (!temp)
+        return 0;
+
+    *dest = temp;
+    temp[*dest_size] = src;
+    (*dest_size)++;
+
+    return 1;
+}
+
+/* like rrd_add_ptr, but calls strdup() on a string first. */
+int rrd_add_strdup(char ***dest, size_t *dest_size, char *src)
+{
+    char *dup_src;
+    int add_ok;
+
+    assert(dest != NULL);
+    assert(src  != NULL);
+
+    dup_src = strdup(src);
+    if (!dup_src)
+        return 0;
+
+    add_ok = rrd_add_ptr((void ***)dest, dest_size, (void *)dup_src);
+    if (!add_ok)
+        free(dup_src);
+
+    return add_ok;
+}
+
+void rrd_free_ptrs(void ***src, size_t *cnt)
+{
+    void **sp;
+
+    assert(src != NULL);
+    sp = *src;
+
+    if (sp == NULL)
+        return;
+
+    while (*cnt > 0) {
+        (*cnt)--;
+        free(sp[*cnt]);
+    }
+
+    free (sp);
+    *src = NULL;
+}
index 11eb2e65f3ee3874ae71bcffa3e09a1d1dbe9464..5b773bafa2c62252e6b71a3d94f3b873dff2121b 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_version Return
  *****************************************************************************
index 50d094c410c724e4e5d79e0589053eb210590bad..5d3f3ebbb8eae57ed51daa221926e71df93aa025 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  ****************************************************************************
  * rrd_xport.c  export RRD data 
  ****************************************************************************/
@@ -10,6 +10,7 @@
 #include "rrd_graph.h"
 #include "rrd_xport.h"
 #include "unused.h"
+#include "rrd_client.h"
 
 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
 #include <io.h>
@@ -53,17 +54,19 @@ int rrd_xport(
     char ***legend_v,   /* legend entries */
     rrd_value_t **data)
 {                       /* two dimensional array containing the data */
-
     image_desc_t im;
     time_t    start_tmp = 0, end_tmp = 0;
     rrd_time_value_t start_tv, end_tv;
     char     *parsetime_error = NULL;
+    char     *opt_daemon = NULL;
+
     struct option long_options[] = {
         {"start", required_argument, 0, 's'},
         {"end", required_argument, 0, 'e'},
         {"maxrows", required_argument, 0, 'm'},
         {"step", required_argument, 0, 261},
         {"enumds", no_argument, 0, 262},    /* these are handled in the frontend ... */
+        {"daemon", required_argument, 0, 'd'},
         {0, 0, 0, 0}
     };
 
@@ -79,7 +82,7 @@ int rrd_xport(
         int       option_index = 0;
         int       opt;
 
-        opt = getopt_long(argc, argv, "s:e:m:", long_options, &option_index);
+        opt = getopt_long(argc, argv, "s:e:m:d:", long_options, &option_index);
 
         if (opt == EOF)
             break;
@@ -109,6 +112,24 @@ int rrd_xport(
                 return -1;
             }
             break;
+        case 'd':
+        {
+            if (opt_daemon != NULL)
+            {
+                rrd_set_error ("You cannot specify --daemon "
+                        "more than once.");
+                return (-1);
+            }
+
+            opt_daemon = strdup(optarg);
+            if (opt_daemon == NULL)
+            {
+                rrd_set_error("strdup error");
+                return -1;
+            }
+            break;
+        }
+
         case '?':
             rrd_set_error("unknown option '%s'", argv[optind - 1]);
             return -1;
@@ -147,6 +168,12 @@ int rrd_xport(
         return (-1);
     }
 
+    {   /* try to connect to rrdcached */
+        int status = rrdc_connect(opt_daemon);
+        if (opt_daemon) free(opt_daemon);
+        if (status != 0) return status;
+    }
+
     if (rrd_xport_fn(&im, start, end, step, col_cnt, legend_v, data) == -1) {
         im_free(&im);
         return -1;
@@ -228,7 +255,7 @@ int rrd_xport_fn(
             ref_list[xport_counter++] = i;
             *step_list_ptr = im->gdes[im->gdes[i].vidx].step;
             /* printf("%s:%lu\n",im->gdes[i].legend,*step_list_ptr); */
-            *step_list_ptr++;
+            step_list_ptr++;
             /* reserve room for one legend entry */
             /* is FMT_LEG_LEN + 5 the correct size? */
             if ((legend_list[j] =
index 87177455be3a82f00d66e62e6bb67a4954b39af5..e517f6c88da033965e3d067bfae52bd96e2b8dab 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  ****************************************************************************
  * rrd_xport.h  contains XML related constants
  ****************************************************************************/
index 1d0f153c26e0fd181717d74150a9a46a85b9cc87..490d42223e32700ac844b6e0e8d754fc0356e332 100644 (file)
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * RRDtool 1.3.8  Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrdupdate.c  Main program for the (standalone) rrdupdate utility
  *****************************************************************************
- * $Id: rrdupdate.c 1801 2009-05-19 13:45:05Z oetiker $
+ * $Id: rrdupdate.c 1484 2008-09-06 14:24:43Z oetiker $
  *****************************************************************************/
 
 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H)
index 53db0d527a356ac76f8748fb439a72ecc88d1eaa..61992343541501561583916e669d07502efa0d31 100644 (file)
@@ -28,9 +28,9 @@
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
-#define NUMVERS 1.3040
+#define NUMVERS 1.3020
 #define PACKAGE_NAME "rrdtool"
-#define PACKAGE_VERSION "1.3.4"
+#define PACKAGE_VERSION "1.3.2"
 #define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION
 
 #define isinf(a) (_fpclass(a) == _FPCLASS_NINF || _fpclass(a) == _FPCLASS_PINF)