From 8892808f3a79ec485e273390213ef3f16792eb54 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 8 Jun 2008 19:41:21 +0200 Subject: [PATCH] Imported upstream version 1.3rc9. --- CHANGES | 215 +++ Makefile.in | 11 +- NEWS | 2 +- TODO | 40 +- aclocal.m4 | 755 ++++++---- bindings/Makefile.in | 11 +- bindings/perl-piped/RRDp.pm | 2 +- bindings/perl-shared/RRDs.pm | 2 +- bindings/perl-shared/RRDs.xs | 18 +- bindings/python/rrdtoolmodule.c | 54 +- bindings/ruby/main.c | 20 +- bindings/tcl/Makefile.am | 4 +- bindings/tcl/Makefile.in | 13 +- bindings/tcl/tclrrd.c | 6 +- config.guess | 34 +- config.sub | 24 +- configure | 1907 +++++++++++++++++--------- configure.ac | 16 +- doc/Makefile.in | 11 +- doc/RRDp.html | 25 +- doc/bin_dec_hex.1 | 6 +- doc/bin_dec_hex.txt | 2 +- doc/cdeftutorial.1 | 18 +- doc/cdeftutorial.txt | 2 +- doc/rpntutorial.1 | 2 +- doc/rpntutorial.txt | 2 +- doc/rrd-beginners.1 | 8 +- doc/rrd-beginners.txt | 2 +- doc/rrdbuild.1 | 100 +- doc/rrdbuild.html | 131 +- doc/rrdbuild.pod | 90 +- doc/rrdbuild.txt | 104 +- doc/rrdcgi.1 | 4 +- doc/rrdcgi.html | 68 +- doc/rrdcgi.txt | 2 +- doc/rrdcreate.1 | 2 +- doc/rrdcreate.html | 79 +- doc/rrdcreate.txt | 2 +- doc/rrddump.1 | 2 +- doc/rrddump.html | 9 +- doc/rrddump.txt | 2 +- doc/rrdfetch.1 | 6 +- doc/rrdfetch.html | 15 +- doc/rrdfetch.txt | 2 +- doc/rrdfirst.1 | 2 +- doc/rrdfirst.html | 6 +- doc/rrdfirst.txt | 2 +- doc/rrdgraph.1 | 54 +- doc/rrdgraph.html | 259 +--- doc/rrdgraph.pod | 42 +- doc/rrdgraph.txt | 48 +- doc/rrdgraph_data.1 | 2 +- doc/rrdgraph_data.txt | 2 +- doc/rrdgraph_examples.1 | 2 +- doc/rrdgraph_examples.txt | 2 +- doc/rrdgraph_graph.1 | 2 +- doc/rrdgraph_graph.html | 219 +-- doc/rrdgraph_graph.txt | 2 +- doc/rrdgraph_rpn.1 | 2 +- doc/rrdgraph_rpn.html | 167 +-- doc/rrdgraph_rpn.txt | 2 +- doc/rrdinfo.1 | 2 +- doc/rrdinfo.html | 3 +- doc/rrdinfo.txt | 2 +- doc/rrdlast.1 | 2 +- doc/rrdlast.html | 3 +- doc/rrdlast.txt | 2 +- doc/rrdlastupdate.1 | 2 +- doc/rrdlastupdate.html | 3 +- doc/rrdlastupdate.txt | 2 +- doc/rrdresize.1 | 2 +- doc/rrdresize.html | 15 +- doc/rrdresize.txt | 2 +- doc/rrdrestore.1 | 2 +- doc/rrdrestore.html | 12 +- doc/rrdrestore.txt | 2 +- doc/rrdthreads.1 | 4 +- doc/rrdthreads.html | 3 +- doc/rrdthreads.pod | 2 +- doc/rrdthreads.txt | 4 +- doc/rrdtool.1 | 2 +- doc/rrdtool.html | 66 +- doc/rrdtool.txt | 2 +- doc/rrdtune.1 | 2 +- doc/rrdtune.html | 55 +- doc/rrdtune.txt | 2 +- doc/rrdtutorial.1 | 76 +- doc/rrdtutorial.txt | 2 +- doc/rrdupdate.1 | 2 +- doc/rrdupdate.html | 22 +- doc/rrdupdate.txt | 2 +- doc/rrdxport.1 | 2 +- doc/rrdxport.html | 26 +- doc/rrdxport.txt | 2 +- examples/Makefile.in | 11 +- netware/Makefile | 2 +- rrdtool.spec | 2 +- src/Makefile.am | 18 +- src/Makefile.in | 75 +- src/librrd.sym | 39 + src/pngsize.c | 13 +- src/rrd.h | 111 +- src/rrd_cgi.c | 71 +- src/rrd_create.c | 6 +- src/rrd_diff.c | 4 +- src/rrd_dump.c | 4 +- src/rrd_error.c | 58 +- src/rrd_fetch.c | 16 +- src/rrd_first.c | 2 +- src/rrd_format.c | 4 +- src/rrd_format.h | 4 +- src/rrd_gfx.c | 10 +- src/rrd_graph.c | 273 ++-- src/rrd_graph.h | 10 +- src/rrd_graph_helper.c | 12 +- src/rrd_hw.c | 2 +- src/rrd_hw.h | 2 +- src/rrd_i18n.h | 2 +- src/rrd_info.c | 121 +- src/rrd_is_thread_safe.h | 4 +- src/rrd_last.c | 2 +- src/rrd_lastupdate.c | 2 +- src/rrd_nan_inf.c | 4 +- src/rrd_not_thread_safe.c | 23 +- src/rrd_open.c | 87 +- src/{parsetime.c => rrd_parsetime.c} | 26 +- src/{parsetime.h => rrd_parsetime.h} | 0 src/rrd_resize.c | 6 +- src/rrd_restore.c | 6 +- src/rrd_rpncalc.c | 2 +- src/rrd_rpncalc.h | 2 +- src/rrd_thread_safe.c | 20 +- src/rrd_thread_safe_nt.c | 14 +- src/rrd_tool.c | 14 +- src/rrd_tool.h | 36 +- src/rrd_tune.c | 4 +- src/rrd_update.c | 50 +- src/rrd_version.c | 2 +- src/rrd_xport.c | 14 +- src/rrd_xport.h | 2 +- src/rrdupdate.c | 4 +- win32/rrd.dsp | 2 +- win32/rrd.vcproj | 2 +- 143 files changed, 3403 insertions(+), 2774 deletions(-) create mode 100644 src/librrd.sym rename src/{parsetime.c => rrd_parsetime.c} (98%) rename src/{parsetime.h => rrd_parsetime.h} (100%) diff --git a/CHANGES b/CHANGES index d18c59f..b931de5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,218 @@ +2008-06-08 17:08 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, 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_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_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc9 + +2008-06-08 17:08 oetiker + + * src/rrd_gfx.c, src/rrd_graph.c: fixed pango markup switch ... we + still want the text to show even if no markup is enabled + +2008-06-08 16:47 oetiker + + * bindings/python/rrdtoolmodule.c, bindings/ruby/main.c, + src/librrd.sym: rrd_freemem has to be exported as well ... + +2008-06-08 16:23 oetiker + + * branches/1.2/program/src/pngsize.c, src/pngsize.c: fix for ticket + #121 jmpbuf on aix is a problem it seems, maybe this makes it + better. + +2008-06-08 15:59 oetiker + + * src/Makefile.am: prepare for the release of rrdtool-1.3rc8 + +2008-06-08 15:55 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, 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_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_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc8 + +2008-06-08 15:55 oetiker + + * bindings/perl-shared/RRDs.xs, bindings/python/rrdtoolmodule.c, + bindings/ruby/main.c, bindings/tcl/tclrrd.c, doc/rrdthreads.pod, + netware/Makefile, src/Makefile.am, src/librrd.sym, + src/parsetime.c, src/parsetime.h, src/rrd.h, src/rrd_cgi.c, + src/rrd_create.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_graph.c, src/rrd_graph.h, src/rrd_graph_helper.c, + src/rrd_info.c, src/rrd_nan_inf.c, src/rrd_not_thread_safe.c, + src/rrd_open.c, src/rrd_parsetime.c, src/rrd_parsetime.h, + src/rrd_resize.c, src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, + src/rrd_tool.c, src/rrd_tool.h, src/rrd_update.c, src/rrd_xport.c, + win32/rrd.dsp, win32/rrd.vcproj: 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. + +2008-06-07 14:35 oetiker + + * src/rrd_open.c: don't bother with don't need when there is neither + madvise not fadvise calls + +2008-06-06 16:38 oetiker + + * branches/1.2/program/src/rrd_graph.c, src/rrd_graph.c: fix for + --font bug (font names wer not being picked up at all). Bug + reported by Dmitry B. Bigunayk + +2008-06-05 20:56 oetiker + + * NEWS: added pango markup name + +2008-06-05 19:59 oetiker + + * src/rrd.h, src/rrd_error.c, src/rrd_format.h, src/rrd_gfx.c, + src/rrd_info.c, src/rrd_open.c, src/rrd_update.c: fixed indenting + +2008-06-05 19:59 oetiker + + * src/rrd_graph.c: disable pango markup by default. added + --pango-markup option for explicit enablement. + +2008-06-05 19:58 oetiker + + * doc/rrdgraph.pod, src/rrd_graph.h: disable pango markup by + default. added --pango-markup option for explicit enablement. + +2008-06-05 19:57 oetiker + + * bindings/python/rrdtoolmodule.c: fixed indenting + +2008-06-04 16:18 oetiker + + * bindings/tcl/Makefile.am, configure.ac: enable new building for + newer tcl versions + +2008-06-02 06:46 oetiker + + * configure.ac: updated documentation of library versioning system + +2008-06-02 06:43 oetiker + + * configure.ac: Had to reset the interface version number due to the + change in the rrd_context implementation. + +2008-06-02 06:21 oetiker + + * src/rrd_restore.c: 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). + +2008-06-01 21:12 oetiker + + * doc/rrdbuild.pod: integrated gentoo bits and spell fixes by Peter + Volkov + +2008-06-01 20:44 oetiker + + * src/rrd.h, src/rrd_error.c, src/rrd_not_thread_safe.c, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c: Patch for + rrd_context system by sebastian harl, making it simpler and less + error prone. Removing one buffer overflow in the process. + +2008-05-31 15:58 oetiker + + * doc/rrdbuild.pod: prepare for the release of rrdtool-1.3rc7 + +2008-05-31 15:57 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/pngsize.c, + src/rrd.h, src/rrd_cgi.c, src/rrd_create.c, src/rrd_datalang.c, + src/rrd_diff.c, src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, + src/rrd_first.c, src/rrd_format.c, src/rrd_format.h, + src/rrd_gfx.c, src/rrd_graph.c, src/rrd_graph_helper.c, + src/rrd_hw.c, src/rrd_hw.h, 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_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_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.3rc7 + +2008-05-31 15:56 oetiker + + * doc/rrdbuild.pod: added pkgconfig build instructions + +2008-05-31 12:28 oetiker + + * branches/1.2/program/src/rrd_graph.c, src/rrd_graph.c: make sure + vdef calcs only calc as far as originally requested. + +2008-05-27 22:24 oetiker + + * src/rrd_info.c: 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. + +2008-05-26 16:39 oetiker + + * trunk/talks/nordic-nagios-08/talk.odp: initial talk slides + +2008-05-26 11:45 oetiker + + * TODO: updated todo list + 2008-05-26 08:56 oetiker * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, diff --git a/Makefile.in b/Makefile.in index 549bcbd..3032d4e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -112,6 +112,7 @@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -134,14 +135,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ -INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ @@ -153,7 +152,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ @@ -171,8 +169,10 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -214,12 +214,13 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_PROGRAMS_FALSE = @STATIC_PROGRAMS_FALSE@ STATIC_PROGRAMS_TRUE = @STATIC_PROGRAMS_TRUE@ STRIP = @STRIP@ -TCL_INC_DIR = @TCL_INC_DIR@ +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@ diff --git a/NEWS b/NEWS index b7c5e47..ec85692 100644 --- a/NEWS +++ b/NEWS @@ -26,7 +26,7 @@ NEW File access methods (Bernhard Fischer) NEW Graphing (Tobi Oetiker) -------- * libart has been replaced by cairo/pango -* pango markup is supported +* pango markup is supported (--pango-markup) * full gridfitting * --graph-render-mode=mono for non antialiased graphing * --font-render-mode=mono for non antialiased fonts diff --git a/TODO b/TODO index baa64f7..c7a06c9 100644 --- a/TODO +++ b/TODO @@ -1,46 +1,18 @@ -What has to be done before the 1.2.0 Release --------------------------------------------- -* Sync Docs with reality (there are things described which have not been - implemented) +Random Feature Ideas for RRDtool +-------------------------------- +Updated: 2008-05-26 -* Write Changes Document with all new features - -* Update Tutorials for new Release. - -Future Ideas ------------- reverse order of stacked graph entries prior to plotting ... this is to make plotting order more naturally fit with the ordering of the legend ... make it possible to define order of legend items independant of their order on the commandline ... -use XDR to write architecture independant date - -have drawing methode modifier for the LINE, AREA, STACK functions which allows -to select wether the data points should be presented as stepes (todays state) -or connected with lines. - -LINEx:ds[#color][/method]:description - -be more clever in the fetch function when no complete data coverage for the -desired area is possible. - -Let the user define the base resolution of the graph independently of -the pixel resolution. If it is smaller than one pixel it will simply -be ignored - -allow sub second precision for the step definition - -modularise consolidation and acquisition functions +architecture independant storage format. -Allow the user to define vertical scaling of graphs in a more flexible way. -some thing like --inner-range 0-1000 and --outer-range 0-10000 which means -that the grapher can choose its vertical scaling in the given range ... -this would replace upper and lower limit +micro second precision -make the inclusion of G?PRINT like output in to the lables of other graph -elements possible +2036 stable time add axis on the right and on top of the graph ... diff --git a/aclocal.m4 b/aclocal.m4 index 54e8388..fdccf71 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -114,8 +114,7 @@ AC_SUBST($1)dnl #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory - [AC_REQUIRE([AC_CANONICAL_HOST])dnl - USE_NLS=yes + [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no @@ -221,7 +220,7 @@ glib_DEFUN([GLIB_WITH_NLS], AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) - GLIB_RUN_PROG([msgfmt -c -o /dev/null],[ + GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" @@ -447,7 +446,7 @@ fi]) dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) -# serial 35 IT_PROG_INTLTOOL +# serial 36 IT_PROG_INTLTOOL AC_DEFUN([IT_PROG_INTLTOOL], [AC_PREREQ([2.50])dnl @@ -460,7 +459,7 @@ case "$am__api_version" in esac if test -n "$1"; then - AC_MSG_CHECKING(for intltool >= $1) + AC_MSG_CHECKING([for intltool >= $1]) INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in` @@ -489,6 +488,7 @@ INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcar 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 $< [$]@' AC_SUBST(INTLTOOL_DESKTOP_RULE) AC_SUBST(INTLTOOL_DIRECTORY_RULE) @@ -508,6 +508,21 @@ AC_SUBST(INTLTOOL_CAVES_RULE) AC_SUBST(INTLTOOL_SCHEMAS_RULE) AC_SUBST(INTLTOOL_THEME_RULE) AC_SUBST(INTLTOOL_SERVICE_RULE) +AC_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) +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 # Use the tools built into the package, not the ones that are installed. AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract') @@ -530,19 +545,16 @@ if test "x$2" != "xno-xml"; then fi fi -AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv) -AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt) -AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge) -AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext) - # 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_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]], + [[extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr]])], [DATADIRNAME=share], [case $host in *-*-solaris*) @@ -583,10 +595,6 @@ AC_CONFIG_COMMANDS([intltool], [ for file in intltool-extract intltool-merge intltool-update; do sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \ -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \ - -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \ - -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \ - -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \ - -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \ -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \ < ${ac_aux_dir}/${file}.in > ${file}.out if cmp -s ${file} ${file}.out 2>/dev/null; then @@ -601,9 +609,7 @@ done ], [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}' prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" -INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}' -INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}' -INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}']) +INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}']) ]) @@ -652,7 +658,7 @@ AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL +# serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -740,7 +746,6 @@ AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl - AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR @@ -815,7 +820,7 @@ test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= @@ -842,6 +847,8 @@ file_magic*) ;; esac +_LT_REQUIRED_DARWIN_CHECKS + AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) @@ -902,8 +909,9 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +[AC_REQUIRE([LT_AC_PROG_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* @@ -915,13 +923,85 @@ $rm conftest* # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +[AC_REQUIRE([LT_AC_PROG_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 conftest* +$rm -r conftest* ])# _LT_LINKER_BOILERPLATE +# _LT_REQUIRED_DARWIN_CHECKS +# -------------------------- +# Check for some things on darwin +AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + + 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. + echo "int foo(void){return 1;}" > conftest.c + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib ${wl}-single_module conftest.c + if test -f libconftest.dylib; then + lt_cv_apple_cc_single_mod=yes + rm -rf libconftest.dylib* + fi + rm conftest.c + 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.[[0123]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) + # 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_AC_SYS_LIBPATH_AIX # ---------------------- @@ -932,12 +1012,20 @@ $rm conftest* # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +[AC_REQUIRE([LT_AC_PROG_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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi],[]) +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_AC_SYS_LIBPATH_AIX @@ -1168,13 +1256,17 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|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" ;; @@ -1191,6 +1283,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ;; *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" ;; @@ -1231,7 +1326,11 @@ sparc*-*solaris*) *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; esac ;; esac @@ -1262,7 +1361,7 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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. @@ -1303,11 +1402,12 @@ fi # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + 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 @@ -1323,7 +1423,7 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], $2=yes fi fi - $rm conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) @@ -1421,24 +1521,27 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl fi ;; *) - # 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. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + 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 + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - 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` + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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 ]) @@ -1591,7 +1694,7 @@ else 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="-dld"], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], @@ -1599,7 +1702,7 @@ else [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="-dld"]) + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) @@ -1665,7 +1768,8 @@ fi # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no @@ -1673,7 +1777,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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 @@ -1813,6 +1917,7 @@ else darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" + old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -1830,7 +1935,8 @@ fi # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker characteristics]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= @@ -1844,20 +1950,58 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" +m4_if($1,[],[ if test "$GCC" = yes; then - 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 ';' >/dev/null ; 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. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`echo "$lt_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"` + 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 +fi]) need_lib_prefix=unknown hardcode_into_libs=no @@ -1875,7 +2019,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -2014,12 +2158,8 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + 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' ;; @@ -2073,7 +2213,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -2136,7 +2276,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -2207,7 +2347,7 @@ linux* | k*bsd*-gnu) # 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)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + 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 @@ -2313,6 +2453,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -2408,6 +2552,13 @@ esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no +AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], +[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], +[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + 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" @@ -2418,7 +2569,8 @@ fi # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_ARG_WITH([tags], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) @@ -2679,7 +2831,7 @@ m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], # AC_PATH_TOOL_PREFIX # ------------------- -# find a file program which can recognise shared library +# find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) @@ -2742,7 +2894,7 @@ fi # AC_PATH_MAGIC # ------------- -# find a file program which can recognise a shared library +# find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -2889,7 +3041,7 @@ esac # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -[AC_CACHE_CHECK([how to recognise dependent libraries], +[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= @@ -2906,7 +3058,7 @@ lt_cv_deplibs_check_method='unknown' # whether `pass_all' will *always* work, you probably want this one. case $host_os in -aix4* | aix5*) +aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; @@ -2928,9 +3080,15 @@ cygwin*) 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'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' + # 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 ;; darwin* | rhapsody*) @@ -2975,7 +3133,7 @@ hpux10.20* | hpux11*) esac ;; -interix3*) +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)$' ;; @@ -3025,6 +3183,10 @@ 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 ;; @@ -3077,7 +3239,7 @@ AC_DEFUN([AC_PROG_NM], lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + 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 @@ -3293,10 +3455,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +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);}\n' +lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER @@ -3332,7 +3494,7 @@ aix3*) fi ;; -aix4* | aix5*) +aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi @@ -3389,6 +3551,7 @@ _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= +_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp @@ -3398,10 +3561,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +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); }\n' +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_AC_SYS_COMPILER @@ -3498,7 +3661,7 @@ case $host_os in # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - aix4* | aix5*) + 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. @@ -3511,7 +3674,7 @@ case $host_os in # 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*) + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) @@ -3547,7 +3710,7 @@ case $host_os in strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -3657,59 +3820,31 @@ case $host_os in fi ;; darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no + _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + if test "$GXX" = yes ; then output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -3792,9 +3927,7 @@ case $host_os in _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - ;; + hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; @@ -3862,7 +3995,7 @@ case $host_os in ;; esac ;; - interix3*) + interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -3954,7 +4087,7 @@ case $host_os in _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - pgCC*) + pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' @@ -3982,6 +4115,29 @@ case $host_os in # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; esac ;; lynxos*) @@ -4020,16 +4176,20 @@ case $host_os in _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_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_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_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_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi - output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in @@ -4191,15 +4351,10 @@ case $host_os in case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes @@ -4246,6 +4401,12 @@ case $host_os in fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac fi ;; esac @@ -4361,7 +4522,8 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], +[AC_REQUIRE([LT_AC_PROG_SED])dnl 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 @@ -4486,10 +4648,15 @@ fi $rm -f confest.$objext +_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + # PORTME: override above test on systems where it is broken ifelse([$1],[CXX], [case $host_os in -interix3*) +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_AC_TAGVAR(predep_objects,$1)= @@ -4497,19 +4664,51 @@ interix3*) _LT_AC_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_AC_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. - _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi ;; esac ;; esac ]) - case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac @@ -4552,10 +4751,17 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" +lt_simple_compile_test_code="\ + subroutine t + return + end +" # Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" +lt_simple_link_test_code="\ + program t + end +" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4587,7 +4793,7 @@ aix3*) postinstall_cmds='$RANLIB $lib' fi ;; -aix4* | aix5*) +aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi @@ -4634,10 +4840,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" +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) {}; }\n' +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_AC_SYS_COMPILER @@ -4690,7 +4896,7 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +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" @@ -4764,6 +4970,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ @@ -4779,6 +4986,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do @@ -4825,7 +5033,7 @@ ifelse([$1], [], # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: @@ -5062,6 +5270,10 @@ predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) @@ -5150,7 +5362,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) @@ -5233,6 +5445,7 @@ fi # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. @@ -5410,7 +5623,7 @@ EOF echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi - rm -f conftest* conftst* + rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then @@ -5459,13 +5672,16 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32*) # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -5476,7 +5692,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; - interix3*) + interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -5502,7 +5718,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) esac else case $host_os in - aix4* | aix5*) + aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor @@ -5598,7 +5814,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - pgCC*) + pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' @@ -5612,6 +5828,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac ;; esac ;; @@ -5732,14 +5956,17 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) @@ -5748,7 +5975,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; - interix3*) + interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -5806,10 +6033,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + m4_if([$1], [GCJ], [], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) @@ -5858,6 +6086,22 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; esac ;; @@ -5867,6 +6111,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -5926,7 +6174,7 @@ AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; @@ -5950,7 +6198,7 @@ esac # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) @@ -5961,11 +6209,12 @@ AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in - aix4* | aix5*) + 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 @@ -5978,7 +6227,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_AC_TAGVAR(link_all_deplibs, $1)=no @@ -5987,6 +6236,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac + _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= @@ -6017,12 +6267,14 @@ ifelse([$1],[CXX],[ # 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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + _LT_AC_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= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) @@ -6072,7 +6324,7 @@ ifelse([$1],[CXX],[ # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -6120,7 +6372,7 @@ EOF _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_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' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -6138,7 +6390,7 @@ EOF fi ;; - interix3*) + interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -6153,7 +6405,7 @@ EOF _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux* | k*bsd*-gnu) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -6171,13 +6423,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi _LT_AC_TAGVAR(link_all_deplibs, $1)=no else @@ -6218,7 +6479,7 @@ EOF sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -6283,7 +6544,7 @@ _LT_EOF fi ;; - aix4* | aix5*) + 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. @@ -6303,7 +6564,7 @@ _LT_EOF # 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*) + 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 @@ -6337,7 +6598,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -6430,7 +6691,7 @@ _LT_EOF # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; @@ -6463,19 +6724,18 @@ _LT_EOF _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -6637,24 +6897,28 @@ _LT_EOF ;; openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; @@ -6713,17 +6977,16 @@ _LT_EOF case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # 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?) - case $wlarc in - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -6780,7 +7043,7 @@ _LT_EOF fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6855,7 +7118,7 @@ x|xyes) # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest @@ -6958,6 +7221,30 @@ AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) + +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. + +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE + +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P + # 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 # @@ -6978,12 +7265,13 @@ do 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 + 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 @@ -7016,6 +7304,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do done ]) SED=$lt_cv_path_SED +AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) diff --git a/bindings/Makefile.in b/bindings/Makefile.in index 94245b8..dab2972 100644 --- a/bindings/Makefile.in +++ b/bindings/Makefile.in @@ -98,6 +98,7 @@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -120,14 +121,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ -INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ @@ -139,7 +138,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ @@ -157,8 +155,10 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -200,12 +200,13 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_PROGRAMS_FALSE = @STATIC_PROGRAMS_FALSE@ STATIC_PROGRAMS_TRUE = @STATIC_PROGRAMS_TRUE@ STRIP = @STRIP@ -TCL_INC_DIR = @TCL_INC_DIR@ +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@ diff --git a/bindings/perl-piped/RRDp.pm b/bindings/perl-piped/RRDp.pm index b016e88..18151f3 100644 --- a/bindings/perl-piped/RRDp.pm +++ b/bindings/perl-piped/RRDp.pm @@ -120,7 +120,7 @@ sub cmd (@); sub end (); sub read (); -$VERSION=1.299908052600; +$VERSION=1.299908060801; sub start ($){ croak "rrdtool is already running" diff --git a/bindings/perl-shared/RRDs.pm b/bindings/perl-shared/RRDs.pm index 1246003..e5b06ad 100644 --- a/bindings/perl-shared/RRDs.pm +++ b/bindings/perl-shared/RRDs.pm @@ -7,7 +7,7 @@ use vars qw(@ISA $VERSION); require DynaLoader; -$VERSION=1.299908052600; +$VERSION=1.299908060801; bootstrap RRDs $VERSION; diff --git a/bindings/perl-shared/RRDs.xs b/bindings/perl-shared/RRDs.xs index 5eeba18..b2a70d9 100644 --- a/bindings/perl-shared/RRDs.xs +++ b/bindings/perl-shared/RRDs.xs @@ -307,20 +307,20 @@ rrd_times(start, end) char *start char *end PREINIT: - struct rrd_time_value start_tv, end_tv; + rrd_time_value_t start_tv, end_tv; char *parsetime_error = NULL; time_t start_tmp, end_tmp; PPCODE: rrd_clear_error(); - if( (parsetime_error = parsetime( start, &start_tv))) { - rrd_set_error( "start time: %s", parsetime_error); + if ((parsetime_error = rrd_parsetime(start, &start_tv))) { + rrd_set_error("start time: %s", parsetime_error); XSRETURN_UNDEF; } - if( (parsetime_error = parsetime( end, &end_tv))) { - rrd_set_error( "end time: %s", parsetime_error); + if ((parsetime_error = rrd_parsetime(end, &end_tv))) { + rrd_set_error("end time: %s", parsetime_error); XSRETURN_UNDEF; } - if( proc_start_end( &start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { + if (rrd_proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { XSRETURN_UNDEF; } EXTEND(sp,2); @@ -389,7 +389,7 @@ SV* rrd_info(...) PROTOTYPE: @ PREINIT: - info_t *data,*save; + rrd_info_t *data,*save; int i; char **argv; HV *hash; @@ -402,7 +402,7 @@ SV* rrd_updatev(...) PROTOTYPE: @ PREINIT: - info_t *data,*save; + rrd_info_t *data,*save; int i; char **argv; HV *hash; @@ -415,7 +415,7 @@ SV* rrd_graphv(...) PROTOTYPE: @ PREINIT: - info_t *data,*save; + rrd_info_t *data,*save; int i; char **argv; HV *hash; diff --git a/bindings/python/rrdtoolmodule.c b/bindings/python/rrdtoolmodule.c index 37810f7..109d66f 100644 --- a/bindings/python/rrdtoolmodule.c +++ b/bindings/python/rrdtoolmodule.c @@ -219,9 +219,9 @@ static PyObject *PyRRD_fetch( } for (i = 0; i < ds_cnt; i++) - free(ds_namv[i]); - free(ds_namv); /* rrdtool don't use PyMem_Malloc :) */ - free(data); + rrd_freemem(ds_namv[i]); + rrd_freemem(ds_namv); /* rrdtool don't use PyMem_Malloc :) */ + rrd_freemem(data); } destroy_args(&argv); @@ -282,9 +282,9 @@ static PyObject *PyRRD_graph( t = PyString_FromString(calcpr[i]); PyList_Append(e, t); Py_DECREF(t); - free(calcpr[i]); + rrd_freemem(calcpr[i]); } - free(calcpr); + rrd_freemem(calcpr); } else { Py_INCREF(Py_None); PyTuple_SET_ITEM(r, 2, Py_None); @@ -404,17 +404,19 @@ static PyObject *PyRRD_resize( } static PyObject *PyDict_FromInfo( - info_t *data) + rrd_info_t *data) { PyObject *r; + r = PyDict_New(); - while (data){ + while (data) { PyObject *val = NULL; + switch (data->type) { case RD_I_VAL: - val = isnan(data->value.u_val) - ? (Py_INCREF(Py_None), Py_None) - : PyFloat_FromDouble(data->value.u_val); + val = isnan(data->value.u_val) + ? (Py_INCREF(Py_None), Py_None) + : PyFloat_FromDouble(data->value.u_val); break; case RD_I_CNT: val = PyLong_FromUnsignedLong(data->value.u_cnt); @@ -426,11 +428,13 @@ static PyObject *PyDict_FromInfo( val = PyString_FromString(data->value.u_str); break; case RD_I_BLO: - val = PyString_FromStringAndSize((char*)data->value.u_blo.ptr, data->value.u_blo.size); + val = + PyString_FromStringAndSize((char *) data->value.u_blo.ptr, + data->value.u_blo.size); break; } - if (val){ - PyDict_SetItemString(r,data->key,val); + if (val) { + PyDict_SetItemString(r, data->key, val); } data = data->next; } @@ -447,18 +451,18 @@ static PyObject *PyRRD_info( PyObject *r; int argc; char **argv; - info_t *data; + rrd_info_t *data; - if (create_args("info", args, &argc, &argv) < 0) + if (create_args("info", args, &argc, &argv) < 0) return NULL; - + if ((data = rrd_info(argc, argv)) == NULL) { PyErr_SetString(ErrorObject, rrd_get_error()); rrd_clear_error(); return NULL; } r = PyDict_FromInfo(data); - info_free(data); + rrd_info_free(data); return r; } @@ -472,18 +476,18 @@ static PyObject *PyRRD_graphv( PyObject *r; int argc; char **argv; - info_t *data; + rrd_info_t *data; - if (create_args("graphv", args, &argc, &argv) < 0) + if (create_args("graphv", args, &argc, &argv) < 0) return NULL; - + if ((data = rrd_graph_v(argc, argv)) == NULL) { PyErr_SetString(ErrorObject, rrd_get_error()); rrd_clear_error(); return NULL; } r = PyDict_FromInfo(data); - info_free(data); + rrd_info_free(data); return r; } @@ -497,18 +501,18 @@ static PyObject *PyRRD_updatev( PyObject *r; int argc; char **argv; - info_t *data; + rrd_info_t *data; - if (create_args("updatev", args, &argc, &argv) < 0) + if (create_args("updatev", args, &argc, &argv) < 0) return NULL; - + if ((data = rrd_update_v(argc, argv)) == NULL) { PyErr_SetString(ErrorObject, rrd_get_error()); rrd_clear_error(); return NULL; } r = PyDict_FromInfo(data); - info_free(data); + rrd_info_free(data); return r; } diff --git a/bindings/ruby/main.c b/bindings/ruby/main.c index b3922d4..40ed33a 100644 --- a/bindings/ruby/main.c +++ b/bindings/ruby/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c 1335 2008-05-01 23:23:35Z oetiker $ +/* $Id: main.c 1411 2008-06-08 16:47:22Z oetiker $ * Substantial penalty for early withdrawal. */ @@ -146,7 +146,7 @@ VALUE rb_rrd_infocall( VALUE args) { string_arr a; - info_t *p, *data; + rrd_info_t *p, *data; VALUE result; a = string_arr_new(args); @@ -171,18 +171,18 @@ VALUE rb_rrd_infocall( break; case RD_I_STR: rb_hash_aset(result, key, rb_str_new2(data->value.u_str)); - free(data->value.u_str); + rrd_freemem(data->value.u_str); break; case RD_I_BLO: rb_hash_aset(result, key, rb_str_new(data->value.u_blo.ptr, data->value.u_blo.size)); - free(data->value.u_blo.ptr); + rrd_freemem(data->value.u_blo.ptr); break; } p = data; data = data->next; - free(p); + rrd_freemem(p); } return result; } @@ -232,9 +232,9 @@ VALUE rb_rrd_fetch( for (i = 0; i < ds_cnt; i++) { rb_ary_push(names, rb_str_new2(raw_names[i])); - free(raw_names[i]); + rrd_freemem(raw_names[i]); } - free(raw_names); + rrd_freemem(raw_names); k = 0; data = rb_ary_new(); @@ -247,7 +247,7 @@ VALUE rb_rrd_fetch( } rb_ary_push(data, line); } - free(raw_data); + rrd_freemem(raw_data); result = rb_ary_new2(5); rb_ary_store(result, 0, INT2NUM(start)); @@ -279,9 +279,9 @@ VALUE rb_rrd_graph( p = calcpr; for (p = calcpr; p && *p; p++) { rb_ary_push(print_results, rb_str_new2(*p)); - free(*p); + rrd_freemem(*p); } - free(calcpr); + rrd_freemem(calcpr); rb_ary_store(result, 0, print_results); rb_ary_store(result, 1, INT2FIX(xsize)); rb_ary_store(result, 2, INT2FIX(ysize)); diff --git a/bindings/tcl/Makefile.am b/bindings/tcl/Makefile.am index b30736b..34f4077 100644 --- a/bindings/tcl/Makefile.am +++ b/bindings/tcl/Makefile.am @@ -12,12 +12,12 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ -TCL_INC_DIR = @TCL_INC_DIR@ +TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@ CLEANFILES = tclrrd.o tclrrd.so SRC_DIR = $(top_srcdir)/src -AM_CPPFLAGS = -I$(TCL_INC_DIR) -I$(SRC_DIR) -DUSE_TCL_STUBS +AM_CPPFLAGS = $(TCL_INCLUDE_SPEC) -I$(SRC_DIR) -DUSE_TCL_STUBS LIBDIRS = -L$(top_builddir)/src/.libs -L$(top_builddir)/src -L$(libdir) LIB_RUNTIME_DIR = $(libdir) diff --git a/bindings/tcl/Makefile.in b/bindings/tcl/Makefile.in index 3945c83..3e1c030 100644 --- a/bindings/tcl/Makefile.in +++ b/bindings/tcl/Makefile.in @@ -110,6 +110,7 @@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -132,14 +133,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ -INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ @@ -151,7 +150,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ @@ -169,8 +167,10 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -212,12 +212,13 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_PROGRAMS_FALSE = @STATIC_PROGRAMS_FALSE@ STATIC_PROGRAMS_TRUE = @STATIC_PROGRAMS_TRUE@ STRIP = @STRIP@ -TCL_INC_DIR = @TCL_INC_DIR@ +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@ @@ -291,7 +292,7 @@ EXTRA_DIST = README tclrrd.c AM_CFLAGS = @CFLAGS@ CLEANFILES = tclrrd.o tclrrd.so SRC_DIR = $(top_srcdir)/src -AM_CPPFLAGS = -I$(TCL_INC_DIR) -I$(SRC_DIR) -DUSE_TCL_STUBS +AM_CPPFLAGS = $(TCL_INCLUDE_SPEC) -I$(SRC_DIR) -DUSE_TCL_STUBS LIBDIRS = -L$(top_builddir)/src/.libs -L$(top_builddir)/src -L$(libdir) LIB_RUNTIME_DIR = $(libdir) @BUILD_TCL_SITE_TRUE@tclpkgdir = @TCL_PACKAGE_DIR@ diff --git a/bindings/tcl/tclrrd.c b/bindings/tcl/tclrrd.c index 0f3ba60..c432918 100644 --- a/bindings/tcl/tclrrd.c +++ b/bindings/tcl/tclrrd.c @@ -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 1306 2008-03-15 10:39:48Z oetiker $ + * $Id: tclrrd.c 1405 2008-06-08 15:55:09Z oetiker $ */ @@ -108,7 +108,7 @@ static int Rrd_Create( time_t last_up = time(NULL) - 10; long int long_tmp; unsigned long int pdp_step = 300; - struct rrd_time_value last_up_tv; + rrd_time_value_t last_up_tv; argv2 = getopt_init(argc, argv); @@ -121,7 +121,7 @@ static int Rrd_Create( getopt_cleanup(argc, argv2); return TCL_ERROR; } - if ((parsetime_error = parsetime(argv2[argv_i], &last_up_tv))) { + if ((parsetime_error = rrd_parsetime(argv2[argv_i], &last_up_tv))) { Tcl_AppendResult(interp, "RRD Error: invalid time format: '", argv2[argv_i], "'", (char *) NULL); getopt_cleanup(argc, argv2); diff --git a/config.guess b/config.guess index 396482d..278f9e9 100755 --- a/config.guess +++ b/config.guess @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2006-07-02' +timestamp='2007-07-22' # 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 @@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -329,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -780,7 +781,7 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -790,12 +791,15 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -950,6 +954,9 @@ EOF x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -1208,6 +1215,15 @@ EOF SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; diff --git a/config.sub b/config.sub index fab0aa3..1761d8b 100755 --- a/config.sub +++ b/config.sub @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2006-09-20' +timestamp='2007-06-28' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -245,12 +245,12 @@ case $basic_machine in | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ + | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -324,7 +324,7 @@ case $basic_machine in | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ @@ -475,8 +475,8 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -683,6 +683,10 @@ case $basic_machine in basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -925,6 +929,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -1219,7 +1226,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1414,6 +1421,9 @@ case $basic_machine in m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; diff --git a/configure b/configure index 1cd40d3..2a40d08 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for rrdtool 1.3rc6. +# Generated by GNU Autoconf 2.61 for rrdtool 1.3rc9. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -726,8 +726,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='rrdtool' PACKAGE_TARNAME='rrdtool' -PACKAGE_VERSION='1.3rc6' -PACKAGE_STRING='rrdtool 1.3rc6' +PACKAGE_VERSION='1.3rc9' +PACKAGE_STRING='rrdtool 1.3rc9' PACKAGE_BUGREPORT='' ac_default_prefix=/usr/local/rrdtool-$PACKAGE_VERSION @@ -863,12 +863,15 @@ CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP +SED GREP EGREP LN_S ECHO AR RANLIB +DSYMUTIL +NMEDIT CXX CXXFLAGS ac_ct_CXX @@ -916,14 +919,12 @@ INTLTOOL_CAVES_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_THEME_RULE INTLTOOL_SERVICE_RULE +INTLTOOL_POLICY_RULE +MSGMERGE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL -INTLTOOL_ICONV -INTLTOOL_MSGFMT -INTLTOOL_MSGMERGE -INTLTOOL_XGETTEXT ALL_LINGUAS LIB_LIBINTL BUILD_LIBINTL_TRUE @@ -968,7 +969,7 @@ TCL_LD_SEARCH_FLAGS TCL_STUB_LIB_SPEC TCL_VERSION TCL_PACKAGE_DIR -TCL_INC_DIR +TCL_INCLUDE_SPEC PYTHON PYTHON_VERSION PYTHON_PREFIX @@ -1509,7 +1510,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.3rc6 to adapt to many kinds of systems. +\`configure' configures rrdtool 1.3rc9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1580,7 +1581,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rrdtool 1.3rc6:";; + short | recursive ) echo "Configuration of rrdtool 1.3rc9:";; esac cat <<\_ACEOF @@ -1720,7 +1721,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rrdtool configure 1.3rc6 +rrdtool configure 1.3rc9 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1734,7 +1735,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.3rc6, which was +It was created by rrdtool $as_me 1.3rc9, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2088,10 +2089,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -NUMVERS=1.299908052600 +NUMVERS=1.299908060801 -LIBVERS=3:4:1 +LIBVERS=4:0:0 ac_aux_dir= @@ -2537,7 +2538,7 @@ fi # Define the identity of the package. PACKAGE='rrdtool' - VERSION='1.3rc6' + VERSION='1.3rc9' cat >>confdefs.h <<_ACEOF @@ -4231,12 +4232,13 @@ do 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 + if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$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 @@ -4271,6 +4273,7 @@ done fi SED=$lt_cv_path_SED + { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } @@ -4632,8 +4635,8 @@ else echo "${ECHO_T}no, using $LN_S" >&6; } fi -{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4652,7 +4655,7 @@ lt_cv_deplibs_check_method='unknown' # whether `pass_all' will *always* work, you probably want this one. case $host_os in -aix4* | aix5*) +aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; @@ -4674,9 +4677,15 @@ cygwin*) 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'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' + # 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 ;; darwin* | rhapsody*) @@ -4721,7 +4730,7 @@ hpux10.20* | hpux11*) esac ;; -interix3*) +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)$' ;; @@ -4771,6 +4780,10 @@ 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 ;; @@ -4858,7 +4871,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4861 "configure"' > conftest.$ac_ext + echo '#line 4874 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4893,7 +4906,8 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -4904,6 +4918,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 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" ;; @@ -4920,6 +4937,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ;; *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" ;; @@ -5023,7 +5043,11 @@ sparc*-*solaris*) *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; esac ;; esac @@ -6391,7 +6415,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! - # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } @@ -6478,24 +6501,27 @@ else fi ;; *) - # 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. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + 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 + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - 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` + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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 @@ -6512,6 +6538,7 @@ fi + # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } @@ -6702,7 +6729,7 @@ EOF echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f conftest* conftst* + rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then @@ -7100,7 +7127,7 @@ test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= @@ -7262,6 +7289,318 @@ fi ;; esac + + 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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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" + 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 + { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +echo "${ECHO_T}$DSYMUTIL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + 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 + { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { echo "$as_me:$LINENO: result: $NMEDIT" >&5 +echo "${ECHO_T}$NMEDIT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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" + 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_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + + { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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. + echo "int foo(void){return 1;}" > conftest.c + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib ${wl}-single_module conftest.c + if test -f libconftest.dylib; then + lt_cv_apple_cc_single_mod=yes + rm -rf libconftest.dylib* + fi + rm conftest.c + fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } + { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 "echo \"\$as_me:$LINENO: $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 + 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 && + $as_test_x conftest$ac_exeext; then + lt_cv_ld_exported_symbols_list=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[0123]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) + # 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 + + enable_dlopen=no enable_win32_dll=no @@ -7300,10 +7639,10 @@ objext=o objext=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +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);}\n' +lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. @@ -7318,16 +7657,16 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +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 -printf "$lt_simple_link_test_code" >conftest.$ac_ext +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 conftest* +$rm -r conftest* @@ -7344,7 +7683,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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. @@ -7355,11 +7694,11 @@ else -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:7358: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7697: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7362: \$? = $ac_status" >&5 + echo "$as_me:7701: \$? = $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. @@ -7410,13 +7749,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # 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' ;; @@ -7426,7 +7767,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic='-fno-common' ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -7484,7 +7825,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # 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' @@ -7536,6 +7877,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; + *) + 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 ;; @@ -7545,6 +7902,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static='-non_shared' ;; + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' @@ -7607,12 +7968,12 @@ if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_pic_works=no + lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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. @@ -7623,27 +7984,27 @@ else -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:7626: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7987: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7630: \$? = $ac_status" >&5 + echo "$as_me:7991: \$? = $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_prog_compiler_pic_works=yes + lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } -if test x"$lt_prog_compiler_pic_works" = xyes; then +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" ;; @@ -7670,13 +8031,13 @@ esac wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works+set}" = set; then +if test "${lt_cv_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_static_works=no + lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + 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 @@ -7686,20 +8047,20 @@ else $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_prog_compiler_static_works=yes + lt_cv_prog_compiler_static_works=yes fi else - lt_prog_compiler_static_works=yes + lt_cv_prog_compiler_static_works=yes fi fi - $rm conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } -if test x"$lt_prog_compiler_static_works" = xyes; then +if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= @@ -7716,7 +8077,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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 @@ -7727,11 +8088,11 @@ else -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:7730: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8091: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7734: \$? = $ac_status" >&5 + echo "$as_me:8095: \$? = $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 @@ -7811,12 +8172,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # 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_" + 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= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do @@ -7875,7 +8237,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no @@ -7923,7 +8285,7 @@ EOF 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' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -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' @@ -7941,7 +8303,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' @@ -7956,7 +8318,7 @@ EOF 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' ;; - linux* | k*bsd*-gnu) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -7974,13 +8336,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + 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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; 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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs=no else @@ -8086,7 +8457,7 @@ _LT_EOF fi ;; - aix4* | aix5*) + 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. @@ -8106,7 +8477,7 @@ _LT_EOF # 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*) + 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 @@ -8140,7 +8511,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct=yes + : else # We have old collect2 hardcode_direct=unsupported @@ -8214,11 +8585,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +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 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -8273,11 +8651,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +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 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -8331,7 +8716,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # 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' + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; @@ -8364,19 +8749,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi link_all_deplibs=yes if test "$GCC" = 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' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + 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 case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -8538,24 +8922,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; openbsd*) - hardcode_direct=yes - hardcode_shlibpath_var=no - 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' + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + 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 - 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 + ld_shlibs=no fi ;; @@ -8614,17 +9002,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # 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?) - case $wlarc in - '') - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + 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 ;; @@ -8681,7 +9068,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + 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 @@ -8758,7 +9145,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -8816,17 +9203,55 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" + if test "$GCC" = yes; then - 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 ';' >/dev/null ; 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. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`echo "$lt_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"` + 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 @@ -8847,7 +9272,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -8986,12 +9411,8 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -9045,7 +9466,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -9108,7 +9529,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -9179,7 +9600,7 @@ linux* | k*bsd*-gnu) # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + 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 @@ -9285,6 +9706,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -9381,6 +9806,21 @@ esac echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi + +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi + +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + 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" @@ -9438,6 +9878,7 @@ else darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" + old_striplib="$STRIP -S" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else @@ -9699,7 +10140,7 @@ fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } @@ -9975,7 +10416,7 @@ fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -10024,7 +10465,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&6;} # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: @@ -10602,6 +11045,10 @@ predeps=$lt_predeps # shared library. postdeps=$lt_postdeps +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path @@ -10690,7 +11137,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols @@ -10850,6 +11297,7 @@ postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= +compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp @@ -10859,10 +11307,10 @@ objext=o objext_CXX=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +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); }\n' +lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -10878,16 +11326,16 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +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 -printf "$lt_simple_link_test_code" >conftest.$ac_ext +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 conftest* +$rm -r conftest* # Allow CC to be a program name with arguments. @@ -11094,7 +11542,7 @@ case $host_os in # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - aix4* | aix5*) + 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. @@ -11107,7 +11555,7 @@ case $host_os in # 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*) + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) @@ -11143,7 +11591,7 @@ case $host_os in strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct_CXX=yes + : else # We have old collect2 hardcode_direct_CXX=unsupported @@ -11217,11 +11665,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +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 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -11277,11 +11732,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +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 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -11351,59 +11813,31 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + if test "$GXX" = yes ; then output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="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_CXX="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}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$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}" + archive_expsym_cmds_CXX="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 - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$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' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -11486,9 +11920,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator_CXX=: case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - ;; + hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; @@ -11556,7 +11988,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; - interix3*) + interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' @@ -11648,7 +12080,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - pgCC*) + pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$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' @@ -11676,6 +12108,29 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${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' + + # 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. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; esac ;; lynxos*) @@ -11714,16 +12169,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_CXX=no ;; openbsd*) - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + ld_shlibs_CXX=no fi - output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in @@ -11885,15 +12344,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes @@ -11940,6 +12394,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac fi ;; esac @@ -12027,7 +12487,6 @@ test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" - cat > conftest.$ac_ext <&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 + postdeps_CXX='-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. - postdeps_CXX='-lCstd -lCrun' + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi ;; esac ;; esac - case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac @@ -12182,12 +12678,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32*) # 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_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) @@ -12199,7 +12697,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -12225,7 +12723,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac else case $host_os in - aix4* | aix5*) + aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor @@ -12321,7 +12819,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; - pgCC*) + pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' @@ -12335,6 +12833,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_CXX='-non_shared' ;; *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac ;; esac ;; @@ -12444,12 +12950,12 @@ if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_pic_works_CXX=no + lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -12460,27 +12966,27 @@ else -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:12463: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12969: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12467: \$? = $ac_status" >&5 + echo "$as_me:12973: \$? = $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_prog_compiler_pic_works_CXX=yes + lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } -if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; @@ -12507,13 +13013,13 @@ esac wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then +if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_static_works_CXX=no + lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + 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 @@ -12523,20 +13029,20 @@ else $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_prog_compiler_static_works_CXX=yes + lt_cv_prog_compiler_static_works_CXX=yes fi else - lt_prog_compiler_static_works_CXX=yes + lt_cv_prog_compiler_static_works_CXX=yes fi fi - $rm conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= @@ -12553,7 +13059,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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 @@ -12564,11 +13070,11 @@ else -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:12567: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13073: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12571: \$? = $ac_status" >&5 + echo "$as_me:13077: \$? = $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 @@ -12621,7 +13127,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in - aix4* | aix5*) + 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 @@ -12634,7 +13140,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) - export_symbols_cmds_CXX='$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' + export_symbols_cmds_CXX='$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) link_all_deplibs_CXX=no @@ -12643,6 +13149,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } @@ -12668,7 +13175,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -12726,20 +13233,7 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - 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 ';' >/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. - 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 -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi + need_lib_prefix=unknown hardcode_into_libs=no @@ -12757,7 +13251,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -12896,12 +13390,7 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -12955,7 +13444,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -13018,7 +13507,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -13089,7 +13578,7 @@ linux* | k*bsd*-gnu) # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + 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 @@ -13195,6 +13684,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -13291,6 +13784,21 @@ esac echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi + +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi + +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + 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" @@ -13374,6 +13882,7 @@ if test -f "$ltmain"; then predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ + compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ @@ -13389,6 +13898,7 @@ if test -f "$ltmain"; then module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ + fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do @@ -13621,6 +14131,10 @@ predeps=$lt_predeps_CXX # shared library. postdeps=$lt_postdeps_CXX +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX @@ -13709,7 +14223,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_CXX" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX @@ -13800,10 +14314,17 @@ objext=o objext_F77=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" +lt_simple_compile_test_code="\ + subroutine t + return + end +" # Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" +lt_simple_link_test_code="\ + program t + end +" # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -13819,16 +14340,16 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +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 -printf "$lt_simple_link_test_code" >conftest.$ac_ext +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 conftest* +$rm -r conftest* # Allow CC to be a program name with arguments. @@ -13866,7 +14387,7 @@ aix3*) postinstall_cmds='$RANLIB $lib' fi ;; -aix4* | aix5*) +aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi @@ -13912,13 +14433,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # 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_F77='-DDLL_EXPORT' ;; @@ -13928,7 +14451,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_F77='-fno-common' ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -13986,7 +14509,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # 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_F77='-DDLL_EXPORT' @@ -14038,6 +14561,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; esac ;; @@ -14047,6 +14586,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_F77='-non_shared' ;; + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' @@ -14109,12 +14652,12 @@ if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_pic_works_F77=no + lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -14125,27 +14668,27 @@ else -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:14128: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14671: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14132: \$? = $ac_status" >&5 + echo "$as_me:14675: \$? = $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_prog_compiler_pic_works_F77=yes + lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; } -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then +if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; @@ -14172,13 +14715,13 @@ esac wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_F77+set}" = set; then +if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_static_works_F77=no + lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + 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 @@ -14188,20 +14731,20 @@ else $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_prog_compiler_static_works_F77=yes + lt_cv_prog_compiler_static_works_F77=yes fi else - lt_prog_compiler_static_works_F77=yes + lt_cv_prog_compiler_static_works_F77=yes fi fi - $rm conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; } -if test x"$lt_prog_compiler_static_works_F77" = xyes; then +if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= @@ -14218,7 +14761,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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 @@ -14229,11 +14772,11 @@ else -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:14232: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14775: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14236: \$? = $ac_status" >&5 + echo "$as_me:14779: \$? = $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 @@ -14313,12 +14856,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # 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_F77="_GLOBAL_OFFSET_TABLE_" + exclude_expsyms_F77='_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= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do @@ -14377,7 +14921,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no @@ -14425,7 +14969,7 @@ EOF allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -14443,7 +14987,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' @@ -14458,7 +15002,7 @@ EOF archive_expsym_cmds_F77='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' ;; - linux* | k*bsd*-gnu) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -14476,13 +15020,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_F77=no else @@ -14588,7 +15141,7 @@ _LT_EOF fi ;; - aix4* | aix5*) + 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. @@ -14608,7 +15161,7 @@ _LT_EOF # 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*) + 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 @@ -14642,7 +15195,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct_F77=yes + : else # We have old collect2 hardcode_direct_F77=unsupported @@ -14706,11 +15259,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +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 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -14755,11 +15315,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +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 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -14813,7 +15380,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; @@ -14846,19 +15413,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_F77="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_F77="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 case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -15020,24 +15586,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; openbsd*) - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac + ld_shlibs_F77=no fi ;; @@ -15096,17 +15666,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # 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?) - case $wlarc in - '') - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; esac link_all_deplibs_F77=yes ;; @@ -15163,7 +15732,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no @@ -15240,7 +15809,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -15298,20 +15867,7 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - 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 ';' >/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. - 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 -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi + need_lib_prefix=unknown hardcode_into_libs=no @@ -15329,7 +15885,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -15468,12 +16024,7 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -15527,7 +16078,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -15590,7 +16141,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -15661,7 +16212,7 @@ linux* | k*bsd*-gnu) # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + 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 @@ -15767,6 +16318,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -15863,6 +16418,21 @@ esac echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi + +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi + +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + 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" @@ -15946,6 +16516,7 @@ if test -f "$ltmain"; then predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ + compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ @@ -15961,6 +16532,7 @@ if test -f "$ltmain"; then module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ + fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do @@ -16193,6 +16765,10 @@ predeps=$lt_predeps_F77 # shared library. postdeps=$lt_postdeps_F77 +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 @@ -16281,7 +16857,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_F77" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 @@ -16339,10 +16915,10 @@ objext=o objext_GCJ=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" +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) {}; }\n' +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. @@ -16358,16 +16934,16 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +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 -printf "$lt_simple_link_test_code" >conftest.$ac_ext +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 conftest* +$rm -r conftest* # Allow CC to be a program name with arguments. @@ -16405,7 +16981,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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. @@ -16416,11 +16992,11 @@ else -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:16419: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16995: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16423: \$? = $ac_status" >&5 + echo "$as_me:16999: \$? = $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. @@ -16471,14 +17047,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # 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_GCJ='-DDLL_EXPORT' + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + ;; darwin* | rhapsody*) @@ -16487,7 +17065,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_GCJ='-fno-common' ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -16545,10 +17123,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # 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_GCJ='-DDLL_EXPORT' + ;; hpux9* | hpux10* | hpux11*) @@ -16597,6 +17175,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; esac ;; @@ -16606,6 +17200,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_GCJ='-non_shared' ;; + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' @@ -16668,12 +17266,12 @@ if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_pic_works_GCJ=no + lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -16684,27 +17282,27 @@ else -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:16687: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17285: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16691: \$? = $ac_status" >&5 + echo "$as_me:17289: \$? = $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_prog_compiler_pic_works_GCJ=yes + lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; } -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then +if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; @@ -16731,13 +17329,13 @@ esac wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then +if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_static_works_GCJ=no + lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + 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 @@ -16747,20 +17345,20 @@ else $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_prog_compiler_static_works_GCJ=yes + lt_cv_prog_compiler_static_works_GCJ=yes fi else - lt_prog_compiler_static_works_GCJ=yes + lt_cv_prog_compiler_static_works_GCJ=yes fi fi - $rm conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; } -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then +if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= @@ -16777,7 +17375,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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 @@ -16788,11 +17386,11 @@ else -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:16791: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17389: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16795: \$? = $ac_status" >&5 + echo "$as_me:17393: \$? = $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 @@ -16872,12 +17470,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # 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_GCJ="_GLOBAL_OFFSET_TABLE_" + exclude_expsyms_GCJ='_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= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do @@ -16936,7 +17535,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no @@ -16984,7 +17583,7 @@ EOF allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -17002,7 +17601,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' @@ -17017,7 +17616,7 @@ EOF archive_expsym_cmds_GCJ='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' ;; - linux* | k*bsd*-gnu) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -17035,13 +17634,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${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' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_GCJ=no else @@ -17147,7 +17755,7 @@ _LT_EOF fi ;; - aix4* | aix5*) + 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. @@ -17167,7 +17775,7 @@ _LT_EOF # 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*) + 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 @@ -17201,7 +17809,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct_GCJ=yes + : else # We have old collect2 hardcode_direct_GCJ=unsupported @@ -17275,11 +17883,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +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 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -17334,11 +17949,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +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 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -17392,7 +18014,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; @@ -17425,19 +18047,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_GCJ="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_GCJ="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 case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -17599,24 +18220,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; openbsd*) - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' + if test -f /usr/libexec/ld.so; then + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac + ld_shlibs_GCJ=no fi ;; @@ -17675,17 +18300,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # 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?) - case $wlarc in - '') - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; esac link_all_deplibs_GCJ=yes ;; @@ -17742,7 +18366,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no @@ -17819,7 +18443,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -17877,20 +18501,7 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - 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 ';' >/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. - 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 -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi + need_lib_prefix=unknown hardcode_into_libs=no @@ -17908,7 +18519,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -18047,12 +18658,7 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -18106,7 +18712,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -18169,7 +18775,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -18240,7 +18846,7 @@ linux* | k*bsd*-gnu) # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + 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 @@ -18346,6 +18952,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -18442,6 +19052,21 @@ esac echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi + +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi + +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + 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" @@ -18525,6 +19150,7 @@ if test -f "$ltmain"; then predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ + compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ @@ -18540,6 +19166,7 @@ if test -f "$ltmain"; then module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ + fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do @@ -18772,6 +19399,10 @@ predeps=$lt_predeps_GCJ # shared library. postdeps=$lt_postdeps_GCJ +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ @@ -18860,7 +19491,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_GCJ" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ @@ -18917,7 +19548,7 @@ objext=o objext_RC=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +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" @@ -18936,16 +19567,16 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +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 -printf "$lt_simple_link_test_code" >conftest.$ac_ext +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 conftest* +$rm -r conftest* # Allow CC to be a program name with arguments. @@ -19005,6 +19636,7 @@ if test -f "$ltmain"; then predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ + compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ @@ -19020,6 +19652,7 @@ if test -f "$ltmain"; then module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ + fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do @@ -19252,6 +19885,10 @@ predeps=$lt_predeps_RC # shared library. postdeps=$lt_postdeps_RC +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC @@ -19340,7 +19977,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_RC" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC @@ -22940,7 +23577,7 @@ _ACEOF fi fi - USE_NLS=yes + USE_NLS=yes gt_cv_have_gettext=no @@ -23911,8 +24548,8 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" _ACEOF -if { (echo "$as_me:$LINENO: msgfmt -c -o /dev/null conftest.foo") >&5 - (msgfmt -c -o /dev/null conftest.foo) 2>&5 +if { (echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5 + ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -24310,6 +24947,7 @@ INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcar 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 $< $@' @@ -24330,24 +24968,18 @@ INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcar -# Use the tools built into the package, not the ones that are installed. -INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' - -INTLTOOL_MERGE='$(top_builddir)/intltool-merge' - -INTLTOOL_UPDATE='$(top_builddir)/intltool-update' - -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 +# 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then +if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $INTLTOOL_PERL in + case $XGETTEXT in [\\/]* | ?:[\\/]*) - ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path. + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -24357,7 +24989,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_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -24368,49 +25000,26 @@ IFS=$as_save_IFS ;; esac fi -INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL -if test -n "$INTLTOOL_PERL"; then - { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5 -echo "${ECHO_T}$INTLTOOL_PERL" >&6; } +XGETTEXT=$ac_cv_path_XGETTEXT +if test -n "$XGETTEXT"; then + { echo "$as_me:$LINENO: result: $XGETTEXT" >&5 +echo "${ECHO_T}$XGETTEXT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi -if test -z "$INTLTOOL_PERL"; then - { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5 -echo "$as_me: error: perl not found; required for intltool" >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then - { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5 -echo "$as_me: error: perl 5.x required for intltool" >&2;} - { (exit 1); exit 1; }; } -fi -if test "xno-xml" != "xno-xml"; then - { echo "$as_me:$LINENO: checking for XML::Parser" >&5 -echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6; } - if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then - { echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6; } - else - { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5 -echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# Extract the first word of "iconv", so it can be a program name with args. -set dummy iconv; ac_word=$2 +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_INTLTOOL_ICONV+set}" = set; then +if test "${ac_cv_path_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $INTLTOOL_ICONV in + case $MSGMERGE in [\\/]* | ?:[\\/]*) - ac_cv_path_INTLTOOL_ICONV="$INTLTOOL_ICONV" # Let the user override the test with a path. + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -24420,7 +25029,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_path_INTLTOOL_ICONV="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -24428,14 +25037,13 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_path_INTLTOOL_ICONV" && ac_cv_path_INTLTOOL_ICONV="iconv" ;; esac fi -INTLTOOL_ICONV=$ac_cv_path_INTLTOOL_ICONV -if test -n "$INTLTOOL_ICONV"; then - { echo "$as_me:$LINENO: result: $INTLTOOL_ICONV" >&5 -echo "${ECHO_T}$INTLTOOL_ICONV" >&6; } +MSGMERGE=$ac_cv_path_MSGMERGE +if test -n "$MSGMERGE"; then + { echo "$as_me:$LINENO: result: $MSGMERGE" >&5 +echo "${ECHO_T}$MSGMERGE" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } @@ -24446,12 +25054,12 @@ fi set dummy msgfmt; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_INTLTOOL_MSGFMT+set}" = set; then +if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $INTLTOOL_MSGFMT in + case $MSGFMT in [\\/]* | ?:[\\/]*) - ac_cv_path_INTLTOOL_MSGFMT="$INTLTOOL_MSGFMT" # Let the user override the test with a path. + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -24461,7 +25069,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_path_INTLTOOL_MSGFMT="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -24469,71 +25077,51 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_path_INTLTOOL_MSGFMT" && ac_cv_path_INTLTOOL_MSGFMT="msgfmt" ;; esac fi -INTLTOOL_MSGFMT=$ac_cv_path_INTLTOOL_MSGFMT -if test -n "$INTLTOOL_MSGFMT"; then - { echo "$as_me:$LINENO: result: $INTLTOOL_MSGFMT" >&5 -echo "${ECHO_T}$INTLTOOL_MSGFMT" >&6; } +MSGFMT=$ac_cv_path_MSGFMT +if test -n "$MSGFMT"; then + { echo "$as_me:$LINENO: result: $MSGFMT" >&5 +echo "${ECHO_T}$MSGFMT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi -# Extract the first word of "msgmerge", so it can be a program name with args. -set dummy msgmerge; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_INTLTOOL_MSGMERGE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $INTLTOOL_MSGMERGE in - [\\/]* | ?:[\\/]*) - ac_cv_path_INTLTOOL_MSGMERGE="$INTLTOOL_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_INTLTOOL_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" - 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_INTLTOOL_MSGMERGE" && ac_cv_path_INTLTOOL_MSGMERGE="msgmerge" - ;; -esac +if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then + { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5 +echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;} + { (exit 1); exit 1; }; } fi -INTLTOOL_MSGMERGE=$ac_cv_path_INTLTOOL_MSGMERGE -if test -n "$INTLTOOL_MSGMERGE"; then - { echo "$as_me:$LINENO: result: $INTLTOOL_MSGMERGE" >&5 -echo "${ECHO_T}$INTLTOOL_MSGMERGE" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +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 + { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5 +echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;} + { (exit 1); exit 1; }; } fi +# Use the tools built into the package, not the ones that are installed. +INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' -# Extract the first word of "xgettext", so it can be a program name with args. -set dummy xgettext; ac_word=$2 +INTLTOOL_MERGE='$(top_builddir)/intltool-merge' + +INTLTOOL_UPDATE='$(top_builddir)/intltool-update' + + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_INTLTOOL_XGETTEXT+set}" = set; then +if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $INTLTOOL_XGETTEXT in + case $INTLTOOL_PERL in [\\/]* | ?:[\\/]*) - ac_cv_path_INTLTOOL_XGETTEXT="$INTLTOOL_XGETTEXT" # Let the user override the test with a path. + ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -24543,7 +25131,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_path_INTLTOOL_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -24551,20 +25139,41 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_path_INTLTOOL_XGETTEXT" && ac_cv_path_INTLTOOL_XGETTEXT="xgettext" ;; esac fi -INTLTOOL_XGETTEXT=$ac_cv_path_INTLTOOL_XGETTEXT -if test -n "$INTLTOOL_XGETTEXT"; then - { echo "$as_me:$LINENO: result: $INTLTOOL_XGETTEXT" >&5 -echo "${ECHO_T}$INTLTOOL_XGETTEXT" >&6; } +INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL +if test -n "$INTLTOOL_PERL"; then + { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5 +echo "${ECHO_T}$INTLTOOL_PERL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi +if test -z "$INTLTOOL_PERL"; then + { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5 +echo "$as_me: error: perl not found; required for intltool" >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then + { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5 +echo "$as_me: error: perl 5.x required for intltool" >&2;} + { (exit 1); exit 1; }; } +fi +if test "xno-xml" != "xno-xml"; then + { echo "$as_me:$LINENO: checking for XML::Parser" >&5 +echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6; } + if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } + else + { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5 +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 @@ -24583,7 +25192,7 @@ int main () { extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr + return _nl_msg_cat_cntr ; return 0; } @@ -31441,6 +32050,9 @@ echo "$as_me: WARNING: tclConfig.sh not found - Tcl interface will not be built" else . $tcl_config TCL_PACKAGE_DIR="$TCL_PACKAGE_PATH/tclrrd$VERSION" + if test -n "$TCL_INC_DIR"; then + TCL_INCLUDE_SPEC="$TCL_INCLUDE_SPEC -I$TCL_INC_DIR" + fi fi # Check whether --enable-tcl was given. if test "${enable_tcl+set}" = set; then @@ -32361,7 +32973,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.3rc6, which was +This file was extended by rrdtool $as_me 1.3rc9, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -32414,7 +33026,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -rrdtool config.status 1.3rc6 +rrdtool config.status 1.3rc9 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -32521,9 +33133,7 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}' prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" -INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}' -INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}' -INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}' +INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' _ACEOF @@ -32713,7 +33323,7 @@ CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim -GREP!$GREP$ac_delim +SED!$SED$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -32755,11 +33365,14 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim +DSYMUTIL!$DSYMUTIL$ac_delim +NMEDIT!$NMEDIT$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim @@ -32807,14 +33420,12 @@ INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim INTLTOOL_SCHEMAS_RULE!$INTLTOOL_SCHEMAS_RULE$ac_delim INTLTOOL_THEME_RULE!$INTLTOOL_THEME_RULE$ac_delim INTLTOOL_SERVICE_RULE!$INTLTOOL_SERVICE_RULE$ac_delim +INTLTOOL_POLICY_RULE!$INTLTOOL_POLICY_RULE$ac_delim +MSGMERGE!$MSGMERGE$ac_delim INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim -INTLTOOL_ICONV!$INTLTOOL_ICONV$ac_delim -INTLTOOL_MSGFMT!$INTLTOOL_MSGFMT$ac_delim -INTLTOOL_MSGMERGE!$INTLTOOL_MSGMERGE$ac_delim -INTLTOOL_XGETTEXT!$INTLTOOL_XGETTEXT$ac_delim ALL_LINGUAS!$ALL_LINGUAS$ac_delim LIB_LIBINTL!$LIB_LIBINTL$ac_delim BUILD_LIBINTL_TRUE!$BUILD_LIBINTL_TRUE$ac_delim @@ -32851,7 +33462,6 @@ BUILD_TCL_FALSE!$BUILD_TCL_FALSE$ac_delim BUILD_TCL_SITE_TRUE!$BUILD_TCL_SITE_TRUE$ac_delim BUILD_TCL_SITE_FALSE!$BUILD_TCL_SITE_FALSE$ac_delim TCL_PREFIX!$TCL_PREFIX$ac_delim -TCL_SHLIB_CFLAGS!$TCL_SHLIB_CFLAGS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -32893,6 +33503,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +TCL_SHLIB_CFLAGS!$TCL_SHLIB_CFLAGS$ac_delim TCL_SHLIB_LD!$TCL_SHLIB_LD$ac_delim TCL_SHLIB_SUFFIX!$TCL_SHLIB_SUFFIX$ac_delim TCL_PACKAGE_PATH!$TCL_PACKAGE_PATH$ac_delim @@ -32900,7 +33511,7 @@ TCL_LD_SEARCH_FLAGS!$TCL_LD_SEARCH_FLAGS$ac_delim TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim TCL_VERSION!$TCL_VERSION$ac_delim TCL_PACKAGE_DIR!$TCL_PACKAGE_DIR$ac_delim -TCL_INC_DIR!$TCL_INC_DIR$ac_delim +TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim PYTHON!$PYTHON$ac_delim PYTHON_VERSION!$PYTHON_VERSION$ac_delim PYTHON_PREFIX!$PYTHON_PREFIX$ac_delim @@ -32919,7 +33530,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -33486,10 +34097,6 @@ done for file in intltool-extract intltool-merge intltool-update; do sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \ -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \ - -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \ - -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \ - -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \ - -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \ -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \ < ${ac_aux_dir}/${file}.in > ${file}.out if cmp -s ${file} ${file}.out 2>/dev/null; then diff --git a/configure.ac b/configure.ac index cbbce92..d634c05 100644 --- a/configure.ac +++ b/configure.ac @@ -9,26 +9,25 @@ dnl tell automake the this script is for rrdtool dnl the official version number is dnl a.b.c -AC_INIT([rrdtool],[1.3rc6]) +AC_INIT([rrdtool],[1.3rc9]) 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.299908052600 +NUMVERS=1.299908060801 AC_SUBST(NUMVERS) dnl for the linker to understand which version the library is compatible with dnl we must keep a separate library version cout of the format c:r:a if any -dnl functionality is changed do c++ prior to release dnl if only implementation changed but all interfaces are kept, do r++ -dnl when only functionality was added, do a++ if any functionality was -dnl removed do a=0. +dnl when only functionality was added do c++,r=0,a++ +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=3:4:1 +LIBVERS=4:0:0 AC_SUBST(LIBVERS) AC_CANONICAL_TARGET @@ -854,6 +853,9 @@ if test "$enable_tcl" = "yes"; then else . $tcl_config TCL_PACKAGE_DIR="$TCL_PACKAGE_PATH/tclrrd$VERSION" + if test -n "$TCL_INC_DIR"; 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], [],[enable_tcl_site=yes]) @@ -873,7 +875,7 @@ AC_SUBST(TCL_LD_SEARCH_FLAGS) AC_SUBST(TCL_STUB_LIB_SPEC) AC_SUBST(TCL_VERSION) AC_SUBST(TCL_PACKAGE_DIR) -AC_SUBST(TCL_INC_DIR) +AC_SUBST(TCL_INCLUDE_SPEC) AC_ARG_ENABLE(python,[ --disable-python do not build the python modules], [],[enable_python=yes]) diff --git a/doc/Makefile.in b/doc/Makefile.in index d2dc7f8..2f663dc 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -102,6 +102,7 @@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -124,14 +125,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ -INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ @@ -143,7 +142,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ @@ -161,8 +159,10 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -204,12 +204,13 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_PROGRAMS_FALSE = @STATIC_PROGRAMS_FALSE@ STATIC_PROGRAMS_TRUE = @STATIC_PROGRAMS_TRUE@ STRIP = @STRIP@ -TCL_INC_DIR = @TCL_INC_DIR@ +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@ diff --git a/doc/RRDp.html b/doc/RRDp.html index a9185aa..56cd79e 100644 --- a/doc/RRDp.html +++ b/doc/RRDp.html @@ -51,26 +51,23 @@ data, RRDp::read will return an undefined variable.

If you import the PERFORMANCE variables into your namespace, you can access RRDtool's internal performance measurements.

-
use RRDp +
use RRDp

Load the RRDp::pipe module.

- -
RRDp::start path to RRDtool executable +
RRDp::start path to RRDtool executable

start RRDtool. The argument must be the path to the RRDtool executable

- -
RRDp::cmd rrdtool commandline +
RRDp::cmd rrdtool commandline

pass commands on to RRDtool. check the RRDtool documentation for more info on the RRDtool commands.

- -
$answer = RRDp::read +
$answer = RRDp::read

read RRDtool's response to your command. Note that the $answer variable will @@ -80,41 +77,33 @@ 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.

- -
$status = RRDp::end +
$status = RRDp::end

terminates RRDtool and returns RRDtool's status ...

- -
$RRDp::user, $RRDp::sys, $RRDp::real +
$RRDp::user, $RRDp::sys, $RRDp::real

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.

-
-

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.

- -
$RRDp::error_mode and $RRDp::error +
$RRDp::error_mode and $RRDp::error

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.

-
-
  $RRDp::error_mode = 'catch';
  RRDp::cmd qw(info file.rrd);
  print $RRDp::error if $RRDp::error;
-

diff --git a/doc/bin_dec_hex.1 b/doc/bin_dec_hex.1 index 31a93a8..6db3ffd 100644 --- a/doc/bin_dec_hex.1 +++ b/doc/bin_dec_hex.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIN_DEC_HEX 1" -.TH BIN_DEC_HEX 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH BIN_DEC_HEX 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" bin_dec_hex \- How to use binary, decimal, and hexadecimal notation. .SH "DESCRIPTION" @@ -412,8 +412,8 @@ The other method builds ub 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'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. +\& 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. \& 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 diff --git a/doc/bin_dec_hex.txt b/doc/bin_dec_hex.txt index a253d8a..9598444 100644 --- a/doc/bin_dec_hex.txt +++ b/doc/bin_dec_hex.txt @@ -371,4 +371,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 BIN_DEC_HEX(1) +1.3rc9 2008-03-15 BIN_DEC_HEX(1) diff --git a/doc/cdeftutorial.1 b/doc/cdeftutorial.1 index 7e2f4ac..ba1dba8 100644 --- a/doc/cdeftutorial.1 +++ b/doc/cdeftutorial.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "CDEFTUTORIAL 1" -.TH CDEFTUTORIAL 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH CDEFTUTORIAL 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" cdeftutorial \- Alex van den Bogaerdt's CDEF tutorial .SH "DESCRIPTION" @@ -404,12 +404,12 @@ every minute: .PP .Vb 7 \& counter value resulting rate -\& 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 +\& 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 .Ve .PP If the \s-1CDP\s0 was to be calculated from the last five updates, it would get @@ -956,7 +956,7 @@ You may do some complex data filtering: \& CDEF:prev3=PREV(prev2) \& CDEF:median=prev1,prev2,prev3,+,+,3,/ \& LINE3:median#000077:filtered -\& LINE1:prev2#007700:'raw data' +\& LINE1:prev2#007700:\(aqraw data\(aq .Ve .PP .Vb 1 @@ -970,7 +970,7 @@ You may do some complex data filtering: \& CDEF:prevtime=PREV(time) \& CDEF:derivate=var,prev1,\-,time,prevtime,\-,/ \& LINE3:derivate#000077:derivate -\& LINE1:var#007700:'raw data' +\& LINE1:var#007700:\(aqraw data\(aq .Ve .SH "Out of ideas for now" .IX Header "Out of ideas for now" diff --git a/doc/cdeftutorial.txt b/doc/cdeftutorial.txt index 6d98481..d6b4d54 100644 --- a/doc/cdeftutorial.txt +++ b/doc/cdeftutorial.txt @@ -799,4 +799,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 CDEFTUTORIAL(1) +1.3rc9 2008-03-15 CDEFTUTORIAL(1) diff --git a/doc/rpntutorial.1 b/doc/rpntutorial.1 index fd0411b..a99e7a7 100644 --- a/doc/rpntutorial.1 +++ b/doc/rpntutorial.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RPNTUTORIAL 1" -.TH RPNTUTORIAL 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RPNTUTORIAL 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rpntutorial \- Reading RRDtool RPN Expressions by Steve Rader .SH "DESCRIPTION" diff --git a/doc/rpntutorial.txt b/doc/rpntutorial.txt index b19819c..1650f67 100644 --- a/doc/rpntutorial.txt +++ b/doc/rpntutorial.txt @@ -187,4 +187,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RPNTUTORIAL(1) +1.3rc9 2008-03-15 RPNTUTORIAL(1) diff --git a/doc/rrd-beginners.1 b/doc/rrd-beginners.1 index 634b20b..206e6f4 100644 --- a/doc/rrd-beginners.1 +++ b/doc/rrd-beginners.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRD-BEGINNERS 1" -.TH RRD-BEGINNERS 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRD-BEGINNERS 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrd\-beginners \- RRDtool Beginners' Guide .SH "SYNOPSIS" @@ -360,15 +360,15 @@ generation is done using Perl scripts. These scripts are shown below: \& a=0 \& while [ "$a" == 0 ]; do \& snmpwalk \-c public 192.168.1.250 hrSWRunPerfMem > snmp_reply -\& total_mem=`awk 'BEGIN {tot_mem=0} +\& total_mem=`awk \(aqBEGIN {tot_mem=0} \& { if ($NF == "KBytes") \& {tot_mem=tot_mem+$(NF\-1)} \& } -\& END {print tot_mem}' snmp_reply` +\& END {print tot_mem}\(aq 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 'sleep 300 \- time % 300' +\& perl \-e \(aqsleep 300 \- time % 300\(aq \& done # end of while loop .Ve .PP diff --git a/doc/rrd-beginners.txt b/doc/rrd-beginners.txt index 363431b..fa45d9c 100644 --- a/doc/rrd-beginners.txt +++ b/doc/rrd-beginners.txt @@ -318,4 +318,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRD-BEGINNERS(1) +1.3rc9 2008-03-15 RRD-BEGINNERS(1) diff --git a/doc/rrdbuild.1 b/doc/rrdbuild.1 index 4ec1554..ff82477 100644 --- a/doc/rrdbuild.1 +++ b/doc/rrdbuild.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDBUILD 1" -.TH RRDBUILD 1 "2008-05-26" "1.3rc6" "rrdtool" +.TH RRDBUILD 1 "2008-06-08" "1.3rc9" "rrdtool" .SH "NAME" rrdbuild \- Instructions for building RRDtool .SH "OVERVIEW" @@ -137,7 +137,7 @@ rrdbuild \- Instructions for building RRDtool If you downloaded the source of rrdtool you have to compile it. This document will give some information on how this is done. .PP -RRDtool relies on services of thrid part libraries. Some of these libraries +RRDtool relies on services of third part libraries. Some of these libraries may already be installed on your system. You have to compile copies of the other ones before you can build RRDtool. .PP @@ -163,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.3rc6 +\& INSTALL_DIR=/usr/local/rrdtool\-1.3rc9 .Ve .PP If your \fI/tmp\fR is mounted with the option noexec (\s-1RHEL\s0 seems todo that) you have to choose @@ -180,9 +180,9 @@ Lets first assume you already have all the necessary libraries pre\-installed. .PP .Vb 4 -\& wget http://oss.oetiker.ch/rrdtool/pub/rrdtool\-1.3rc6.tar.gz -\& gunzip \-c rrdtool\-1.3rc6.tar.gz | tar xf \- -\& cd rrdtool\-1.3rc6 +\& wget http://oss.oetiker.ch/rrdtool/pub/rrdtool\-1.3rc9.tar.gz +\& gunzip \-c rrdtool\-1.3rc9.tar.gz | tar xf \- +\& cd rrdtool\-1.3rc9 \& ./configure \-\-prefix=$INSTALL_DIR && make && make install .Ve .PP @@ -193,8 +193,9 @@ 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. Additions to -this list are welcome. +hints on getting your \s-1OS\s0 ready for the rrdtool compilation. +.PP +Additions to this list are welcome. .Sh "OpenSolaris 2008.05" .IX Subsection "OpenSolaris 2008.05" Just add a compiler and the gnome development package: @@ -204,13 +205,13 @@ Just add a compiler and the gnome development package: \& pkg install SUNWgnome\-common\-devel .Ve .PP -There is a a problem with \fIcairo.pc\fR on opensolaris. It suggests that +There is a problem with \fIcairo.pc\fR 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 \fIxrender.pc\fR file. Use perl to fix this: .PP .Vb 1 -\& perl \-i~ \-p \-e 's/(Requires.*?)\es*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc +\& perl \-i~ \-p \-e \(aqs/(Requires.*?)\es*xrender.*/$1/\(aq /usr/lib/pkgconfig/cairo.pc .Ve .Sh "Debian / Ubuntu" .IX Subsection "Debian / Ubuntu" @@ -220,19 +221,46 @@ of packages will get added through dependencies. .Vb 1 \& apt\-get install libpango1.0\-dev libxml2\-dev .Ve +.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 +system. The only thing you should care about are \s-1USE\s0 flags, which allow you +fine tune features rrdtool will be built with. Currently the following \s-1USE\s0 +flags are available: +.PP +.Vb 7 +\& doc \- install .html and .txt documentation +\& into /usr/share/doc/rrdtool\-1.x.xx/ +\& perl \- build and install perl language bindings +\& python \- build and install python language bindings +\& ruby \- build and install ruby language bindings +\& tcl \- build and install tcl language bindings +\& rrdcgi \- build and install rrdcgi +.Ve +.PP +After you've decided which \s-1USE\s0 flags you need, set them either in +\&\fImake.conf\fR or \fI/etc/portage/package.use\fR and finally run: +.PP +.Vb 1 +\& # emerge \-va rrdtool +.Ve +.PP +Take a look at Gentoo handbook for further details on how to manage \s-1USE\s0 +flags: http://www.gentoo.org/doc/en/handbook/handbook\-x86.xml?part=2 .SH "BUILDING DEPENDENCIES" .IX Header "BUILDING DEPENDENCIES" But again this may have been too optimistic still, and you actually have to compile your own copies of some of the required libraries. Things like 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 the +possible that they are pretty old and thus don't live up to our expectations, so you may want to compile their latest versions. .PP -\fIBuild Tipps for \s-1AIX\s0\fR -.IX Subsection "Build Tipps for AIX" +\fIBuild Tips for \s-1AIX\s0\fR +.IX Subsection "Build Tips for AIX" .PP -If you are woking with \s-1AIX\s0, you may find the the \fB\-\-disable\-shared\fR option +If you are working with \s-1AIX\s0, you may find the the \fB\-\-disable\-shared\fR option will cause things to break for you. In that case you may have to install the shared libraries into the rrdtool \s-1PREFIX\s0 and work with \fB\-\-disable\-static\fR instead. @@ -250,7 +278,7 @@ Another hint to get rrdtool working on \s-1AIX\s0 is to use the \s-1IBM\s0 \s-1X In order to build the libraries you need a compiler on your system. Unfortunately compilers are not all alike. This has an effect on the \s-1CFLAGS\s0 you want to set. The examples below are for the popular \s-1GCC\s0 compiler suite. -If you have an other compile you have to use the following settings: +If you have an other compilers here are some ides: .IP "Sun Forte" 4 .IX Item "Sun Forte" .Vb 1 @@ -259,16 +287,19 @@ If you have an other compile you have to use the following settings: .Sp .RS 4 Some libraries want to know where other libraries are. For this to work, -set the following environamen variable +set the following environment variable .Sp .Vb 2 \& export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig \& export PATH=$INSTALL_DIR/bin:$PATH .Ve .Sp -Since we are compiling libraries dynamically, you they must further know -where to find each other. This is done by setting an appropriate \s-1LDFLAG\s0. -Unfortunatly the syntax differs from system to system: +This relies on the presence of the \fIpkgconfig\fR program. Below you find instructions +on how to compile pkgconfig as well. +.Sp +Since we are compiling libraries dynamically, they must know +where to find each other. This is done by setting an appropriate \s-1LDFLAGS\s0. +Unfortunately, the syntax again differs from system to system: .IP "Solaris" 4 .IX Item "Solaris" .Vb 1 @@ -279,9 +310,6 @@ Unfortunatly the syntax differs from system to system: .Vb 1 \& export LDFLAGS="\-Wl,\-\-rpath \-Wl,${INSTALL_DIR}/lib" .Ve -.Sp -If you are on a 64bit platform, but would like to continue to use the rrd files created -on your old 32bit linux, you may be able .IP "\s-1HPUX\s0" 4 .IX Item "HPUX" .Vb 1 @@ -303,12 +331,26 @@ then do \& export GNUMAKE=gmake .Ve .Sp -otherwhise just do +otherwise just do .Sp .Vb 1 \& export MAKE=make .Ve .RE +.IP "Building pkgconfig" 4 +.IX Item "Building pkgconfig" +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. +.Sp +.Vb 6 +\& 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 CFLAGS="\-O3 \-fPIC" +\& $MAKE +\& $MAKE install +.Ve .IP "Building zlib" 4 .IX Item "Building zlib" Chances are very high that you already have that on your system ... @@ -325,7 +367,7 @@ Chances are very high that you already have that on your system ... .IP "Building libpng" 4 .IX Item "Building libpng" Libpng itself requires zlib to build, so we need to help a bit. If you -already have a copy of zlib on your system (which is very likley) you can +already have a copy of zlib on your system (which is very likely) you can drop the settings of \s-1LDFLAGS\s0 and \s-1CPPFLAGS\s0. Note that the backslash (\e) at the end of line 4 means that line 4 and line 5 are on one line. .Sp @@ -369,9 +411,9 @@ add the following at the start the configure line: .Ve .IP "Building fontconfig" 4 .IX Item "Building fontconfig" -Note that fontconfig has a runtime configuration file in INSTALL_DIR/etc you +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 changeing the +Run the fc-cache program to build the fontconfig cache after changing the config file. .Sp .Vb 7 @@ -389,7 +431,7 @@ config file. \& cd $BUILD_DIR \& 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 fontconfig\-2.4.2 +\& cd pixman\-0.10.0 \& ./configure \-\-prefix=$INSTALL_DIR CFLAGS="\-O3 \-fPIC" \& $MAKE \& $MAKE install @@ -443,7 +485,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.3rc6 +\& cd $BUILD_DIR/rrdtool\-1.3rc9 \& ./configure \-\-prefix=$INSTALL_DIR \-\-disable\-tcl \-\-disable\-python \& $MAKE clean \& $MAKE @@ -451,7 +493,7 @@ their current state. .Ve .PP \&\s-1SOLARIS\s0 \s-1HINT:\s0 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 +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 diff --git a/doc/rrdbuild.html b/doc/rrdbuild.html index 90fdc4c..bd24888 100644 --- a/doc/rrdbuild.html +++ b/doc/rrdbuild.html @@ -23,6 +23,7 @@
  • OpenSolaris 2008.05
  • Debian / Ubuntu
  • +
  • Gentoo
  • BUILDING DEPENDENCIES
  • @@ -30,7 +31,7 @@
  • Building Libraries
  • @@ -51,7 +52,7 @@

    OVERVIEW

    If you downloaded the source of rrdtool you have to compile it. This document will give some information on how this is done.

    -

    RRDtool relies on services of thrid part libraries. Some of these libraries +

    RRDtool relies on services of third part libraries. Some of these libraries may already be installed on your system. You have to compile copies of the other ones before you can build RRDtool.

    This document will tell you about all the necessary steps to get going.

    @@ -78,7 +79,7 @@ tar and GNU make respectively. It could be that they a

    Once you have decided. Save the two locations into environment variables.

      BUILD_DIR=/tmp/rrdbuild
    - INSTALL_DIR=/usr/local/rrdtool-1.3rc6
    + INSTALL_DIR=/usr/local/rrdtool-1.3rc9

    If your /tmp is mounted with the option noexec (RHEL seems todo that) you have to choose a different directory!

    Now make sure the BUILD_DIR exists and go there:

    @@ -88,9 +89,9 @@ a different directory!

    Lets first assume you already have all the necessary libraries pre-installed.

    - wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3rc6.tar.gz
    - gunzip -c rrdtool-1.3rc6.tar.gz | tar xf -
    - cd rrdtool-1.3rc6
    + wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3rc9.tar.gz
    + gunzip -c rrdtool-1.3rc9.tar.gz | tar xf -
    + cd rrdtool-1.3rc9
      ./configure --prefix=$INSTALL_DIR && make && make install

    Ok, this was very optimistic. This try will probably have ended with configure complaining about several missing libraries.

    @@ -101,8 +102,8 @@ pre-installed.

    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. Additions to -this list are welcome.

    +hints on getting your OS ready for the rrdtool compilation.

    +

    Additions to this list are welcome.

    OpenSolaris 2008.05

    @@ -110,7 +111,7 @@ this list are welcome.

      pkg install sunstudioexpress
      pkg install SUNWgnome-common-devel
    -

    There is a a problem with cairo.pc on opensolaris. It suggests that +

    There is a problem with cairo.pc 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 xrender.pc file. Use perl to fix this:

    @@ -125,18 +126,40 @@ of packages will get added through dependencies.

    apt-get install libpango1.0-dev libxml2-dev

    +

    Gentoo

    +

    In Gentoo installing rrdtool is really simple you just need to emerge +rrdtool. 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:

    +
    + doc    - install .html and .txt documentation
    +          into /usr/share/doc/rrdtool-1.x.xx/
    + perl   - build and install perl language bindings
    + python - build and install python language bindings
    + ruby   - build and install ruby language bindings
    + tcl    - build and install tcl language bindings
    + rrdcgi - build and install rrdcgi
    +

    After you've decided which USE flags you need, set them either in +make.conf or /etc/portage/package.use and finally run:

    +
    + # emerge -va rrdtool
    +

    Take a look at Gentoo handbook for further details on how to manage USE +flags: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2

    +

    +


    BUILDING DEPENDENCIES

    But again this may have been too optimistic still, and you actually have to compile your own copies of some of the required libraries. Things like 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 the +possible that they are pretty old and thus don't live up to our expectations, so you may want to compile their latest versions.

    -

    Build Tipps for AIX

    -

    If you are woking with AIX, you may find the the --disable-shared option +

    Build Tips for AIX

    +

    If you are working with AIX, you may find the the --disable-shared 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 --disable-static instead.

    @@ -151,9 +174,9 @@ instead.

    In order to build the libraries you need a compiler on your system. Unfortunately compilers are not all alike. This has an effect on the CFLAGS you want to set. The examples below are for the popular GCC compiler suite. -If you have an other compile you have to use the following settings:

    +If you have an other compilers here are some ides:

    -
    Sun Forte +
    Sun Forte
    @@ -161,58 +184,67 @@ If you have an other compile you have to use the following settings:

    Some libraries want to know where other libraries are. For this to work, -set the following environamen variable

    +set the following environment variable

      export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig
      export PATH=$INSTALL_DIR/bin:$PATH
    -

    Since we are compiling libraries dynamically, you they must further know -where to find each other. This is done by setting an appropriate LDFLAG. -Unfortunatly the syntax differs from system to system:

    +

    This relies on the presence of the pkgconfig program. Below you find instructions +on how to compile pkgconfig as well.

    +

    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:

    -
    Solaris +
    Solaris
      export LDFLAGS=-R${INSTALL_DIR}/lib
    -
    Linux +
    Linux
      export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib"
    -
    -

    If you are on a 64bit platform, but would like to continue to use the rrd files created -on your old 32bit linux, you may be able

    -
    -
    HPUX +
    HPUX
     
      export LDFLAGS="+b${INSTALL_DIR}/lib"
    -
    AIX +
    AIX
      export LDFLAGS="-Wl,-blibpath:${INSTALL_DIR}/lib"
    -

    If you have GNUmake installed and it is not called 'make', then do

      export MAKE=gmake
      export GNUMAKE=gmake
    -

    otherwhise just do

    +

    otherwise just do

      export MAKE=make
    -
    Building zlib +
    Building pkgconfig
    -

    Chances are very high that you already have that on your system ...

    +

    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.

    +
    + 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 CFLAGS="-O3 -fPIC"
    + $MAKE
    + $MAKE install
    +
    Building zlib
    +
    +

    Chances are very high that you already have that on your system ...

      cd $BUILD_DIR
      wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz
    @@ -222,16 +254,13 @@ then do

    $MAKE $MAKE install
    - -
    Building libpng +
    Building libpng

    Libpng itself requires zlib to build, so we need to help a bit. If you -already have a copy of zlib on your system (which is very likley) you can +already have a copy of zlib on your system (which is very likely) you can drop the settings of LDFLAGS and CPPFLAGS. Note that the backslash (\) at 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
    @@ -241,8 +270,7 @@ the end of line 4 means that line 4 and line 5 are on one line.

    $MAKE $MAKE install
    - -
    Building freetype +
    Building freetype
    @@ -253,16 +281,12 @@ the end of line 4 means that line 4 and line 5 are on one line.

    ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" $MAKE $MAKE install
    -
    -

    If you run into problems building freetype on Solaris, you may want to try to add the following at the start the configure line:

    -
    -
      env EGREP=egrep
    -
    Building LibXML2 +
    Building LibXML2
    @@ -274,15 +298,13 @@ add the following at the start the configure line:

    $MAKE $MAKE install
    -
    Building fontconfig +
    Building fontconfig
    -

    Note that fontconfig has a runtime configuration file in INSTALL_DIR/etc you +

    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 changeing the +Run the fc-cache program to build the fontconfig cache after changing the config file.

    -
    -
      cd $BUILD_DIR
      wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz
    @@ -292,20 +314,19 @@ config file.

    $MAKE $MAKE install
    - -
    Building Pixman +
    Building Pixman
      cd $BUILD_DIR
      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 fontconfig-2.4.2
    + cd pixman-0.10.0
      ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC"
      $MAKE
      $MAKE install
    -
    Building Cairo +
    Building Cairo
    @@ -321,7 +342,7 @@ config file.

    $MAKE $MAKE install
    -
    Building Glib +
    Building Glib
    @@ -333,7 +354,7 @@ config file.

    $MAKE $MAKE install
    -
    Building Pango +
    Building Pango
    @@ -355,13 +376,13 @@ 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.3rc6
    + cd $BUILD_DIR/rrdtool-1.3rc9
      ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
      $MAKE clean
      $MAKE
      $MAKE install

    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 +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!

    Now go to $INSTALL_DIR/share/rrdtool/examples/ and run them to see if diff --git a/doc/rrdbuild.pod b/doc/rrdbuild.pod index b2f6f89..d244137 100644 --- a/doc/rrdbuild.pod +++ b/doc/rrdbuild.pod @@ -7,7 +7,7 @@ rrdbuild - Instructions for building RRDtool If you downloaded the source of rrdtool you have to compile it. This document will give some information on how this is done. -RRDtool relies on services of thrid part libraries. Some of these libraries +RRDtool relies on services of third part libraries. Some of these libraries may already be installed on your system. You have to compile copies of the other ones before you can build RRDtool. @@ -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.3rc6 + INSTALL_DIR=/usr/local/rrdtool-1.3rc9 If your F 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.3rc6.tar.gz - gunzip -c rrdtool-1.3rc6.tar.gz | tar xf - - cd rrdtool-1.3rc6 + wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3rc9.tar.gz + gunzip -c rrdtool-1.3rc9.tar.gz | tar xf - + cd rrdtool-1.3rc9 ./configure --prefix=$INSTALL_DIR && make && make install Ok, this was very optimistic. This try will probably have ended with @@ -68,8 +68,9 @@ B complaining about several missing libraries. 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. Additions to -this list are welcome. +hints on getting your OS ready for the rrdtool compilation. + +Additions to this list are welcome. =head2 OpenSolaris 2008.05 @@ -78,7 +79,7 @@ Just add a compiler and the gnome development package: pkg install sunstudioexpress pkg install SUNWgnome-common-devel -There is a a problem with F on opensolaris. It suggests that +There is a problem with F 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 F file. Use perl to fix this: @@ -92,18 +93,42 @@ of packages will get added through dependencies. apt-get install libpango1.0-dev libxml2-dev +=head2 Gentoo + +In Gentoo installing rrdtool is really simple you just need to B. 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: + + doc - install .html and .txt documentation + into /usr/share/doc/rrdtool-1.x.xx/ + perl - build and install perl language bindings + python - build and install python language bindings + ruby - build and install ruby language bindings + tcl - build and install tcl language bindings + rrdcgi - build and install rrdcgi + +After you've decided which USE flags you need, set them either in +F or F and finally run: + + # emerge -va rrdtool + +Take a look at Gentoo handbook for further details on how to manage USE +flags: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2 + =head1 BUILDING DEPENDENCIES But again this may have been too optimistic still, and you actually have to compile your own copies of some of the required libraries. Things like 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 the +possible that they are pretty old and thus don't live up to our expectations, so you may want to compile their latest versions. -=head3 Build Tipps for AIX +=head3 Build Tips for AIX -If you are woking with AIX, you may find the the B<--disable-shared> option +If you are working with AIX, you may find the the B<--disable-shared> 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<--disable-static> instead. @@ -120,7 +145,7 @@ Another hint to get rrdtool working on AIX is to use the IBM XL C Compiler: In order to build the libraries you need a compiler on your system. Unfortunately compilers are not all alike. This has an effect on the CFLAGS you want to set. The examples below are for the popular GCC compiler suite. -If you have an other compile you have to use the following settings: +If you have an other compilers here are some ides: =over @@ -133,14 +158,17 @@ If you have an other compile you have to use the following settings: =over Some libraries want to know where other libraries are. For this to work, -set the following environamen variable +set the following environment variable export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig export PATH=$INSTALL_DIR/bin:$PATH -Since we are compiling libraries dynamically, you they must further know -where to find each other. This is done by setting an appropriate LDFLAG. -Unfortunatly the syntax differs from system to system: +This relies on the presence of the F program. Below you find instructions +on how to compile pkgconfig as well. + +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: =over @@ -152,9 +180,6 @@ Unfortunatly the syntax differs from system to system: export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib" -If you are on a 64bit platform, but would like to continue to use the rrd files created -on your old 32bit linux, you may be able - =item HPUX export LDFLAGS="+b${INSTALL_DIR}/lib" @@ -171,10 +196,23 @@ then do export MAKE=gmake export GNUMAKE=gmake -otherwhise just do +otherwise just do export MAKE=make +=item Building pkgconfig + +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. + + 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 CFLAGS="-O3 -fPIC" + $MAKE + $MAKE install + =item Building zlib Chances are very high that you already have that on your system ... @@ -190,7 +228,7 @@ Chances are very high that you already have that on your system ... =item Building libpng Libpng itself requires zlib to build, so we need to help a bit. If you -already have a copy of zlib on your system (which is very likley) you can +already have a copy of zlib on your system (which is very likely) you can drop the settings of LDFLAGS and CPPFLAGS. Note that the backslash (\) at the end of line 4 means that line 4 and line 5 are on one line. @@ -229,9 +267,9 @@ add the following at the start the configure line: =item Building fontconfig -Note that fontconfig has a runtime configuration file in INSTALL_DIR/etc you +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 changeing the +Run the fc-cache program to build the fontconfig cache after changing the config file. cd $BUILD_DIR @@ -247,7 +285,7 @@ config file. cd $BUILD_DIR 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 fontconfig-2.4.2 + cd pixman-0.10.0 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" $MAKE $MAKE install @@ -298,14 +336,14 @@ 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.3rc6 + cd $BUILD_DIR/rrdtool-1.3rc9 ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python $MAKE clean $MAKE $MAKE install 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 +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! diff --git a/doc/rrdbuild.txt b/doc/rrdbuild.txt index 11b83c1..f3f0846 100644 --- a/doc/rrdbuild.txt +++ b/doc/rrdbuild.txt @@ -9,7 +9,7 @@ OOVVEERRVVIIEEWW If you downloaded the source of rrdtool you have to compile it. This document will give some information on how this is done. - RRDtool relies on services of thrid part libraries. Some of these + RRDtool relies on services of third part libraries. Some of these libraries may already be installed on your system. You have to compile copies of the other ones before you can build RRDtool. @@ -35,7 +35,7 @@ OOPPTTIIMMIISSTTIICC BBUUIILLDD ables. BUILD_DIR=/tmp/rrdbuild - INSTALL_DIR=/usr/local/rrdtool-1.3rc6 + INSTALL_DIR=/usr/local/rrdtool-1.3rc9 If your _/_t_m_p is mounted with the option noexec (RHEL seems todo that) you have to choose a different directory! @@ -48,9 +48,9 @@ OOPPTTIIMMIISSTTIICC BBUUIILLDD Lets first assume you already have all the necessary libraries pre-installed. - wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3rc6.tar.gz - gunzip -c rrdtool-1.3rc6.tar.gz | tar xf - - cd rrdtool-1.3rc6 + wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3rc9.tar.gz + gunzip -c rrdtool-1.3rc9.tar.gz | tar xf - + cd rrdtool-1.3rc9 ./configure --prefix=$INSTALL_DIR && make && make install Ok, this was very optimistic. This try will probably have ended with @@ -61,7 +61,9 @@ IINNSSTTAALLLLIINNGG DDEEPPEENNDDEENNCCIIEESS 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. + pilation. + + Additions to this list are welcome. OOppeennSSoollaarriiss 22000088..0055 @@ -70,10 +72,10 @@ IINNSSTTAALLLLIINNGG DDEEPPEENNDDEENNCCIIEESS pkg install sunstudioexpress pkg install SUNWgnome-common-devel - There is a a problem with _c_a_i_r_o_._p_c 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 _x_r_e_n_d_e_r_._p_c file. Use - perl to fix this: + There is a problem with _c_a_i_r_o_._p_c 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 _x_r_e_n_d_e_r_._p_c file. Use perl to + fix this: perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc @@ -84,18 +86,42 @@ IINNSSTTAALLLLIINNGG DDEEPPEENNDDEENNCCIIEESS apt-get install libpango1.0-dev libxml2-dev + GGeennttoooo + + In Gentoo installing rrdtool is really simple you just need to eemmeerrggee + rrrrddttooooll. 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 fol- + lowing USE flags are available: + + doc - install .html and .txt documentation + into /usr/share/doc/rrdtool-1.x.xx/ + perl - build and install perl language bindings + python - build and install python language bindings + ruby - build and install ruby language bindings + tcl - build and install tcl language bindings + rrdcgi - build and install rrdcgi + + After you've decided which USE flags you need, set them either in + _m_a_k_e_._c_o_n_f or _/_e_t_c_/_p_o_r_t_a_g_e_/_p_a_c_k_a_g_e_._u_s_e and finally run: + + # emerge -va rrdtool + + Take a look at Gentoo handbook for further details on how to manage USE + flags: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2 + BBUUIILLDDIINNGG DDEEPPEENNDDEENNCCIIEESS But again this may have been too optimistic still, and you actually have to compile your own copies of some of the required libraries. Things like 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 the expectations, so you may want to compile their + don't live up to our expectations, so you may want to compile their latest versions. - _B_u_i_l_d _T_i_p_p_s _f_o_r _A_I_X + _B_u_i_l_d _T_i_p_s _f_o_r _A_I_X - If you are woking with AIX, you may find the the ----ddiissaabbllee--sshhaarreedd + If you are working with AIX, you may find the the ----ddiissaabbllee--sshhaarreedd 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 ----ddiissaabbllee--ssttaattiicc instead. @@ -113,21 +139,23 @@ BBUUIILLDDIINNGG DDEEPPEENNDDEENNCCIIEESS In order to build the libraries you need a compiler on your system. Unfortunately compilers are not all alike. This has an effect on the CFLAGS you want to set. The examples below are for the popular GCC com- - piler suite. If you have an other compile you have to use the follow- - ing settings: + piler suite. If you have an other compilers here are some ides: Sun Forte CFLAGS="-xO3 -kPIC" Some libraries want to know where other libraries are. For this to - work, set the following environamen variable + work, set the following environment variable export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig export PATH=$INSTALL_DIR/bin:$PATH - Since we are compiling libraries dynamically, you they must further - know where to find each other. This is done by setting an appropri- - ate LDFLAG. Unfortunatly the syntax differs from system to system: + This relies on the presence of the _p_k_g_c_o_n_f_i_g program. Below you + find instructions on how to compile pkgconfig as well. + + 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: Solaris export LDFLAGS=-R${INSTALL_DIR}/lib @@ -135,10 +163,6 @@ BBUUIILLDDIINNGG DDEEPPEENNDDEENNCCIIEESS Linux export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib" - If you are on a 64bit platform, but would like to continue to - use the rrd files created on your old 32bit linux, you may be - able - HPUX export LDFLAGS="+b${INSTALL_DIR}/lib" @@ -150,10 +174,22 @@ BBUUIILLDDIINNGG DDEEPPEENNDDEENNCCIIEESS export MAKE=gmake export GNUMAKE=gmake - otherwhise just do + otherwise just do export MAKE=make + Building pkgconfig + 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. + + 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 CFLAGS="-O3 -fPIC" + $MAKE + $MAKE install + Building zlib Chances are very high that you already have that on your system ... @@ -167,10 +203,10 @@ BBUUIILLDDIINNGG DDEEPPEENNDDEENNCCIIEESS Building libpng Libpng itself requires zlib to build, so we need to help a bit. If - you already have a copy of zlib on your system (which is very lik- - ley) you can drop the settings of LDFLAGS and CPPFLAGS. Note that - the backslash (\) at the end of line 4 means that line 4 and line 5 - are on one line. + you already have a copy of zlib on your system (which is very + likely) you can drop the settings of LDFLAGS and CPPFLAGS. Note + that the backslash (\) at 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 @@ -204,10 +240,10 @@ BBUUIILLDDIINNGG DDEEPPEENNDDEENNCCIIEESS $MAKE install Building fontconfig - Note that fontconfig has a runtime configuration file in + 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 changeing the config file. + the fontconfig cache after changing the config file. cd $BUILD_DIR wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz @@ -221,7 +257,7 @@ BBUUIILLDDIINNGG DDEEPPEENNDDEENNCCIIEESS cd $BUILD_DIR 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 fontconfig-2.4.2 + cd pixman-0.10.0 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" $MAKE $MAKE install @@ -268,14 +304,14 @@ BBUUIILLDDIINNGG DDEEPPEENNDDEENNCCIIEESS python and tcl setups that would prevent rrdtool from building if they are included in their current state. - cd $BUILD_DIR/rrdtool-1.3rc6 + cd $BUILD_DIR/rrdtool-1.3rc9 ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python $MAKE clean $MAKE $MAKE install 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 + (the one shipping with Solaris) you will need the sun forte compiler installed on your box or you have to hand-tune bind- ings/perl-shared/Makefile while building! @@ -287,4 +323,4 @@ AAUUTTHHOORR -1.3rc6 2008-05-26 RRDBUILD(1) +1.3rc9 2008-06-08 RRDBUILD(1) diff --git a/doc/rrdcgi.1 b/doc/rrdcgi.1 index 458670e..6c63592 100644 --- a/doc/rrdcgi.1 +++ b/doc/rrdcgi.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDCGI 1" -.TH RRDCGI 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDCGI 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdcgi \- Create web pages containing RRD graphs based on templates .SH "SYNOPSIS" @@ -318,7 +318,7 @@ cgi-bins are seperate directories \&

    RRDCGI test Page

    \& ' +\& \-\-imginfo \(aq\(aq \& \-\-lazy \-\-start \-1d \-\-end now \& DEF:http_src=/.../rrds/test.rrd:http_src:AVERAGE \& AREA:http_src#00ff00:http_src diff --git a/doc/rrdcgi.html b/doc/rrdcgi.html index f062d93..917ab97 100644 --- a/doc/rrdcgi.html +++ b/doc/rrdcgi.html @@ -52,32 +52,29 @@ In the end it will printout a web page including the necessary CGI headers.

    only for a subset of tags. This allows nesting of tags.

    The argument parser uses the same semantics as you are used from your C-shell.

    -
    --filter +
    --filter

    Assume that rrdcgi is run as a filter and not as a cgi.

    -

    Keywords

    -
    RRD::CV name +
    RRD::CV name

    Inserts the CGI variable of the given name.

    - -
    RRD::CV::QUOTE name +
    RRD::CV::QUOTE name

    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.

    - -
    RRD::CV::PATH name +
    RRD::CV::PATH name

    Inserts the CGI variable of the given name, quotes it and makes sure @@ -85,82 +82,63 @@ it starts neither with a '/' nor contains '..'. This is to make sure that no problematic pathnames can be introduced through the CGI interface.

    - -
    RRD::GETENV variable +
    RRD::GETENV variable

    Get the value of an environment variable.

    -
    -
      <RRD::GETENV REMOTE_USER>
    -
    -

    might give you the name of the remote user given you are using some sort of access control on the directory.

    - -
    RRD::GOODFOR seconds +
    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 seconds is negative a Refresh header.

    - -
    RRD::INCLUDE filename +
    RRD::INCLUDE filename

    Include the contents of the specified file into the page returned from the cgi.

    - -
    RRD::SETENV variable value +
    RRD::SETENV variable value

    If you want to present your graphs in another time zone than your own, you could use

    -
    -
      <RRD::SETENV TZ UTC>
    -
    -

    to make sure everything is presented in Universal Time. Note that the values permitted to TZ depend on your OS.

    - -
    RRD::SETVAR variable value +
    RRD::SETVAR variable value

    Analog to SETENV but for local variables.

    - -
    RRD::GETVAR variable +
    RRD::GETVAR variable

    Analog to GETENV but for local variables.

    - -
    RRD::TIME::LAST rrd-file strftime-format +
    RRD::TIME::LAST rrd-file strftime-format

    This gets replaced by the last modification time of the selected RRD. The time is strftime-formatted with the string specified in the second argument.

    - -
    RRD::TIME::NOW strftime-format +
    RRD::TIME::NOW strftime-format

    This gets replaced by the current time of day. The time is strftime-formatted with the string specified in the argument.

    -
    -

    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.

    - -
    RRD::TIME::STRFTIME START|END start-spec end-spec strftime-format +
    RRD::TIME::STRFTIME START|END start-spec end-spec strftime-format

    This gets replaced by a strftime-formatted time using the format @@ -169,14 +147,11 @@ whether START or END is specified. Both start-spec a 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''.

    -
    -

    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.

    - -
    RRD::GRAPH rrdgraph arguments +
    RRD::GRAPH rrdgraph arguments

    This tag creates the RRD graph defined by its argument and then is @@ -184,41 +159,30 @@ replaced by an appropriate <IMG ... > tag referring to the graph. The --lazy 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 RRD::GRAPH tag work as described in the rrdgraph manual page.

    -
    -

    Use the --lazy 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.

    -
    -

    If you do not specify your own --imginfo format, the following will be used:

    -
    -
      <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.

    - -
    RRD::PRINT number +
    RRD::PRINT number

    If the preceding RRD::GRAPH tag contained and PRINT arguments, then you can access their output with this tag. The number argument refers to the number of the PRINT argument. This first PRINT has number 0.

    - -
    RRD::INTERNAL <var> +
    RRD::INTERNAL <var>

    This tag gets replaced by an internal var. Currently these vars are known: VERSION, COMPILETIME. These vars represent the compiled-in values.

    -

    diff --git a/doc/rrdcgi.txt b/doc/rrdcgi.txt index 60a8335..39bd614 100644 --- a/doc/rrdcgi.txt +++ b/doc/rrdcgi.txt @@ -204,4 +204,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDCGI(1) +1.3rc9 2008-03-15 RRDCGI(1) diff --git a/doc/rrdcreate.1 b/doc/rrdcreate.1 index 1eeb565..53fc8d9 100644 --- a/doc/rrdcreate.1 +++ b/doc/rrdcreate.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDCREATE 1" -.TH RRDCREATE 1 "2008-05-12" "1.3rc6" "rrdtool" +.TH RRDCREATE 1 "2008-05-12" "1.3rc9" "rrdtool" .SH "NAME" rrdcreate \- Set up a new Round Robin Database .SH "SYNOPSIS" diff --git a/doc/rrdcreate.html b/doc/rrdcreate.html index 1ebf6e0..52b82c1 100644 --- a/doc/rrdcreate.html +++ b/doc/rrdcreate.html @@ -50,74 +50,55 @@ Database (RRD) files. The file is created at its final, full size and filled with *UNKNOWN* data.

    -
    filename +
    filename

    The name of the RRD you want to create. RRD files should end with the extension .rrd. However, RRDtool will accept any filename.

    - -
    --start|-b start time (default: now - 10s) +
    --start|-b start time (default: now - 10s)

    Specifies the time in seconds since 1970-01-01 UTC when the first value should be added to the RRD. RRDtool will not accept any data timed before or at the time specified.

    -
    -

    See also AT-STYLE TIME SPECIFICATION section in the rrdfetch documentation for other ways to specify time.

    - -
    --step|-s step (default: 300 seconds) +
    --step|-s step (default: 300 seconds)

    Specifies the base interval in seconds with which data will be fed into the RRD.

    - -
    DS:ds-name:DST:dst arguments +
    DS:ds-name:DST:dst arguments

    A single RRD can accept input from several data sources (DS), for example incoming and outgoing traffic on a specific communication line. With the DS configuration option you must define some basic properties of each data source you want to store in the RRD.

    -
    -

    ds-name is the name you will use to reference this particular data source from an RRD. A ds-name must be 1 to 19 characters long in the characters [a-zA-Z0-9_].

    -
    -

    DST defines the Data Source Type. The remaining arguments of a data source entry depend on the data source type. For GAUGE, COUNTER, DERIVE, and ABSOLUTE the format for a data source entry is:

    -
    -

    DS:ds-name:GAUGE | COUNTER | DERIVE | ABSOLUTE:heartbeat:min:max

    -
    -

    For COMPUTE data sources, the format is:

    -
    -

    DS:ds-name:COMPUTE:rpn-expression

    -
    -

    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.

    -
    -
    GAUGE +
    GAUGE

    is for things like temperatures or number of people in a room or the value of a RedHat share.

    - -
    COUNTER +
    COUNTER

    is for continuous incrementing counters like the ifInOctets counter in @@ -128,8 +109,7 @@ 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.

    - -
    DERIVE +
    DERIVE

    will store the derivative of the line going from the last to the @@ -138,22 +118,17 @@ 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.

    -
    -
    NOTE on COUNTER vs DERIVE +
    NOTE on COUNTER vs DERIVE

    by Don Baarda <don.baarda@baesystems.com>

    -
    -

    If you cannot tolerate ever mistaking the occasional counter reset for a 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 ``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 @@ -162,9 +137,9 @@ 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.

    -
    -
    ABSOLUTE +
    +
    ABSOLUTE

    is for counters which get reset upon reading. This is used for fast counters @@ -173,8 +148,7 @@ 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.

    - -
    COMPUTE +
    COMPUTE

    is for storing the result of a formula applied to other data sources @@ -186,7 +160,6 @@ 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.

    -

    heartbeat defines the maximum number of seconds that may pass between two updates of this data source before the value of the @@ -210,49 +183,41 @@ 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 CDEFs must refer only to DEFs and CDEFs previously defined in the same graph command.

    -
    RRA:CF:cf arguments + +
    RRA:CF:cf arguments

    The purpose of an RRD is to store data in the round robin archives (RRA). An archive consists of a number of data values or statistics for each of the defined data-sources (DS) and is defined with an RRA line.

    -
    -

    When data is entered into an RRD, it is first fit into time slots of the length defined with the -s option, thus becoming a primary data point.

    -
    -

    The data is also processed with the consolidation function (CF) of the archive. There are several consolidation functions that consolidate primary data points via an aggregate function: AVERAGE, MIN, MAX, LAST.

    -
    -
    AVERAGE +
    AVERAGE

    the average of the data points is stored.

    - -
    MIN +
    MIN

    the smallest of the data points is stored.

    - -
    MAX +
    MAX

    the largest of the data points is stored.

    - -
    LAST +
    LAST

    the last data points is used.

    -

    Note that data aggregation inevitably leads to loss of precision and information. The trick is to pick the aggregate function such that the @@ -268,6 +233,7 @@ to the number of PDPs in the interval. Thus, it ranges from 0 to 1 (exclusive).<

    steps defines how many of these primary data points are used to build a consolidated data point which then goes into the archive.

    rows defines how many generations of data values are kept in an RRA.

    +

    @@ -489,7 +455,7 @@ same average rate. -- Don Baarda <HOW TO MEASURE

    Here are a few hints on how to measure:

    -
    Temperature +
    Temperature

    Usually you have some type of meter you can read to get the temperature. @@ -498,8 +464,7 @@ that the temperature reading happened at a certain time. You can use the GAUGE data source type for this. RRDtool will then record your reading together with the time.

    - -
    Mail Messages +
    Mail Messages

    Assume you have a method to count the number of messages transported by @@ -513,8 +478,7 @@ 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.

    - -
    It's always a Rate +
    It's always a Rate

    RRDtool stores rates in amount/second for COUNTER, DERIVE and ABSOLUTE @@ -529,7 +493,6 @@ 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).

    -

    diff --git a/doc/rrdcreate.txt b/doc/rrdcreate.txt index 170ddff..1e361a8 100644 --- a/doc/rrdcreate.txt +++ b/doc/rrdcreate.txt @@ -541,4 +541,4 @@ AAUUTTHHOORR -1.3rc6 2008-05-12 RRDCREATE(1) +1.3rc9 2008-05-12 RRDCREATE(1) diff --git a/doc/rrddump.1 b/doc/rrddump.1 index 252eab8..9d444b1 100644 --- a/doc/rrddump.1 +++ b/doc/rrddump.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDDUMP 1" -.TH RRDDUMP 1 "2008-05-16" "1.3rc6" "rrdtool" +.TH RRDDUMP 1 "2008-05-16" "1.3rc9" "rrdtool" .SH "NAME" rrddump \- dump the contents of an RRD to XML format .SH "SYNOPSIS" diff --git a/doc/rrddump.html b/doc/rrddump.html index f4fc01b..3a6f22d 100644 --- a/doc/rrddump.html +++ b/doc/rrddump.html @@ -46,20 +46,18 @@ files from one computer architecture to another as well to manipulate the contents of an RRD file in a somewhat more convenient manner.

    -
    filename.rrd +
    filename.rrd

    The name of the RRD you want to dump.

    - -
    filename.xml +
    filename.xml

    The (optional) filename that you want to write the XML output to. If not specified, the XML will be printed to stdout.

    - -
    [--no-header|-n] +
    [--no-header|-n]

    In rrdtool 1.3, the dump function started producing correct xml-headers. @@ -67,7 +65,6 @@ 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.

    -

    diff --git a/doc/rrddump.txt b/doc/rrddump.txt index 8a32280..164af9d 100644 --- a/doc/rrddump.txt +++ b/doc/rrddump.txt @@ -48,4 +48,4 @@ AAUUTTHHOORR -1.3rc6 2008-05-16 RRDDUMP(1) +1.3rc9 2008-05-16 RRDDUMP(1) diff --git a/doc/rrdfetch.1 b/doc/rrdfetch.1 index 9539bae..5c7de01 100644 --- a/doc/rrdfetch.1 +++ b/doc/rrdfetch.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDFETCH 1" -.TH RRDFETCH 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDFETCH 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdfetch \- Fetch data from an RRD. .SH "SYNOPSIS" @@ -227,9 +227,9 @@ Using the bash shell, this could look be: Or in Perl: .PP .Vb 3 -\& perl \-e '$ctime = time; $rrdres = 900; \e +\& perl \-e \(aq$ctime = time; $rrdres = 900; \e \& system "rrdtool fetch subdata.rrd AVERAGE \e -\& \-r $rrdres \-e @{[int($ctime/$rrdres)*$rrdres]} \-s e\-1h"' +\& \-r $rrdres \-e @{[int($ctime/$rrdres)*$rrdres]} \-s e\-1h"\(aq .Ve .Sh "AT-STYLE \s-1TIME\s0 \s-1SPECIFICATION\s0" .IX Subsection "AT-STYLE TIME SPECIFICATION" diff --git a/doc/rrdfetch.html b/doc/rrdfetch.html index 9e4e41c..e4e682a 100644 --- a/doc/rrdfetch.html +++ b/doc/rrdfetch.html @@ -55,28 +55,25 @@ The data fetched is printed to stdout. *UNKNOWN* data is often represented by the string ``NaN'' depending on your OS's printf function.

    -
    filename +
    filename

    the name of the RRD you want to fetch the data from.

    - -
    CF +
    CF

    the consolidation function that is applied to the data you want to fetch (AVERAGE,MIN,MAX,LAST)

    - -
    --resolution|-r resolution (default is the highest resolution) +
    --resolution|-r resolution (default is the highest resolution)

    the interval you want the values to have (seconds per value). rrdfetch will try to match your request, but it will return data even if no absolute match is possible. NB. See note below.

    - -
    --start|-s start (default end-1day) +
    --start|-s start (default end-1day)

    start of the time series. A time in seconds since epoch (1970-01-01) @@ -84,15 +81,13 @@ 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.

    - -
    --end|-e end (default now) +
    --end|-e end (default now)

    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.

    -

    diff --git a/doc/rrdfetch.txt b/doc/rrdfetch.txt index 3adfff9..702903d 100644 --- a/doc/rrdfetch.txt +++ b/doc/rrdfetch.txt @@ -228,4 +228,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDFETCH(1) +1.3rc9 2008-03-15 RRDFETCH(1) diff --git a/doc/rrdfirst.1 b/doc/rrdfirst.1 index feb57ca..128bcd9 100644 --- a/doc/rrdfirst.1 +++ b/doc/rrdfirst.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDFIRST 1" -.TH RRDFIRST 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDFIRST 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdfirst \- Return the date of the first data sample in an RRA within an RRD .SH "SYNOPSIS" diff --git a/doc/rrdfirst.html b/doc/rrdfirst.html index 819171a..78f2f83 100644 --- a/doc/rrdfirst.html +++ b/doc/rrdfirst.html @@ -39,20 +39,18 @@

    The first function returns the UNIX timestamp of the first data sample entered into the specified RRA of the RRD file.

    -
    filename +
    filename

    The name of the RRD that contains the data.

    - -
    --rraindex number +
    --rraindex number

    The index number of the RRA that is to be examined. If not specified, the index defaults to zero. RRA index numbers can be determined through rrdtool info.

    -

    diff --git a/doc/rrdfirst.txt b/doc/rrdfirst.txt index 9c8f4a3..ee3541c 100644 --- a/doc/rrdfirst.txt +++ b/doc/rrdfirst.txt @@ -26,4 +26,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDFIRST(1) +1.3rc9 2008-03-15 RRDFIRST(1) diff --git a/doc/rrdgraph.1 b/doc/rrdgraph.1 index ca72245..096f25b 100644 --- a/doc/rrdgraph.1 +++ b/doc/rrdgraph.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH 1" -.TH RRDGRAPH 1 "2008-04-21" "1.3rc6" "rrdtool" +.TH RRDGRAPH 1 "2008-06-05" "1.3rc9" "rrdtool" .SH "NAME" rrdgraph \- Round Robin Database tool grapher functions .SH "SYNOPSIS" @@ -397,7 +397,7 @@ suitable for including the graph into a web page, the command line would look like this: .Sp .Vb 1 -\& \-\-imginfo 'Demo' +\& \-\-imginfo \(aqDemo\(aq .Ve .Sp [\fB\-c\fR|\fB\-\-color\fR \fI\s-1COLORTAG\s0\fR#\fIrrggbb\fR[\fIaa\fR]] @@ -468,6 +468,32 @@ This specifies the largest font size which will be rendered bitmapped, that is, without any font smoothing. By default, no text is rendered bitmapped. .Sp +[\fB\-P\fR|\fB\-\-pango\-markup\fR] +.Sp +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 +.Sp +.Vb 1 +\& text +.Ve +.Sp +Apart from the verbose syntax, there are also the following short tags available. +.Sp +.Vb 9 +\& b Bold +\& big Makes font relatively larger, equivalent to +\& i Italic +\& s Strikethrough +\& sub Subscript +\& sup Superscript +\& small Makes font relatively smaller, equivalent to +\& tt Monospace font +\& u Underline +.Ve +.Sp +More details on . +.Sp [\fB\-G\fR|\fB\-\-graph\-render\-mode\fR {\fBnormal\fR,\fBmono\fR}] .Sp There are 2 render modes: @@ -536,30 +562,6 @@ 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. -.IP "Markup" 4 -.IX Item "Markup" -All text in rrdtool is rendered using Pango markup. This means text can contain embeded markup instructions. -Simple html markup using -.Sp -.Vb 1 -\& text -.Ve -.Sp -can be used. Apart from the verbose syntax, there are also the following short tags available. -.Sp -.Vb 9 -\& b Bold -\& big Makes font relatively larger, equivalent to -\& i Italic -\& s Strikethrough -\& sub Subscript -\& sup Superscript -\& small Makes font relatively smaller, equivalent to -\& tt Monospace font -\& u Underline -.Ve -.Sp -More details on http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html. .Sh "graphv" .IX Subsection "graphv" Calling rrdtool with the graphv option will return information in the diff --git a/doc/rrdgraph.html b/doc/rrdgraph.html index ec76219..5415923 100644 --- a/doc/rrdgraph.html +++ b/doc/rrdgraph.html @@ -84,7 +84,7 @@ graph it (or print it). This ends the rrdtool graph sequence.<

    OPTIONS

    -
    graphv +
    graphv

    This alternate version of graph takes the same arguments and performs the @@ -92,26 +92,20 @@ same function. The v stands for verbose, which describes the o returned. 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.

    - -
    filename +
    filename

    The name and path of the graph to generate. It is recommended to end this in .png, .svg or .eps, but RRDtool does not enforce this.

    -
    -

    filename can be '-' to send the image to stdout. In this case, no other output is generated.

    - -
    Time range +
    Time range

    [-s|--start time] [-e|--end time] [-S|--step seconds]

    -
    -

    The start and end of the time series you would like to display, and which RRA the data should come from. Defaults are: 1 day ago until now, with the best possible resolution. Start and end can @@ -124,61 +118,44 @@ If you want rrdtool graph to get data at a one-hour resolution from the RRD, set step to 3'600. Note: a step smaller than one pixel will silently be ignored.

    - -
    Labels +
    Labels

    [-t|--title string] [-v|--vertical-label string]

    -
    -

    A horizontal string at the top of the graph and/or a vertically placed string at the left hand side of the graph.

    - -
    Size +
    Size

    [-w|--width pixels] [-h|--height pixels] [-j|--only-graph] [-D|--full-size-mode]

    -
    -

    By default, the width and height of the canvas (the part with the actual data and such). This defaults to 400 pixels by 100 pixels.

    -
    -

    If you specify the --full-size-mode 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 --only-graph 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.

    - -
    Limits +
    Limits

    [-u|--upper-limit value] [-l|--lower-limit value] [-r|--rigid]

    -
    -

    By default the graph will be autoscaling so that it will adjust the y-axis to the range of the data. You can change this behaviour by explicitly setting the limits. The displayed y-axis will then range at least from lower-limit to upper-limit. Autoscaling will still permit those boundaries to be stretched unless the rigid option is set.

    -
    -

    [-A|--alt-autoscale]

    -
    -

    Sometimes the default algorithm for selecting the y-axis scale is not satisfactory. Normally the scale is selected from a predefined set of ranges and this fails miserably when you need to graph something @@ -186,58 +163,37 @@ like 260 + 0.001 * sin(x). This option calculates the minimum and maximum y-axis from the actual minimum and maximum data values. Our example would display slightly less than 260-0.001 to slightly more than 260+0.001 (this feature was contributed by Sasha Mikheev).

    -
    -

    [-J|--alt-autoscale-min]

    -
    -

    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.

    -
    -

    [-M|--alt-autoscale-max]

    -
    -

    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.

    -
    -

    [-N|--no-gridfit]

    -
    -

    In order to avoid anti-aliasing blurring effects rrdtool snaps points to device resolution pixels, this results in a crisper aperance. If this is not to your liking, you can use this switch to turn this behaviour off.

    -
    -

    Gridfitting is turned off for PDF, EPS, SVG output by default.

    - -
    Grid +
    Grid
    -
    X-Axis +
    X-Axis

    [-x|--x-grid GTM:GST:MTM:MST:LTM:LST:LPR:LFM]

    -
    -

    [-x|--x-grid none]

    -
    -

    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.

    -
    -

    The grid is defined by specifying a certain amount of time in the ?TM positions. You can choose from SECOND, MINUTE, HOUR, DAY, WEEK, MONTH or YEAR. Then you define how many of these should @@ -249,66 +205,39 @@ 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).

    -
    -
      --x-grid MINUTE:10:HOUR:1:HOUR:4:0:%X
    -
    -

    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 HOUR:8:DAY:1:DAY:1:86400:%A
    -
    -

    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.

    - -
    Y-Axis +
    Y-Axis

    [-y|--y-grid grid step:label factor]

    -
    -

    [-y|--y-grid none]

    -
    -

    Y-axis grid lines appear at each grid step interval. Labels are placed every label factor lines. You can specify -y none to suppress the grid and labels altogether. The default for this option is to automatically select sensible values.

    -
    -

    If you have set --y-grid to 'none' not only the labels get supressed, 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.

    -
    -

    [-Y|--alt-y-grid]

    -
    -

    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).

    -
    -

    [-o|--logarithmic]

    -
    -

    Logarithmic y-axis scaling.

    -
    -

    [-X|--units-exponent value]

    -
    -

    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 @@ -318,59 +247,37 @@ 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.

    -
    -

    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 --alt-y-grid mode.

    -
    -

    [-L|--units-length value]

    -
    -

    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.

    -
    -

    [--units=si]

    -
    -

    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.

    -
    -
    Miscellaneous + +
    Miscellaneous

    [-z|--lazy]

    -
    -

    Only generate the graph if the current graph is out of date or not existent.

    -
    -

    [-f|--imginfo printfstr]

    -
    -

    After the image has been created, the graph function uses printf together with this format string to create output similar to the PRINT function, only that the printf function is supplied with the parameters filename, xsize and ysize. In order to generate an IMG tag suitable for including the graph into a web page, the command line would look like this:

    -
    -
      --imginfo '<IMG SRC="/img/%s" WIDTH="%lu" HEIGHT="%lu" ALT="Demo">'
    -
    -

    [-c|--color COLORTAG#rrggbb[aa]]

    -
    -

    Override the default colors for the standard elements of the graph. The COLORTAG is one of BACK background, CANVAS for the background of the actual graph, SHADEA for the left and top border, SHADEB for the @@ -382,46 +289,24 @@ 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.

    -
    -

    A green arrow is made by: --color ARROW#00FF00

    -
    -

    [--zoom factor]

    -
    -

    Zoom the graphics by the given amount. The factor must be > 0

    -
    -

    [-n|--font FONTTAG:size:[font]]

    -
    -

    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.

    -
    -

    Use Times for the title: --font TITLE:13:Times

    -
    -

    If you do not give a font string you can modify just the sice of the default font: --font TITLE:13:.

    -
    -

    If you specify the size 0 then you can modify just the font without touching the size. This is especially usefull for altering the default font without resetting the default fontsizes: --font DEFAULT:0:Courier.

    -
    -

    RRDtool comes with a preset default font. You can set the environment variable RRD_DEFAULT_FONT if you want to change this.

    -
    -

    RRDtool uses Pango for its font handling. This means you can to use the full Pango syntax when selecting your font:

    -
    -

    The font name has the form ``[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]'', where FAMILY-LIST is a comma separated list of families optionally terminated by a comma, STYLE_OPTIONS is a whitespace separated list of @@ -429,163 +314,87 @@ words where each WORD describes one of style, variant, weight, stretch, or gravity, and SIZE is a decimal number (size in points) or optionally followed by the unit modifier ``px'' for absolute size. Any one of the options may be absent.

    -
    -

    [-R|--font-render-mode {normal,light,mono}]

    -
    -

    There are 3 font render modes:

    -
    -

    normal: Full Hinting and Antialiasing (default)

    -
    -

    light: Slight Hinting and Antialiasing

    -
    -

    mono: Full Hinting and NO Antialiasing

    -
    -

    [-B|--font-smoothing-threshold size]

    -
    -

    (this gets ignored in 1.3 for now!)

    -
    -

    This specifies the largest font size which will be rendered bitmapped, that is, without any font smoothing. By default, no text is rendered bitmapped.

    -
    -
    +

    [-P|--pango-markup]

    +

    All text in rrdtool is rendered using Pango. With the --pango-markup option, all +text will be processed by pango markup. This allows to embed some simple html +like markup tags using +

    +
    +
    + <span key="value">text</span>
    +

    Apart from the verbose syntax, there are also the following short tags available.

    +
    + b     Bold
    + big   Makes font relatively larger, equivalent to <span size="larger">
    + i     Italic
    + s     Strikethrough
    + sub   Subscript
    + sup   Superscript
    + small Makes font relatively smaller, equivalent to <span size="smaller">
    + tt    Monospace font
    + u     Underline 
    + 
    +More details on L<http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html>;.

    [-G|--graph-render-mode {normal,mono}]

    -
    -

    There are 2 render modes:

    -
    -

    normal: Graphs are fully Antialiased (default)

    -
    -

    mono: No Antialiasing

    -
    -

    [-E|--slope-mode]

    -
    -

    RRDtool graphs are composed of stair case curves by default. This is in line with the way RRDtool calculates its data. Some people favor a more 'organic' look for their graphs even though it is not all that true.

    -
    -

    [-a|--imgformat PNG|SVG|EPS|PDF]

    -
    -

    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.

    -
    -

    [-i|--interlaced]

    -
    -

    (this gets ignored in 1.3 for now!)

    -
    -

    If images are interlaced they become visible on browsers more quickly.

    -
    -

    [-g|--no-legend]

    -
    -

    Suppress generation of the legend; only render the graph.

    -
    -

    [-F|--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).

    -
    -

    [-T|--tabwidth value]

    -
    -

    By default the tab-width is 40 pixels, use this option to change it.

    -
    -

    [-b|--base value]

    -
    -

    If you are graphing memory (and NOT network traffic) this switch should be set to 1024 so that one Kb is 1024 byte. For traffic measurement, 1 kb/s is 1000 b/s.

    -
    -

    [-W|--watermark string]

    -
    -

    Adds the given string as a watermark, horizontally centred, at the bottom of the graph.

    - -
    Data and variables +
    Data and variables

    DEF:vname=rrdfile:ds-name:CF[:step=step][:start=time][:end=time]

    -
    -

    CDEF:vname=RPN expression

    -
    -

    VDEF:vname=RPN expression

    -
    -

    You need at least one DEF statement to generate anything. The other statements are useful but optional. See the rrdgraph_data manpage and the rrdgraph_rpn manpage for the exact format.

    - -
    Graph and print elements +
    Graph and print elements

    You need at least one graph element to generate an image and/or at least one print statement to generate a report. See the rrdgraph_graph manpage for the exact format.

    - -
    Markup - -
    -

    All text in rrdtool is rendered using Pango markup. This means text can contain embeded markup instructions. -Simple html markup using -

    -
    -
    -
    -
    - <span key="value">text</span>
    -
    -
    -

    can be used. Apart from the verbose syntax, there are also the following short tags available.

    -
    -
    -
    - b     Bold
    - big   Makes font relatively larger, equivalent to <span size="larger">
    - i     Italic
    - s     Strikethrough
    - sub   Subscript
    - sup   Superscript
    - small Makes font relatively smaller, equivalent to <span size="smaller">
    - tt    Monospace font
    - u     Underline 
    - 
    -More details on http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html.
    -
    -

    diff --git a/doc/rrdgraph.pod b/doc/rrdgraph.pod index 54fd5b0..159d6af 100644 --- a/doc/rrdgraph.pod +++ b/doc/rrdgraph.pod @@ -346,6 +346,28 @@ This specifies the largest font size which will be rendered bitmapped, that is, without any font smoothing. By default, no text is rendered bitmapped. +[B<-P>|B<--pango-markup>] + +All text in rrdtool is rendered using Pango. With the B<--pango-markup> option, all +text will be processed by pango markup. This allows to embed some simple html +like markup tags using + + text + +Apart from the verbose syntax, there are also the following short tags available. + + b Bold + big Makes font relatively larger, equivalent to + i Italic + s Strikethrough + sub Subscript + sup Superscript + small Makes font relatively smaller, equivalent to + tt Monospace font + u Underline + +More details on L. + [B<-G>|B<--graph-render-mode> {B,B}] There are 2 render modes: @@ -417,26 +439,6 @@ You need at least one graph element to generate an image and/or at least one print statement to generate a report. See L for the exact format. -=item Markup - -All text in rrdtool is rendered using Pango markup. This means text can contain embeded markup instructions. -Simple html markup using - - text - -can be used. Apart from the verbose syntax, there are also the following short tags available. - - b Bold - big Makes font relatively larger, equivalent to - i Italic - s Strikethrough - sub Subscript - sup Superscript - small Makes font relatively smaller, equivalent to - tt Monospace font - u Underline - -More details on http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html. =back diff --git a/doc/rrdgraph.txt b/doc/rrdgraph.txt index d18c746..641c1fd 100644 --- a/doc/rrdgraph.txt +++ b/doc/rrdgraph.txt @@ -325,6 +325,30 @@ OOPPTTIIOONNSS bitmapped, that is, without any font smoothing. By default, no text is rendered bitmapped. + [--PP|----ppaannggoo--mmaarrkkuupp] + + All text in rrdtool is rendered using Pango. With the + ----ppaannggoo--mmaarrkkuupp option, all text will be processed by pango markup. + This allows to embed some simple html like markup tags using + + text + + Apart from the verbose syntax, there are also the following short + tags available. + + b Bold + big Makes font relatively larger, equivalent to + i Italic + s Strikethrough + sub Subscript + sup Superscript + small Makes font relatively smaller, equivalent to + tt Monospace font + u Underline + + More details on . + [--GG|----ggrraapphh--rreennddeerr--mmooddee {nnoorrmmaall,mmoonnoo}] There are 2 render modes: @@ -398,28 +422,6 @@ OOPPTTIIOONNSS least one print statement to generate a report. See rrdgraph_graph for the exact format. - Markup - All text in rrdtool is rendered using Pango markup. This means text - can contain embeded markup instructions. Simple html markup using - - text - - can be used. Apart from the verbose syntax, there are also the fol- - lowing short tags available. - - b Bold - big Makes font relatively larger, equivalent to - i Italic - s Strikethrough - sub Subscript - sup Superscript - small Makes font relatively smaller, equivalent to - tt Monospace font - u Underline - - More details on http://developer.gnome.org/doc/API/2.0/pango/Pango- - MarkupFormat.html. - ggrraapphhvv Calling rrdtool with the graphv option will return information in the @@ -463,4 +465,4 @@ AAUUTTHHOORR -1.3rc6 2008-04-21 RRDGRAPH(1) +1.3rc9 2008-06-05 RRDGRAPH(1) diff --git a/doc/rrdgraph_data.1 b/doc/rrdgraph_data.1 index 5406238..4b259b4 100644 --- a/doc/rrdgraph_data.1 +++ b/doc/rrdgraph_data.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_DATA 1" -.TH RRDGRAPH_DATA 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDGRAPH_DATA 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdgraph_data \- preparing data for graphing in rrdtool graph .SH "SYNOPSIS" diff --git a/doc/rrdgraph_data.txt b/doc/rrdgraph_data.txt index 2a22682..b29b0e9 100644 --- a/doc/rrdgraph_data.txt +++ b/doc/rrdgraph_data.txt @@ -104,4 +104,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDGRAPH_DATA(1) +1.3rc9 2008-03-15 RRDGRAPH_DATA(1) diff --git a/doc/rrdgraph_examples.1 b/doc/rrdgraph_examples.1 index 0642673..e1d36fb 100644 --- a/doc/rrdgraph_examples.1 +++ b/doc/rrdgraph_examples.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_EXAMPLES 1" -.TH RRDGRAPH_EXAMPLES 1 "2008-03-25" "1.3rc6" "rrdtool" +.TH RRDGRAPH_EXAMPLES 1 "2008-03-25" "1.3rc9" "rrdtool" .SH "NAME" rrdgraph_examples \- Examples for rrdtool graph .SH "SYNOPSIS" diff --git a/doc/rrdgraph_examples.txt b/doc/rrdgraph_examples.txt index 92dd941..57ff36a 100644 --- a/doc/rrdgraph_examples.txt +++ b/doc/rrdgraph_examples.txt @@ -196,4 +196,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-25 RRDGRAPH_EXAMPLES(1) +1.3rc9 2008-03-25 RRDGRAPH_EXAMPLES(1) diff --git a/doc/rrdgraph_graph.1 b/doc/rrdgraph_graph.1 index 62ca614..09940ba 100644 --- a/doc/rrdgraph_graph.1 +++ b/doc/rrdgraph_graph.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_GRAPH 1" -.TH RRDGRAPH_GRAPH 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDGRAPH_GRAPH 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdgraph_graph \- rrdtool graph command reference .SH "SYNOPSIS" diff --git a/doc/rrdgraph_graph.html b/doc/rrdgraph_graph.html index d530670..0898515 100644 --- a/doc/rrdgraph_graph.html +++ b/doc/rrdgraph_graph.html @@ -67,51 +67,42 @@ Similarly, no report is generated if you don't use print options.


    PRINT

    -
    PRINT:vname:format[:strftime] +
    PRINT:vname:format[:strftime]

    Depending on the context, either the value component or the time component of a VDEF is printed using format. It is an error to specify a vname generated by a DEF or CDEF.

    -
    -

    Any text in format is printed literally with one exception: The percent character introduces a formatter string. This string can be:

    -
    -

    For printing values:

    -
    -
    %% +
    %%

    just prints a literal '%' character

    - -
    %#.#le +
    %#.#le

    prints numbers like 1.2346e+04. The optional integers # denote field width and decimal precision.

    - -
    %#.#lf +
    %#.#lf

    prints numbers like 12345.6789, with optional field width and precision.

    - -
    %s +
    %s

    place this after %le, %lf or %lg. This will be replaced by the appropriate SI magnitude unit and the value will be scaled accordingly (123456 -> 123.456 k).

    - -
    %S +
    %S

    is similar to %s. It does, however, use a previously defined @@ -120,80 +111,68 @@ one (just like %s) unless the value is zero, in which case the unit stays undefined. Thus, formatter strings using %S and no %s 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 :strftime to the format. Note that rrdtool uses the strftime function of your OSs clibrary. 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.

    -
    %a +
    %a

    The abbreviated weekday name according to the current locale.

    - -
    %A +
    %A

    The full weekday name according to the current locale.

    - -
    %b +
    %b

    The abbreviated month name according to the current locale.

    - -
    %B +
    %B

    The full month name according to the current locale.

    - -
    %c +
    %c

    The preferred date and time representation for the current locale.

    - -
    %d +
    %d

    The day of the month as a decimal number (range 01 to 31).

    - -
    %H +
    %H

    The hour as a decimal number using a 24-hour clock (range 00 to 23).

    - -
    %I +
    %I

    The hour as a decimal number using a 12-hour clock (range 01 to 12).

    - -
    %j +
    %j

    The day of the year as a decimal number (range 001 to 366).

    - -
    %m +
    %m

    The month as a decimal number (range 01 to 12).

    - -
    %M +
    %M

    The minute as a decimal number (range 00 to 59).

    - -
    %p +
    %p

    Either `AM' or `PM' according to the given time value, or the corresponding @@ -201,113 +180,98 @@ 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.

    - -
    %S +
    %S

    The second as a decimal number (range 00 to 61).

    - -
    %U +
    %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 %V and %W.

    - -
    %V +
    %V

    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.

    - -
    %w +
    %w

    The day of the week as a decimal, range 0 to 6, Sunday being 0. See also %u.

    - -
    %W +
    %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.

    - -
    %x +
    %x

    The preferred date representation for the current locale without the time.

    - -
    %X +
    %X

    The preferred time representation for the current locale without the date.

    - -
    %y +
    %y

    The year as a decimal number without a century (range 00 to 99).

    - -
    %Y +
    %Y

    The year as a decimal number including the century.

    - -
    %Z +
    %Z

    The time zone or name or abbreviation.

    - -
    %% +
    %%

    A literal `%' character.

    -
    -
    PRINT:vname:CF:format + +
    PRINT:vname:CF:format

    Deprecated. Use the new form of this command in new scripts. The first form of this command is to be used with CDEF vnames.

    -


    GRAPH

    -
    GPRINT:vname:format +
    GPRINT:vname:format

    This is the same as PRINT, but printed inside the graph.

    - -
    GPRINT:vname:CF:format +
    GPRINT:vname:CF:format

    Deprecated. Use the new form of this command in new scripts. This is the same as PRINT, but printed inside the graph.

    - -
    COMMENT:text +
    COMMENT:text

    Text is printed literally in the legend section of the graph. Note that in RRDtool 1.2 you have to escape colons in COMMENT text in the same way you have to escape them in *PRINT commands by writing '\:'.

    - -
    VRULE:time#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]] +
    VRULE:time#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]

    Draw a vertical line at time. Its color is composed from three @@ -318,16 +282,14 @@ from a VDEF. It is an error to use vnames from dashes modifier. See LINE for more details.

    - -
    HRULE:value#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]] +
    HRULE:value#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]

    Draw a horizontal line at value. 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.

    - -
    LINE[width]:value[#color][:[legend][:STACK]][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]] +
    LINE[width]:value[#color][:[legend][:STACK]][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]

    Draw a line of the specified width onto the graph. width can be a @@ -338,8 +300,6 @@ the legend section if specified. The value can be generated by VDEF, and CDEF. If the optional STACK modifier is used, this line is stacked on top of the previous element which can be a LINE or an AREA.

    -
    -

    The dashes modifier enables dashed line style. Without any further options a symmetric dashed line with a segment length of 5 pixels will be drawn. The dash pattern can be changed if the dashes= parameter is followed by either @@ -347,20 +307,16 @@ one value or an even number (1, 2, 4, 6, ...) of positive values. Each value provides the length of alternate on_s and off_s portions of the stroke. The dash-offset parameter specifies an offset into the pattern at which the stroke begins.

    -
    -

    When you do not specify a color, you cannot specify a legend. Should you want to use STACK, use the ``LINEx:<value>::STACK'' form.

    - -
    AREA:value[#color][:[legend][:STACK]] +
    AREA:value[#color][:[legend][:STACK]]

    See LINE, however the area between the x-axis and the line will be filled.

    - -
    TICK:vname#rrggbb[aa][:fraction[:legend]] +
    TICK:vname#rrggbb[aa][:fraction[:legend]]

    Plot a tick mark (a vertical line) for each value of vname that is @@ -370,8 +326,7 @@ the axis). Note that the color specification is not optional. The TICK marks nor start at the lower edge of the graphing area. If the fraction is negative they start at the upper border of the graphing area.

    - -
    SHIFT:vname:offset +
    SHIFT:vname:offset

    Using this command RRDtool will graph the following elements @@ -381,8 +336,7 @@ 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.

    - -
    TEXTALIGN:{left|right|justified|center} +
    TEXTALIGN:{left|right|justified|center}

    Labels are placed below the graph. When they overflow to the left, they wrap @@ -391,13 +345,11 @@ to the next line. By default, lines are justified left and right. The not an option, so that you can change the default several times in your argument list.

    - -
    STACK:vname#color[:legend] +
    STACK:vname#color[:legend]

    Deprecated. Use the STACK modifiers on the other commands.

    -

    Some notes on stacking

    When stacking, an element is not placed above the X-axis but rather @@ -454,183 +406,154 @@ Pango uses the xml span tags for inline formatting instructions <span foreground="blue" size="x-large">Blue text</span> is <i>cool</i>!

    The complete list of attributes for the span tag (taken from the pango documentation):

    -
    font_desc +
    font_desc

    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.

    - -
    font_family +
    font_family

    A font family name

    - -
    face +
    face

    Synonym for font_family

    - -
    size +
    size

    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'.

    - -
    style +
    style

    One of 'normal', 'oblique', 'italic'

    - -
    weight +
    weight

    One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight

    - -
    variant +
    variant

    'normal' or 'smallcaps'

    - -
    stretch +
    stretch

    One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'

    - -
    foreground +
    foreground

    An RGB color specification such as '#00FF00' or a color name such as 'red'

    - -
    background +
    background

    An RGB color specification such as '#00FF00' or a color name such as 'red'

    - -
    underline +
    underline

    One of 'none', 'single', 'double', 'low', 'error'

    - -
    underline_color +
    underline_color

    The color of underlines; an RGB color specification such as '#00FF00' or a color name such as 'red'

    - -
    rise +
    rise

    Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.

    - -
    strikethrough +
    strikethrough

    'true' or 'false' whether to strike through the text

    - -
    strikethrough_color +
    strikethrough_color

    The color of strikethrough lines; an RGB color specification such as '#00FF00' or a color name such as 'red'

    - -
    fallback +
    fallback

    '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.

    - -
    lang +
    lang

    A language code, indicating the text language

    - -
    letter_spacing +
    letter_spacing

    Inter-letter spacing in 1024ths of a point.

    - -
    gravity +
    gravity

    One of 'south', 'east', 'north', 'west', 'auto'.

    - -
    gravity_hint +
    gravity_hint

    One of 'natural', 'strong', 'line'.

    -

    To save you some typing, there are also some shortcuts:

    -
    b +
    b

    Bold

    - -
    big +
    big

    Makes font relatively larger, equivalent to <span size=``larger''>

    - -
    i +
    i

    Italic

    - -
    s +
    s

    Strikethrough

    - -
    sub +
    sub

    Subscript

    - -
    sup +
    sup

    Superscript

    - -
    small +
    small

    Makes font relatively smaller, equivalent to <span size=``smaller''>

    - -
    tt +
    tt

    Monospace font

    - -
    u +
    u

    Underline

    -

    diff --git a/doc/rrdgraph_graph.txt b/doc/rrdgraph_graph.txt index 03050ea..9629825 100644 --- a/doc/rrdgraph_graph.txt +++ b/doc/rrdgraph_graph.txt @@ -416,4 +416,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDGRAPH_GRAPH(1) +1.3rc9 2008-03-15 RRDGRAPH_GRAPH(1) diff --git a/doc/rrdgraph_rpn.1 b/doc/rrdgraph_rpn.1 index 3dbc9e2..47ee711 100644 --- a/doc/rrdgraph_rpn.1 +++ b/doc/rrdgraph_rpn.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_RPN 1" -.TH RRDGRAPH_RPN 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDGRAPH_RPN 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdgraph_rpn \- About RPN Math in rrdtool graph .SH "SYNOPSIS" diff --git a/doc/rrdgraph_rpn.html b/doc/rrdgraph_rpn.html index d5fccbb..ef20291 100644 --- a/doc/rrdgraph_rpn.html +++ b/doc/rrdgraph_rpn.html @@ -70,173 +70,92 @@ would do a = b, 3, +, 5, * without the need for parentheses.


    OPERATORS

    -
    Boolean operators +
    Boolean operators

    LT, LE, GT, GE, EQ, NE

    -
    -

    Pop two elements from the stack, compare them for the selected condition and return 1 for true or 0 for false. Comparing an unknown or an infinite value will always result in 0 (false).

    -
    -

    UN, ISINF

    -
    -

    Pop one element from the stack, compare this to unknown respectively to positive or negative infinity. Returns 1 for true or 0 for false.

    -
    -

    IF

    -
    -

    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.

    -
    -

    Example: A,B,C,IF should be read as if (A) then (B) else (C)

    -
    -

    - -
    Comparing values +
    Comparing values

    MIN, MAX

    -
    -

    Pops two elements from the stack and returns the smaller or larger, respectively. Note that infinite is larger than anything else. If one of the input numbers is unknown then the result of the operation will be unknown too.

    -
    -

    LIMIT

    -
    -

    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 unknown is pushed.

    -
    -

    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 unknown or infinite this function will always return an unknown

    -
    -

    Example: CDEF:a=alpha,0,100,LIMIT will return unknown if alpha is lower than 0 or if it is higher than 100.

    -
    -

    - -
    Arithmetics +
    Arithmetics

    +, -, *, /, %

    -
    -

    Add, subtract, multiply, divide, modulo

    -
    -

    ADDNAN

    -
    -

    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.

    -
    -

    SIN, COS, LOG, EXP, SQRT

    -
    -

    Sine and cosine (input in radians), log and exp (natural logarithm), square root.

    -
    -

    ATAN

    -
    -

    Arctangent (output in radians).

    -
    -

    ATAN2

    -
    -

    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.

    -
    -

    Example: CDEF:angle=Y,X,ATAN2,RAD2DEG will convert X,Y components into an angle in degrees.

    -
    -

    FLOOR, CEIL

    -
    -

    Round down or up to the nearest integer.

    -
    -

    DEG2RAD, RAD2DEG

    -
    -

    Convert angle in degrees to radians, or radians to degrees.

    -
    -

    ABS

    -
    -

    Take the absolute value.

    - -
    Set Operations +
    Set Operations

    SORT, REV

    -
    -

    Pop one element from the stack. This is the count of items to be sorted (or reversed). The top count of the remaining elements are then sorted (or reversed) in place on the stack.

    -
    -

    Example: CDEF:x=v1,v2,v3,v4,v5,v6,6,SORT,POP,5,REV,POP,+,+,+,4,/ will compute the average of the values v1 to v6 after removing the smallest and largest.

    -
    -

    AVG

    -
    -

    Pop one element (count) from the stack. Now pop count elements and build the average, ignoring all UNKNOWN values in the process.

    -
    -

    Example: CDEF:x=a,b,c,d,4,AVG

    -
    -

    TREND, TRENDNAN

    -
    -

    Create a ``sliding window'' average of another data series.

    -
    -

    Usage: CDEF:smoothed=x,1800,TREND

    -
    -

    This will create a half-hour (1800 second) sliding window average of x. The average is essentially computed as shown here:

    -
    -
                      +---!---!---!---!---!---!---!---!--->
                                                          now
    @@ -246,105 +165,63 @@ average is essentially computed as shown here:

    <---------------> 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)
    -
    -

    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.

    - -
    Special values +
    Special values

    UNKN

    -
    -

    Pushes an unknown value on the stack

    -
    -

    INF, NEGINF

    -
    -

    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.

    -
    -

    PREV

    -
    -

    Pushes an unknown value if this is the first value of a data set or otherwise the result of this CDEF at the previous time step. This allows you to do calculations across the data. This function cannot be used in VDEF instructions.

    -
    -

    PREV(vname)

    -
    -

    Pushes an unknown 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 VDEF instructions.

    -
    -

    COUNT

    -
    -

    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 VDEF instructions.

    - -
    Time +
    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.

    -
    -

    NOW

    -
    -

    Pushes the current time on the stack.

    -
    -

    TIME

    -
    -

    Pushes the time the currently processed value was taken at onto the stack.

    -
    -

    LTIME

    -
    -

    Takes the time as defined by TIME, 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.

    - -
    Processing the stack directly +
    Processing the stack directly

    DUP, POP, EXC

    -
    -

    Duplicate the top element, remove the top element, exchange the two top elements.

    -
    -

    -

    @@ -352,49 +229,37 @@ top elements.

    VARIABLES

    These operators work only on VDEF statements. Note that currently ONLY these work for VDEF.

    -
    MAXIMUM, MINIMUM, AVERAGE +
    MAXIMUM, MINIMUM, AVERAGE

    Return the corresponding value, MAXIMUM and MINIMUM also return the first occurrence of that value in the time component.

    -
    -

    Example: VDEF:avg=mydata,AVERAGE

    - -
    STDEV +
    STDEV

    Returns the standard deviation of the values.

    -
    -

    Example: VDEF:stdev=mydata,STDEV

    - -
    LAST, FIRST +
    LAST, FIRST

    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.

    -
    -

    Example: VDEF:first=mydata,FIRST

    - -
    TOTAL +
    TOTAL

    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.

    -
    -

    Example: VDEF:total=mydata,TOTAL

    - -
    PERCENT +
    PERCENT

    This should follow a DEF or CDEF vname. The vname is popped, @@ -406,12 +271,9 @@ purpose so if this operator returns an unknown you have quite a lot of them in your data. Infinite numbers are lesser, or more, than the finite numbers and are always more than the Unknown numbers. (NaN < -INF < finite values < INF)

    -
    -

    Example: VDEF:perc95=mydata,95,PERCENT

    - -
    LSLSLOPE, LSLINT, LSLCORREL +
    LSLSLOPE, LSLINT, LSLCORREL

    Return the parameters for a Least Squares Line (y = mx +b) @@ -421,11 +283,8 @@ y-intercept (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.

    -
    -

    Example: VDEF:slope=mydata,LSLSLOPE

    -

    diff --git a/doc/rrdgraph_rpn.txt b/doc/rrdgraph_rpn.txt index f4d1b27..bc7fbc6 100644 --- a/doc/rrdgraph_rpn.txt +++ b/doc/rrdgraph_rpn.txt @@ -306,4 +306,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDGRAPH_RPN(1) +1.3rc9 2008-03-15 RRDGRAPH_RPN(1) diff --git a/doc/rrdinfo.1 b/doc/rrdinfo.1 index 109bee9..2e98e5c 100644 --- a/doc/rrdinfo.1 +++ b/doc/rrdinfo.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDINFO 1" -.TH RRDINFO 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDINFO 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdinfo \- extract header information from an RRD .SH "SYNOPSIS" diff --git a/doc/rrdinfo.html b/doc/rrdinfo.html index 8490112..a333f33 100644 --- a/doc/rrdinfo.html +++ b/doc/rrdinfo.html @@ -77,12 +77,11 @@ data sources.

    rra[0].cdp_prep[1].value = nan rra[0].cdp_prep[1].unknown_datapoints = 0
    -
    filename.rrd +
    filename.rrd

    The name of the RRD you want to examine.

    -

    diff --git a/doc/rrdinfo.txt b/doc/rrdinfo.txt index 9a0ce52..341ae29 100644 --- a/doc/rrdinfo.txt +++ b/doc/rrdinfo.txt @@ -55,4 +55,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDINFO(1) +1.3rc9 2008-03-15 RRDINFO(1) diff --git a/doc/rrdlast.1 b/doc/rrdlast.1 index b73b2ff..a79bef2 100644 --- a/doc/rrdlast.1 +++ b/doc/rrdlast.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDLAST 1" -.TH RRDLAST 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDLAST 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdlast \- Return the date of the last data sample in an RRD .SH "SYNOPSIS" diff --git a/doc/rrdlast.html b/doc/rrdlast.html index 0406125..d1feb13 100644 --- a/doc/rrdlast.html +++ b/doc/rrdlast.html @@ -39,12 +39,11 @@

    The last function returns the UNIX timestamp of the most recent update of the RRD.

    -
    filename +
    filename

    The name of the RRD that contains the data.

    -

    diff --git a/doc/rrdlast.txt b/doc/rrdlast.txt index ecc62dd..f1ea1c3 100644 --- a/doc/rrdlast.txt +++ b/doc/rrdlast.txt @@ -20,4 +20,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDLAST(1) +1.3rc9 2008-03-15 RRDLAST(1) diff --git a/doc/rrdlastupdate.1 b/doc/rrdlastupdate.1 index 6d62db9..48e958e 100644 --- a/doc/rrdlastupdate.1 +++ b/doc/rrdlastupdate.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDLASTUPDATE 1" -.TH RRDLASTUPDATE 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDLASTUPDATE 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdlastupdate \- Return the most recent update to an RRD .SH "SYNOPSIS" diff --git a/doc/rrdlastupdate.html b/doc/rrdlastupdate.html index 05ff422..05fccf2 100644 --- a/doc/rrdlastupdate.html +++ b/doc/rrdlastupdate.html @@ -39,12 +39,11 @@

    The lastupdate function returns the UNIX timestamp and the value stored for each datum in the most recent update of an RRD.

    -
    filename +
    filename

    The name of the RRD that contains the data.

    -

    diff --git a/doc/rrdlastupdate.txt b/doc/rrdlastupdate.txt index 7020b83..0ee68d9 100644 --- a/doc/rrdlastupdate.txt +++ b/doc/rrdlastupdate.txt @@ -20,4 +20,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDLASTUPDATE(1) +1.3rc9 2008-03-15 RRDLASTUPDATE(1) diff --git a/doc/rrdresize.1 b/doc/rrdresize.1 index db15b8d..b9f5186 100644 --- a/doc/rrdresize.1 +++ b/doc/rrdresize.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDRESIZE 1" -.TH RRDRESIZE 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDRESIZE 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdresize \- alters the size of an RRA and creates a new .rrd file .SH "SYNOPSIS" diff --git a/doc/rrdresize.html b/doc/rrdresize.html index 497044e..9303df2 100644 --- a/doc/rrdresize.html +++ b/doc/rrdresize.html @@ -40,38 +40,33 @@

    The resize function is used to modify the number of rows in an RRA.

    -
    filename +
    filename

    the name of the RRD you want to alter.

    - -
    rra-num +
    rra-num

    the RRA you want to alter. You can find the number using rrdtool info.

    - -
    GROW +
    GROW

    used if you want to add extra rows to an RRA. The extra rows will be inserted as the rows that are oldest.

    - -
    SHRINK +
    SHRINK

    used if you want to remove rows from an RRA. The rows that will be removed are the oldest rows.

    - -
    rows +
    rows

    the number of rows you want to add or remove.

    -

    diff --git a/doc/rrdresize.txt b/doc/rrdresize.txt index 443abf1..2cdb013 100644 --- a/doc/rrdresize.txt +++ b/doc/rrdresize.txt @@ -41,4 +41,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDRESIZE(1) +1.3rc9 2008-03-15 RRDRESIZE(1) diff --git a/doc/rrdrestore.1 b/doc/rrdrestore.1 index 07c6b7e..7dc5e9d 100644 --- a/doc/rrdrestore.1 +++ b/doc/rrdrestore.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDRESTORE 1" -.TH RRDRESTORE 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDRESTORE 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdrestore \- Restore the contents of an RRD from its XML dump format .SH "SYNOPSIS" diff --git a/doc/rrdrestore.html b/doc/rrdrestore.html index 4f49fa5..142c29f 100644 --- a/doc/rrdrestore.html +++ b/doc/rrdrestore.html @@ -40,31 +40,27 @@

    The restore function reads the XML representation of an RRD and converts it to the native RRD format.

    -
    filename.xml +
    filename.xml

    The name of the XML file you want to restore.

    - -
    filename.rrd +
    filename.rrd

    The name of the RRD to restore.

    - -
    --range-check|-r +
    --range-check|-r

    Make sure the values in the RRAs do not exceed the limits defined for the various data sources.

    - -
    --force-overwrite|-f +
    --force-overwrite|-f

    Allows RRDtool to overwrite the destination RRD.

    -

    diff --git a/doc/rrdrestore.txt b/doc/rrdrestore.txt index 2f21b0c..12e2a54 100644 --- a/doc/rrdrestore.txt +++ b/doc/rrdrestore.txt @@ -30,4 +30,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDRESTORE(1) +1.3rc9 2008-03-15 RRDRESTORE(1) diff --git a/doc/rrdthreads.1 b/doc/rrdthreads.1 index dd1a5ff..48c4571 100644 --- a/doc/rrdthreads.1 +++ b/doc/rrdthreads.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDTHREADS 1" -.TH RRDTHREADS 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDTHREADS 1 "2008-06-08" "1.3rc9" "rrdtool" .SH "NAME" rrdthreads \- Provisions for linking the RRD library to use in multi\-threaded programs .SH "SYNOPSIS" @@ -214,7 +214,7 @@ taking all options as function parameters. You may provide argc and **argv arguments for variable length argument lists. See \&\f(CW\*(C`rrd_update_r\*(C'\fR as an example. .IP "\(bu" 4 -Do not use the \f(CW\*(C`parsetime\*(C'\fR function! +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 diff --git a/doc/rrdthreads.html b/doc/rrdthreads.html index a20a111..cbc5735 100644 --- a/doc/rrdthreads.html +++ b/doc/rrdthreads.html @@ -110,6 +110,7 @@ instead, it provides a per-thread error message.

    Many others (lookup documentation)

    +
  • A header file named rrd_is_thread_safe.h is provided that works with the GNU C-preprocessor to ``poison'' some of the most @@ -133,7 +134,7 @@ taking all options as function parameters. You may provide argc and rrd_update_r as an example.

  • -

    Do not use the parsetime function!

    +

    Do not use the rrd_parsetime function!

    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)

    diff --git a/doc/rrdthreads.pod b/doc/rrdthreads.pod index ace7ee8..71506e9 100644 --- a/doc/rrdthreads.pod +++ b/doc/rrdthreads.pod @@ -126,7 +126,7 @@ C as an example. =item * -Do not use the C function! +Do not use the C function! It uses lots of global variables. You may use it in functions not designed to be thread-safe, like in functions wrapping the C<_r> version of some diff --git a/doc/rrdthreads.txt b/doc/rrdthreads.txt index 89ff34a..4af68da 100644 --- a/doc/rrdthreads.txt +++ b/doc/rrdthreads.txt @@ -83,7 +83,7 @@ DDEESSCCRRIIPPTTIIOONN provide argc and **argv arguments for variable length argument lists. See "rrd_update_r" as an example. - · Do not use the "parsetime" function! + · Do not use the "rrd_parsetime" function! It uses lots of global variables. You may use it in functions not designed to be thread-safe, like in functions wrapping the "_r" @@ -100,4 +100,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDTHREADS(1) +1.3rc9 2008-06-08 RRDTHREADS(1) diff --git a/doc/rrdtool.1 b/doc/rrdtool.1 index eb7a463..d4c7769 100644 --- a/doc/rrdtool.1 +++ b/doc/rrdtool.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDTOOL 1" -.TH RRDTOOL 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDTOOL 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdtool \- Round Robin Database Tool .SH "SYNOPSIS" diff --git a/doc/rrdtool.html b/doc/rrdtool.html index 2673b6b..a3cc6ac 100644 --- a/doc/rrdtool.html +++ b/doc/rrdtool.html @@ -76,95 +76,82 @@ saves a considerable amount of startup time when you plan to make for RRDtool which allow you to use it directly from perl, python, tcl, php, etc.

    -
    create +
    create

    Set up a new Round Robin Database (RRD). Check the rrdcreate manpage.

    -
  • -
    update +
    update

    Store new data values into an RRD. Check the rrdupdate manpage.

    - -
    updatev +
    updatev

    Operationally equivalent to update except for output. Check the rrdupdate manpage.

    - -
    graph +
    graph

    Create a graph from data stored in one or several RRDs. Apart from generating graphs, data can also be extracted to stdout. Check the rrdgraph manpage.

    - -
    dump +
    dump

    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 the rrddump manpage.

    - -
    restore +
    restore

    Restore an RRD in XML format to a binary RRD. Check the rrdrestore manpage

    - -
    fetch +
    fetch

    Get data for a certain time period from a RRD. The graph function uses fetch to retrieve its data from an RRD. Check the rrdfetch manpage.

    - -
    tune +
    tune

    Alter setup of an RRD. Check the rrdtune manpage.

    - -
    last +
    last

    Find the last update time of an RRD. Check the rrdlast manpage.

    - -
    info +
    info

    Get information about an RRD. Check the rrdinfo manpage.

    - -
    rrdresize +
    rrdresize

    Change the size of individual RRAs. This is dangerous! Check the rrdresize manpage.

    - -
    xport +
    xport

    Export data retrieved from one or several RRDs. Check the rrdxport manpage

    - -
    rrdcgi +
    rrdcgi

    This is a standalone tool for producing RRD graphs on the fly. Check the rrdcgi manpage.

    -

    HOW DOES RRDTOOL WORK?

    -
    Data Acquisition +
    Data Acquisition

    When monitoring the state of a system, it is convenient to have the @@ -177,8 +164,7 @@ 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.

    - -
    Consolidation +
    Consolidation

    You may log data at a 1 minute interval, but you might also be @@ -195,16 +181,13 @@ consolidated values (see rrdcreate). You can define any number of different consolidation setups within one RRD. They will all be maintained on the fly when new data is loaded into the RRD.

    - -
    Round Robin Archives +
    Round Robin Archives

    Data values of the same consolidation setup are stored into Round Robin Archives (RRA). 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.

    -
    -

    It works like this: If you want to store 1'000 values in 5 minute interval, RRDtool will allocate space for 1'000 data values and a header area. In the header it will store a pointer telling which slots @@ -215,22 +198,17 @@ manner. This automatically limits the history to the last 1'000 values single RRD, 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 RRAs guarantees that the RRD 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.

    -
    -

    Using different consolidation functions (CF) 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.

    - -
    Unknown Data +
    Unknown Data

    As mentioned earlier, the RRD stores data at a constant @@ -246,8 +224,7 @@ performed to make sure that the percentage of unknown values in the data point is above a configurable level. If not, an *UNKNOWN* value will be written to the RRA.

    - -
    Graphing +
    Graphing

    RRDtool allows you to generate reports in numerical and @@ -256,16 +233,12 @@ graphical form based on the data stored in one or several contents of the graph can be defined freely. Check the rrdgraph manpage for more information on this.

    - -
    Aberrant Behavior Detection +
    Aberrant Behavior Detection

    by Jake Brutlag

    -
    -

    RRDtool provides the building blocks for near real-time aberrant behavior detection. These components include:

    -
    • An algorithm for predicting the value of a time series one time step @@ -312,6 +285,7 @@ particular, a FAILURES RRA logs potential failures. With these you could, for example, use a front-end application to RRDtool to initiate real-time alerts.

      For a detailed description on how to set this up, see the rrdcreate manpage.

      +

    diff --git a/doc/rrdtool.txt b/doc/rrdtool.txt index 81c851d..fba608a 100644 --- a/doc/rrdtool.txt +++ b/doc/rrdtool.txt @@ -273,4 +273,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDTOOL(1) +1.3rc9 2008-03-15 RRDTOOL(1) diff --git a/doc/rrdtune.1 b/doc/rrdtune.1 index 115eb92..748eac0 100644 --- a/doc/rrdtune.1 +++ b/doc/rrdtune.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDTUNE 1" -.TH RRDTUNE 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDTUNE 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdtune \- Modify some basic properties of a Round Robin Database .SH "SYNOPSIS" diff --git a/doc/rrdtune.html b/doc/rrdtune.html index 7bd6cce..fe809e4 100644 --- a/doc/rrdtune.html +++ b/doc/rrdtune.html @@ -66,46 +66,40 @@ the data source header in the RRD.

    A second application of the tune function is to set or alter parameters used by the specialized function RRAs for aberrant behavior detection.

    -
    filename +
    filename

    The name of the RRD you want to tune.

    - -
    --heartbeat|-h ds-name:heartbeat +
    --heartbeat|-h ds-name:heartbeat

    modify the heartbeat of a data source. By setting this to a high value the RRD will accept things like one value per day.

    - -
    --minimum|-i ds-name:min +
    --minimum|-i ds-name:min

    alter the minimum value acceptable as input from the data source. Setting min to 'U' will disable this limit.

    - -
    --maximum|-a ds-name:max +
    --maximum|-a ds-name:max

    alter the maximum value acceptable as input from the data source. Setting max to 'U' will disable this limit.

    - -
    --data-source-type|-d ds-name:DST +
    --data-source-type|-d ds-name:DST

    alter the type DST of a data source.

    - -
    --data-source-rename|-r old-name:new-name +
    --data-source-rename|-r old-name:new-name

    rename a data source.

    - -
    --deltapos scale-value +
    --deltapos scale-value

    Alter the deviation scaling factor for the upper bound of the @@ -116,8 +110,7 @@ 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 RRA.

    - -
    --deltaneg scale-value +
    --deltaneg scale-value

    Alter the deviation scaling factor for the lower bound of the confidence band @@ -125,8 +118,7 @@ used internally to calculate violations for the FAILURES RRA. T value is 2. As with --deltapos, this argument is unrelated to the scale factor chosen when graphing confidence bounds.

    - -
    --failure-threshold failure-threshold +
    --failure-threshold failure-threshold

    Alter the number of confidence bound violations that constitute a failure for @@ -135,8 +127,7 @@ the window length of the FAILURES RRA. This restriction is not the tune option, so one can reset failure-threshold and window-length simultaneously. Setting this option will reset the count of violations to 0.

    - -
    --window-length window-length +
    --window-length window-length

    Alter the number of time points in the temporal window for determining @@ -144,50 +135,43 @@ failures. This must be an integer greater than or equal to the window length of the FAILURES RRA and less than or equal to 28. Setting this option will reset the count of violations to 0.

    - -
    --alpha adaption-parameter +
    --alpha adaption-parameter

    Alter the intercept adaptation parameter for the Holt-Winters forecasting algorithm. This parameter must be between 0 and 1.

    - -
    --beta adaption-parameter +
    --beta adaption-parameter

    Alter the slope adaptation parameter for the Holt-Winters forecasting algorithm. This parameter must be between 0 and 1.

    - -
    --gamma adaption-parameter +
    --gamma adaption-parameter

    Alter the seasonal coefficient adaptation parameter for the SEASONAL RRA. This parameter must be between 0 and 1.

    - -
    --gamma-deviation adaption-parameter +
    --gamma-deviation adaption-parameter

    Alter the seasonal deviation adaptation parameter for the DEVSEASONAL RRA. This parameter must be between 0 and 1.

    - -
    --smoothing-window fraction-of-season +
    --smoothing-window fraction-of-season

    Alter the size of the smoothing window for the SEASONAL RRA. This must be between 0 and 1.

    - -
    --smoothing-window-deviation fraction-of-season +
    --smoothing-window-deviation fraction-of-season

    Alter the size of the smoothing window for the DEVSEASONAL RRA. This must be between 0 and 1.

    - -
    --aberrant-reset ds-name +
    --aberrant-reset ds-name

    This option causes the aberrant behavior detection algorithm to reset @@ -201,8 +185,6 @@ violation history. Note that reset does not erase past predictions values of the DEVPREDICT RRA), or failure history (the values of the FAILURES RRA). This option will function even if not all the listed RRAs are present.

    -
    -

    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 @@ -213,12 +195,9 @@ 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.

    -
    -

    Use of this tuning option is advised when the behavior of the data source time series changes in a drastic and permanent manner.

    -

    diff --git a/doc/rrdtune.txt b/doc/rrdtune.txt index edfd39e..455bb59 100644 --- a/doc/rrdtune.txt +++ b/doc/rrdtune.txt @@ -159,4 +159,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDTUNE(1) +1.3rc9 2008-03-15 RRDTUNE(1) diff --git a/doc/rrdtutorial.1 b/doc/rrdtutorial.1 index 1a03402..14ef029 100644 --- a/doc/rrdtutorial.1 +++ b/doc/rrdtutorial.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDTUTORIAL 1" -.TH RRDTUTORIAL 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDTUTORIAL 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdtutorial \- Alex van den Bogaerdt's RRDtool tutorial .SH "DESCRIPTION" @@ -288,7 +288,7 @@ I will use the following abbreviations: .PP .Vb 6 \& M: meter -\& KM: kilometer (= 1'000 meters). +\& KM: kilometer (= 1\(aq000 meters). \& H: hour \& S: second \& KM/H: kilometers per hour @@ -544,16 +544,16 @@ to display kilometers per hour from the same data! To change a value that is measured in meters per second: .PP .Vb 3 -\& Calculate meters per hour: value * 3'600 -\& Calculate kilometers per hour: value / 1'000 -\& Together this makes: value * (3'600/1'000) or value * 3.6 +\& Calculate meters per hour: value * 3\(aq600 +\& Calculate kilometers per hour: value / 1\(aq000 +\& Together this makes: value * (3\(aq600/1\(aq000) or value * 3.6 .Ve .PP In our example database we made a mistake and we need to compensate for this by multiplying with 1'000. Applying that correction: .PP .Vb 1 -\& value * 3.6 * 1'000 == value * 3'600 +\& value * 3.6 * 1\(aq000 == value * 3\(aq600 .Ve .PP Now let's create this \s-1PNG\s0, and add some more magic ... @@ -642,7 +642,7 @@ Or you could use the \*(L"time\*(R" function in Perl (the shortest example in this tutorial): .PP .Vb 1 -\& perl \-e 'print time, "\en" ' +\& perl \-e \(aqprint time, "\en" \(aq .Ve .PP How to run a program on regular intervals is \s-1OS\s0 specific. But here is @@ -1135,11 +1135,11 @@ If the delta is negative, this can be compensated for by adding the maximum value of the counter + 1. For our car this would be: .PP .Vb 1 -\& Delta = 7 \- 999'987 = \-999'980 (instead of 1'000'007\-999'987=20) +\& Delta = 7 \- 999\(aq987 = \-999\(aq980 (instead of 1\(aq000\(aq007\-999\(aq987=20) .Ve .PP .Vb 1 -\& Real delta = \-999'980 + 999'999 + 1 = 20 +\& Real delta = \-999\(aq980 + 999\(aq999 + 1 = 20 .Ve .PP At the time of writing this document, RRDtool knows of counters that @@ -1147,8 +1147,8 @@ are either 32 bits or 64 bits of size. These counters can handle the following different values: .PP .Vb 2 -\& \- 32 bits: 0 .. 4'294'967'295 -\& \- 64 bits: 0 .. 18'446'744'073'709'551'615 +\& \- 32 bits: 0 .. 4\(aq294\(aq967\(aq295 +\& \- 64 bits: 0 .. 18\(aq446\(aq744\(aq073\(aq709\(aq551\(aq615 .Ve .PP If these numbers look strange to you, you can view them in @@ -1181,50 +1181,50 @@ can't handle the numbers :) Correction numbers: .PP .Vb 3 -\& \- 32 bits: (4'294'967'295 + 1) = 4'294'967'296 -\& \- 64 bits: (18'446'744'073'709'551'615 + 1) -\& \- correction1 = 18'446'744'069'414'584'320 +\& \- 32 bits: (4\(aq294\(aq967\(aq295 + 1) = 4\(aq294\(aq967\(aq296 +\& \- 64 bits: (18\(aq446\(aq744\(aq073\(aq709\(aq551\(aq615 + 1) +\& \- correction1 = 18\(aq446\(aq744\(aq069\(aq414\(aq584\(aq320 .Ve .PP .Vb 6 -\& Before: 4'294'967'200 +\& Before: 4\(aq294\(aq967\(aq200 \& Increase: 100 -\& Should become: 4'294'967'300 +\& Should become: 4\(aq294\(aq967\(aq300 \& But really is: 4 -\& Delta: \-4'294'967'196 -\& Correction1: \-4'294'967'196 + 4'294'967'296 = 100 +\& Delta: \-4\(aq294\(aq967\(aq196 +\& Correction1: \-4\(aq294\(aq967\(aq196 + 4\(aq294\(aq967\(aq296 = 100 .Ve .PP .Vb 9 -\& Before: 18'446'744'073'709'551'000 +\& Before: 18\(aq446\(aq744\(aq073\(aq709\(aq551\(aq000 \& Increase: 800 -\& Should become: 18'446'744'073'709'551'800 +\& Should become: 18\(aq446\(aq744\(aq073\(aq709\(aq551\(aq800 \& But really is: 184 -\& Delta: \-18'446'744'073'709'550'816 -\& Correction1: \-18'446'744'073'709'550'816 -\& + 4'294'967'296 = \-18'446'744'069'414'583'520 -\& Correction2: \-18'446'744'069'414'583'520 -\& + 18'446'744'069'414'584'320 = 800 +\& Delta: \-18\(aq446\(aq744\(aq073\(aq709\(aq550\(aq816 +\& Correction1: \-18\(aq446\(aq744\(aq073\(aq709\(aq550\(aq816 +\& + 4\(aq294\(aq967\(aq296 = \-18\(aq446\(aq744\(aq069\(aq414\(aq583\(aq520 +\& Correction2: \-18\(aq446\(aq744\(aq069\(aq414\(aq583\(aq520 +\& + 18\(aq446\(aq744\(aq069\(aq414\(aq584\(aq320 = 800 .Ve .PP .Vb 7 -\& Before: 18'446'744'073'709'551'615 ( maximum value ) -\& Increase: 18'446'744'069'414'584'320 ( absurd increase, minimum for -\& Should become: 36'893'488'143'124'135'935 this example to work ) -\& But really is: 18'446'744'069'414'584'319 -\& Delta: \-4'294'967'296 -\& Correction1: \-4'294'967'296 + 4'294'967'296 = 0 +\& Before: 18\(aq446\(aq744\(aq073\(aq709\(aq551\(aq615 ( maximum value ) +\& Increase: 18\(aq446\(aq744\(aq069\(aq414\(aq584\(aq320 ( absurd increase, minimum for +\& Should become: 36\(aq893\(aq488\(aq143\(aq124\(aq135\(aq935 this example to work ) +\& But really is: 18\(aq446\(aq744\(aq069\(aq414\(aq584\(aq319 +\& Delta: \-4\(aq294\(aq967\(aq296 +\& Correction1: \-4\(aq294\(aq967\(aq296 + 4\(aq294\(aq967\(aq296 = 0 \& (not negative \-> no correction2) .Ve .PP .Vb 7 -\& Before: 18'446'744'073'709'551'615 ( maximum value ) -\& Increase: 18'446'744'069'414'584'319 ( one less increase ) -\& Should become: 36'893'488'143'124'135'934 -\& But really is: 18'446'744'069'414'584'318 -\& Delta: \-4'294'967'297 -\& Correction1: \-4'294'967'297 + 4'294'967'296 = \-1 -\& Correction2: \-1 + 18'446'744'069'414'584'320 = 18'446'744'069'414'584'319 +\& Before: 18\(aq446\(aq744\(aq073\(aq709\(aq551\(aq615 ( maximum value ) +\& Increase: 18\(aq446\(aq744\(aq069\(aq414\(aq584\(aq319 ( one less increase ) +\& Should become: 36\(aq893\(aq488\(aq143\(aq124\(aq135\(aq934 +\& But really is: 18\(aq446\(aq744\(aq069\(aq414\(aq584\(aq318 +\& Delta: \-4\(aq294\(aq967\(aq297 +\& Correction1: \-4\(aq294\(aq967\(aq297 + 4\(aq294\(aq967\(aq296 = \-1 +\& Correction2: \-1 + 18\(aq446\(aq744\(aq069\(aq414\(aq584\(aq320 = 18\(aq446\(aq744\(aq069\(aq414\(aq584\(aq319 .Ve .PP As you can see from the last two examples, you need strange numbers diff --git a/doc/rrdtutorial.txt b/doc/rrdtutorial.txt index 7879298..a868af6 100644 --- a/doc/rrdtutorial.txt +++ b/doc/rrdtutorial.txt @@ -1149,4 +1149,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDTUTORIAL(1) +1.3rc9 2008-03-15 RRDTUTORIAL(1) diff --git a/doc/rrdupdate.1 b/doc/rrdupdate.1 index 1b2827e..31fbf05 100644 --- a/doc/rrdupdate.1 +++ b/doc/rrdupdate.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDUPDATE 1" -.TH RRDUPDATE 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDUPDATE 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdupdate \- Store a new set of values into the RRD .SH "SYNOPSIS" diff --git a/doc/rrdupdate.html b/doc/rrdupdate.html index 26f979e..556515b 100644 --- a/doc/rrdupdate.html +++ b/doc/rrdupdate.html @@ -45,7 +45,7 @@ is time aligned (interpolated) according to the properties of the RRD to which the data is written.

    -
    updatev +
    updatev

    This alternate version of update takes the same arguments and @@ -57,14 +57,12 @@ 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.

    - -
    filename +
    filename

    The name of the RRD you want to update.

    - -
    --template|-t ds-name[:ds-name]... +
    --template|-t ds-name[:ds-name]...

    By default, the update function expects its data input in the order @@ -73,26 +71,19 @@ sources (i.e. if the third data source DST is COMPUTE, the thir input value will be mapped to the fourth data source in the RRD 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 specified in the template are not available in the RRD file, the update process will abort with an error message.

    -
    -

    While it appears possible with the template switch to update data sources asynchronously, RRDtool implicitly assigns non-COMPUTE data sources missing from the template the *UNKNOWN* value.

    -
    -

    Do not specify a value for a COMPUTE DST in the update function. If this is done accidentally (and this can only be done using the template switch), RRDtool will ignore the value specified for the COMPUTE DST.

    - -
    N|timestamp:value[:value...] +
    N|timestamp:value[:value...]

    The data used for updating the RRD was acquired at a certain @@ -105,21 +96,16 @@ 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 COUNTER, DERIVE or ABSOLUTE.

    -
    -

    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 (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 numeric, but the data acquisition modules may impose their very own parsing of this parameter as long as the colon (:) remains the data source value separator.

    -

    diff --git a/doc/rrdupdate.txt b/doc/rrdupdate.txt index 17928bb..19b6f09 100644 --- a/doc/rrdupdate.txt +++ b/doc/rrdupdate.txt @@ -91,4 +91,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDUPDATE(1) +1.3rc9 2008-03-15 RRDUPDATE(1) diff --git a/doc/rrdxport.1 b/doc/rrdxport.1 index 2907110..bf5cf90 100644 --- a/doc/rrdxport.1 +++ b/doc/rrdxport.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDXPORT 1" -.TH RRDXPORT 1 "2008-03-15" "1.3rc6" "rrdtool" +.TH RRDXPORT 1 "2008-03-15" "1.3rc9" "rrdtool" .SH "NAME" rrdxport \- Export data in XML format based on data from one or several RRD .SH "SYNOPSIS" diff --git a/doc/rrdxport.html b/doc/rrdxport.html index 105baff..02316c3 100644 --- a/doc/rrdxport.html +++ b/doc/rrdxport.html @@ -51,7 +51,7 @@ representation of the data stored in one or several RRDs. It can also extract numerical reports.

    If no XPORT statements are found, there will be no output.

    -
    -s|--start seconds (default end-1day) +
    -s|--start seconds (default end-1day)

    The time when the exported range should begin. Time in seconds since @@ -60,16 +60,14 @@ current time. By default one day worth of data will be printed. See also AT-STYLE TIME SPECIFICATION section in the rrdfetch documentation for a detailed explanation on how to specify time.

    - -
    -e|--end seconds (default now) +
    -e|--end seconds (default now)

    The time when the exported range should end. Time in seconds since epoch. See also AT-STYLE TIME SPECIFICATION section in the rrdfetch documentation for a detailed explanation of ways to specify time.

    - -
    -m|--maxrows rows (default 400 rows) +
    -m|--maxrows rows (default 400 rows)

    This works like the -w|--width parameter of rrdgraph. @@ -77,42 +75,34 @@ In fact it is exactly the same, but the parameter was renamed to describe its purpose in this module. See rrdgraph documentation for details.

    - -
    --step value (default automatic) +
    --step value (default automatic)

    See the rrdgraph manpage documentation.

    - -
    --enumds +
    --enumds

    The generated xml should contain the data values in enumerated tags.

    -
    -
      <v0>val</v0><v1>val</v1>
    - -
    DEF:vname=rrd:ds-name:CF +
    DEF:vname=rrd:ds-name:CF

    See rrdgraph documentation.

    - -
    CDEF:vname=rpn-expression +
    CDEF:vname=rpn-expression

    See rrdgraph documentation.

    - -
    XPORT:vname::legend +
    XPORT:vname::legend

    At least one XPORT statement should be present. The values referenced by vname are printed. Optionally add a legend.

    -

    diff --git a/doc/rrdxport.txt b/doc/rrdxport.txt index 77f029b..cb327dd 100644 --- a/doc/rrdxport.txt +++ b/doc/rrdxport.txt @@ -125,4 +125,4 @@ AAUUTTHHOORR -1.3rc6 2008-03-15 RRDXPORT(1) +1.3rc9 2008-03-15 RRDXPORT(1) diff --git a/examples/Makefile.in b/examples/Makefile.in index 9c72640..941fcee 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -102,6 +102,7 @@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -124,14 +125,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ -INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ @@ -143,7 +142,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ @@ -161,8 +159,10 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -204,12 +204,13 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_PROGRAMS_FALSE = @STATIC_PROGRAMS_FALSE@ STATIC_PROGRAMS_TRUE = @STATIC_PROGRAMS_TRUE@ STRIP = @STRIP@ -TCL_INC_DIR = @TCL_INC_DIR@ +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@ diff --git a/netware/Makefile b/netware/Makefile index c138dfa..ec4e287 100644 --- a/netware/Makefile +++ b/netware/Makefile @@ -227,7 +227,7 @@ XLIBOBJS = \ $(OBJDIR)/rrd_getopt1.o \ $(OBJDIR)/art_rgba_svp.o \ $(OBJDIR)/hash_32.o \ - $(OBJDIR)/parsetime.o \ + $(OBJDIR)/rrd_parsetime.o \ $(OBJDIR)/pngsize.o \ $(EOLIST) diff --git a/rrdtool.spec b/rrdtool.spec index ec585c5..f979e5d 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -7,7 +7,7 @@ Summary: Round Robin Database Tool to store and display time-series data Name: rrdtool -Version: 1.3rc6 +Version: 1.3rc9 Release: 0.1%{?dist} License: GPL Group: Applications/Databases diff --git a/src/Makefile.am b/src/Makefile.am index daaacb6..4f19be5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,7 +16,7 @@ AM_CPPFLAGS = -DRRD_DEFAULT_FONT=\"$(RRD_DEFAULT_FONT)\" -DNUMVERS=@NUMVERS@ UPD_C_FILES = \ rrd_getopt.c \ rrd_getopt1.c \ - parsetime.c \ + rrd_parsetime.c \ rrd_hw.c \ rrd_hw_math.c \ rrd_hw_update.c \ @@ -44,13 +44,12 @@ RRD_C_FILES = \ rrd_gfx.c \ rrd_dump.c \ rrd_fetch.c \ - rrd_tool.c \ rrd_resize.c \ rrd_tune.c noinst_HEADERS = \ unused.h \ - rrd_getopt.h parsetime.h \ + rrd_getopt.h rrd_parsetime.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 \ @@ -68,15 +67,16 @@ librrdupd_la_SOURCES = $(UPD_C_FILES) rrd_not_thread_safe.c librrdupd_la_LIBADD = $(CORE_LIBS) @LIB_LIBINTL@ librrd_la_SOURCES = $(RRD_C_FILES) +librrd_la_DEPENDENCIES = librrdupd.la librrd.sym librrd_la_LIBADD = librrdupd.la $(ALL_LIBS) - -# see http://sourceware.org/autobook/autobook/autobook_91.html - librrd_la_LDFLAGS = -version-info @LIBVERS@ +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_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info @LIBVERS@ +librrd_th_la_LDFLAGS += -export-symbols librrd.sym librrd_th_la_LIBADD = $(ALL_LIBS) include_HEADERS = rrd.h @@ -93,12 +93,12 @@ rrdcgi_LDADD = librrd.la rrdupdate_SOURCES = rrdupdate.c rrdupdate_LDADD = librrdupd.la -rrdtool_SOURCES = -rrdtool_DEPENDENCIES = rrd_tool.o librrd.la +rrdtool_SOURCES = rrd_tool.c +rrdtool_DEPENDENCIES = librrd.la rrdtool_LDADD = librrd.la # strftime is here because we do not usually need it. unices have propper # iso date support EXTRA_DIST= strftime.c strftime.h \ - win32comp.c rrd_thread_safe_nt.c get_ver.awk + win32comp.c rrd_thread_safe_nt.c get_ver.awk librrd.sym diff --git a/src/Makefile.in b/src/Makefile.in index 52b533a..9824829 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -69,17 +69,14 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -librrd_la_DEPENDENCIES = librrdupd.la $(am__DEPENDENCIES_1) am__objects_1 = 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_tool.lo rrd_resize.lo \ - rrd_tune.lo + rrd_gfx.lo rrd_dump.lo rrd_fetch.lo rrd_resize.lo rrd_tune.lo am_librrd_la_OBJECTS = $(am__objects_1) librrd_la_OBJECTS = $(am_librrd_la_OBJECTS) -librrd_th_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_2 = librrd_th_la-rrd_getopt.lo librrd_th_la-rrd_getopt1.lo \ - librrd_th_la-parsetime.lo librrd_th_la-rrd_hw.lo \ + 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 \ @@ -92,17 +89,16 @@ am__objects_3 = librrd_th_la-hash_32.lo librrd_th_la-pngsize.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_tool.lo librrd_th_la-rrd_resize.lo \ - librrd_th_la-rrd_tune.lo + librrd_th_la-rrd_resize.lo librrd_th_la-rrd_tune.lo am_librrd_th_la_OBJECTS = $(am__objects_2) $(am__objects_3) \ librrd_th_la-rrd_thread_safe.lo librrd_th_la_OBJECTS = $(am_librrd_th_la_OBJECTS) @BUILD_MULTITHREAD_TRUE@am_librrd_th_la_rpath = -rpath $(libdir) librrdupd_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__objects_4 = rrd_getopt.lo rrd_getopt1.lo 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_4 = rrd_getopt.lo rrd_getopt1.lo 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_librrdupd_la_OBJECTS = $(am__objects_4) rrd_not_thread_safe.lo librrdupd_la_OBJECTS = $(am_librrdupd_la_OBJECTS) @BUILD_RRDCGI_TRUE@am__EXEEXT_1 = rrdcgi$(EXEEXT) @@ -111,7 +107,7 @@ PROGRAMS = $(bin_PROGRAMS) am_rrdcgi_OBJECTS = rrd_cgi.$(OBJEXT) rrdcgi_OBJECTS = $(am_rrdcgi_OBJECTS) rrdcgi_DEPENDENCIES = librrd.la -am_rrdtool_OBJECTS = +am_rrdtool_OBJECTS = rrd_tool.$(OBJEXT) rrdtool_OBJECTS = $(am_rrdtool_OBJECTS) am_rrdupdate_OBJECTS = rrdupdate.$(OBJEXT) rrdupdate_OBJECTS = $(am_rrdupdate_OBJECTS) @@ -178,6 +174,7 @@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -200,14 +197,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ -INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ @@ -219,7 +214,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ -INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ @@ -237,8 +231,10 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -280,12 +276,13 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_PROGRAMS_FALSE = @STATIC_PROGRAMS_FALSE@ STATIC_PROGRAMS_TRUE = @STATIC_PROGRAMS_TRUE@ STRIP = @STRIP@ -TCL_INC_DIR = @TCL_INC_DIR@ +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@ @@ -361,7 +358,7 @@ AM_CPPFLAGS = -DRRD_DEFAULT_FONT=\"$(RRD_DEFAULT_FONT)\" -DNUMVERS=@NUMVERS@ UPD_C_FILES = \ rrd_getopt.c \ rrd_getopt1.c \ - parsetime.c \ + rrd_parsetime.c \ rrd_hw.c \ rrd_hw_math.c \ rrd_hw_update.c \ @@ -389,13 +386,12 @@ RRD_C_FILES = \ rrd_gfx.c \ rrd_dump.c \ rrd_fetch.c \ - rrd_tool.c \ rrd_resize.c \ rrd_tune.c noinst_HEADERS = \ unused.h \ - rrd_getopt.h parsetime.h \ + rrd_getopt.h rrd_parsetime.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 \ @@ -407,27 +403,28 @@ lib_LTLIBRARIES = librrd.la $(am__append_1) librrdupd_la_SOURCES = $(UPD_C_FILES) rrd_not_thread_safe.c librrdupd_la_LIBADD = $(CORE_LIBS) @LIB_LIBINTL@ librrd_la_SOURCES = $(RRD_C_FILES) +librrd_la_DEPENDENCIES = librrdupd.la librrd.sym librrd_la_LIBADD = librrdupd.la $(ALL_LIBS) - -# see http://sourceware.org/autobook/autobook/autobook_91.html -librrd_la_LDFLAGS = -version-info @LIBVERS@ +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_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info @LIBVERS@ +librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info @LIBVERS@ \ + -export-symbols librrd.sym librrd_th_la_LIBADD = $(ALL_LIBS) include_HEADERS = rrd.h rrdcgi_SOURCES = rrd_cgi.c rrdcgi_LDADD = librrd.la rrdupdate_SOURCES = rrdupdate.c rrdupdate_LDADD = librrdupd.la -rrdtool_SOURCES = -rrdtool_DEPENDENCIES = rrd_tool.o librrd.la +rrdtool_SOURCES = rrd_tool.c +rrdtool_DEPENDENCIES = librrd.la rrdtool_LDADD = librrd.la # strftime is here because we do not usually need it. unices have propper # iso date support EXTRA_DIST = strftime.c strftime.h \ - win32comp.c rrd_thread_safe_nt.c get_ver.awk + win32comp.c rrd_thread_safe_nt.c get_ver.awk librrd.sym all: all-am @@ -550,7 +547,6 @@ 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-parsetime.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_create.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_diff.Plo@am__quote@ @@ -572,16 +568,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_lastupdate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_nan_inf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_open.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_parsetime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_resize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_restore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_rpncalc.Plo@am__quote@ @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_tool.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_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)/parsetime.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_create.Plo@am__quote@ @@ -605,10 +600,11 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_nan_inf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_not_thread_safe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_open.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_parsetime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_resize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_restore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_rpncalc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_tool.Plo@am__quote@ +@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_version.Plo@am__quote@ @@ -650,12 +646,12 @@ librrd_th_la-rrd_getopt1.lo: rrd_getopt1.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --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-parsetime.lo: parsetime.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-parsetime.lo -MD -MP -MF "$(DEPDIR)/librrd_th_la-parsetime.Tpo" -c -o librrd_th_la-parsetime.lo `test -f 'parsetime.c' || echo '$(srcdir)/'`parsetime.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/librrd_th_la-parsetime.Tpo" "$(DEPDIR)/librrd_th_la-parsetime.Plo"; else rm -f "$(DEPDIR)/librrd_th_la-parsetime.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parsetime.c' object='librrd_th_la-parsetime.lo' libtool=yes @AMDEPBACKSLASH@ +librrd_th_la-rrd_parsetime.lo: rrd_parsetime.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --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@ then mv -f "$(DEPDIR)/librrd_th_la-rrd_parsetime.Tpo" "$(DEPDIR)/librrd_th_la-rrd_parsetime.Plo"; else rm -f "$(DEPDIR)/librrd_th_la-rrd_parsetime.Tpo"; exit 1; fi +@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 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-parsetime.lo `test -f 'parsetime.c' || echo '$(srcdir)/'`parsetime.c +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --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@ if $(LIBTOOL) --tag=CC --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; \ @@ -832,13 +828,6 @@ librrd_th_la-rrd_fetch.lo: rrd_fetch.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --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_tool.lo: rrd_tool.c -@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_tool.lo -MD -MP -MF "$(DEPDIR)/librrd_th_la-rrd_tool.Tpo" -c -o librrd_th_la-rrd_tool.lo `test -f 'rrd_tool.c' || echo '$(srcdir)/'`rrd_tool.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/librrd_th_la-rrd_tool.Tpo" "$(DEPDIR)/librrd_th_la-rrd_tool.Plo"; else rm -f "$(DEPDIR)/librrd_th_la-rrd_tool.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rrd_tool.c' object='librrd_th_la-rrd_tool.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_tool.lo `test -f 'rrd_tool.c' || echo '$(srcdir)/'`rrd_tool.c - librrd_th_la-rrd_resize.lo: rrd_resize.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --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@ then mv -f "$(DEPDIR)/librrd_th_la-rrd_resize.Tpo" "$(DEPDIR)/librrd_th_la-rrd_resize.Plo"; else rm -f "$(DEPDIR)/librrd_th_la-rrd_resize.Tpo"; exit 1; fi diff --git a/src/librrd.sym b/src/librrd.sym new file mode 100644 index 0000000..7e3e8da --- /dev/null +++ b/src/librrd.sym @@ -0,0 +1,39 @@ +rrd_clear_error +rrd_create +rrd_create_r +rrd_dump +rrd_dump_r +rrd_fetch +rrd_fetch_r +rrd_first +rrd_first_r +rrd_free_context +rrd_freemem +rrd_get_context +rrd_get_error +rrd_graph +rrd_graph_v +rrd_info +rrd_info_free +rrd_info_print +rrd_info_push +rrd_last +rrd_last_r +rrd_lastupdate +rrd_new_context +rrd_parsetime +rrd_proc_start_end +rrd_resize +rrd_restore +rrd_set_error +rrd_set_to_DINF +rrd_set_to_DNAN +rrd_strerror +rrd_strversion +rrd_test_error +rrd_tune +rrd_update +rrd_update_r +rrd_update_v +rrd_version +rrd_xport diff --git a/src/pngsize.c b/src/pngsize.c index dc2cc36..1a7b437 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * pngsize.c determine the size of a PNG image *****************************************************************************/ @@ -27,12 +27,15 @@ int PngSize( /* this is to make compile on aix work since they seem to define jmpbuf to be _jmpbuf which breaks compilation */ -#ifdef jmpbuf -#undef jmpbuf -#endif - #ifndef png_jmpbuf +#ifdef PNG_SETJMP_SUPPORTED +# define png_jmpbuf(png_ptr) ((png_ptr)->PNG_jmpbuf) +#else +#ifdef jmpbuf +#undef jmpbuf +#endif # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#endif #endif if (setjmp(png_jmpbuf(png_read_ptr))) { diff --git a/src/rrd.h b/src/rrd.h index ede0c8e..7fdef65 100644 --- a/src/rrd.h +++ b/src/rrd.h @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrdlib.h Public header file for librrd ***************************************************************************** - * $Id: rrd.h 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd.h 1413 2008-06-08 17:08:47Z oetiker $ * $Log$ * Revision 1.9 2005/02/13 16:13:33 oetiker * let rrd_graph return the actual value range it picked ... @@ -60,15 +60,15 @@ extern "C" { /* Formerly rrd_nan_inf.h */ #ifndef DNAN -# define DNAN set_to_DNAN() +# define DNAN rrd_set_to_DNAN() #endif #ifndef DINF -# define DINF set_to_DINF() +# define DINF rrd_set_to_DINF() #endif - double set_to_DNAN( + double rrd_set_to_DNAN( void); - double set_to_DINF( + double rrd_set_to_DINF( void); /* end of rrd_nan_inf.h */ @@ -92,36 +92,51 @@ extern "C" { unsigned char *ptr; /* pointer */ } rrd_blob_t; - enum info_type { RD_I_VAL = 0, + typedef enum rrd_info_type { RD_I_VAL = 0, RD_I_CNT, RD_I_STR, RD_I_INT, RD_I_BLO - }; + } rrd_info_type_t; - typedef union infoval { + typedef union rrd_infoval { unsigned long u_cnt; rrd_value_t u_val; char *u_str; int u_int; - struct rrd_blob_t u_blo; - } infoval; + rrd_blob_t u_blo; + } rrd_infoval_t; - typedef struct info_t { + typedef struct rrd_info_t { char *key; - enum info_type type; - union infoval value; - struct info_t *next; - } info_t; + rrd_info_type_t type; + rrd_infoval_t value; + struct rrd_info_t *next; + } rrd_info_t; /* main function blocks */ int rrd_create( int, char **); + rrd_info_t *rrd_info( + int, + char **); + rrd_info_t *rrd_info_push( + rrd_info_t *, + char *, + rrd_info_type_t, + rrd_infoval_t); + void rrd_info_print( + rrd_info_t *data); + void rrd_info_free( + rrd_info_t *); int rrd_update( int, char **); + rrd_info_t *rrd_update_v( + int, + char **); int rrd_graph( int, char **, @@ -131,7 +146,7 @@ extern "C" { FILE *, double *, double *); - info_t *rrd_graph_v( + rrd_info_t *rrd_graph_v( int, char **); @@ -156,6 +171,13 @@ extern "C" { 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); time_t rrd_first( int, char **); @@ -210,41 +232,39 @@ extern "C" { const char *filename, int rraindex); -/* Transplanted from parsetime.h */ +/* Transplanted from rrd_parsetime.h */ typedef enum { ABSOLUTE_TIME, RELATIVE_TO_START_TIME, RELATIVE_TO_END_TIME - } timetype; + } rrd_timetype_t; #define TIME_OK NULL - struct rrd_time_value { - timetype type; + typedef struct rrd_time_value { + rrd_timetype_t type; long offset; struct tm tm; - }; + } rrd_time_value_t; - char *parsetime( + char *rrd_parsetime( const char *spec, - struct rrd_time_value *ptv); -/* END parsetime.h */ + rrd_time_value_t *ptv); +/* END rrd_parsetime.h */ - struct rrd_context { - int len; - int errlen; - char *lib_errstr; - char *rrd_error; - }; + typedef struct rrd_context { + char lib_errstr[256]; + char rrd_error[4096]; + } rrd_context_t; /* returns the current per-thread rrd_context */ - struct rrd_context *rrd_get_context( + rrd_context_t *rrd_get_context( void); - int proc_start_end( - struct rrd_time_value *, - struct rrd_time_value *, + int rrd_proc_start_end( + rrd_time_value_t *, + rrd_time_value_t *, time_t *, time_t *); @@ -259,19 +279,22 @@ extern "C" { char *rrd_get_error( void); + /* rrd_strerror is thread safe, but still it uses a global buffer + (but one per thread), thus subsequent calls within a single + thread overwrite the same buffer */ + const char *rrd_strerror( + int err); + /** MULTITHREADED HELPER FUNCTIONS */ - struct rrd_context *rrd_new_context( + rrd_context_t *rrd_new_context( void); void rrd_free_context( - struct rrd_context *buf); - -/* void rrd_set_error_r (struct rrd_context *, char *, ...); */ -/* void rrd_clear_error_r(struct rrd_context *); */ -/* int rrd_test_error_r (struct rrd_context *); */ -/* char *rrd_get_error_r (struct rrd_context *); */ + rrd_context_t *buf); - int LockRRD( - int in_file); +/* void rrd_set_error_r (rrd_context_t *, char *, ...); */ +/* void rrd_clear_error_r(rrd_context_t *); */ +/* int rrd_test_error_r (rrd_context_t *); */ +/* char *rrd_get_error_r (rrd_context_t *); */ #endif /* _RRDLIB_H */ diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index e3ac8aa..85b0aee 100644 --- a/src/rrd_cgi.c +++ b/src/rrd_cgi.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_cgi.c RRD Web Page Generator *****************************************************************************/ @@ -391,6 +391,63 @@ char *stralloc( return (nstr); } +static int readfile( + const char *file_name, + char **buffer, + int skipfirst) +{ + long writecnt = 0, totalcnt = MEMBLK; + long offset = 0; + FILE *input = NULL; + char c; + + if ((strcmp("-", file_name) == 0)) { + input = stdin; + } else { + if ((input = fopen(file_name, "rb")) == NULL) { + rrd_set_error("opening '%s': %s", file_name, rrd_strerror(errno)); + return (-1); + } + } + if (skipfirst) { + do { + c = getc(input); + offset++; + } while (c != '\n' && !feof(input)); + } + if (strcmp("-", file_name)) { + fseek(input, 0, SEEK_END); + /* have extra space for detecting EOF without realloc */ + totalcnt = (ftell(input) + 1) / sizeof(char) - offset; + if (totalcnt < MEMBLK) + totalcnt = MEMBLK; /* sanitize */ + fseek(input, offset * sizeof(char), SEEK_SET); + } + if (((*buffer) = (char *) malloc((totalcnt + 4) * sizeof(char))) == NULL) { + perror("Allocate Buffer:"); + exit(1); + }; + do { + writecnt += + fread((*buffer) + writecnt, 1, + (totalcnt - writecnt) * sizeof(char), input); + if (writecnt >= totalcnt) { + totalcnt += MEMBLK; + if (((*buffer) = + rrd_realloc((*buffer), + (totalcnt + 4) * sizeof(char))) == NULL) { + perror("Realloc Buffer:"); + exit(1); + }; + } + } while (!feof(input)); + (*buffer)[writecnt] = '\0'; + if (strcmp("-", file_name) != 0) { + fclose(input); + }; + return writecnt; +} + int main( int argc, char *argv[]) @@ -666,7 +723,7 @@ char *printstrftime( long argc, const char **args) { - struct rrd_time_value start_tv, end_tv; + rrd_time_value_t start_tv, end_tv; char *parsetime_error = NULL; char formatted[MAX_STRFTIME_SIZE]; struct tm *the_tm; @@ -679,19 +736,19 @@ char *printstrftime( } /* Init start and end time */ - parsetime("end-24h", &start_tv); - parsetime("now", &end_tv); + rrd_parsetime("end-24h", &start_tv); + rrd_parsetime("now", &end_tv); /* Parse the start and end times we were given */ - if ((parsetime_error = parsetime(args[1], &start_tv))) { + if ((parsetime_error = rrd_parsetime(args[1], &start_tv))) { rrd_set_error("start time: %s", parsetime_error); return stralloc(""); } - if ((parsetime_error = parsetime(args[2], &end_tv))) { + if ((parsetime_error = rrd_parsetime(args[2], &end_tv))) { rrd_set_error("end time: %s", parsetime_error); return stralloc(""); } - if (proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { + if (rrd_proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { return stralloc(""); } diff --git a/src/rrd_create.c b/src/rrd_create.c index 92fe3b0..bb8d45d 100644 --- a/src/rrd_create.c +++ b/src/rrd_create.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_create.c creates new rrds *****************************************************************************/ @@ -40,7 +40,7 @@ int rrd_create( int opt; time_t last_up = time(NULL) - 10; unsigned long pdp_step = 300; - struct rrd_time_value last_up_tv; + rrd_time_value_t last_up_tv; char *parsetime_error = NULL; long long_tmp; int rc; @@ -56,7 +56,7 @@ int rrd_create( switch (opt) { case 'b': - if ((parsetime_error = parsetime(optarg, &last_up_tv))) { + if ((parsetime_error = rrd_parsetime(optarg, &last_up_tv))) { rrd_set_error("start time: %s", parsetime_error); return (-1); } diff --git a/src/rrd_diff.c b/src/rrd_diff.c index bc3edbb..a56207a 100644 --- a/src/rrd_diff.c +++ b/src/rrd_diff.c @@ -1,11 +1,11 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 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 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_diff.c 1413 2008-06-08 17:08:47Z oetiker $ * $Log$ * Revision 1.4 2003/03/10 00:30:34 oetiker * handle cases with two negative numbers diff --git a/src/rrd_dump.c b/src/rrd_dump.c index bf438cc..61b48de 100644 --- a/src/rrd_dump.c +++ b/src/rrd_dump.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_dump Display a RRD ***************************************************************************** - * $Id: rrd_dump.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_dump.c 1413 2008-06-08 17:08:47Z oetiker $ * $Log$ * Revision 1.7 2004/05/25 20:53:21 oetiker * prevent small leak when resources are exhausted -- Mike Slifcak diff --git a/src/rrd_error.c b/src/rrd_error.c index 992730c..2498e98 100644 --- a/src/rrd_error.c +++ b/src/rrd_error.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_error.c Common Header File ***************************************************************************** - * $Id: rrd_error.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_error.c 1413 2008-06-08 17:08:47Z 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 @@ -46,7 +46,7 @@ void rrd_set_error( rrd_clear_error(); va_start(argp, fmt); #ifdef HAVE_VSNPRINTF - vsnprintf(CTX->rrd_error, CTX->len, fmt, argp); + vsnprintf(CTX->rrd_error, sizeof(CTX->rrd_error), fmt, argp); #else vsprintf(CTX->rrd_error, fmt, argp); #endif @@ -78,7 +78,7 @@ char *rrd_get_error( context. Using these functions would require to change each and every function containing any of the non _r versions... */ void rrd_set_error_r( - struct rrd_context *rrd_ctx, + rrd_context_t *rrd_ctx, char *fmt, ...) { @@ -87,75 +87,61 @@ void rrd_set_error_r( rrd_clear_error_r(rrd_ctx); va_start(argp, fmt); #ifdef HAVE_VSNPRINTF - vsnprintf((char *) rrd_ctx->rrd_error, rrd_ctx->len, fmt, argp); - rrd_ctx->rrd_error[rrd_ctx->len] = '\0'; + vsnprintf(rrd_ctx->rrd_error, sizeof(rrd_ctx->rrd_error), fmt, argp); + rrd_ctx->rrd_error[sizeof(rrd_ctx->rrd_error) - 1] = '\0'; #else - vsprintf((char *) rrd_ctx->rrd_error, fmt, argp); + vsprintf(rrd_ctx->rrd_error, fmt, argp); #endif va_end(argp); } int rrd_test_error_r( - struct rrd_context *rrd_ctx) + rrd_context_t *rrd_ctx) { return rrd_ctx->rrd_error[0] != '\0'; } void rrd_clear_error_r( - struct rrd_context *rrd_ctx) + rrd_context_t *rrd_ctx) { rrd_ctx->rrd_error[0] = '\0'; } char *rrd_get_error_r( - struct rrd_context *rrd_ctx) + rrd_context_t *rrd_ctx) { - return (char *) rrd_ctx->rrd_error; + return rrd_ctx->rrd_error; } #endif /* PS: Should we move this to some other file? It is not really error related. */ -struct rrd_context *rrd_new_context( +rrd_context_t *rrd_new_context( void) { - struct rrd_context *rrd_ctx = - (struct rrd_context *) malloc(sizeof(struct rrd_context)); + rrd_context_t *rrd_ctx = + (rrd_context_t *) malloc(sizeof(rrd_context_t)); - if (rrd_ctx) { - rrd_ctx->rrd_error = malloc(MAXLEN + 10); - rrd_ctx->lib_errstr = malloc(ERRBUFLEN + 10); - if (rrd_ctx->rrd_error && rrd_ctx->lib_errstr) { - *rrd_ctx->rrd_error = 0; - *rrd_ctx->lib_errstr = 0; - rrd_ctx->len = MAXLEN; - rrd_ctx->errlen = ERRBUFLEN; - return rrd_ctx; - } - if (rrd_ctx->rrd_error) - free(rrd_ctx->rrd_error); - if (rrd_ctx->lib_errstr) - free(rrd_ctx->lib_errstr); - free(rrd_ctx); + if (!rrd_ctx) { + return NULL; } - return NULL; + + rrd_ctx->rrd_error[0] = '\0'; + rrd_ctx->lib_errstr[0] = '\0'; + return rrd_ctx; } void rrd_free_context( - struct rrd_context *rrd_ctx) + rrd_context_t *rrd_ctx) { if (rrd_ctx) { - if (rrd_ctx->rrd_error) - free(rrd_ctx->rrd_error); - if (rrd_ctx->lib_errstr) - free(rrd_ctx->lib_errstr); free(rrd_ctx); } } #if 0 void rrd_globalize_error( - struct rrd_context *rrd_ctx) + rrd_context_t *rrd_ctx) { if (rrd_ctx) { rrd_set_error(rrd_ctx->rrd_error); diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c index ad3bdb3..2e2eac4 100644 --- a/src/rrd_fetch.c +++ b/src/rrd_fetch.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_fetch.c read date from an rrd to use for further processing ***************************************************************************** - * $Id: rrd_fetch.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_fetch.c 1413 2008-06-08 17:08:47Z oetiker $ * $Log$ * Revision 1.8 2004/05/18 18:53:03 oetiker * big spell checking patch -- slif@bellsouth.net @@ -73,7 +73,7 @@ int rrd_fetch( time_t start_tmp = 0, end_tmp = 0; const char *cf; - struct rrd_time_value start_tv, end_tv; + rrd_time_value_t start_tv, end_tv; char *parsetime_error = NULL; struct option long_options[] = { {"resolution", required_argument, 0, 'r'}, @@ -86,8 +86,8 @@ int rrd_fetch( opterr = 0; /* initialize getopt */ /* init start and end time */ - parsetime("end-24h", &start_tv); - parsetime("now", &end_tv); + rrd_parsetime("end-24h", &start_tv); + rrd_parsetime("now", &end_tv); while (1) { int option_index = 0; @@ -100,13 +100,13 @@ int rrd_fetch( switch (opt) { case 's': - if ((parsetime_error = parsetime(optarg, &start_tv))) { + if ((parsetime_error = rrd_parsetime(optarg, &start_tv))) { rrd_set_error("start time: %s", parsetime_error); return -1; } break; case 'e': - if ((parsetime_error = parsetime(optarg, &end_tv))) { + if ((parsetime_error = rrd_parsetime(optarg, &end_tv))) { rrd_set_error("end time: %s", parsetime_error); return -1; } @@ -121,7 +121,7 @@ int rrd_fetch( } - if (proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { + if (rrd_proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { return -1; } diff --git a/src/rrd_first.c b/src/rrd_first.c index aad5bbe..f80983d 100644 --- a/src/rrd_first.c +++ b/src/rrd_first.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_first Return ***************************************************************************** diff --git a/src/rrd_format.c b/src/rrd_format.c index 3274830..2f8c329 100644 --- a/src/rrd_format.c +++ b/src/rrd_format.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_format.c RRD Database Format helper functions ***************************************************************************** - * $Id: rrd_format.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_format.c 1413 2008-06-08 17:08:47Z oetiker $ * $Log$ * Revision 1.5 2004/05/18 18:53:03 oetiker * big spell checking patch -- slif@bellsouth.net diff --git a/src/rrd_format.h b/src/rrd_format.h index 32e047c..b8f0790 100644 --- a/src/rrd_format.h +++ b/src/rrd_format.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_format.h RRD Database Format header *****************************************************************************/ @@ -384,7 +384,7 @@ typedef struct rrd_t { ds_def_t *ds_def; /* list of data source definitions */ rra_def_t *rra_def; /* list of round robin archive def */ live_head_t *live_head; /* rrd v >= 3 last_up with us */ - time_t *legacy_last_up; /* rrd v < 3 last_up time */ + time_t *legacy_last_up; /* rrd v < 3 last_up time */ pdp_prep_t *pdp_prep; /* pdp data prep area */ cdp_prep_t *cdp_prep; /* cdp prep area */ rra_ptr_t *rra_ptr; /* list of rra pointers */ diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index eb733b7..5315c1d 100644 --- a/src/rrd_gfx.c +++ b/src/rrd_gfx.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_gfx.c graphics wrapper for rrdtool **************************************************************************/ @@ -139,7 +139,8 @@ static PangoLayout *gfx_prep_text( tab_array = pango_tab_array_new(tab_count, (gboolean) (1)); for (i = 1; i <= tab_count; i++) { pango_tab_array_set_tab(tab_array, - i, PANGO_TAB_LEFT, tabwidth * i - tab_shift+border); + i, PANGO_TAB_LEFT, + tabwidth * i - tab_shift + border); } cairo_new_path(cr); cairo_set_source_rgba(cr, color.red, color.green, color.blue, @@ -155,7 +156,10 @@ static PangoLayout *gfx_prep_text( font_desc = pango_font_description_from_string(font); pango_font_description_set_size(font_desc, size * PANGO_SCALE); pango_layout_set_font_description(layout, font_desc); - pango_layout_set_markup(layout, text, -1); + if (im->with_markup) + pango_layout_set_markup(layout, text, -1); + else + pango_layout_set_text(layout, text, -1); return layout; } diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 480041f..f0b8e55 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd__graph.c produce graphs from data in rrdfiles ****************************************************************************/ @@ -1520,7 +1520,7 @@ int print_calc( } if (im->gdes[i].gf == GF_PRINT) { - infoval prline; + rrd_infoval_t prline; if (im->gdes[i].strftm) { prline.u_str = malloc((FMT_LEG_LEN + 2) * sizeof(char)); @@ -1657,9 +1657,7 @@ int leg_place( } leg_cc = strlen(im->gdes[i].legend); /* is there a controle code ant the end of the legend string ? */ - if (leg_cc >= 2 - && im->gdes[i].legend[leg_cc - - 2] == '\\' ) { + if (leg_cc >= 2 && im->gdes[i].legend[leg_cc - 2] == '\\') { prt_fctn = im->gdes[i].legend[leg_cc - 1]; leg_cc -= 2; im->gdes[i].legend[leg_cc] = '\0'; @@ -1671,8 +1669,7 @@ int leg_place( prt_fctn != 'r' && prt_fctn != 'j' && prt_fctn != 'c' && - prt_fctn != 's' && - prt_fctn != '\0' && prt_fctn != 'g') { + prt_fctn != 's' && prt_fctn != '\0' && prt_fctn != 'g') { free(legspace); rrd_set_error ("Unknown control code at the end of '%s\\%c'", @@ -1808,7 +1805,9 @@ int leg_place( leg_y - im->text_prop[TEXT_PROP_LEGEND].size * 1.8; } } else { - im->yimg = leg_y - im->text_prop[TEXT_PROP_LEGEND].size * 1.8 + border * 0.6; + im->yimg = + leg_y - im->text_prop[TEXT_PROP_LEGEND].size * 1.8 + + border * 0.6; } free(legspace); } @@ -1858,13 +1857,16 @@ int calc_horizontal_grid( if (im->ygrid_scale.gridstep == 0) /* range is one -> 0.1 is reasonable scale */ im->ygrid_scale.gridstep = 0.1; /* should have at least 5 lines but no more then 15 */ - if (range / im->ygrid_scale.gridstep < 5 && im->ygrid_scale.gridstep >= 30 ) + if (range / im->ygrid_scale.gridstep < 5 + && im->ygrid_scale.gridstep >= 30) im->ygrid_scale.gridstep /= 10; if (range / im->ygrid_scale.gridstep > 15) im->ygrid_scale.gridstep *= 10; - if (range / im->ygrid_scale.gridstep > 5 ) { + if (range / im->ygrid_scale.gridstep > 5) { im->ygrid_scale.labfact = 1; - if (range / im->ygrid_scale.gridstep > 8 || im->ygrid_scale.gridstep < 1.8 * im->text_prop[TEXT_PROP_AXIS].size ) + if (range / im->ygrid_scale.gridstep > 8 + || im->ygrid_scale.gridstep < + 1.8 * im->text_prop[TEXT_PROP_AXIS].size) im->ygrid_scale.labfact = 2; } else { im->ygrid_scale.gridstep /= 5; @@ -1891,7 +1893,7 @@ int calc_horizontal_grid( sprintf(im->ygrid_scale.labfmt, "%%%d.0f%s", len, (im->symbol != ' ' ? " %c" : "")); } - } else { /* classic rrd grid */ + } else { /* classic rrd grid */ for (i = 0; ylab[i].grid > 0; i++) { pixel = im->ysize / (scaledrange / ylab[i].grid); gridind = i; @@ -2945,7 +2947,7 @@ int graph_paint( int lazy = lazy_check(im); double areazero = 0.0; graph_desc_t *lastgdes = NULL; - infoval info; + rrd_infoval_t info; PangoFontMap *font_map = pango_cairo_font_map_get_default(); /* if we are lazy and there is nothing to PRINT ... quit now */ @@ -3066,8 +3068,9 @@ int graph_paint( im->xsize, im->yorigin - im->ysize, im->graph_col[GRC_CANVAS]); gfx_add_point(im, im->xorigin, im->yorigin - im->ysize); - gfx_close_path(im); - cairo_rectangle(im->cr, im->xorigin, im->yorigin-im->ysize-1.0, im->xsize,im->ysize+2.0); + gfx_close_path(im); + cairo_rectangle(im->cr, im->xorigin, im->yorigin - im->ysize - 1.0, + im->xsize, im->ysize + 2.0); cairo_clip(im->cr); if (im->minval > 0.0) areazero = im->minval; @@ -3526,8 +3529,8 @@ int rrd_graph( double *ymax) { int prlines = 0; - info_t *grinfo = NULL; - info_t *walker; + rrd_info_t *grinfo = NULL; + rrd_info_t *walker; grinfo = rrd_graph_v(argc, argv); if (grinfo == NULL) @@ -3581,7 +3584,7 @@ int rrd_graph( /* skip anything else */ walker = walker->next; } - info_free(grinfo); + rrd_info_free(grinfo); return 0; } @@ -3592,12 +3595,12 @@ int rrd_graph( ** - options parsing now in rrd_graph_options() ** - script parsing now in rrd_graph_script() */ -info_t *rrd_graph_v( +rrd_info_t *rrd_graph_v( int argc, char **argv) { image_desc_t im; - info_t *grinfo; + rrd_info_t *grinfo; rrd_graph_init(&im); /* a dummy surface so that we can measure text sizes for placements */ @@ -3605,13 +3608,13 @@ info_t *rrd_graph_v( im.cr = cairo_create(im.surface); rrd_graph_options(argc, argv, &im); if (rrd_test_error()) { - info_free(im.grinfo); + rrd_info_free(im.grinfo); im_free(&im); return NULL; } if (optind >= argc) { - info_free(im.grinfo); + rrd_info_free(im.grinfo); im_free(&im); rrd_set_error("missing filename"); return NULL; @@ -3619,7 +3622,7 @@ info_t *rrd_graph_v( if (strlen(argv[optind]) >= MAXPATH) { rrd_set_error("filename (including path) too long"); - info_free(im.grinfo); + rrd_info_free(im.grinfo); im_free(&im); return NULL; } @@ -3633,7 +3636,7 @@ info_t *rrd_graph_v( rrd_graph_script(argc, argv, &im, 1); if (rrd_test_error()) { - info_free(im.grinfo); + rrd_info_free(im.grinfo); im_free(&im); return NULL; } @@ -3641,7 +3644,7 @@ info_t *rrd_graph_v( /* Everything is now read and the actual work can start */ if (graph_paint(&im) == -1) { - info_free(im.grinfo); + rrd_info_free(im.grinfo); im_free(&im); return NULL; } @@ -3652,7 +3655,7 @@ info_t *rrd_graph_v( */ if (im.imginfo) { - infoval info; + rrd_infoval_t info; info.u_str = sprintf_alloc(im.imginfo, @@ -3663,7 +3666,7 @@ info_t *rrd_graph_v( free(info.u_str); } if (im.rendered_image) { - infoval img; + rrd_infoval_t img; img.u_blo.size = im.rendered_image_size; img.u_blo.ptr = im.rendered_image; @@ -3702,8 +3705,8 @@ void rrd_graph_init( im->grid_dash_off = 1; im->grid_dash_on = 1; im->gridfit = 1; - im->grinfo = (info_t *) NULL; - im->grinfo_current = (info_t *) NULL; + im->grinfo = (rrd_info_t *) NULL; + im->grinfo_current = (rrd_info_t *) NULL; im->imgformat = IF_PNG; im->imginfo = NULL; im->lazy = 0; @@ -3725,6 +3728,7 @@ void rrd_graph_init( im->unitslength = 6; im->viewfactor = 1.0; im->watermark[0] = '\0'; + im->with_markup = 0; im->ximg = 0; im->xlab_user.minsec = -1; im->xorigin = 0; @@ -3791,141 +3795,73 @@ void rrd_graph_options( char scan_gtm[12], scan_mtm[12], scan_ltm[12], col_nam[12]; time_t start_tmp = 0, end_tmp = 0; long long_tmp; - struct rrd_time_value start_tv, end_tv; + rrd_time_value_t start_tv, end_tv; long unsigned int color; char *old_locale = ""; /* defines for long options without a short equivalent. should be bytes, and may not collide with (the ASCII value of) short options */ #define LONGOPT_UNITS_SI 255 + +/* *INDENT-OFF* */ struct option long_options[] = { - { - "start", required_argument, 0, 's'}, { - "end", required_argument, 0, - 'e'}, { - "x-grid", - required_argument, 0, - 'x'}, { - "y-grid", - required_argument, - 0, 'y'}, { - "vertical-label", - required_argument, - 0, - 'v'}, { - "width", - required_argument, - 0, - 'w'}, - { - "height", required_argument, 0, 'h'}, { - "full-size-mode", no_argument, - 0, 'D'}, { - "interlaced", - no_argument, 0, - 'i'}, { - "upper-limit", - required_argument, - 0, - 'u'}, { - "lower-limit", - required_argument, - 0, - 'l'}, { - "rigid", - no_argument, - 0, - 'r'}, - { - "base", required_argument, 0, 'b'}, { - "logarithmic", no_argument, 0, - 'o'}, { - "color", - required_argument, 0, - 'c'}, { - "font", - required_argument, - 0, 'n'}, { - "title", - required_argument, - 0, 't'}, - { - "imginfo", required_argument, 0, 'f'}, { - "imgformat", - required_argument, 0, 'a'}, { - "lazy", - no_argument, - 0, - 'z'}, - { - "zoom", required_argument, 0, 'm'}, { - "no-legend", no_argument, 0, - 'g'}, { - "force-rules-legend", - no_argument, - 0, 'F'}, { - "only-graph", - no_argument, 0, - 'j'}, { - "alt-y-grid", - no_argument, - 0, 'Y'}, - { - "no-minor", no_argument, 0, 'I'}, { - "slope-mode", no_argument, 0, - 'E'}, { - "alt-autoscale", - no_argument, 0, 'A'}, { - "alt-autoscale-min", - no_argument, - 0, - 'J'}, { - "alt-autoscale-max", - no_argument, - 0, - 'M'}, { - "no-gridfit", - no_argument, - 0, - 'N'}, - { - "units-exponent", required_argument, - 0, 'X'}, { - "units-length", required_argument, - 0, 'L'}, { - "units", required_argument, 0, - LONGOPT_UNITS_SI}, { - "step", required_argument, 0, - 'S'}, { - "tabwidth", - required_argument, 0, - 'T'}, { - "font-render-mode", - required_argument, - 0, 'R'}, { - "graph-render-mode", - required_argument, - 0, - 'G'}, - { - "font-smoothing-threshold", - required_argument, 0, 'B'}, { - "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 */ - { - 0, 0, 0, 0} - }; + { "start", required_argument, 0, 's'}, + { "end", required_argument, 0, 'e'}, + { "x-grid", required_argument, 0, 'x'}, + { "y-grid", required_argument, 0, 'y'}, + { "vertical-label", required_argument, 0, 'v'}, + { "width", required_argument, 0, 'w'}, + { "height", required_argument, 0, 'h'}, + { "full-size-mode", no_argument, 0, 'D'}, + { "interlaced", no_argument, 0, 'i'}, + { "upper-limit", required_argument, 0, 'u'}, + { "lower-limit", required_argument, 0, 'l'}, + { "rigid", no_argument, 0, 'r'}, + { "base", required_argument, 0, 'b'}, + { "logarithmic", no_argument, 0, 'o'}, + { "color", required_argument, 0, 'c'}, + { "font", required_argument, 0, 'n'}, + { "title", required_argument, 0, 't'}, + { "imginfo", required_argument, 0, 'f'}, + { "imgformat", required_argument, 0, 'a'}, + { "lazy", no_argument, 0, 'z'}, + { "zoom", required_argument, 0, 'm'}, + { "no-legend", no_argument, 0, 'g'}, + { "force-rules-legend", no_argument, 0, 'F'}, + { "only-graph", no_argument, 0, 'j'}, + { "alt-y-grid", no_argument, 0, 'Y'}, + { "no-minor", no_argument, 0, 'I'}, + { "slope-mode", no_argument, 0, 'E'}, + { "alt-autoscale", no_argument, 0, 'A'}, + { "alt-autoscale-min", no_argument, 0, 'J'}, + { "alt-autoscale-max", no_argument, 0, 'M'}, + { "no-gridfit", no_argument, 0, 'N'}, + { "units-exponent", required_argument, 0, 'X'}, + { "units-length", required_argument, 0, 'L'}, + { "units", required_argument, 0, LONGOPT_UNITS_SI}, + { "step", required_argument, 0, 'S'}, + { "tabwidth", required_argument, 0, 'T'}, + { "font-render-mode", required_argument, 0, 'R'}, + { "graph-render-mode", required_argument, 0, 'G'}, + { "font-smoothing-threshold", required_argument, 0, 'B'}, + { "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'}, + { 0, 0, 0, 0} +}; +/* *INDENT-ON* */ + optind = 0; opterr = 0; /* initialize getopt */ - parsetime("end-24h", &start_tv); - parsetime("now", &end_tv); + rrd_parsetime("end-24h", &start_tv); + rrd_parsetime("now", &end_tv); while (1) { int option_index = 0; int opt; 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:k", + "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", long_options, &option_index); if (opt == EOF) break; @@ -3987,14 +3923,17 @@ void rrd_graph_options( case 'N': im->gridfit = 0; break; + case 'P': + im->with_markup = 1; + break; case 's': - if ((parsetime_error = parsetime(optarg, &start_tv))) { + if ((parsetime_error = rrd_parsetime(optarg, &start_tv))) { rrd_set_error("start time: %s", parsetime_error); return; } break; case 'e': - if ((parsetime_error = parsetime(optarg, &end_tv))) { + if ((parsetime_error = rrd_parsetime(optarg, &end_tv))) { rrd_set_error("end time: %s", parsetime_error); return; } @@ -4187,18 +4126,20 @@ void rrd_graph_options( if (size > 0) { im->text_prop[propidx].size = size; } - if ((int) strlen(prop) > end) { - if (prop[end] == ':') { + if ((int) strlen(optarg) > end) { + if (optarg[end] == ':') { strncpy(im->text_prop[propidx].font, - prop + end + 1, 255); + optarg + end + 1, 255); im->text_prop[propidx].font[255] = '\0'; } else { rrd_set_error - ("expected after font size in '%s'", - prop); + ("expected : after font size in '%s'", + optarg); return; } } + /* only run the for loop for DEFAULT (0) for + all others, we break here. woodo programming */ if (propidx == sindex && sindex != 0) break; } @@ -4279,8 +4220,8 @@ void rrd_graph_options( return; } - if (proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { - /* error string is set in parsetime.c */ + if (rrd_proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { + /* error string is set in rrd_parsetime.c */ return; } @@ -4510,15 +4451,21 @@ int vdef_calc( graph_desc_t *src, *dst; rrd_value_t *data; long step, steps; + unsigned long end; dst = &im->gdes[gdi]; src = &im->gdes[dst->vidx]; data = src->data + src->ds; - steps = (src->end - src->start) / src->step; + end = + src->end_orig % src->step == + 0 ? src->end_orig : (src->end_orig + src->step - + src->end_orig % src->step); + + steps = (end - src->start) / src->step; #if 0 printf ("DEBUG: start == %lu, end == %lu, %lu steps\n", - src->start, src->end, steps); + src->start, src->end_orig, steps); #endif switch (dst->vf.op) { case VDEF_PERCENT:{ @@ -4739,10 +4686,10 @@ int vdef_percent_compar( void grinfo_push( image_desc_t *im, char *key, - enum info_type type, - infoval value) + rrd_info_type_t type, + rrd_infoval_t value) { - im->grinfo_current = info_push(im->grinfo_current, key, type, value); + im->grinfo_current = rrd_info_push(im->grinfo_current, key, type, value); if (im->grinfo == NULL) { im->grinfo = im->grinfo_current; } diff --git a/src/rrd_graph.h b/src/rrd_graph.h index 7e85cd6..1b45284 100644 --- a/src/rrd_graph.h +++ b/src/rrd_graph.h @@ -219,7 +219,7 @@ typedef struct image_desc_t { double force_scale_max; /* Force a scale--max */ /* status information */ - + int with_markup; long xorigin, yorigin; /* where is (0,0) of the graph */ long ximg, yimg; /* total size of the image */ size_t rendered_image_size; @@ -244,8 +244,8 @@ typedef struct image_desc_t { cairo_font_options_t *font_options; /* cairo font options */ cairo_antialias_t graph_antialias; /* antialiasing for the graph */ - info_t *grinfo; /* root pointer to extra graph info */ - info_t *grinfo_current; /* pointing to current entry */ + rrd_info_t *grinfo; /* root pointer to extra graph info */ + rrd_info_t *grinfo_current; /* pointing to current entry */ } image_desc_t; /* Prototypes */ @@ -454,5 +454,5 @@ void gfx_area_fit( void grinfo_push( image_desc_t *im, char *key, - enum info_type type, - infoval value); + rrd_info_type_t type, + rrd_infoval_t value); diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index c9990f7..1a02247 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_graph_helper.c commandline parser functions * this code initially written by Alex van den Bogaerdt @@ -889,7 +889,7 @@ int rrd_parse_def( int i = 0; char command[7]; /* step, start, end, reduce */ char tmpstr[256]; - struct rrd_time_value start_tv, end_tv; + rrd_time_value_t start_tv, end_tv; time_t start_tmp = 0, end_tmp = 0; char *parsetime_error = NULL; @@ -951,7 +951,7 @@ int rrd_parse_def( } else if (!strcmp("start", command)) { i = scan_for_col(&line[*eaten], 255, tmpstr); (*eaten) += i; - if ((parsetime_error = parsetime(tmpstr, &start_tv))) { + if ((parsetime_error = rrd_parsetime(tmpstr, &start_tv))) { rrd_set_error("start time: %s", parsetime_error); return 1; } @@ -959,7 +959,7 @@ int rrd_parse_def( } else if (!strcmp("end", command)) { i = scan_for_col(&line[*eaten], 255, tmpstr); (*eaten) += i; - if ((parsetime_error = parsetime(tmpstr, &end_tv))) { + if ((parsetime_error = rrd_parsetime(tmpstr, &end_tv))) { rrd_set_error("end time: %s", parsetime_error); return 1; } @@ -978,8 +978,8 @@ int rrd_parse_def( } (*eaten)++; } - if (proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { - /* error string is set in parsetime.c */ + if (rrd_proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { + /* error string is set in rrd_parsetime.c */ return 1; } if (start_tmp < 3600 * 24 * 365 * 10) { diff --git a/src/rrd_hw.c b/src/rrd_hw.c index 5010d9e..62f64c6 100644 --- a/src/rrd_hw.c +++ b/src/rrd_hw.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_hw.c : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection ***************************************************************************** diff --git a/src/rrd_hw.h b/src/rrd_hw.h index fb984d9..d30e109 100644 --- a/src/rrd_hw.h +++ b/src/rrd_hw.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_hw.h : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection *****************************************************************************/ diff --git a/src/rrd_i18n.h b/src/rrd_i18n.h index 96fe9c7..9dc3e7e 100644 --- a/src/rrd_i18n.h +++ b/src/rrd_i18n.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Takao Fujiwara, 2008 + * RRDtool 1.3rc9 Copyright by Takao Fujiwara, 2008 ***************************************************************************** * rrd_i18n.h Common Header File *****************************************************************************/ diff --git a/src/rrd_info.c b/src/rrd_info.c index cf90e0e..257219a 100644 --- a/src/rrd_info.c +++ b/src/rrd_info.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_info Get Information about the configuration of an RRD *****************************************************************************/ @@ -9,10 +9,10 @@ #include /* proto */ -info_t *rrd_info( +rrd_info_t *rrd_info( int, char **); -info_t *rrd_info_r( +rrd_info_t *rrd_info_r( char *filename); /* allocate memory for string */ @@ -20,18 +20,14 @@ char *sprintf_alloc( char *fmt, ...) { -#ifdef HAVE_VSNPRINTF - int maxlen = 50; -#else - int maxlen = 1000; -#endif + int maxlen = 1024 + strlen(fmt); char *str = NULL; va_list argp; - str = malloc(sizeof(char) * (strlen(fmt) + maxlen)); + str = malloc(sizeof(char) * (maxlen + 1)); if (str != NULL) { va_start(argp, fmt); #ifdef HAVE_VSNPRINTF - vsnprintf(str, maxlen - 1, fmt, argp); + vsnprintf(str, maxlen, fmt, argp); #else vsprintf(str, fmt, argp); #endif @@ -40,19 +36,19 @@ char *sprintf_alloc( return str; } -/* the function formerly known as push was renamed info_push because - * it is now used outside the scope of this file */ -info_t - *info_push( - info_t *info, +/* the function formerly known as push was renamed to info_push and later + * rrd_info_push because it is now used outside the scope of this file */ +rrd_info_t + *rrd_info_push( + rrd_info_t *info, char *key, - enum info_type type, - infoval value) + rrd_info_type_t type, + rrd_infoval_t value) { - info_t *next; + rrd_info_t *next; next = malloc(sizeof(*next)); - next->next = (info_t *) 0; + next->next = (rrd_info_t *) 0; if (info) info->next = next; next->type = type; @@ -82,11 +78,11 @@ info_t } -info_t *rrd_info( +rrd_info_t *rrd_info( int argc, char **argv) { - info_t *info; + rrd_info_t *info; if (argc < 2) { rrd_set_error("please specify an rrd"); @@ -100,13 +96,13 @@ info_t *rrd_info( -info_t *rrd_info_r( +rrd_info_t *rrd_info_r( char *filename) { unsigned int i, ii = 0; rrd_t rrd; - info_t *data = NULL, *cd; - infoval info; + rrd_info_t *data = NULL, *cd; + rrd_infoval_t info; rrd_file_t *rrd_file; enum cf_en current_cf; enum dst_en current_ds; @@ -116,22 +112,23 @@ info_t *rrd_info_r( goto err_free; info.u_str = filename; - cd = info_push(NULL, sprintf_alloc("filename"), RD_I_STR, info); + cd = rrd_info_push(NULL, sprintf_alloc("filename"), RD_I_STR, info); data = cd; info.u_str = rrd.stat_head->version; - cd = info_push(cd, sprintf_alloc("rrd_version"), RD_I_STR, info); + cd = rrd_info_push(cd, sprintf_alloc("rrd_version"), RD_I_STR, info); info.u_cnt = rrd.stat_head->pdp_step; - cd = info_push(cd, sprintf_alloc("step"), RD_I_CNT, info); + cd = rrd_info_push(cd, sprintf_alloc("step"), RD_I_CNT, info); info.u_cnt = rrd.live_head->last_up; - cd = info_push(cd, sprintf_alloc("last_update"), RD_I_CNT, info); + cd = rrd_info_push(cd, sprintf_alloc("last_update"), RD_I_CNT, info); for (i = 0; i < rrd.stat_head->ds_cnt; i++) { info.u_str = rrd.ds_def[i].dst; - cd = info_push(cd, sprintf_alloc("ds[%s].type", rrd.ds_def[i].ds_nam), + cd = rrd_info_push(cd, sprintf_alloc("ds[%s].type", + rrd.ds_def[i].ds_nam), RD_I_STR, info); current_ds = dst_conv(rrd.ds_def[i].dst); @@ -143,7 +140,7 @@ info_t *rrd_info_r( rpn_compact2str((rpn_cdefds_t *) &(rrd.ds_def[i].par[DS_cdef]), rrd.ds_def, &buffer); info.u_str = buffer; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("ds[%s].cdef", rrd.ds_def[i].ds_nam), RD_I_STR, info); free(buffer); @@ -151,97 +148,97 @@ info_t *rrd_info_r( break; default: info.u_cnt = rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("ds[%s].minimal_heartbeat", rrd.ds_def[i].ds_nam), RD_I_CNT, info); info.u_val = rrd.ds_def[i].par[DS_min_val].u_val; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("ds[%s].min", rrd.ds_def[i].ds_nam), RD_I_VAL, info); info.u_val = rrd.ds_def[i].par[DS_max_val].u_val; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("ds[%s].max", rrd.ds_def[i].ds_nam), RD_I_VAL, info); break; } info.u_str = rrd.pdp_prep[i].last_ds; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("ds[%s].last_ds", rrd.ds_def[i].ds_nam), RD_I_STR, info); info.u_val = rrd.pdp_prep[i].scratch[PDP_val].u_val; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("ds[%s].value", rrd.ds_def[i].ds_nam), RD_I_VAL, info); info.u_cnt = rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("ds[%s].unknown_sec", rrd.ds_def[i].ds_nam), RD_I_CNT, info); } for (i = 0; i < rrd.stat_head->rra_cnt; i++) { info.u_str = rrd.rra_def[i].cf_nam; - cd = info_push(cd, sprintf_alloc("rra[%d].cf", i), RD_I_STR, info); + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].cf", i), RD_I_STR, info); current_cf = cf_conv(rrd.rra_def[i].cf_nam); info.u_cnt = rrd.rra_def[i].row_cnt; - cd = info_push(cd, sprintf_alloc("rra[%d].rows", i), RD_I_CNT, info); + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].rows", i), RD_I_CNT, info); info.u_cnt = rrd.rra_ptr[i].cur_row; - cd = info_push(cd, sprintf_alloc("rra[%d].cur_row", i), RD_I_CNT, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].cur_row", i), RD_I_CNT, info); info.u_cnt = rrd.rra_def[i].pdp_cnt; - cd = info_push(cd, sprintf_alloc("rra[%d].pdp_per_row", i), RD_I_CNT, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].pdp_per_row", i), RD_I_CNT, info); switch (current_cf) { case CF_HWPREDICT: case CF_MHWPREDICT: info.u_val = rrd.rra_def[i].par[RRA_hw_alpha].u_val; - cd = info_push(cd, sprintf_alloc("rra[%d].alpha", i), RD_I_VAL, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].alpha", i), RD_I_VAL, info); info.u_val = rrd.rra_def[i].par[RRA_hw_beta].u_val; - cd = info_push(cd, sprintf_alloc("rra[%d].beta", i), RD_I_VAL, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].beta", i), RD_I_VAL, info); break; case CF_SEASONAL: case CF_DEVSEASONAL: info.u_val = rrd.rra_def[i].par[RRA_seasonal_gamma].u_val; - cd = info_push(cd, sprintf_alloc("rra[%d].gamma", i), RD_I_VAL, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].gamma", i), RD_I_VAL, info); if (atoi(rrd.stat_head->version) >= 4) { info.u_val = rrd.rra_def[i].par[RRA_seasonal_smoothing_window].u_val; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].smoothing_window", i), RD_I_VAL, info); } break; case CF_FAILURES: info.u_val = rrd.rra_def[i].par[RRA_delta_pos].u_val; - cd = info_push(cd, sprintf_alloc("rra[%d].delta_pos", i), + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].delta_pos", i), RD_I_VAL, info); info.u_val = rrd.rra_def[i].par[RRA_delta_neg].u_val; - cd = info_push(cd, sprintf_alloc("rra[%d].delta_neg", i), + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].delta_neg", i), RD_I_VAL, info); info.u_cnt = rrd.rra_def[i].par[RRA_failure_threshold].u_cnt; - cd = info_push(cd, sprintf_alloc("rra[%d].failure_threshold", i), + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].failure_threshold", i), RD_I_CNT, info); info.u_cnt = rrd.rra_def[i].par[RRA_window_len].u_cnt; - cd = info_push(cd, sprintf_alloc("rra[%d].window_length", i), + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].window_length", i), RD_I_CNT, info); break; case CF_DEVPREDICT: break; default: info.u_val = rrd.rra_def[i].par[RRA_cdp_xff_val].u_val; - cd = info_push(cd, sprintf_alloc("rra[%d].xff", i), RD_I_VAL, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].xff", i), RD_I_VAL, info); break; } @@ -253,19 +250,19 @@ info_t *rrd_info_r( info.u_val = rrd.cdp_prep[i * rrd.stat_head->ds_cnt + ii].scratch[CDP_hw_intercept].u_val; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].cdp_prep[%d].intercept", i, ii), RD_I_VAL, info); info.u_val = rrd.cdp_prep[i * rrd.stat_head->ds_cnt + ii].scratch[CDP_hw_slope].u_val; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].cdp_prep[%d].slope", i, ii), RD_I_VAL, info); info.u_cnt = rrd.cdp_prep[i * rrd.stat_head->ds_cnt + ii].scratch[CDP_null_count].u_cnt; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].cdp_prep[%d].NaN_count", i, ii), RD_I_CNT, info); break; @@ -273,7 +270,7 @@ info_t *rrd_info_r( info.u_val = rrd.cdp_prep[i * rrd.stat_head->ds_cnt + ii].scratch[CDP_hw_seasonal].u_val; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].cdp_prep[%d].seasonal", i, ii), RD_I_VAL, info); break; @@ -281,7 +278,7 @@ info_t *rrd_info_r( info.u_val = rrd.cdp_prep[i * rrd.stat_head->ds_cnt + ii].scratch[CDP_seasonal_deviation].u_val; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].cdp_prep[%d].deviation", i, ii), RD_I_VAL, info); break; @@ -300,7 +297,7 @@ info_t *rrd_info_r( history[j] = (violations_array[j] == 1) ? '1' : '0'; history[j] = '\0'; info.u_str = history; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].cdp_prep[%d].history", i, ii), RD_I_STR, info); } @@ -309,13 +306,13 @@ info_t *rrd_info_r( info.u_val = rrd.cdp_prep[i * rrd.stat_head->ds_cnt + ii].scratch[CDP_val].u_val; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc("rra[%d].cdp_prep[%d].value", i, ii), RD_I_VAL, info); info.u_cnt = rrd.cdp_prep[i * rrd.stat_head->ds_cnt + ii].scratch[CDP_unkn_pdp_cnt].u_cnt; - cd = info_push(cd, + cd = rrd_info_push(cd, sprintf_alloc ("rra[%d].cdp_prep[%d].unknown_datapoints", i, ii), RD_I_CNT, info); @@ -331,8 +328,8 @@ info_t *rrd_info_r( } -void info_print( - info_t *data) +void rrd_info_print( + rrd_info_t *data) { while (data) { printf("%s = ", data->key); @@ -362,10 +359,10 @@ void info_print( } } -void info_free( - info_t *data) +void rrd_info_free( + rrd_info_t *data) { - info_t *save; + rrd_info_t *save; while (data) { save = data; diff --git a/src/rrd_is_thread_safe.h b/src/rrd_is_thread_safe.h index d313074..80a794b 100644 --- a/src/rrd_is_thread_safe.h +++ b/src/rrd_is_thread_safe.h @@ -1,12 +1,12 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 * This file: Copyright 2003 Peter Stamfest * & 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 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_is_thread_safe.h 1413 2008-06-08 17:08:47Z oetiker $ *************************************************************************** */ #ifndef _RRD_IS_THREAD_SAFE_H diff --git a/src/rrd_last.c b/src/rrd_last.c index 240364b..097b19c 100644 --- a/src/rrd_last.c +++ b/src/rrd_last.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_last.c ***************************************************************************** diff --git a/src/rrd_lastupdate.c b/src/rrd_lastupdate.c index e340893..8501f54 100644 --- a/src/rrd_lastupdate.c +++ b/src/rrd_lastupdate.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_lastupdate Get the last datum entered for each DS *****************************************************************************/ diff --git a/src/rrd_nan_inf.c b/src/rrd_nan_inf.c index 1787948..2914d1a 100644 --- a/src/rrd_nan_inf.c +++ b/src/rrd_nan_inf.c @@ -19,7 +19,7 @@ double dinf; #endif -double set_to_DNAN( +double rrd_set_to_DNAN( void) { if (!done_nan) { @@ -29,7 +29,7 @@ double set_to_DNAN( return dnan; } -double set_to_DINF( +double rrd_set_to_DINF( void) { if (!done_inf) { diff --git a/src/rrd_not_thread_safe.c b/src/rrd_not_thread_safe.c index 9616b6a..d0797ab 100644 --- a/src/rrd_not_thread_safe.c +++ b/src/rrd_not_thread_safe.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 * This file: Copyright 2003 Peter Stamfest * & Tobias Oetiker * Distributed under the GPL @@ -7,37 +7,26 @@ * rrd_not_thread_safe.c Contains routines used when thread safety is not * an issue ***************************************************************************** - * $Id: rrd_not_thread_safe.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_not_thread_safe.c 1413 2008-06-08 17:08:47Z oetiker $ *************************************************************************** */ #include "rrd.h" #include "rrd_tool.h" #define MAXLEN 4096 #define ERRBUFLEN 256 -static char rrd_error[MAXLEN + 10]; -static char rrd_liberror[ERRBUFLEN + 10]; -static int rrd_context_init = 0; - /* The global context is very useful in the transition period to even more thread-safe stuff, it can be used whereever we need a context and do not need to worry about concurrency. */ -static struct rrd_context global_ctx = { - MAXLEN, - ERRBUFLEN, - rrd_error, - rrd_liberror +static rrd_context_t global_ctx = { + "", + "" }; /* #include */ -struct rrd_context *rrd_get_context( +rrd_context_t *rrd_get_context( void) { - if (!rrd_context_init) { - rrd_context_init = 1; - global_ctx.rrd_error[0] = '\0'; - global_ctx.lib_errstr[0] = '\0'; - } return &global_ctx; } diff --git a/src/rrd_open.c b/src/rrd_open.c index a03e5d3..d57c2ef 100644 --- a/src/rrd_open.c +++ b/src/rrd_open.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_open.c Open an RRD File ***************************************************************************** - * $Id: rrd_open.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_open.c 1413 2008-06-08 17:08:47Z oetiker $ *****************************************************************************/ #include "rrd_tool.h" @@ -34,10 +34,11 @@ #endif /* get the address of the start of this page */ +#if defined USE_MADVISE || defined HAVE_POSIX_FADVISE #ifndef PAGE_START #define PAGE_START(addr) ((addr)&(~(_page_size-1))) #endif - +#endif /* Open a database file, return its header and an open filehandle, * positioned to the first cdp in the first rra. @@ -226,13 +227,13 @@ rrd_file_t *rrd_open( rrd_set_error("live_head_t malloc"); goto out_close; } - #if defined USE_MADVISE /* the live_head will be needed soonish, so hint accordingly */ - madvise(data + PAGE_START(offset), - sizeof(time_t), MADV_WILLNEED); -#endif - __rrd_read(rrd->legacy_last_up,time_t,1); + madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED); +#endif + __rrd_read(rrd->legacy_last_up, time_t, + 1); + rrd->live_head->last_up = *rrd->legacy_last_up; rrd->live_head->last_up_usec = 0; } else { @@ -316,6 +317,7 @@ void rrd_dontneed( rrd_file_t *rrd_file, rrd_t *rrd) { +#if defined USE_MADVISE || defined HAVE_POSIX_FADVISE unsigned long dontneed_start; unsigned long rra_start; unsigned long active_block; @@ -369,8 +371,13 @@ 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 */ } + + + + int rrd_close( rrd_file_t *rrd_file) { @@ -528,8 +535,8 @@ void rrd_init( void rrd_free( rrd_t *rrd) { - if (rrd->legacy_last_up){ /* this gets set for version < 3 only */ - free(rrd->live_head); + if (rrd->legacy_last_up) { /* this gets set for version < 3 only */ + free(rrd->live_head); } } #else @@ -557,63 +564,3 @@ void rrd_freemem( free(mem); } - -/* XXX: FIXME: missing documentation. */ -/*XXX: FIXME should be renamed to rrd_readfile or _rrd_readfile */ - -int /*_rrd_*/ readfile( - const char *file_name, - char **buffer, - int skipfirst) -{ - long writecnt = 0, totalcnt = MEMBLK; - long offset = 0; - FILE *input = NULL; - char c; - - if ((strcmp("-", file_name) == 0)) { - input = stdin; - } else { - if ((input = fopen(file_name, "rb")) == NULL) { - rrd_set_error("opening '%s': %s", file_name, rrd_strerror(errno)); - return (-1); - } - } - if (skipfirst) { - do { - c = getc(input); - offset++; - } while (c != '\n' && !feof(input)); - } - if (strcmp("-", file_name)) { - fseek(input, 0, SEEK_END); - /* have extra space for detecting EOF without realloc */ - totalcnt = (ftell(input) + 1) / sizeof(char) - offset; - if (totalcnt < MEMBLK) - totalcnt = MEMBLK; /* sanitize */ - fseek(input, offset * sizeof(char), SEEK_SET); - } - if (((*buffer) = (char *) malloc((totalcnt + 4) * sizeof(char))) == NULL) { - perror("Allocate Buffer:"); - exit(1); - }; - do { - writecnt += - fread((*buffer) + writecnt, 1, - (totalcnt - writecnt) * sizeof(char), input); - if (writecnt >= totalcnt) { - totalcnt += MEMBLK; - if (((*buffer) = - rrd_realloc((*buffer), - (totalcnt + 4) * sizeof(char))) == NULL) { - perror("Realloc Buffer:"); - exit(1); - }; - } - } while (!feof(input)); - (*buffer)[writecnt] = '\0'; - if (strcmp("-", file_name) != 0) { - fclose(input); - }; - return writecnt; -} diff --git a/src/parsetime.c b/src/rrd_parsetime.c similarity index 98% rename from src/parsetime.c rename to src/rrd_parsetime.c index 8818f1c..c1aef0b 100644 --- a/src/parsetime.c +++ b/src/rrd_parsetime.c @@ -1,5 +1,5 @@ /* - * parsetime.c - parse time for at(1) + * rrd_parsetime.c - parse time for at(1) * Copyright (C) 1993, 1994 Thomas Koenig * * modifications for English-language times @@ -483,7 +483,7 @@ static char *expect2( * It also applies those m-guessing heuristics. */ static char *plus_minus( - struct rrd_time_value *ptv, + rrd_time_value_t *ptv, int doop) { static int op = PLUS; @@ -569,7 +569,7 @@ static char *plus_minus( * tod() computes the time of day (TIME-OF-DAY-SPEC) */ static char *tod( - struct rrd_time_value *ptv) + rrd_time_value_t *ptv) { int hour, minute = 0; int tlen; @@ -646,7 +646,7 @@ static char *tod( * assign_date() assigns a date, adjusting year as appropriate */ static char *assign_date( - struct rrd_time_value *ptv, + rrd_time_value_t *ptv, long mday, long mon, long year) @@ -679,7 +679,7 @@ static char *assign_date( * day() picks apart DAY-SPEC-[12] */ static char *day( - struct rrd_time_value *ptv) + rrd_time_value_t *ptv) { /* using time_t seems to help portability with 64bit oses */ time_t mday = 0, wday, mon, year = ptv->tm.tm_year; @@ -823,7 +823,7 @@ static char *day( /* - * parsetime() is the external interface that takes tspec, parses + * rrd_parsetime() is the external interface that takes tspec, parses * it and puts the result in the rrd_time_value structure *ptv. * It can return either absolute times (these are ensured to be * correct) or relative time references that are expected to be @@ -831,9 +831,9 @@ static char *day( * mktime() The return value is either TIME_OK (aka NULL) or * the pointer to the error message in the case of problems */ -char *parsetime( +char *rrd_parsetime( const char *tspec, - struct rrd_time_value *ptv) + rrd_time_value_t *ptv) { time_t now = time(NULL); int hr = 0; @@ -986,12 +986,12 @@ char *parsetime( } EnsureMemFree(); return TIME_OK; -} /* parsetime */ +} /* rrd_parsetime */ -int proc_start_end( - struct rrd_time_value *start_tv, - struct rrd_time_value *end_tv, +int rrd_proc_start_end( + rrd_time_value_t *start_tv, + rrd_time_value_t *end_tv, time_t *start, time_t *end) { @@ -1040,4 +1040,4 @@ int proc_start_end( *end = mktime(&(end_tv->tm)) + end_tv->offset; } return 0; -} /* proc_start_end */ +} /* rrd_proc_start_end */ diff --git a/src/parsetime.h b/src/rrd_parsetime.h similarity index 100% rename from src/parsetime.h rename to src/rrd_parsetime.h diff --git a/src/rrd_resize.c b/src/rrd_resize.c index e20f6bf..ddacd13 100644 --- a/src/rrd_resize.c +++ b/src/rrd_resize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_resize.c Alters size of an RRA ***************************************************************************** @@ -60,7 +60,7 @@ int rrd_resize( rrd_free(&rrdold); return (-1); } - if (LockRRD(rrd_file->fd) != 0) { + if (rrd_lock(rrd_file) != 0) { rrd_set_error("could not lock original RRD"); rrd_free(&rrdold); rrd_close(rrd_file); @@ -98,7 +98,7 @@ int rrd_resize( rrd_free(&rrdnew); return (-1); } - if (LockRRD(rrd_out_file->fd) != 0) { + if (rrd_lock(rrd_out_file) != 0) { rrd_set_error("could not lock new RRD"); rrd_free(&rrdold); rrd_close(rrd_file); diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 37fa55e..f08bba3 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -1,11 +1,11 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 * This file: Copyright 2008 Florian octo Forster * Distributed under the GPL ***************************************************************************** * rrd_restore.c Contains logic to parse XML input and create an RRD file ***************************************************************************** - * $Id: rrd_restore.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_restore.c 1413 2008-06-08 17:08:47Z oetiker $ *************************************************************************** */ /* @@ -163,7 +163,7 @@ static int value_check_range( if (((!isnan(min)) && (*rrd_value < min)) || ((!isnan(max)) && (*rrd_value > max))) - *rrd_value = NAN; + *rrd_value = DNAN; return (0); } /* int value_check_range */ diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c index aec519f..c794c22 100644 --- a/src/rrd_rpncalc.c +++ b/src/rrd_rpncalc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_rpncalc.c RPN calculator functions ****************************************************************************/ diff --git a/src/rrd_rpncalc.h b/src/rrd_rpncalc.h index 853715d..1f2fb8a 100644 --- a/src/rrd_rpncalc.h +++ b/src/rrd_rpncalc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_rpncalc.h RPN calculator functions ****************************************************************************/ diff --git a/src/rrd_thread_safe.c b/src/rrd_thread_safe.c index 3ad3bea..742bb49 100644 --- a/src/rrd_thread_safe.c +++ b/src/rrd_thread_safe.c @@ -1,12 +1,12 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 * This file: Copyright 2003 Peter Stamfest * & Tobias Oetiker * Distributed under the GPL ***************************************************************************** * rrd_thread_safe.c Contains routines used when thread safety is required ***************************************************************************** - * $Id: rrd_thread_safe.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_thread_safe.c 1413 2008-06-08 17:08:47Z oetiker $ *************************************************************************** */ #include @@ -27,7 +27,7 @@ static pthread_once_t context_key_once = PTHREAD_ONCE_INIT; static void context_destroy_context( void *ctx_) { - struct rrd_context *ctx = ctx_; + rrd_context_t *ctx = ctx_; if (ctx) rrd_free_context(ctx); @@ -40,10 +40,10 @@ static void context_get_key( pthread_key_create(&context_key, context_destroy_context); } -struct rrd_context *rrd_get_context( +rrd_context_t *rrd_get_context( void) { - struct rrd_context *ctx; + rrd_context_t *ctx; pthread_once(&context_key_once, context_get_key); ctx = pthread_getspecific(context_key); @@ -58,9 +58,9 @@ struct rrd_context *rrd_get_context( const char *rrd_strerror( int err) { - struct rrd_context *ctx = rrd_get_context(); + rrd_context_t *ctx = rrd_get_context(); - if (strerror_r(err, ctx->lib_errstr, ctx->errlen)) + if (strerror_r(err, ctx->lib_errstr, sizeof(ctx->lib_errstr))) return "strerror_r failed. sorry!"; else return ctx->lib_errstr; @@ -71,12 +71,12 @@ const char *rrd_strerror( int err) { static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; - struct rrd_context *ctx; + rrd_context_t *ctx; ctx = rrd_get_context(); pthread_mutex_lock(&mtx); - strncpy(ctx->lib_errstr, strerror(err), ctx->errlen); - ctx->lib_errstr[ctx->errlen] = '\0'; + strncpy(ctx->lib_errstr, strerror(err), sizeof(ctx->lib_errstr)); + ctx->lib_errstr[sizeof(ctx->lib_errstr) - 1] = '\0'; pthread_mutex_unlock(&mtx); return ctx->lib_errstr; } diff --git a/src/rrd_thread_safe_nt.c b/src/rrd_thread_safe_nt.c index b05acd9..80b8bae 100644 --- a/src/rrd_thread_safe_nt.c +++ b/src/rrd_thread_safe_nt.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 * This file: Copyright 2003 Peter Stamfest * & 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 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_thread_safe_nt.c 1413 2008-06-08 17:08:47Z oetiker $ *************************************************************************** */ #include @@ -44,10 +44,10 @@ static void context_init_context( atexit(context_destroy_context); } } -struct rrd_context *rrd_get_context( +rrd_context_t *rrd_get_context( void) { - struct rrd_context *ctx; + rrd_context_t *ctx; context_init_context(); @@ -63,15 +63,15 @@ struct rrd_context *rrd_get_context( const char *rrd_strerror( int err) { - struct rrd_context *ctx; + rrd_context_t *ctx; context_init_context(); ctx = rrd_get_context(); EnterCriticalSection(&CriticalSection); - strncpy(ctx->lib_errstr, strerror(err), ctx->errlen); - ctx->lib_errstr[ctx->errlen] = '\0'; + strncpy(ctx->lib_errstr, strerror(err), sizeof(ctx->lib_errstr)); + ctx->lib_errstr[sizeof(ctx->lib_errstr) - 1] = '\0'; LeaveCriticalSection(&CriticalSection); return ctx->lib_errstr; diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 088c195..670e3c3 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_tool.c Startup wrapper *****************************************************************************/ @@ -621,15 +621,15 @@ int HandleInputLine( else if (strcmp("dump", argv[1]) == 0) rrd_dump(argc - 1, &argv[1]); else if (strcmp("info", argv[1]) == 0 || strcmp("updatev", argv[1]) == 0) { - info_t *data; + rrd_info_t *data; if (strcmp("info", argv[1]) == 0) data = rrd_info(argc - 1, &argv[1]); else data = rrd_update_v(argc - 1, &argv[1]); - info_print(data); - info_free(data); + rrd_info_print(data); + rrd_info_free(data); } else if (strcmp("--version", argv[1]) == 0 || @@ -804,12 +804,12 @@ int HandleInputLine( } } else if (strcmp("graphv", argv[1]) == 0) { - info_t *grinfo = NULL; /* 1 to distinguish it from the NULL that rrd_graph sends in */ + rrd_info_t *grinfo = NULL; /* 1 to distinguish it from the NULL that rrd_graph sends in */ grinfo = rrd_graph_v(argc - 1, &argv[1]); if (grinfo) { - info_print(grinfo); - info_free(grinfo); + rrd_info_print(grinfo); + rrd_info_free(grinfo); } } else if (strcmp("tune", argv[1]) == 0) diff --git a/src/rrd_tool.h b/src/rrd_tool.h index 7928392..a8a01fa 100644 --- a/src/rrd_tool.h +++ b/src/rrd_tool.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_tool.h Common Header File *****************************************************************************/ @@ -63,31 +63,9 @@ extern "C" { #define DIM(x) (sizeof(x)/sizeof(x[0])) - info_t *rrd_info( - int, - char **); - int rrd_lastupdate( - int argc, - char **argv, - time_t *last_update, - unsigned long *ds_cnt, - char ***ds_namv, - char ***last_ds); - info_t *rrd_update_v( - int, - char **); char *sprintf_alloc( char *, ...); - info_t *info_push( - info_t *, - char *, - enum info_type, - infoval); - void info_print( - info_t *data); - void info_free( - info_t *); /* HELPER FUNCTIONS */ @@ -141,10 +119,8 @@ extern "C" { int whence); off_t rrd_tell( rrd_file_t *rrd_file); - int readfile( - const char *file, - char **buffer, - int skipfirst); + int rrd_lock( + rrd_file_t *file); #define RRD_READONLY (1<<0) #define RRD_READWRITE (1<<1) @@ -163,12 +139,6 @@ extern "C" { char *a, char *b); - /* rrd_strerror is thread safe, but still it uses a global buffer - (but one per thread), thus subsequent calls within a single - thread overwrite the same buffer */ - const char *rrd_strerror( - int err); - #endif #ifdef __cplusplus diff --git a/src/rrd_tune.c b/src/rrd_tune.c index ca132f6..ceebdc7 100644 --- a/src/rrd_tune.c +++ b/src/rrd_tune.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * change header parameters of an rrd ***************************************************************************** - * $Id: rrd_tune.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_tune.c 1413 2008-06-08 17:08:47Z oetiker $ * $Log$ * Revision 1.6 2004/05/26 22:11:12 oetiker * reduce compiler warnings. Many small fixes. -- Mike Slifcak diff --git a/src/rrd_update.c b/src/rrd_update.c index dc5240d..7f4c9c0 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -1,10 +1,10 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_update.c RRD Update Function ***************************************************************************** - * $Id: rrd_update.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrd_update.c 1413 2008-06-08 17:08:47Z oetiker $ *****************************************************************************/ #include "rrd_tool.h" @@ -71,7 +71,7 @@ int _rrd_update( const char *tmplt, int argc, const char **argv, - info_t *); + rrd_info_t *); static int allocate_data_structures( rrd_t *rrd, @@ -104,7 +104,7 @@ static int process_arg( char **updvals, long *tmpl_idx, unsigned long tmpl_cnt, - info_t **pcdp_summary, + rrd_info_t **pcdp_summary, int version, unsigned long *skip_update, int *schedule_smooth); @@ -258,7 +258,7 @@ static int write_to_rras( unsigned long *rra_current, time_t current_time, unsigned long *skip_update, - info_t **pcdp_summary); + rrd_info_t **pcdp_summary); static int write_RRA_row( rrd_file_t *rrd_file, @@ -266,7 +266,7 @@ static int write_RRA_row( unsigned long rra_idx, unsigned long *rra_current, unsigned short CDP_scratch_idx, - info_t **pcdp_summary, + rrd_info_t **pcdp_summary, time_t rra_time); static int smooth_all_rras( @@ -317,13 +317,13 @@ static inline void initialize_time( #define IFDNAN(X,Y) (isnan(X) ? (Y) : (X)); -info_t *rrd_update_v( +rrd_info_t *rrd_update_v( int argc, char **argv) { char *tmplt = NULL; - info_t *result = NULL; - infoval rc; + rrd_info_t *result = NULL; + rrd_infoval_t rc; struct option long_options[] = { {"template", required_argument, 0, 't'}, {0, 0, 0, 0} @@ -359,7 +359,7 @@ info_t *rrd_update_v( goto end_tag; } rc.u_int = 0; - result = info_push(NULL, sprintf_alloc("return_value"), RD_I_INT, rc); + result = rrd_info_push(NULL, sprintf_alloc("return_value"), RD_I_INT, rc); rc.u_int = _rrd_update(argv[optind], tmplt, argc - optind - 1, (const char **) (argv + optind + 1), result); @@ -428,7 +428,7 @@ int _rrd_update( const char *tmplt, int argc, const char **argv, - info_t *pcdp_summary) + rrd_info_t *pcdp_summary) { int arg_i = 2; @@ -479,7 +479,7 @@ int _rrd_update( /* get exclusive lock to whole file. * lock gets removed when we close the file. */ - if (LockRRD(rrd_file->fd) != 0) { + if (rrd_lock(rrd_file) != 0) { rrd_set_error("could not lock RRD"); goto err_close; } @@ -560,8 +560,8 @@ int _rrd_update( * * returns 0 on success */ -int LockRRD( - int in_file) +int rrd_lock( + rrd_file_t *file) { int rcstat; @@ -569,8 +569,8 @@ int LockRRD( #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) struct _stat st; - if (_fstat(in_file, &st) == 0) { - rcstat = _locking(in_file, _LK_NBLCK, st.st_size); + if (_fstat(file->fd, &st) == 0) { + rcstat = _locking(file->fd, _LK_NBLCK, st.st_size); } else { rcstat = -1; } @@ -582,7 +582,7 @@ int LockRRD( lock.l_start = 0; /* start of file */ lock.l_whence = SEEK_SET; /* end of file */ - rcstat = fcntl(in_file, F_SETLK, &lock); + rcstat = fcntl(file->fd, F_SETLK, &lock); #endif } @@ -750,7 +750,7 @@ static int process_arg( char **updvals, long *tmpl_idx, unsigned long tmpl_cnt, - info_t **pcdp_summary, + rrd_info_t **pcdp_summary, int version, unsigned long *skip_update, int *schedule_smooth) @@ -832,7 +832,7 @@ static int process_arg( rrd->live_head->last_up = *current_time; rrd->live_head->last_up_usec = *current_time_usec; - if ( version < 3 ){ + if (version < 3) { *rrd->legacy_last_up = rrd->live_head->last_up; } free(seasonal_coef); @@ -926,12 +926,12 @@ static int get_time_from_reading( double tmp; char *parsetime_error = NULL; char *old_locale; - struct rrd_time_value ds_tv; + rrd_time_value_t ds_tv; struct timeval tmp_time; /* used for time conversion */ /* get the time from the reading ... handle N */ if (timesyntax == '@') { /* at-style */ - if ((parsetime_error = parsetime(updvals[0], &ds_tv))) { + if ((parsetime_error = rrd_parsetime(updvals[0], &ds_tv))) { rrd_set_error("ds time: %s: %s", updvals[0], parsetime_error); return -1; } @@ -1855,7 +1855,7 @@ static int write_to_rras( unsigned long *rra_current, time_t current_time, unsigned long *skip_update, - info_t **pcdp_summary) + rrd_info_t **pcdp_summary) { unsigned long rra_idx; unsigned long rra_start; @@ -1963,11 +1963,11 @@ static int write_RRA_row( unsigned long rra_idx, unsigned long *rra_current, unsigned short CDP_scratch_idx, - info_t **pcdp_summary, + rrd_info_t **pcdp_summary, time_t rra_time) { unsigned long ds_idx, cdp_idx; - infoval iv; + rrd_infoval_t iv; for (ds_idx = 0; ds_idx < rrd->stat_head->ds_cnt; ds_idx++) { /* compute the cdp index */ @@ -1980,7 +1980,7 @@ static int write_RRA_row( if (*pcdp_summary != NULL) { iv.u_val = rrd->cdp_prep[cdp_idx].scratch[CDP_scratch_idx].u_val; /* append info to the return hash */ - *pcdp_summary = info_push(*pcdp_summary, + *pcdp_summary = rrd_info_push(*pcdp_summary, sprintf_alloc("[%d]RRA[%s][%lu]DS[%s]", rra_time, rrd->rra_def[rra_idx]. diff --git a/src/rrd_version.c b/src/rrd_version.c index 252a997..d2972ab 100644 --- a/src/rrd_version.c +++ b/src/rrd_version.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_version Return ***************************************************************************** diff --git a/src/rrd_xport.c b/src/rrd_xport.c index a54df18..0a51798 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_xport.c export RRD data ****************************************************************************/ @@ -56,7 +56,7 @@ int rrd_xport( image_desc_t im; time_t start_tmp = 0, end_tmp = 0; - struct rrd_time_value start_tv, end_tv; + rrd_time_value_t start_tv, end_tv; char *parsetime_error = NULL; struct option long_options[] = { {"start", required_argument, 0, 's'}, @@ -72,8 +72,8 @@ int rrd_xport( rrd_graph_init(&im); - parsetime("end-24h", &start_tv); - parsetime("now", &end_tv); + rrd_parsetime("end-24h", &start_tv); + rrd_parsetime("now", &end_tv); while (1) { int option_index = 0; @@ -91,13 +91,13 @@ int rrd_xport( case 262: break; case 's': - if ((parsetime_error = parsetime(optarg, &start_tv))) { + if ((parsetime_error = rrd_parsetime(optarg, &start_tv))) { rrd_set_error("start time: %s", parsetime_error); return -1; } break; case 'e': - if ((parsetime_error = parsetime(optarg, &end_tv))) { + if ((parsetime_error = rrd_parsetime(optarg, &end_tv))) { rrd_set_error("end time: %s", parsetime_error); return -1; } @@ -115,7 +115,7 @@ int rrd_xport( } } - if (proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { + if (rrd_proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { return -1; } diff --git a/src/rrd_xport.h b/src/rrd_xport.h index 75bca6c..65ca5ff 100644 --- a/src/rrd_xport.h +++ b/src/rrd_xport.h @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_xport.h contains XML related constants ****************************************************************************/ diff --git a/src/rrdupdate.c b/src/rrdupdate.c index 48994a5..0115496 100644 --- a/src/rrdupdate.c +++ b/src/rrdupdate.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.3rc6 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrdupdate.c Main program for the (standalone) rrdupdate utility ***************************************************************************** - * $Id: rrdupdate.c 1380 2008-05-26 08:56:58Z oetiker $ + * $Id: rrdupdate.c 1413 2008-06-08 17:08:47Z oetiker $ *****************************************************************************/ #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) diff --git a/win32/rrd.dsp b/win32/rrd.dsp index fbc0c1d..a5cd6c3 100644 --- a/win32/rrd.dsp +++ b/win32/rrd.dsp @@ -233,7 +233,7 @@ SOURCE=..\src\hash_32.c # End Source File # Begin Source File -SOURCE=..\src\parsetime.c +SOURCE=..\src\rrd_parsetime.c # End Source File # Begin Source File diff --git a/win32/rrd.vcproj b/win32/rrd.vcproj index 30ca966..b9822a9 100644 --- a/win32/rrd.vcproj +++ b/win32/rrd.vcproj @@ -168,7 +168,7 @@ + RelativePath="rrd_parsetime.c">