From 23a63bef251017be5fd4f09db2be10575e3df59e Mon Sep 17 00:00:00 2001 From: Bernd Zeimetz Date: Tue, 24 Jan 2012 23:07:58 +0100 Subject: [PATCH] Imported Upstream version 1.4.7 --- CHANGES | 167 + COPYRIGHT | 4 +- Makefile.am | 16 +- Makefile.in | 79 +- WIN32-BUILD-TIPS.txt | 62 +- aclocal.m4 | 19 - autogen.sh | 12 +- bindings/Makefile.in | 55 +- bindings/lua/Makefile.in | 55 +- bindings/lua/rrdlua.c | 2 +- bindings/perl-piped/RRDp.pm | 2 +- bindings/perl-shared/MANIFEST | 1 - bindings/perl-shared/Makefile.PL | 90 +- bindings/perl-shared/README | 20 +- bindings/perl-shared/RRDs.pm | 2 +- bindings/perl-shared/RRDs.xs | 17 +- bindings/ruby/extconf.rb | 8 +- bindings/ruby/main.c | 11 +- bindings/tcl/Makefile.in | 55 +- configure | 13942 +++++++++-------------------- configure.ac | 152 +- doc/Makefile.in | 55 +- doc/bin_dec_hex.1 | 4 +- doc/bin_dec_hex.txt | 2 +- doc/cdeftutorial.1 | 6 +- doc/cdeftutorial.html | 2 +- doc/cdeftutorial.pod | 2 +- doc/cdeftutorial.txt | 4 +- doc/librrd.3 | 4 +- doc/librrd.txt | 2 +- doc/rpntutorial.1 | 4 +- doc/rpntutorial.txt | 2 +- doc/rrd-beginners.1 | 4 +- doc/rrd-beginners.txt | 2 +- doc/rrdbuild.1 | 33 +- doc/rrdbuild.html | 22 +- doc/rrdbuild.pod | 25 +- doc/rrdbuild.txt | 27 +- doc/rrdcached.1 | 28 +- doc/rrdcached.html | 24 +- doc/rrdcached.pod | 24 +- doc/rrdcached.txt | 28 +- doc/rrdcgi.1 | 4 +- doc/rrdcgi.txt | 2 +- doc/rrdcreate.1 | 6 +- doc/rrdcreate.html | 2 +- doc/rrdcreate.pod | 2 +- doc/rrdcreate.txt | 13 +- doc/rrddump.1 | 4 +- doc/rrddump.txt | 2 +- doc/rrdfetch.1 | 13 +- doc/rrdfetch.html | 9 +- doc/rrdfetch.pod | 9 +- doc/rrdfetch.txt | 11 +- doc/rrdfirst.1 | 4 +- doc/rrdfirst.txt | 2 +- doc/rrdflushcached.1 | 4 +- doc/rrdflushcached.txt | 2 +- doc/rrdgraph.1 | 11 +- doc/rrdgraph.html | 8 +- doc/rrdgraph.pod | 7 +- doc/rrdgraph.txt | 11 +- doc/rrdgraph_data.1 | 4 +- doc/rrdgraph_data.txt | 2 +- doc/rrdgraph_examples.1 | 4 +- doc/rrdgraph_examples.txt | 2 +- doc/rrdgraph_graph.1 | 11 +- doc/rrdgraph_graph.html | 4 + doc/rrdgraph_graph.pod | 5 + doc/rrdgraph_graph.txt | 7 +- doc/rrdgraph_rpn.1 | 12 +- doc/rrdgraph_rpn.html | 8 +- doc/rrdgraph_rpn.pod | 8 +- doc/rrdgraph_rpn.txt | 10 +- doc/rrdinfo.1 | 4 +- doc/rrdinfo.txt | 2 +- doc/rrdlast.1 | 4 +- doc/rrdlast.txt | 2 +- doc/rrdlastupdate.1 | 4 +- doc/rrdlastupdate.txt | 2 +- doc/rrdresize.1 | 4 +- doc/rrdresize.txt | 2 +- doc/rrdrestore.1 | 4 +- doc/rrdrestore.txt | 2 +- doc/rrdthreads.1 | 4 +- doc/rrdthreads.txt | 2 +- doc/rrdtool.1 | 4 +- doc/rrdtool.txt | 2 +- doc/rrdtune.1 | 4 +- doc/rrdtune.txt | 2 +- doc/rrdtutorial.1 | 23 +- doc/rrdtutorial.html | 21 +- doc/rrdtutorial.pod | 21 +- doc/rrdtutorial.txt | 18 +- doc/rrdupdate.1 | 4 +- doc/rrdupdate.txt | 2 +- doc/rrdxport.1 | 8 +- doc/rrdxport.html | 6 + doc/rrdxport.pod | 5 + doc/rrdxport.txt | 7 +- examples/Makefile.in | 55 +- examples/rrdcached/Makefile.in | 55 +- intl/Makefile.in | 587 -- libtool | 10 +- m4/acinclude.m4 | 121 +- m4/codeset.m4 | 21 - m4/glibc2.m4 | 30 - m4/glibc21.m4 | 30 - m4/intdiv0.m4 | 84 - m4/intl.m4 | 285 - m4/intmax.m4 | 33 - m4/inttypes-pri.m4 | 36 - m4/inttypes_h.m4 | 26 - m4/lcmessage.m4 | 30 - m4/lock.m4 | 316 - m4/longlong.m4 | 109 - m4/printf-posix.m4 | 44 - m4/size_max.m4 | 68 - m4/stdint_h.m4 | 26 - m4/uintmax_t.m4 | 30 - m4/visibility.m4 | 52 - m4/wchar_t.m4 | 20 - m4/wint_t.m4 | 28 - m4/xsize.m4 | 13 - po/rrdtool.pot | 89 +- rrd_config.h.in | 270 +- rrdtool.spec | 52 +- src/Makefile.am | 19 +- src/Makefile.in | 250 +- src/pngsize.c | 2 +- src/rrd.h | 13 +- src/rrd_cgi.c | 12 +- src/rrd_client.c | 122 +- src/rrd_client.h | 29 +- src/rrd_config_bottom.h | 18 +- src/rrd_create.c | 27 +- src/rrd_daemon.c | 188 +- src/rrd_diff.c | 4 +- src/rrd_dump.c | 7 +- src/rrd_error.c | 4 +- src/rrd_fetch.c | 8 +- src/rrd_fetch_libdbi.c | 27 +- src/rrd_first.c | 2 +- src/rrd_format.c | 10 +- src/rrd_format.h | 4 +- src/rrd_getopt.c | 21 +- src/rrd_getopt1.c | 10 + src/rrd_gfx.c | 14 +- src/rrd_graph.c | 97 +- src/rrd_graph.h | 6 + src/rrd_graph_helper.c | 2 +- src/rrd_hw.c | 2 +- src/rrd_hw.h | 2 +- src/rrd_i18n.h | 2 +- src/rrd_info.c | 2 +- src/rrd_is_thread_safe.h | 4 +- src/rrd_last.c | 2 +- src/rrd_lastupdate.c | 2 +- src/rrd_not_thread_safe.c | 4 +- src/rrd_open.c | 58 +- src/rrd_parsetime.c | 6 +- src/rrd_resize.c | 24 +- src/rrd_restore.c | 23 +- src/rrd_rpncalc.c | 23 +- src/rrd_rpncalc.h | 4 +- src/rrd_thread_safe.c | 4 +- src/rrd_thread_safe_nt.c | 4 +- src/rrd_tool.c | 184 +- src/rrd_tool.h | 10 +- src/rrd_tune.c | 13 +- src/rrd_update.c | 25 +- src/rrd_utils.c | 30 +- src/rrd_version.c | 2 +- src/rrd_xport.c | 14 +- src/rrd_xport.h | 2 +- src/rrdupdate.c | 6 +- win32/README | 11 + win32/config.h | 9 +- win32/rrd.dsp | 247 - win32/rrd.sln | 27 +- win32/rrd.vcproj | 648 -- win32/rrd_config.h.msvc | 66 - win32/rrdlib.vcproj | 256 +- win32/rrdtool.dsp | 92 - win32/rrdtool.dsw | 44 - win32/rrdtool.sln | 20 + win32/rrdtool.vcproj | 112 +- win32/rrdupdate.sln | 20 + win32/rrdupdate.vcproj | 292 + 189 files changed, 6761 insertions(+), 14392 deletions(-) delete mode 100644 intl/Makefile.in delete mode 100644 m4/codeset.m4 delete mode 100644 m4/glibc2.m4 delete mode 100644 m4/glibc21.m4 delete mode 100644 m4/intdiv0.m4 delete mode 100644 m4/intl.m4 delete mode 100644 m4/intmax.m4 delete mode 100644 m4/inttypes-pri.m4 delete mode 100644 m4/inttypes_h.m4 delete mode 100644 m4/lcmessage.m4 delete mode 100644 m4/lock.m4 delete mode 100644 m4/longlong.m4 delete mode 100644 m4/printf-posix.m4 delete mode 100644 m4/size_max.m4 delete mode 100644 m4/stdint_h.m4 delete mode 100644 m4/uintmax_t.m4 delete mode 100644 m4/visibility.m4 delete mode 100644 m4/wchar_t.m4 delete mode 100644 m4/wint_t.m4 delete mode 100644 m4/xsize.m4 create mode 100755 win32/README delete mode 100644 win32/rrd.dsp delete mode 100644 win32/rrd.vcproj delete mode 100644 win32/rrd_config.h.msvc delete mode 100644 win32/rrdtool.dsp delete mode 100644 win32/rrdtool.dsw create mode 100755 win32/rrdtool.sln create mode 100755 win32/rrdupdate.sln create mode 100755 win32/rrdupdate.vcproj diff --git a/CHANGES b/CHANGES index e2a8674..cca8bf5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,170 @@ +RRDtool 1.4.7 - 2012-01-24 +========================== +Bugfixes: + +* test for tm.tm_gmtoff presence in configure.ac fix for #330 (libdbi + compiles on solaris should now work too) + +* check in /usr/lib64 for tclConfig.sh too + +* fix shared library version number (regression from 1.4.6) + +* be clearer as to what VDEF LAST/FIRST do. + +* remove perl 5.004 compatibility hack and make RRDs compile with newer + perls. + +New Functionality: + +* added a nop control for string formating, so that strings ending in /x are + possible by entering \x\. fix for #331 + +* added support for rrdgraph to use the yotta, zetta, zepto, yocto prefixes. + Fix for #333 (thanks Christoph) + +RRDtool 1.4.6 - 2012-01-16 +========================== +Enhancements: + * Added --json option to xport with inspiration from Erik Kastner and + Michael Markstaller -- Tobi + + * updated win32 port -- Larry Adams and the cacti team + + * configure option to disable building rrd_graph: --disable-rrd_graph + With support from Ulf Zimmermann (OpenLane) + +Bugfixes: + * fixed segfault in rrdtool (xport, fetch, graph) when handling + error conditions. -- James Brown + * improve compilation robustness in finding pic flags + * fix warnings in ruby bindings + * fix horizontal alignment of AREAS and LINES in graph output + * improved grid-fitting in graph output + * simplified configure tests for libwrap and libdbi + * rpn compare operators CAN return unknown ... (#293) + * do not require gettext 0.18 (0.17 is sufficient) + * improved rpm spec file -- Bernard Li + * fix glib dependency for --disable-rrd_graph and update library versions + (#323) + * fix uninitialized variable in rrd_graph (#322) + * fix issues with logarithmic charts (#296) -- Christoph Biedl + * improved data reduction algorithm in graph: after fetching, data must be + reduced to at least chart resolution, else some data will not get plotted. + fix for #298 + * properly handle the case where RRDCACHED_ADDRESS is an empty string + * the number of COMPUTE rpn nodes is architecture dependent. calculate the + right number and complain otherwise. Fix for #300. + * make rrd_mkdir_p work on bsd* Unixes too ... their dirname call works + differently ... #305 + * allow to restore XML files with zero row rras ... this is a degenerated + case that does not occur in the wild, as rrdtool prevents the creation + of such rrd files. But rrdtool restore 1.3 did allows to create them via + restore. Now this is possible again. #310. + * the first TREND* value can be calculated earlier ... -- fredrick (#312) + * actually link with LIBINTL if we got it ... should make solaris happy + * dbi_result_get_datetime_idx() return timestamp in UTC, but time axis on + graph supposed to be in local time. #321 + * fix ruby binding for rrd_xport #318 + * free step_list on error. fix for #317 + * fix buffer overflow for LONG lines in journal handling code for update + requests. #316 + * fix alignment of centered items ... title and footer + * fix for the header size problem and its effects on rrd_resize + * refuse to build if troff and nroff are not around #302 + * plug memory leak in lua bindings #301 + * improve cross compiling -- Michael Olbrich + * fix rrd_create behaviour when mmapping on a full filesystem by actually + 'filling' the file with zero. -- Francois-Xavier Bourlet + * with libwrap use 'rrdcached' as the name of our daemon and not just + rrdcache + * bring spacing around graph back in line with 1.2 goodness ... in + connection with no-legend and no title + * do not mistake "sqlxxabc.rrd" for a libdbi specification -- Peter Stamfest + * if rrd_cgi fails to parse stuff, do NOT try to fix up the mess ... it is bound to fail + * update timestamp continuity checks in rrd_cached ... allow sub-second + precision + * fix double free in rrd_resize + * do not close the file handle to the resize file of there was a problem + getting it in the first place. + + + +RRDtool 1.4.5 - 2010-12-26 +========================== +Bugfixes: + * rrdcached: print \n at the end of log messages when running rrdcached in the + foreground -- Bernard Li + * rrdcached: Let the -s, -m and -P options affect the default socket as + well -- Sebastian Harl + * rrdgraph: font related memory leaks fixed #208 -- tobi + * rrdgraph-libdbi: print error message instead of dumping core on sql + problem -- Pavel Nikiforov + * rrdgraph-libdbi: properly allocated response buffer -- Pavel Nikiforov + * rrdtool: in remote mode, make argument count for remote commands strict + -- Dave Peticolas + * rrdgraph: fix problems with second %s in right-axis format -- tobi + * compilation: works on MSVC2008 now -- jkane mail.com + * everywhere: fix locale handling. locales were not properly reset after + calling set locale -- tobi + * rrd_cgi: windows compilation fix -- jkane mail.com + * rrdgraph: fix use of %s in strftime (G)PRINT commands #277 -- tobi + * ruby: fix bindings to be compatible with current ruby implementations #279 + * rrdcached: Ensure that response_read() always calls fflush() or fclose() #278 + -- kevin brintnall + * rrd_client: free addrinfo list after use ... -- Christian Magnusson + * rrdupdate: follow the normal code path for exiting rrd_update if there is a problem + with rrdc, plugging a memory leak on the way -- Christian Magnusson + * rrdgraph: make sure we do not try to draw points all that far outside the + drawing area since some versions of cairo seem to go unstable when this + happens. -- Peter Stamfest + * rrdgraph: fix an endles loop near 2^31 timestamp (32bit platform problem) + -- Peter Stamfest + * compilation: AIX does not like MAP_PRIVATE and -lW in LDFLAGS #216 -- tobi + * compliation: add extra space in LDFLAGS #284 -- dam at opencsw + * rrdcached: Fix permissions of the default socket -- Florian Forster + * rrdgraph-libdbi: Fix sigma calculation -- Hans Jørgen Jakobsen + * rrdcreate: better checks for RRA arguments + * configure: make configure recognize tcl-site argument (#281) + * rrdgraph: if there is no right label, do not reserve any space for it --tobi + +Enhancements: + * rrdcached: add hosts_access support added -- Shaun Reitan + * rrdfetch/graph: introduce "epoch" as a new base time reference, meaning + timestamp 0: you can now write epoch+11111111s or epoch+19711205s + -- Peter Stamfest + + +RRDtool 1.4.4 - 2010-07-05 +========================== +Bugfixes: + + * compile: multiple fixes isnan and isinf defines to make rrdtool compile + with gcc on solaris (with --disable-nls) -- Tobi + * handle gettext/libintl like any other feature, do not try to supply + our own ... rrdtool can work fine without it -- tobi + * rrd_client: fix potential segfaults -- Florian Forster + * rrd_client: resolve synmlinks properly -- Kevin Brintnall + * compile: fix libtool and libtoolize names for OSX compiles -- Antoine Musso + * compile: fix for HAVE_BROKEN_MS_ASYNC (old linux kernels) + * rrd_xport: fix --daemon handling + * rrd_client: explicitly close connection on error -- Thorsten von Eicken + * rrd_update: fix memory leak for COMPUTE datasources -- Frederik Kriewitz + * rrd_daemon: fix segfault when specifying a relative path (-j option) -- Adrian-Ioan Vasile + * compile: make rrdtool compile with gcc 4.5 -- anicka@suse.cz + * portability: use %lld (long long int) for time_t *printf + * compile: link pangocairo and not pango since we do use pangocairo actually -- Stephen S. Disbrow + * compile: re-integrate intl into compile dependency so that hosts with + old (or no) gettext can get access to the included copy. + * rrd_cached: exit with status !=0 on invalid cli -- Sebastian Harl + +Enhancements: + + * updated build files and instructions for win32 port by Chris Larsen + * legal: Relicense the RRDCacheD client interface under the MIT license -- Florian Forster + * legal: Updted FLOSS Exception for latest PHP license + * rrd_cached: better help output -- Sebastian Harl + +------------------------------------------------------------------------ RRDtool 1.4.3 - 2010-03-22 ========================== New Features diff --git a/COPYRIGHT b/COPYRIGHT index 93cb62b..1e4fb76 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,4 +1,4 @@ -$Id: COPYRIGHT 1843 2009-06-07 11:34:39Z oetiker $ +$Id: COPYRIGHT 2080 2010-05-11 14:55:18Z oetiker $ RRDTOOL - Round Robin Database Tool A tool for fast logging of numerical data graphical display of this data. @@ -81,7 +81,7 @@ MIT License (As listed in file MIT-License.txt) - Mozilla Public License (MPL) 1.0/1.1 Open Software License 2.0 OpenSSL license (with original SSLeay license) "2003" ("1998") -PHP License 3.0 +PHP License 3.01 Python license (CNRI Python License) - Python Software Foundation License 2.1.1 Sleepycat License "1999" diff --git a/Makefile.am b/Makefile.am index 5f361ed..2003373 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# $Id: Makefile.am 2039 2010-03-22 15:05:43Z oetiker $ +# $Id: Makefile.am 2239 2011-12-16 07:48:48Z oetiker $ ## Process this file with automake to produce Makefile.in RSYNC = rsync --rsh=ssh @@ -9,13 +9,13 @@ SUBDIRS = po src examples doc bindings # the following files are not mentioned in any other Makefile EXTRA_DIST = COPYRIGHT CHANGES WIN32-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \ - rrdtool.spec favicon.ico win32/Makefile win32/config.h autogen.sh \ - win32/rrd.dsp win32/rrd.sln win32/rrd.vcproj libtool \ - win32/rrd_config.h.msvc win32/rrdlib.vcproj win32/rrdtool.dsp \ - win32/rrdtool.dsw win32/rrdtool.vcproj netware/Makefile \ - etc/rrdcached-default etc/rrdcached-init - - + rrdtool.spec favicon.ico autogen.sh \ + libtool \ + netware/Makefile \ + etc/rrdcached-default etc/rrdcached-init \ + win32/Makefile win32/config.h win32/rrdlib.vcproj win32/rrdtool.vcproj win32/rrdupdate.vcproj \ + win32/README win32/rrd.sln win32/rrdtool.sln win32/rrdupdate.sln + CLEANFILES = config.cache diff --git a/Makefile.in b/Makefile.in index d47ce76..2248126 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ -# $Id: Makefile.am 2039 2010-03-22 15:05:43Z oetiker $ +# $Id: Makefile.am 2239 2011-12-16 07:48:48Z oetiker $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -39,34 +39,25 @@ target_triplet = @target@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/rrd_config.h.in \ - $(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \ - ABOUT-NLS COPYING NEWS TODO compile config.guess config.rpath \ - config.sub depcomp install-sh ltmain.sh missing + $(top_srcdir)/configure ABOUT-NLS COPYING NEWS TODO compile \ + config.guess config.rpath config.sub depcomp install-sh \ + ltmain.sh missing am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \ - $(top_srcdir)/m4/intl.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = rrd_config.h -CONFIG_CLEAN_FILES = intl/Makefile +CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) @@ -128,7 +119,6 @@ GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ ALL_LIBS = @ALL_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -137,12 +127,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ COMP_LUA = @COMP_LUA@ COMP_PERL = @COMP_PERL@ COMP_PYTHON = @COMP_PYTHON@ @@ -151,7 +138,6 @@ CORE_LIBS = @CORE_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -162,50 +148,30 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GENCAT = @GENCAT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC2 = @GLIBC2@ -GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ -HAVE_ASPRINTF = @HAVE_ASPRINTF@ -HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ -HAVE_SNPRINTF = @HAVE_SNPRINTF@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ -HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBVERS = @LIBVERS@ LIPO = @LIPO@ LN_S = @LN_S@ -LTLIBC = @LTLIBC@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ LUA = @LUA@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DEFINES = @LUA_DEFINES@ @@ -248,7 +214,6 @@ PKGCONFIG = @PKGCONFIG@ POD2HTML = @POD2HTML@ POD2MAN = @POD2MAN@ POSUB = @POSUB@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ @@ -280,13 +245,9 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_VERSION = @TCL_VERSION@ TROFF = @TROFF@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WERROR = @WERROR@ -WINDRES = @WINDRES@ -WOE32 = @WOE32@ -WOE32DLL = @WOE32DLL@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ @@ -356,11 +317,12 @@ RSYNC = rsync --rsh=ssh # build the following subdirectories SUBDIRS = po src examples doc bindings EXTRA_DIST = COPYRIGHT CHANGES WIN32-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \ - rrdtool.spec favicon.ico win32/Makefile win32/config.h autogen.sh \ - win32/rrd.dsp win32/rrd.sln win32/rrd.vcproj libtool \ - win32/rrd_config.h.msvc win32/rrdlib.vcproj win32/rrdtool.dsp \ - win32/rrdtool.dsw win32/rrdtool.vcproj netware/Makefile \ - etc/rrdcached-default etc/rrdcached-init + rrdtool.spec favicon.ico autogen.sh \ + libtool \ + netware/Makefile \ + etc/rrdcached-default etc/rrdcached-init \ + win32/Makefile win32/config.h win32/rrdlib.vcproj win32/rrdtool.vcproj win32/rrdupdate.vcproj \ + win32/README win32/rrd.sln win32/rrdtool.sln win32/rrdupdate.sln CLEANFILES = config.cache @@ -425,8 +387,6 @@ $(srcdir)/rrd_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) distclean-hdr: -rm -f rrd_config.h stamp-h1 -intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in - cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -701,7 +661,6 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - --with-included-gettext \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ diff --git a/WIN32-BUILD-TIPS.txt b/WIN32-BUILD-TIPS.txt index b3fae96..c80acc8 100644 --- a/WIN32-BUILD-TIPS.txt +++ b/WIN32-BUILD-TIPS.txt @@ -1,52 +1,42 @@ Compiling RRDtool on Win32 with Microsoft Visual C++: --------------------------------------------------------------- +2010-06-04 Chris Larsen clarsen@euphoriaaudio.com 2008-03-12 Stefan Ludewig stefan.ludewig@exitgames.com Here are step by step instructions for building rrdlib.lib and rrdtool.exe version 1.3.5 and newer with Microsoft Visual Studio 2008 (9.0.x). -(1) Download and extract libraries rrdtool depends on: +(1) Create a folder named "contrib" in the directory where this text file is located. - - cairo: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.0-1_win32.zip - and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.8.0-1_win32.zip +(2) Download the following libraries that rrdtool depends on into this folder: - - glib: http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.18/glib_2.18.3-1_win32.zip - and http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.18/glib-dev_2.18.3-1_win32.zip + - cairo: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.10-3_win32.zip + and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo-dev_1.8.10-3_win32.zip - - libpng: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.2.32-1_win32.zip - and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng-dev_1.2.32-1_win32.zip + - glib: http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.24/glib_2.24.1-1_win32.zip + and http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.24/glib-dev_2.24.1-1_win32.zip - - libxml2: http://downloads.sourceforge.net/gnuwin32/libxml2-2.4.12-bin.zip?modtime=1009062000&big_mirror=1 - and http://downloads.sourceforge.net/gnuwin32/libxml2-2.4.12-1-lib.zip?modtime=1024783200&big_mirror=1 + - libpng: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.0-1_win32.zip + and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng-dev_1.4.0-1_win32.zip - - pango: http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango_1.22.2-1_win32.zip - and http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.22/pango-dev_1.22.2-1_win32.zip + - libxml2: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2_2.7.7-1_win32.zip + and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libxml2-dev_2.7.7-1_win32.zip - - zlib: http://www.zlib.net/zlib123-dll.zip + - pango: http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.28/pango_1.28.0-1_win32.zip + and http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.28/pango-dev_1.28.0-1_win32.zip -(2) Create a folder named "contrib" next to your rrdtool-folder. + - zlib: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib_1.2.4-2_win32.zip + and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-dev_1.2.4-2_win32.zip + + - fontconfig: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip + + - freetype: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.3.12-1_win32.zip + + - expat: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip -(3) Copy the following folders and files from the downloaded archieves into - the contrib-folder, you just created: - - a) The folder "bin" from cairo_1.8.0-1_win32 and the folders "lib" and - "include" from cairo-dev_1.8.0-1_win32 into contrib/cairo. - - b) The folder "bin" from glib_2.18.3-1_win32 and the folders "lib" and - "include" from glib-dev_2.18.3-1_win32 into contrib/glib - - c) The folder "bin" from libpng_1.2.32-1_win32 and the folders "lib" and - "include" from libpng-dev_1.2.32-1_win32 into contrib/libpng - - d) The file "libxml2.dll" from libxml2-2.4.12-bin/bin and the file - "libxml2.lib" from libxml2-2.4.12-1-lib\lib into contrib/libxml2/lib and - the folder "include" from from libxml2-2.4.12-1-lib into contrib/libxml2 - - e) The folder "bin" from pango_1.22.2-1_win32 and the folders "lib" and - "include" from pango-dev_1.22.2-1_win32 into contrib/pango - - f) The folders "lib" and "include" and the file "zlib1.dll" into - contrib/zlib +(3) Extract all of the .zip files into the contrib folder. Do not extract each library into it's own + directory. We want all of the files merged into a structure consisting of "bin, include, lib..." + etc folders. (4) Open the Visual Studio 2008 Solution "rrd.sln" in the win32 folder of your rrdtool-folder and build either the project rrdlib (for the @@ -56,6 +46,10 @@ version 1.3.5 and newer with Microsoft Visual Studio 2008 (9.0.x). executable. These DLLs must be available on all hosts where rrdtool will run. +6/10/10 Chris +Updated project to include latest files and libraries. +Builds static or dynamic rrdlib + 5/1/05 Tobi to help windows deal with the reentrant versions of many unix calls link with win32comp.c diff --git a/aclocal.m4 b/aclocal.m4 index 3629324..b8161ed 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1258,36 +1258,17 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/acinclude.m4]) -m4_include([m4/codeset.m4]) m4_include([m4/gettext.m4]) -m4_include([m4/glibc2.m4]) -m4_include([m4/glibc21.m4]) m4_include([m4/iconv.m4]) -m4_include([m4/intdiv0.m4]) -m4_include([m4/intl.m4]) m4_include([m4/intlmacosx.m4]) -m4_include([m4/intmax.m4]) -m4_include([m4/inttypes-pri.m4]) -m4_include([m4/inttypes_h.m4]) -m4_include([m4/lcmessage.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/libtool.m4]) -m4_include([m4/lock.m4]) -m4_include([m4/longlong.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) -m4_include([m4/printf-posix.m4]) m4_include([m4/progtest.m4]) -m4_include([m4/size_max.m4]) -m4_include([m4/stdint_h.m4]) -m4_include([m4/uintmax_t.m4]) -m4_include([m4/visibility.m4]) -m4_include([m4/wchar_t.m4]) -m4_include([m4/wint_t.m4]) -m4_include([m4/xsize.m4]) diff --git a/autogen.sh b/autogen.sh index a7226cc..e9b7eff 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,3 +1,11 @@ -#!/bin/sh -libtoolize +#!/bin/bash + +# On MAC OS X, GNU libtoolize is named 'glibtoolize': +if [ `(uname -s) 2>/dev/null` == 'Darwin' ] +then + glibtoolize +else + libtoolize +fi + autoreconf --force --install --verbose -I m4 diff --git a/bindings/Makefile.in b/bindings/Makefile.in index f19555f..1c8548e 100644 --- a/bindings/Makefile.in +++ b/bindings/Makefile.in @@ -38,23 +38,14 @@ subdir = bindings DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \ - $(top_srcdir)/m4/intl.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -111,7 +102,6 @@ am__relativize = \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ ALL_LIBS = @ALL_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -120,12 +110,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ COMP_LUA = @COMP_LUA@ COMP_PERL = @COMP_PERL@ COMP_PYTHON = @COMP_PYTHON@ @@ -134,7 +121,6 @@ CORE_LIBS = @CORE_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -145,50 +131,30 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GENCAT = @GENCAT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC2 = @GLIBC2@ -GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ -HAVE_ASPRINTF = @HAVE_ASPRINTF@ -HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ -HAVE_SNPRINTF = @HAVE_SNPRINTF@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ -HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBVERS = @LIBVERS@ LIPO = @LIPO@ LN_S = @LN_S@ -LTLIBC = @LTLIBC@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ LUA = @LUA@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DEFINES = @LUA_DEFINES@ @@ -231,7 +197,6 @@ PKGCONFIG = @PKGCONFIG@ POD2HTML = @POD2HTML@ POD2MAN = @POD2MAN@ POSUB = @POSUB@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ @@ -263,13 +228,9 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_VERSION = @TCL_VERSION@ TROFF = @TROFF@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WERROR = @WERROR@ -WINDRES = @WINDRES@ -WOE32 = @WOE32@ -WOE32DLL = @WOE32DLL@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ diff --git a/bindings/lua/Makefile.in b/bindings/lua/Makefile.in index 223fd14..5ed9c3b 100644 --- a/bindings/lua/Makefile.in +++ b/bindings/lua/Makefile.in @@ -40,23 +40,14 @@ subdir = bindings/lua DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \ - $(top_srcdir)/m4/intl.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -132,7 +123,6 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ ALL_LIBS = @ALL_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -141,12 +131,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ COMP_LUA = @COMP_LUA@ COMP_PERL = @COMP_PERL@ COMP_PYTHON = @COMP_PYTHON@ @@ -155,7 +142,6 @@ CORE_LIBS = @CORE_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -166,50 +152,30 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GENCAT = @GENCAT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC2 = @GLIBC2@ -GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ -HAVE_ASPRINTF = @HAVE_ASPRINTF@ -HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ -HAVE_SNPRINTF = @HAVE_SNPRINTF@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ -HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBVERS = @LIBVERS@ LIPO = @LIPO@ LN_S = @LN_S@ -LTLIBC = @LTLIBC@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ LUA = @LUA@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DEFINES = @LUA_DEFINES@ @@ -252,7 +218,6 @@ PKGCONFIG = @PKGCONFIG@ POD2HTML = @POD2HTML@ POD2MAN = @POD2MAN@ POSUB = @POSUB@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ @@ -284,13 +249,9 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_VERSION = @TCL_VERSION@ TROFF = @TROFF@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WERROR = @WERROR@ -WINDRES = @WINDRES@ -WOE32 = @WOE32@ -WOE32DLL = @WOE32DLL@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ diff --git a/bindings/lua/rrdlua.c b/bindings/lua/rrdlua.c index a733184..690ba29 100644 --- a/bindings/lua/rrdlua.c +++ b/bindings/lua/rrdlua.c @@ -66,7 +66,7 @@ static char **make_argv(const char *cmd, lua_State * L) for (i=1; i 'RRDs', + 'VERSION_FROM' => 'RRDs.pm', + 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL} -D_CRT_SECURE_NO_WARNINGS -DWIN32", + 'INC' => '-I../../src/ "-IC:/Perl/lib/CORE" -I"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include" -I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include"', + 'LDDLFLAGS' => '-dll -nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86', + 'LDFLAGS' => '-nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86', + 'OPTIMIZE' => '-O2 -MD', + 'LIBS' => '"..\..\win32\Release\rrdlib.lib" "..\..\win32\Release" "C:\Perl\lib\CORE\perl514.lib" -L../../contrib/lib -L"C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib" -L"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib" -L"C:\Perl\lib\CORE"', + 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, + ($] ge '5.005') ? ( + 'AUTHOR' => 'Tobias Oetiker (tobi@oetiker.ch)', + 'ABSTRACT' => 'Round Robin Database Tool', + ) : () + ); +}else{ + # if the last argument when calling Makefile.PL is RPATH=/... and ... is the + # path to librrd.so then the Makefile will be written such that RRDs.so knows + # where to find librrd.so later on ... + my $R=""; + if ($ARGV[-1] =~ /RPATH=(\S+)/){ + pop @ARGV; + my $rp = $1; + for ($^O){ + /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; + /hpux/ && do{ $R = "+b$rp"}; + /solaris/ && do{ $R = "-R$rp"}; + /bsd/ && do{ $R = "-R$rp"}; + /aix/ && do{ $R = "-blibpath:$rp"}; + } } -} - -# darwin works without this because librrd contains its -# install_name which will includes the final location of the -# library after it is installed. This install_name gets transfered -# to the perl shared object. -my $librrd; -if ($^O eq 'darwin'){ + # darwin works without this because librrd contains its + # install_name which will includes the final location of the + # library after it is installed. This install_name gets transfered + # to the perl shared object. + my $librrd; + if ($^O eq 'darwin'){ $librrd = '-lrrd'; -} -else { - $librrd = "-L../../src/.libs/ $R -lrrd"; -} + } else { + $librrd = "-L../../src/.libs/ $R -lrrd"; + } -WriteMakefile( - 'NAME' => 'RRDs', - 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION - 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}", - 'INC' => '-I../../src', - # Perl will figure out which one is valid - #'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"}, - 'depend' => {'RRDs.c' => "../../src/librrd.la"}, - 'LDFROM' => '$(OBJECT) '.$librrd, - 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, - ($^O eq 'darwin') ? ( 'LDDLFLAGS' => "-L../../src/.libs/ $Config{lddlflags}" ) : () -); + WriteMakefile( + 'NAME' => 'RRDs', + 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION + 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}", + 'INC' => '-I../../src', + # Perl will figure out which one is valid + #'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"}, + 'depend' => {'RRDs.c' => "../../src/librrd.la"}, + 'LDFROM' => '$(OBJECT) '.$librrd, + 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, + ($^O eq 'darwin') ? ( 'LDDLFLAGS' => "-L../../src/.libs/ $Config{lddlflags}" ) : () + ); +} diff --git a/bindings/perl-shared/README b/bindings/perl-shared/README index 0918ecf..c5d7fbf 100644 --- a/bindings/perl-shared/README +++ b/bindings/perl-shared/README @@ -4,9 +4,21 @@ the following: perl Makefile.PL make test -(win32 users try perl ntmake.pl) +For Windows Users, make sure you have the following requirements: -* if dynamic linking does not work, try +- ActiveState Perl (32bit version Only) +- Microsoft Visual C++ +- The following binaries in your path: mt.exe, nmake.exe, link.exe, perl.exe +- Make the project rrdlib.vcproj in Release mode to create rrdlib.lib -perl Makefile.PL LINKTYPE=static -make test +To build: + +perl Makefile.PL +nmake + +To Install: + +nmake install + +NOTE: If using anything other than Visual C++ 9, edit Makefile.PL and modify + your paths appropriately. diff --git a/bindings/perl-shared/RRDs.pm b/bindings/perl-shared/RRDs.pm index 3da8ffd..761e26b 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.4003; +$VERSION=1.4007; bootstrap RRDs $VERSION; diff --git a/bindings/perl-shared/RRDs.xs b/bindings/perl-shared/RRDs.xs index 029b3be..252018f 100644 --- a/bindings/perl-shared/RRDs.xs +++ b/bindings/perl-shared/RRDs.xs @@ -24,18 +24,14 @@ extern "C" { */ #define VERSION_SAVED VERSION #undef VERSION +#ifndef WIN32 #include "../../rrd_config.h" +#endif #include "../../src/rrd_tool.h" #undef VERSION #define VERSION VERSION_SAVED #undef VERSION_SAVED -/* perl 5.004 compatibility */ -#if PERLPATCHLEVEL < 5 -#define PL_sv_undef sv_undef -#endif - - #define rrdcode(name) \ argv = (char **) malloc((items+1)*sizeof(char *));\ argv[0] = "dummy";\ @@ -126,7 +122,6 @@ BOOT: #ifdef MUST_DISABLE_FPMASK fpsetmask(0); #endif - SV* rrd_error() @@ -136,7 +131,6 @@ rrd_error() OUTPUT: RETVAL - int rrd_last(...) PROTOTYPE: @ @@ -159,7 +153,6 @@ rrd_first(...) OUTPUT: RETVAL - int rrd_create(...) PROTOTYPE: @ @@ -172,7 +165,6 @@ rrd_create(...) OUTPUT: RETVAL - int rrd_update(...) PROTOTYPE: @ @@ -185,7 +177,6 @@ rrd_update(...) OUTPUT: RETVAL - int rrd_tune(...) PROTOTYPE: @ @@ -198,7 +189,6 @@ rrd_tune(...) OUTPUT: RETVAL - SV * rrd_graph(...) PROTOTYPE: @ @@ -444,6 +434,7 @@ rrd_restore(...) OUTPUT: RETVAL +#ifndef WIN32 int rrd_flushcached(...) PROTOTYPE: @ @@ -454,3 +445,5 @@ rrd_flushcached(...) rrdcode(rrd_flushcached); OUTPUT: RETVAL + +#endif diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb index 2045e5a..164a525 100644 --- a/bindings/ruby/extconf.rb +++ b/bindings/ruby/extconf.rb @@ -4,13 +4,13 @@ require 'mkmf' if /linux/ =~ RUBY_PLATFORM - $LDFLAGS += '-Wl,--rpath -Wl,$(EPREFIX)/lib' + $LDFLAGS += ' -Wl,--rpath -Wl,$(EPREFIX)/lib' elsif /solaris/ =~ RUBY_PLATFORM - $LDFLAGS += '-R$(EPREFIX)/lib' + $LDFLAGS += ' -R$(EPREFIX)/lib' elsif /hpux/ =~ RUBY_PLATFORM - $LDFLAGS += '+b$(EPREFIX)/lib' + $LDFLAGS += ' +b$(EPREFIX)/lib' elsif /aix/ =~ RUBY_PLATFORM - $LDFLAGS += '-Wl,-blibpath:$(EPREFIX)/lib' + $LDFLAGS += ' -blibpath:$(EPREFIX)/lib' end dir_config("rrd","../../src","../../src/.libs") diff --git a/bindings/ruby/main.c b/bindings/ruby/main.c index af42069..da5cf28 100644 --- a/bindings/ruby/main.c +++ b/bindings/ruby/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c 2022 2010-02-16 13:04:18Z oetiker $ +/* $Id: main.c 2246 2011-12-18 11:54:57Z oetiker $ * Substantial penalty for early withdrawal. */ @@ -48,16 +48,16 @@ string_arr string_arr_new( switch (TYPE(v)) { case T_STRING: - a.strings[i + 1] = strdup(STR2CSTR(v)); + a.strings[i + 1] = strdup(StringValuePtr(v)); break; case T_FIXNUM: - snprintf(buf, 63, "%d", FIX2INT(v)); + snprintf(buf, 63, "%ld", (long)FIX2INT(v)); a.strings[i + 1] = strdup(buf); break; default: rb_raise(rb_eTypeError, - "invalid argument - %s, expected T_STRING or T_FIXNUM on index %d", - rb_class2name(CLASS_OF(v)), i); + "invalid argument - %s, expected T_STRING or T_FIXNUM on index %ld", + (long)rb_class2name(CLASS_OF(v)), i); break; } } @@ -333,6 +333,7 @@ VALUE rb_rrd_xport( time_t start, end; a = string_arr_new(args); + reset_rrd_state(); rrd_xport(a.len, a.strings, &xxsize, &start, &end, &step, &col_cnt, &legend_v, &data); string_arr_delete(a); diff --git a/bindings/tcl/Makefile.in b/bindings/tcl/Makefile.in index 55fb982..0a36517 100644 --- a/bindings/tcl/Makefile.in +++ b/bindings/tcl/Makefile.in @@ -42,23 +42,14 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/ifOctets.tcl.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \ - $(top_srcdir)/m4/intl.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -102,7 +93,6 @@ DIST_SOURCES = DATA = $(pkglib_DATA) $(tclpkg_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ ALL_LIBS = @ALL_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -111,12 +101,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ COMP_LUA = @COMP_LUA@ COMP_PERL = @COMP_PERL@ COMP_PYTHON = @COMP_PYTHON@ @@ -125,7 +112,6 @@ CORE_LIBS = @CORE_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -136,50 +122,30 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GENCAT = @GENCAT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC2 = @GLIBC2@ -GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ -HAVE_ASPRINTF = @HAVE_ASPRINTF@ -HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ -HAVE_SNPRINTF = @HAVE_SNPRINTF@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ -HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBVERS = @LIBVERS@ LIPO = @LIPO@ LN_S = @LN_S@ -LTLIBC = @LTLIBC@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ LUA = @LUA@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DEFINES = @LUA_DEFINES@ @@ -222,7 +188,6 @@ PKGCONFIG = @PKGCONFIG@ POD2HTML = @POD2HTML@ POD2MAN = @POD2MAN@ POSUB = @POSUB@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ @@ -255,13 +220,9 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_VERSION = @TCL_VERSION@ TROFF = @TROFF@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WERROR = @WERROR@ -WINDRES = @WINDRES@ -WOE32 = @WOE32@ -WOE32DLL = @WOE32DLL@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ diff --git a/configure b/configure index 0ccfa4d..8d8b21d 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.63 for rrdtool 1.4.3. +# Generated by GNU Autoconf 2.63 for rrdtool 1.4.7. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='rrdtool' PACKAGE_TARNAME='rrdtool' -PACKAGE_VERSION='1.4.3' -PACKAGE_STRING='rrdtool 1.4.3' +PACKAGE_VERSION='1.4.7' +PACKAGE_STRING='rrdtool 1.4.7' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. @@ -851,8 +851,10 @@ PERL ALL_LIBS CORE_LIBS PKGCONFIG -BUILD_RRDCGI_FALSE -BUILD_RRDCGI_TRUE +BUILD_RRDGRAPH_FALSE +BUILD_RRDGRAPH_TRUE +BUILD_LIBWRAP_FALSE +BUILD_LIBWRAP_TRUE BUILD_LIBDBI_FALSE BUILD_LIBDBI_TRUE BUILD_MULTITHREAD_FALSE @@ -870,39 +872,9 @@ POSUB LTLIBINTL LIBINTL INTLLIBS -INTL_LIBTOOL_SUFFIX_PREFIX -INTLOBJS -GENCAT -INSTOBJEXT -DATADIRNAME -CATOBJEXT -USE_INCLUDED_LIBINTL -BUILD_INCLUDED_LIBINTL -LTLIBC -WINDRES -WOE32 -WOE32DLL -HAVE_WPRINTF -HAVE_SNPRINTF -HAVE_ASPRINTF -HAVE_POSIX_PRINTF -INTL_MACOSX_LIBS -GLIBC21 -INTLBISON LTLIBICONV LIBICONV -LTLIBMULTITHREAD -LIBMULTITHREAD -LTLIBTHREAD -LIBTHREAD -LIBPTH_PREFIX -LTLIBPTH -LIBPTH -PRI_MACROS_BROKEN -ALLOCA -HAVE_VISIBILITY -CFLAG_VISIBILITY -GLIBC2 +INTL_MACOSX_LIBS XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 @@ -934,6 +906,8 @@ SED LIBTOOL STATIC_PROGRAMS_FALSE STATIC_PROGRAMS_TRUE +BUILD_RRDCGI_FALSE +BUILD_RRDCGI_TRUE RRDGRAPH_YLEGEND_ANGLE AM_BACKSLASH AM_DEFAULT_VERBOSITY @@ -1041,6 +1015,7 @@ enable_dependency_tracking enable_maintainer_mode enable_silent_rules enable_rrdcgi +enable_rrd_graph with_rrd_default_font enable_mmap enable_pthread @@ -1052,13 +1027,11 @@ enable_fast_install with_gnu_ld enable_libtool_lock enable_nls -enable_threads enable_rpath -with_libpth_prefix with_libiconv_prefix -with_included_gettext with_libintl_prefix enable_libdbi +enable_libwrap enable_perl enable_perl_site_install with_perl_options @@ -1069,6 +1042,7 @@ enable_lua enable_lua_site_install enable_tcl with_tcllib +enable_tcl_site enable_python ' ac_precious_vars='build_alias @@ -1085,6 +1059,8 @@ PERLCC PERLCCFLAGS PERLLD PERLLDFLAGS +NROFF +TROFF RRDDOCDIR' @@ -1638,7 +1614,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.4.3 to adapt to many kinds of systems. +\`configure' configures rrdtool 1.4.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1709,7 +1685,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rrdtool 1.4.3:";; + short | recursive ) echo "Configuration of rrdtool 1.4.7:";; esac cat <<\_ACEOF @@ -1724,6 +1700,7 @@ Optional Features: --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --disable-rrdcgi disable building of rrdcgi + --disable-rrd_graph disable all rrd_graph functions --disable-mmap disable mmap in rrd_update, use seek+write instead --disable-pthread disable multithread support --enable-static-programs @@ -1734,11 +1711,9 @@ Optional Features: optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-nls do not use Native Language Support - --enable-threads={posix|solaris|pth|win32} - specify multithreading API - --disable-threads build without multithread safety --disable-rpath do not hardcode runtime library paths --disable-libdbi do not build in support for libdbi + --disable-libwrap do not build in support for libwrap (tcp wrapper) --disable-perl do not build the perl modules --enable-perl-site-install by default the rrdtool perl modules are installed @@ -1777,11 +1752,8 @@ Optional Packages: both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-gnu-ld assume the C compiler uses GNU ld default=no - --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib - --without-libpth-prefix don't search for libpth in includedir and libdir --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir - --with-included-gettext use the GNU gettext library included here --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --with-perl-options=OPTIONS options to pass on command-line when @@ -1809,6 +1781,8 @@ Some influential environment variables: PERLCCFLAGS CC flags for Perl modules PERLLD Linker for Perl modules PERLLDFLAGS LD flags for Perl modules + NROFF path to the local nroff version + TROFF path to the local troff version RRDDOCDIR [DATADIR/doc/PACKAGE-VERSION] Documentation directory Use these variables to override the choices made by `configure' or to help @@ -1876,7 +1850,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rrdtool configure 1.4.3 +rrdtool configure 1.4.7 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1890,7 +1864,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by rrdtool $as_me 1.4.3, which was +It was created by rrdtool $as_me 1.4.7, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2260,10 +2234,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -NUMVERS=1.4003 +NUMVERS=1.4007 -LIBVERS=5:3:1 +LIBVERS=6:0:2 ac_aux_dir= @@ -4720,7 +4694,7 @@ fi # Define the identity of the package. PACKAGE='rrdtool' - VERSION='1.4.3' + VERSION='1.4.7' cat >>confdefs.h <<_ACEOF @@ -4959,6 +4933,31 @@ else fi + if test $enable_rrdcgi != no; then + BUILD_RRDCGI_TRUE= + BUILD_RRDCGI_FALSE='#' +else + BUILD_RRDCGI_TRUE='#' + BUILD_RRDCGI_FALSE= +fi + + +# Check whether --enable-rrd_graph was given. +if test "${enable_rrd_graph+set}" = set; then + enableval=$enable_rrd_graph; enable_rrdcgi=no +else + enable_rrd_graph=yes +fi + + +if test $enable_rrd_graph != no; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_RRD_GRAPH /**/ +_ACEOF + +fi + # Check whether --with-rrd-default-font was given. if test "${with_rrd_default_font+set}" = set; then @@ -6572,13 +6571,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6575: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6574: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6578: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6577: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6581: output\"" >&5) + (eval echo "\"\$as_me:6580: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -7783,7 +7782,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7786 "configure"' > conftest.$ac_ext + echo '#line 7785 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9152,11 +9151,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:9155: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9154: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9159: \$? = $ac_status" >&5 + echo "$as_me:9158: \$? = $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. @@ -9491,11 +9490,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:9494: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9493: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9498: \$? = $ac_status" >&5 + echo "$as_me:9497: \$? = $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. @@ -9596,11 +9595,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:9599: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9598: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9603: \$? = $ac_status" >&5 + echo "$as_me:9602: \$? = $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 @@ -9651,11 +9650,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:9654: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9653: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9658: \$? = $ac_status" >&5 + echo "$as_me:9657: \$? = $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 @@ -12451,7 +12450,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12454 "configure" +#line 12453 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12547,7 +12546,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12550 "configure" +#line 12549 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12835,7 +12834,7 @@ fi if test "x$GCC" = "xyes"; then - for flag in -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do + for flag in -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do oCFLAGS="$CFLAGS" CFLAGS="$CFLAGS $flag" cachename=rd_cv_gcc_flag_`echo $flag|sed 's/[^A-Za-z]/_/g'` @@ -13944,7 +13943,7 @@ fi -eval `./libtool --config | grep pic_flag` +eval `./libtool --config | grep pic_flag=` CFLAGS="$CFLAGS $pic_flag" @@ -14750,7 +14749,9 @@ $as_echo "$as_me: error: unknown endianness -for ac_func in nl_langinfo tzset fsync mbstowcs opendir readdir chdir chroot getuid strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday + + +for ac_func in nl_langinfo tzset round rint fsync mbstowcs opendir readdir chdir chroot getuid strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -17389,464 +17390,670 @@ fi - { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2 or newer" >&5 -$as_echo_n "checking whether we are using the GNU C Library 2 or newer... " >&6; } -if test "${ac_cv_gnu_library_2+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) - Lucky GNU user - #endif -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then - ac_cv_gnu_library_2=yes +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else - ac_cv_gnu_library_2=no -fi -rm -f conftest* - - - + with_gnu_ld=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2" >&5 -$as_echo "$ac_cv_gnu_library_2" >&6; } - - GLIBC2="$ac_cv_gnu_library_2" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: fi -done -done -IFS=$as_save_IFS - -fi + rm -f conf$$.sh fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +$as_echo_n "checking for ld used by GCC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +if test "${acl_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - + acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:$LINENO: result: $LD" >&5 +$as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${acl_cv_prog_gnu_ld+set}" = set; then + $as_echo_n "(cached) " >&6 else - RANLIB="$ac_cv_prog_RANLIB" + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + - CFLAG_VISIBILITY= - HAVE_VISIBILITY=0 - if test -n "$GCC"; then - { $as_echo "$as_me:$LINENO: checking for simple visibility declarations" >&5 -$as_echo_n "checking for simple visibility declarations... " >&6; } - if test "${gl_cv_cc_visibility+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if test "${acl_cv_rpath+set}" = set; then $as_echo_n "(cached) " >&6 else - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void); -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_cc_visibility=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done - gl_cv_cc_visibility=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$gl_save_CFLAGS" +{ $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval=$enable_rpath; : +else + enable_rpath=yes fi - { $as_echo "$as_me:$LINENO: result: $gl_cv_cc_visibility" >&5 -$as_echo "$gl_cv_cc_visibility" >&6; } - if test $gl_cv_cc_visibility = yes; then - CFLAG_VISIBILITY="-fvisibility=hidden" - HAVE_VISIBILITY=1 - fi - fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_VISIBILITY $HAVE_VISIBILITY -_ACEOF - - -{ $as_echo "$as_me:$LINENO: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 -$as_echo_n "checking for size_t... " >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_size_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (size_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((size_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=yes -fi + use_additional=yes -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" -fi + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -$as_echo "$ac_cv_type_size_t" >&6; } -if test "x$ac_cv_type_size_t" = x""yes; then - : -else -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then -fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" - { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 -$as_echo_n "checking for stdint.h... " >&6; } -if test "${gl_cv_header_stdint_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -uintmax_t i = (uintmax_t) -1; return !i; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_header_stdint_h=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" - gl_cv_header_stdint_h=no -fi + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5 -$as_echo "$gl_cv_header_stdint_h" >&6; } - if test $gl_cv_header_stdint_h = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H_WITH_UINTMAX 1 -_ACEOF + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIBICONV_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done fi -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 +$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; +CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } @@ -17872,65 +18079,46 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_working_alloca_h=yes + gt_cv_func_CFPreferencesCopyAppValue=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_working_alloca_h=no + gt_cv_func_CFPreferencesCopyAppValue=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then +{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA_H 1 +#define HAVE_CFPREFERENCESCOPYAPPVALUE 1 _ACEOF -fi - -{ $as_echo "$as_me:$LINENO: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then + fi + { $as_echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 +$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } +if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - +#include int main () { -char *p = (char *) alloca (1); - if (p) return 0; +CFLocaleCopyCurrent(); ; return 0; } @@ -17956,43 +18144,73 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_func_alloca_works=yes + gt_cv_func_CFLocaleCopyCurrent=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_alloca_works=no + gt_cv_func_CFLocaleCopyCurrent=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } - -if test $ac_cv_func_alloca_works = yes; then +{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA 1 +#define HAVE_CFLOCALECOPYCURRENT 1 _ACEOF -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -cat >>confdefs.h <<\_ACEOF -#define C_ALLOCA 1 -_ACEOF -{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then + + + LIBINTL= + LTLIBINTL= + POSUB= + + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + { $as_echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 +$as_echo_n "checking for GNU gettext in libc... " >&6; } +if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -18001,73 +18219,15 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; int main () { -return $ac_func (); +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } @@ -18093,272 +18253,89 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - eval "$as_ac_var=yes" + eval "$gt_func_gnugettext_libc=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + eval "$gt_func_gnugettext_libc=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} +ac_res=`eval 'as_val=${'$gt_func_gnugettext_libc'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi - - done -fi -{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then -int -main () -{ - return find_stack_direction () < 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_stack_direction=1 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_c_stack_direction=-1 -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF + am_save_CPPFLAGS="$CPPFLAGS" + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do -fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done - { $as_echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5 -$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; } -if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if test "${am_cv_func_iconv+set}" = set; then $as_echo_n "(cached) " >&6 else - gt_cv_int_divbyzero_sigfpe= - case "$host_os" in - macos* | darwin[6-9]* | darwin[1-9][0-9]*) - # On MacOS X 10.2 or newer, just assume the same as when cross- - # compiling. If we were to perform the real test, 1 Crash Report - # dialog window would pop up. - case "$host_cpu" in - i[34567]86 | x86_64) - gt_cv_int_divbyzero_sigfpe="guessing yes" ;; - esac - ;; - esac - if test -z "$gt_cv_int_divbyzero_sigfpe"; then - if test "$cross_compiling" = yes; then - - # Guess based on the CPU. - case "$host_cpu" in - alpha* | i[34567]86 | x86_64 | m68k | s390*) - gt_cv_int_divbyzero_sigfpe="guessing yes";; - *) - gt_cv_int_divbyzero_sigfpe="guessing no";; - esac - -else - cat >conftest.$ac_ext <<_ACEOF + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include -#include - -static void -sigfpe_handler (int sig) -{ - /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ - exit (sig != SIGFPE); -} - -int x = 1; -int y = 0; -int z; -int nan; - -int main () -{ - signal (SIGFPE, sigfpe_handler); -/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ -#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) - signal (SIGTRAP, sigfpe_handler); -#endif -/* Linux/SPARC yields signal SIGILL. */ -#if defined (__sparc__) && defined (__linux__) - signal (SIGILL, sigfpe_handler); -#endif - - z = x / y; - nan = y / y; - exit (1); -} - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gt_cv_int_divbyzero_sigfpe=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -gt_cv_int_divbyzero_sigfpe=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi - -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5 -$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; } - case "$gt_cv_int_divbyzero_sigfpe" in - *yes) value=1;; - *) value=0;; - esac - -cat >>confdefs.h <<_ACEOF -#define INTDIV0_RAISES_SIGFPE $value -_ACEOF - - - - { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5 -$as_echo_n "checking for inttypes.h... " >&6; } -if test "${gl_cv_header_inttypes_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include +#include int main () { -uintmax_t i = (uintmax_t) -1; return !i; +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -18367,71 +18344,41 @@ $as_echo "$ac_try_echo") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_header_inttypes_h=yes + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + am_cv_func_iconv=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_header_inttypes_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5 -$as_echo "$gl_cv_header_inttypes_h" >&6; } - if test $gl_cv_header_inttypes_h = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking for unsigned long long int" >&5 -$as_echo_n "checking for unsigned long long int... " >&6; } -if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Test preprocessor. */ - #if ! (-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - error in preprocessor; - #endif - #if ! (18446744073709551615ULL <= -1ull) - error in preprocessor; - #endif - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; +#include +#include int main () { -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } - _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" @@ -18454,5902 +18401,169 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_type_unsigned_long_long_int=yes + am_cv_lib_iconv=yes + am_cv_func_iconv=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_unsigned_long_long_int=no + fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 -$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } - if test $ac_cv_type_unsigned_long_long_int = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UNSIGNED_LONG_LONG_INT 1 -_ACEOF - - fi - - - - - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - - test $ac_cv_type_unsigned_long_long_int = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' - -cat >>confdefs.h <<_ACEOF -#define uintmax_t $ac_type -_ACEOF - - else - -cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTMAX_T 1 -_ACEOF - - fi - - + LIBS="$am_save_LIBS" + fi -for ac_header in inttypes.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + { $as_echo "$as_me:$LINENO: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if test "${am_cv_func_iconv_works+set}" = set; then + $as_echo_n "(cached) " >&6 else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF + + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + if test "$cross_compiling" = yes; then + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +#include +#include +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 1; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + (eval "$ac_try") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + (exit $ac_status); }; }; then + am_cv_func_iconv_works=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +( exit $ac_status ) +am_cv_func_iconv_works=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + LIBS="$am_save_LIBS" - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 +$as_echo "$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_inttypes_h = yes; then - { $as_echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 -$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } -if test "${gt_cv_inttypes_pri_broken+set}" = set; then - $as_echo_n "(cached) " >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#ifdef PRId32 -char *p = PRId32; -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gt_cv_inttypes_pri_broken=no -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_inttypes_pri_broken=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 -$as_echo "$gt_cv_inttypes_pri_broken" >&6; } - fi - if test "$gt_cv_inttypes_pri_broken" = yes; then - -cat >>confdefs.h <<_ACEOF -#define PRI_MACROS_BROKEN 1 -_ACEOF - - PRI_MACROS_BROKEN=1 - else - PRI_MACROS_BROKEN=0 - fi - - - - - - - # Check whether --enable-threads was given. -if test "${enable_threads+set}" = set; then - enableval=$enable_threads; gl_use_threads=$enableval -else - case "$host_os" in - osf*) gl_use_threads=no ;; - *) gl_use_threads=yes ;; - esac - -fi - - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # For using : - case "$host_os" in - osf*) - # On OSF/1, the compiler needs the flag -D_REENTRANT so that it - # groks . cc also understands the flag -pthread, but - # we don't use it because 1. gcc-2.95 doesn't understand -pthread, - # 2. putting a flag into CPPFLAGS that has an effect on the linker - # causes the AC_TRY_LINK test below to succeed unexpectedly, - # leading to wrong values of LIBTHREAD and LTLIBTHREAD. - CPPFLAGS="$CPPFLAGS -D_REENTRANT" - ;; - esac - # Some systems optimize for single-threaded programs by default, and - # need special flags to disable these optimizations. For example, the - # definition of 'errno' in . - case "$host_os" in - aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; - solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; - esac - fi - - - - - - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5 -$as_echo_n "checking for ld used by GCC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${acl_cv_path_LD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; - esac - fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$acl_cv_path_LD" -if test -n "$LD"; then - { $as_echo "$as_me:$LINENO: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${acl_cv_prog_gnu_ld+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$acl_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$acl_cv_prog_gnu_ld - - - - - { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5 -$as_echo_n "checking for shared library run path origin... " >&6; } -if test "${acl_cv_rpath+set}" = set; then - $as_echo_n "(cached) " >&6 -else - - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - -fi -{ $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 -$as_echo "$acl_cv_rpath" >&6; } - wl="$acl_cv_wl" - acl_libext="$acl_cv_libext" - acl_shlibext="$acl_cv_shlibext" - acl_libname_spec="$acl_cv_libname_spec" - acl_library_names_spec="$acl_cv_library_names_spec" - acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - acl_hardcode_direct="$acl_cv_hardcode_direct" - acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" - # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then - enableval=$enable_rpath; : -else - enable_rpath=yes -fi - - - - acl_libdirstem=lib - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - - - - gl_threads_api=none - LIBTHREAD= - LTLIBTHREAD= - LIBMULTITHREAD= - LTLIBMULTITHREAD= - if test "$gl_use_threads" != no; then - { $as_echo "$as_me:$LINENO: checking whether imported symbols can be declared weak" >&5 -$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } - gl_have_weak=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -extern void xyzzy (); -#pragma weak xyzzy -int -main () -{ -xyzzy(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gl_have_weak=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $gl_have_weak" >&5 -$as_echo "$gl_have_weak" >&6; } - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks . It's added above, in gl_LOCK_EARLY_BODY. - if test "${ac_cv_header_pthread_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5 -$as_echo_n "checking for pthread.h... " >&6; } -if test "${ac_cv_header_pthread_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -$as_echo "$ac_cv_header_pthread_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5 -$as_echo_n "checking pthread.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5 -$as_echo_n "checking pthread.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for pthread.h" >&5 -$as_echo_n "checking for pthread.h... " >&6; } -if test "${ac_cv_header_pthread_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_pthread_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -$as_echo "$ac_cv_header_pthread_h" >&6; } - -fi -if test "x$ac_cv_header_pthread_h" = x""yes; then - gl_have_pthread_h=yes -else - gl_have_pthread_h=no -fi - - - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -pthread_mutex_lock((pthread_mutex_t*)0); - pthread_mutexattr_init((pthread_mutexattr_t*)0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gl_have_pthread=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - { $as_echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5 -$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main () -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_pthread_pthread_kill=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_kill=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_kill" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } -if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. - case "$host_os" in - solaris* | hpux*) - -cat >>confdefs.h <<\_ACEOF -#define PTHREAD_IN_USE_DETECTION_HARD 1 -_ACEOF - - esac - -fi - - else - # Some library is needed. Try libpthread and libc_r. - { $as_echo "$as_me:$LINENO: checking for pthread_kill in -lpthread" >&5 -$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main () -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_pthread_pthread_kill=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_kill=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_kill" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } -if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then - gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread -fi - - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - { $as_echo "$as_me:$LINENO: checking for pthread_kill in -lc_r" >&5 -$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } -if test "${ac_cv_lib_c_r_pthread_kill+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc_r $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main () -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_c_r_pthread_kill=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_c_r_pthread_kill=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_kill" >&5 -$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } -if test "x$ac_cv_lib_c_r_pthread_kill" = x""yes; then - gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r -fi - - fi - fi - if test -n "$gl_have_pthread"; then - gl_threads_api=posix - -cat >>confdefs.h <<\_ACEOF -#define USE_POSIX_THREADS 1 -_ACEOF - - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if test $gl_have_weak = yes; then - -cat >>confdefs.h <<\_ACEOF -#define USE_POSIX_THREADS_WEAK 1 -_ACEOF - - LIBTHREAD= - LTLIBTHREAD= - fi - fi - # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the - # pthread_rwlock_* functions. - { $as_echo "$as_me:$LINENO: checking for pthread_rwlock_t" >&5 -$as_echo_n "checking for pthread_rwlock_t... " >&6; } -if test "${ac_cv_type_pthread_rwlock_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_pthread_rwlock_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -if (sizeof (pthread_rwlock_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -if (sizeof ((pthread_rwlock_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pthread_rwlock_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pthread_rwlock_t" >&5 -$as_echo "$ac_cv_type_pthread_rwlock_t" >&6; } -if test "x$ac_cv_type_pthread_rwlock_t" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PTHREAD_RWLOCK 1 -_ACEOF - -fi - - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -#if __FreeBSD__ == 4 -error "No, in FreeBSD 4.0 recursive mutexes actually don't work." -#else -int x = (int)PTHREAD_MUTEX_RECURSIVE; -return !x; -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -_ACEOF - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then - gl_have_solaristhread= - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lthread" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -thr_self(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gl_have_solaristhread=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gl_save_LIBS" - if test -n "$gl_have_solaristhread"; then - gl_threads_api=solaris - LIBTHREAD=-lthread - LTLIBTHREAD=-lthread - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - -cat >>confdefs.h <<\_ACEOF -#define USE_SOLARIS_THREADS 1 -_ACEOF - - if test $gl_have_weak = yes; then - -cat >>confdefs.h <<\_ACEOF -#define USE_SOLARIS_THREADS_WEAK 1 -_ACEOF - - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - if test "$gl_use_threads" = pth; then - gl_save_CPPFLAGS="$CPPFLAGS" - - - - - - { $as_echo "$as_me:$LINENO: checking how to link with libpth" >&5 -$as_echo_n "checking how to link with libpth... " >&6; } -if test "${ac_cv_libpth_libs+set}" = set; then - $as_echo_n "(cached) " >&6 -else - - - - - - use_additional=yes - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - -# Check whether --with-libpth-prefix was given. -if test "${with_libpth_prefix+set}" = set; then - withval=$with_libpth_prefix; - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - fi - fi - -fi - - LIBPTH= - LTLIBPTH= - INCPTH= - LIBPTH_PREFIX= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='pth ' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" - else - : - fi - else - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - if test "$acl_hardcode_direct" = yes; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - haveit= - for x in $LDFLAGS $LIBPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" - fi - fi - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - LIBPTH_PREFIX="$basedir" - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - if test -n "$found_la"; then - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIBPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIBPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" - ;; - esac - done - fi - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" - else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" - done - fi - - ac_cv_libpth_libs="$LIBPTH" - ac_cv_libpth_ltlibs="$LTLIBPTH" - ac_cv_libpth_cppflags="$INCPTH" - ac_cv_libpth_prefix="$LIBPTH_PREFIX" - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_libpth_libs" >&5 -$as_echo "$ac_cv_libpth_libs" >&6; } - LIBPTH="$ac_cv_libpth_libs" - LTLIBPTH="$ac_cv_libpth_ltlibs" - INCPTH="$ac_cv_libpth_cppflags" - LIBPTH_PREFIX="$ac_cv_libpth_prefix" - - for element in $INCPTH; do - haveit= - for x in $CPPFLAGS; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" - fi - done - - - - - HAVE_LIBPTH=yes - - - - gl_have_pth= - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lpth" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -pth_self(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gl_have_pth=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gl_save_LIBS" - if test -n "$gl_have_pth"; then - gl_threads_api=pth - LIBTHREAD="$LIBPTH" - LTLIBTHREAD="$LTLIBPTH" - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - -cat >>confdefs.h <<\_ACEOF -#define USE_PTH_THREADS 1 -_ACEOF - - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if test $gl_have_weak = yes; then - -cat >>confdefs.h <<\_ACEOF -#define USE_PTH_THREADS_WEAK 1 -_ACEOF - - LIBTHREAD= - LTLIBTHREAD= - fi - fi - else - CPPFLAGS="$gl_save_CPPFLAGS" - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=win32 - -cat >>confdefs.h <<\_ACEOF -#define USE_WIN32_THREADS 1 -_ACEOF - - fi - fi - fi - fi - { $as_echo "$as_me:$LINENO: checking for multithread API to use" >&5 -$as_echo_n "checking for multithread API to use... " >&6; } - { $as_echo "$as_me:$LINENO: result: $gl_threads_api" >&5 -$as_echo "$gl_threads_api" >&6; } - - - - - - - - - - - - - - - - - - - - - use_additional=yes - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - -# Check whether --with-libiconv-prefix was given. -if test "${with_libiconv_prefix+set}" = set; then - withval=$with_libiconv_prefix; - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - fi - fi - -fi - - LIBICONV= - LTLIBICONV= - INCICONV= - LIBICONV_PREFIX= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='iconv ' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" - else - : - fi - else - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - if test "$acl_hardcode_direct" = yes; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - haveit= - for x in $LDFLAGS $LIBICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" - fi - fi - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - LIBICONV_PREFIX="$basedir" - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - if test -n "$found_la"; then - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIBICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIBICONV; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" - ;; - esac - done - fi - else - LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" - else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" - done - fi - - - - - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; } -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_BUILTIN_EXPECT 1 -_ACEOF - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - - - - - - -for ac_header in argz.h inttypes.h limits.h unistd.h sys/param.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - - - - - - - - - - - -for ac_func in getcwd getegid geteuid getgid getuid mempcpy munmap \ - stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ - argz_next __fsetlocking -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - { $as_echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5 -$as_echo_n "checking whether feof_unlocked is declared... " >&6; } -if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ - -#ifndef feof_unlocked - char *p = (char *) feof_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_feof_unlocked=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl_feof_unlocked=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5 -$as_echo "$ac_cv_have_decl_feof_unlocked" >&6; } - if test $ac_cv_have_decl_feof_unlocked = yes; then - gt_value=1 - else - gt_value=0 - fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FEOF_UNLOCKED $gt_value -_ACEOF - - - - { $as_echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5 -$as_echo_n "checking whether fgets_unlocked is declared... " >&6; } -if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ - -#ifndef fgets_unlocked - char *p = (char *) fgets_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_fgets_unlocked=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl_fgets_unlocked=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5 -$as_echo "$ac_cv_have_decl_fgets_unlocked" >&6; } - if test $ac_cv_have_decl_fgets_unlocked = yes; then - gt_value=1 - else - gt_value=0 - fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FGETS_UNLOCKED $gt_value -_ACEOF - - - - - - - - - am_save_CPPFLAGS="$CPPFLAGS" - - for element in $INCICONV; do - haveit= - for x in $CPPFLAGS; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" - fi - done - - - { $as_echo "$as_me:$LINENO: checking for iconv" >&5 -$as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then - $as_echo_n "(cached) " >&6 -else - - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - am_cv_func_iconv=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - am_cv_lib_iconv=yes - am_cv_func_iconv=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$am_save_LIBS" - fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 -$as_echo "$am_cv_func_iconv" >&6; } - if test "$am_cv_func_iconv" = yes; then - { $as_echo "$as_me:$LINENO: checking for working iconv" >&5 -$as_echo_n "checking for working iconv... " >&6; } -if test "${am_cv_func_iconv_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - - am_save_LIBS="$LIBS" - if test $am_cv_lib_iconv = yes; then - LIBS="$LIBS $LIBICONV" - fi - if test "$cross_compiling" = yes; then - case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -int main () -{ - /* Test against AIX 5.1 bug: Failures are not distinguishable from successful - returns. */ - { - iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); - if (cd_utf8_to_88591 != (iconv_t)(-1)) - { - static const char input[] = "\342\202\254"; /* EURO SIGN */ - char buf[10]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_utf8_to_88591, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - return 1; - } - } -#if 0 /* This bug could be worked around by the caller. */ - /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ - { - iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); - if (cd_88591_to_utf8 != (iconv_t)(-1)) - { - static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; - char buf[50]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if ((int)res > 0) - return 1; - } - } -#endif - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - return 1; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - am_cv_func_iconv_works=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -am_cv_func_iconv_works=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - LIBS="$am_save_LIBS" - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 -$as_echo "$am_cv_func_iconv_works" >&6; } - case "$am_cv_func_iconv_works" in - *no) am_func_iconv=no am_cv_lib_iconv=no ;; - *) am_func_iconv=yes ;; - esac - else - am_func_iconv=no am_cv_lib_iconv=no - fi - if test "$am_func_iconv" = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ICONV 1 -_ACEOF - - fi - if test "$am_cv_lib_iconv" = yes; then - { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5 -$as_echo_n "checking how to link with libiconv... " >&6; } - { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5 -$as_echo "$LIBICONV" >&6; } - else - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi - - - - if test "$am_cv_func_iconv" = yes; then - { $as_echo "$as_me:$LINENO: checking for iconv declaration" >&5 -$as_echo_n "checking for iconv declaration... " >&6; } - if test "${am_cv_proto_iconv+set}" = set; then - $as_echo_n "(cached) " >&6 -else - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - am_cv_proto_iconv_arg1="" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - am_cv_proto_iconv_arg1="const" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" -fi - - am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - { $as_echo "$as_me:$LINENO: result: ${ac_t:- - }$am_cv_proto_iconv" >&5 -$as_echo "${ac_t:- - }$am_cv_proto_iconv" >&6; } - -cat >>confdefs.h <<_ACEOF -#define ICONV_CONST $am_cv_proto_iconv_arg1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking for NL_LOCALE_NAME macro" >&5 -$as_echo_n "checking for NL_LOCALE_NAME macro... " >&6; } -if test "${gt_cv_nl_locale_name+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES)); - return !cs; - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gt_cv_nl_locale_name=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_nl_locale_name=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_nl_locale_name" >&5 -$as_echo "$gt_cv_nl_locale_name" >&6; } - if test $gt_cv_nl_locale_name = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NL_LOCALE_NAME 1 -_ACEOF - - fi - - for ac_prog in bison -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_INTLBISON+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$INTLBISON"; then - ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_INTLBISON="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -INTLBISON=$ac_cv_prog_INTLBISON -if test -n "$INTLBISON"; then - { $as_echo "$as_me:$LINENO: result: $INTLBISON" >&5 -$as_echo "$INTLBISON" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$INTLBISON" && break -done - - if test -z "$INTLBISON"; then - ac_verc_fail=yes - else - { $as_echo "$as_me:$LINENO: checking version of bison" >&5 -$as_echo_n "checking version of bison... " >&6; } - ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - esac - { $as_echo "$as_me:$LINENO: result: $ac_prog_version" >&5 -$as_echo "$ac_prog_version" >&6; } - fi - if test $ac_verc_fail = yes; then - INTLBISON=: - fi - - - { $as_echo "$as_me:$LINENO: checking for long long int" >&5 -$as_echo_n "checking for long long int... " >&6; } -if test "${ac_cv_type_long_long_int+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF - - /* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Test preprocessor. */ - #if ! (-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - error in preprocessor; - #endif - #if ! (18446744073709551615ULL <= -1ull) - error in preprocessor; - #endif - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} - -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if test "$cross_compiling" = yes; then - ac_cv_type_long_long_int=yes -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif -int -main () -{ -long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long_long_int=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_type_long_long_int=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_long_long_int=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 -$as_echo "$ac_cv_type_long_long_int" >&6; } - if test $ac_cv_type_long_long_int = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_LONG_INT 1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking for wchar_t" >&5 -$as_echo_n "checking for wchar_t... " >&6; } -if test "${gt_cv_c_wchar_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - wchar_t foo = (wchar_t)'\0'; -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gt_cv_c_wchar_t=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_c_wchar_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 -$as_echo "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_WCHAR_T 1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking for wint_t" >&5 -$as_echo_n "checking for wint_t... " >&6; } -if test "${gt_cv_c_wint_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0'; -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gt_cv_c_wint_t=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_c_wint_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 -$as_echo "$gt_cv_c_wint_t" >&6; } - if test $gt_cv_c_wint_t = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_WINT_T 1 -_ACEOF - - fi - - - - - { $as_echo "$as_me:$LINENO: checking for intmax_t" >&5 -$as_echo_n "checking for intmax_t... " >&6; } -if test "${gt_cv_c_intmax_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#if HAVE_STDINT_H_WITH_UINTMAX -#include -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include -#endif - -int -main () -{ -intmax_t x = -1; - return !x; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gt_cv_c_intmax_t=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_c_intmax_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5 -$as_echo "$gt_cv_c_intmax_t" >&6; } - if test $gt_cv_c_intmax_t = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_INTMAX_T 1 -_ACEOF - - fi - - - - { $as_echo "$as_me:$LINENO: checking whether printf() supports POSIX/XSI format strings" >&5 -$as_echo_n "checking whether printf() supports POSIX/XSI format strings... " >&6; } -if test "${gt_cv_func_printf_posix+set}" = set; then - $as_echo_n "(cached) " >&6 -else - - if test "$cross_compiling" = yes; then - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ - notposix -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "notposix" >/dev/null 2>&1; then - gt_cv_func_printf_posix="guessing no" -else - gt_cv_func_printf_posix="guessing yes" -fi -rm -f conftest* - - -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -/* The string "%2$d %1$d", with dollar characters protected from the shell's - dollar expansion (possibly an autoconf bug). */ -static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -static char buf[100]; -int main () -{ - sprintf (buf, format, 33, 55); - return (strcmp (buf, "55 33") != 0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gt_cv_func_printf_posix=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -gt_cv_func_printf_posix=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_printf_posix" >&5 -$as_echo "$gt_cv_func_printf_posix" >&6; } - case $gt_cv_func_printf_posix in - *yes) - -cat >>confdefs.h <<\_ACEOF -#define HAVE_POSIX_PRINTF 1 -_ACEOF - - ;; - esac - - - { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 -$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } -if test "${ac_cv_gnu_library_2_1+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then - ac_cv_gnu_library_2_1=yes -else - ac_cv_gnu_library_2_1=no -fi -rm -f conftest* - - - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 -$as_echo "$ac_cv_gnu_library_2_1" >&6; } - - GLIBC21="$ac_cv_gnu_library_2_1" - - - - -for ac_header in stdint.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - { $as_echo "$as_me:$LINENO: checking for SIZE_MAX" >&5 -$as_echo_n "checking for SIZE_MAX... " >&6; } - if test "${gl_cv_size_max+set}" = set; then - $as_echo_n "(cached) " >&6 -else - - gl_cv_size_max= - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#if HAVE_STDINT_H -#include -#endif -#ifdef SIZE_MAX -Found it -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Found it" >/dev/null 2>&1; then - gl_cv_size_max=yes -fi -rm -f conftest* - - if test -z "$gl_cv_size_max"; then - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) size_t_bits_minus_1=$ac_lo;; -'') size_t_bits_minus_1= ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -static long int longval () { return sizeof (size_t) * CHAR_BIT - 1; } -static unsigned long int ulongval () { return sizeof (size_t) * CHAR_BIT - 1; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if ((sizeof (size_t) * CHAR_BIT - 1) < 0) - { - long int i = longval (); - if (i != (sizeof (size_t) * CHAR_BIT - 1)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != (sizeof (size_t) * CHAR_BIT - 1)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - size_t_bits_minus_1=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -size_t_bits_minus_1= -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) fits_in_uint=$ac_lo;; -'') fits_in_uint= ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -static long int longval () { return sizeof (size_t) <= sizeof (unsigned int); } -static unsigned long int ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) - { - long int i = longval (); - if (i != (sizeof (size_t) <= sizeof (unsigned int))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != (sizeof (size_t) <= sizeof (unsigned int))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - fits_in_uint=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -fits_in_uint= -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val - if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then - if test $fits_in_uint = 1; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - extern size_t foo; - extern unsigned long foo; - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - fits_in_uint=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $fits_in_uint = 1; then - gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" - else - gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" - fi - else - gl_cv_size_max='((size_t)~(size_t)0)' - fi - fi - -fi - - { $as_echo "$as_me:$LINENO: result: $gl_cv_size_max" >&5 -$as_echo "$gl_cv_size_max" >&6; } - if test "$gl_cv_size_max" != yes; then - -cat >>confdefs.h <<_ACEOF -#define SIZE_MAX $gl_cv_size_max -_ACEOF - - fi - - - - - -for ac_header in stdint.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 -$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then - $as_echo_n "(cached) " >&6 -else - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -CFPreferencesCopyAppValue(NULL, NULL) - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gt_cv_func_CFPreferencesCopyAppValue=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_func_CFPreferencesCopyAppValue=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 -$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CFPREFERENCESCOPYAPPVALUE 1 -_ACEOF - - fi - { $as_echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 -$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then - $as_echo_n "(cached) " >&6 -else - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -CFLocaleCopyCurrent(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gt_cv_func_CFLocaleCopyCurrent=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_func_CFLocaleCopyCurrent=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 -$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CFLOCALECOPYCURRENT 1 -_ACEOF - - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - - - - - - - - { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 -$as_echo_n "checking for ptrdiff_t... " >&6; } -if test "${ac_cv_type_ptrdiff_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_ptrdiff_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (ptrdiff_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((ptrdiff_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_ptrdiff_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 -$as_echo "$ac_cv_type_ptrdiff_t" >&6; } -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then - : -else - -cat >>confdefs.h <<\_ACEOF -#define ptrdiff_t long -_ACEOF - - -fi - - - - -for ac_header in stddef.h stdlib.h string.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - - -for ac_func in asprintf fwprintf putenv setenv setlocale snprintf wcslen -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - { $as_echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5 -$as_echo_n "checking whether _snprintf is declared... " >&6; } -if test "${ac_cv_have_decl__snprintf+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ - -#ifndef _snprintf - char *p = (char *) _snprintf; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl__snprintf=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl__snprintf=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5 -$as_echo "$ac_cv_have_decl__snprintf" >&6; } - if test $ac_cv_have_decl__snprintf = yes; then - gt_value=1 - else - gt_value=0 - fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SNPRINTF $gt_value -_ACEOF - - - - { $as_echo "$as_me:$LINENO: checking whether _snwprintf is declared" >&5 -$as_echo_n "checking whether _snwprintf is declared... " >&6; } -if test "${ac_cv_have_decl__snwprintf+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ - -#ifndef _snwprintf - char *p = (char *) _snwprintf; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl__snwprintf=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl__snwprintf=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__snwprintf" >&5 -$as_echo "$ac_cv_have_decl__snwprintf" >&6; } - if test $ac_cv_have_decl__snwprintf = yes; then - gt_value=1 - else - gt_value=0 - fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SNWPRINTF $gt_value -_ACEOF - - - - - { $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 -$as_echo_n "checking whether getc_unlocked is declared... " >&6; } -if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ - -#ifndef getc_unlocked - char *p = (char *) getc_unlocked; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_getc_unlocked=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl_getc_unlocked=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 -$as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } - if test $ac_cv_have_decl_getc_unlocked = yes; then - gt_value=1 - else - gt_value=0 - fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETC_UNLOCKED $gt_value -_ACEOF - - - - case $gt_cv_func_printf_posix in - *yes) HAVE_POSIX_PRINTF=1 ;; - *) HAVE_POSIX_PRINTF=0 ;; - esac - - if test "$ac_cv_func_asprintf" = yes; then - HAVE_ASPRINTF=1 - else - HAVE_ASPRINTF=0 - fi - - if test "$ac_cv_func_snprintf" = yes; then - HAVE_SNPRINTF=1 - else - HAVE_SNPRINTF=0 - fi - - if test "$ac_cv_func_wprintf" = yes; then - HAVE_WPRINTF=1 - else - HAVE_WPRINTF=0 - fi - - - - { $as_echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 -$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${am_cv_langinfo_codeset+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -char* cs = nl_langinfo(CODESET); return !cs; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - am_cv_langinfo_codeset=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - am_cv_langinfo_codeset=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 -$as_echo "$am_cv_langinfo_codeset" >&6; } - if test $am_cv_langinfo_codeset = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LANGINFO_CODESET 1 -_ACEOF - - fi - - - { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 -$as_echo_n "checking for LC_MESSAGES... " >&6; } -if test "${gt_cv_val_LC_MESSAGES+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -return LC_MESSAGES - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gt_cv_val_LC_MESSAGES=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_val_LC_MESSAGES=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_val_LC_MESSAGES" >&5 -$as_echo "$gt_cv_val_LC_MESSAGES" >&6; } - if test $gt_cv_val_LC_MESSAGES = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LC_MESSAGES 1 -_ACEOF - - fi - - - if test "$enable_shared" = yes; then - case "$host_os" in - mingw* | cygwin*) is_woe32dll=yes ;; - *) is_woe32dll=no ;; - esac - else - is_woe32dll=no - fi - WOE32DLL=$is_woe32dll - - - case "$host_os" in - mingw* | cygwin*) is_woe32=yes ;; - *) is_woe32=no ;; - esac - WOE32=$is_woe32 - - if test $WOE32 = yes; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. -set dummy ${ac_tool_prefix}windres; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_WINDRES+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$WINDRES"; then - ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="${ac_tool_prefix}windres" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -WINDRES=$ac_cv_prog_WINDRES -if test -n "$WINDRES"; then - { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5 -$as_echo "$WINDRES" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_WINDRES"; then - ac_ct_WINDRES=$WINDRES - # Extract the first word of "windres", so it can be a program name with args. -set dummy windres; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_WINDRES"; then - ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # 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_WINDRES="windres" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES -if test -n "$ac_ct_WINDRES"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5 -$as_echo "$ac_ct_WINDRES" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_WINDRES" = x; then - WINDRES="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - WINDRES=$ac_ct_WINDRES - fi -else - WINDRES="$ac_cv_prog_WINDRES" -fi - - fi - - case "$host_os" in - hpux*) LTLIBC="" ;; - *) LTLIBC="-lc" ;; - esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 -$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then - $as_echo_n "(cached) " >&6 -else - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -CFPreferencesCopyAppValue(NULL, NULL) - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gt_cv_func_CFPreferencesCopyAppValue=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_func_CFPreferencesCopyAppValue=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 -$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CFPREFERENCESCOPYAPPVALUE 1 -_ACEOF - - fi - { $as_echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 -$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then - $as_echo_n "(cached) " >&6 -else - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -CFLocaleCopyCurrent(); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - gt_cv_func_CFLocaleCopyCurrent=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_func_CFLocaleCopyCurrent=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" -fi -{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 -$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_CFLOCALECOPYCURRENT 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_ICONV 1 _ACEOF fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + if test "$am_cv_lib_iconv" = yes; then + { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= fi @@ -24357,123 +18571,6 @@ _ACEOF - BUILD_INCLUDED_LIBINTL=no - USE_INCLUDED_LIBINTL=no - - LIBINTL= - LTLIBINTL= - POSUB= - - case " $gt_needs " in - *" need-formatstring-macros "*) gt_api_version=3 ;; - *" need-ngettext "*) gt_api_version=2 ;; - *) gt_api_version=1 ;; - esac - gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" - gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" - - if test "$USE_NLS" = "yes"; then - gt_use_preinstalled_gnugettext=no - - { $as_echo "$as_me:$LINENO: checking whether included gettext is requested" >&5 -$as_echo_n "checking whether included gettext is requested... " >&6; } - -# Check whether --with-included-gettext was given. -if test "${with_included_gettext+set}" = set; then - withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval -else - nls_cv_force_use_gnu_gettext=no -fi - - { $as_echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5 -$as_echo "$nls_cv_force_use_gnu_gettext" >&6; } - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - - - if test $gt_api_version -ge 3; then - gt_revision_test_code=' -#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -' - else - gt_revision_test_code= - fi - if test $gt_api_version -ge 2; then - gt_expression_test_code=' + * ngettext ("", "", 0)' - else - gt_expression_test_code= - fi - - { $as_echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 -$as_echo_n "checking for GNU gettext in libc... " >&6; } -if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern int *_nl_domain_bindings; -int -main () -{ -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$gt_func_gnugettext_libc=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$gt_func_gnugettext_libc=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$gt_func_gnugettext_libc'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - - if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then - - - use_additional=yes @@ -24821,120 +18918,410 @@ fi exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" - ;; - esac - done - fi - else - LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" - fi - fi + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + { $as_echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 +$as_echo_n "checking for GNU gettext in libintl... " >&6; } +if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$gt_func_gnugettext_libintl=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$gt_func_gnugettext_libintl=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +ac_res=`eval 'as_val=${'$gt_func_gnugettext_libintl'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + fi + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_NLS 1 +_ACEOF + + else + USE_NLS=no + fi + fi + + { $as_echo "$as_me:$LINENO: checking whether to use NLS" >&5 +$as_echo_n "checking whether to use NLS... " >&6; } + { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { $as_echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 +$as_echo_n "checking where the gettext function comes from... " >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { $as_echo "$as_me:$LINENO: result: $gt_source" >&5 +$as_echo "$gt_source" >&6; } + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + { $as_echo "$as_me:$LINENO: checking how to link with libintl" >&5 +$as_echo_n "checking how to link with libintl... " >&6; } + { $as_echo "$as_me:$LINENO: result: $LIBINTL" >&5 +$as_echo "$LIBINTL" >&6; } + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break fi done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" - else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" - done + + fi + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETTEXT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DCGETTEXT 1 +_ACEOF + fi - fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" - done + + POSUB=po fi - { $as_echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 -$as_echo_n "checking for GNU gettext in libintl... " >&6; } -if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then + + + INTLLIBS="$LIBINTL" + + + + + + + + +case $TERM in + # for the most important terminal types we directly know the sequences + xterm|xterm*|vt220|vt220*) + T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' /dev/null` + T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' /dev/null` + ;; + vt100|vt100*|cygwin) + T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' /dev/null` + T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' /dev/null` + ;; + *) + T_MD='' + T_ME='' + ;; +esac + { $as_echo "$as_me:$LINENO: result: " >&5 +$as_echo "" >&6; } + { $as_echo "$as_me:$LINENO: result: ${T_MD}IEEE Math Checks${T_ME}" >&5 +$as_echo "${T_MD}IEEE Math Checks${T_ME}" >&6; } + + + + +for ac_func in fpclassify +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else - gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $INCINTL" - gt_save_LIBS="$LIBS" - LIBS="$LIBS $LIBINTL" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus -"C" +extern "C" #endif -const char *_nl_expand_alias (const char *); +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + int main () { -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") +return $ac_func (); ; return 0; } @@ -24960,38 +19347,392 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - eval "$gt_func_gnugettext_libintl=yes" + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + { $as_echo "$as_me:$LINENO: checking for fpclassify with " >&5 +$as_echo_n "checking for fpclassify with ... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +volatile int x;volatile float f; +int +main () +{ +x = fpclassify(f) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + cat >>confdefs.h <<\_ACEOF +#define HAVE_FPCLASSIFY 1 +_ACEOF + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +done + + + +for ac_func in isinf +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + { $as_echo "$as_me:$LINENO: checking for isinf with " >&5 +$as_echo_n "checking for isinf with ... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +volatile int x;volatile float f; +int +main () +{ +x = isinf(f) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + cat >>confdefs.h <<\_ACEOF +#define HAVE_ISINF 1 +_ACEOF + else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$gt_func_gnugettext_libintl=no" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +done + + +{ $as_echo "$as_me:$LINENO: checking whether isfinite is broken" >&5 +$as_echo_n "checking whether isfinite is broken... " >&6; } +if test "${ac_cv_have_broken_isfinite+set}" = set; then + $as_echo_n "(cached) " >&6 +else + +if test "$cross_compiling" = yes; then + +case "${target}" in + hppa*-*-hpux*) ac_cv_have_broken_isfinite=yes ;; + *-solaris2.8) ac_cv_have_broken_isfinite=yes ;; + *-solaris2.9) ac_cv_have_broken_isfinite=yes ;; + *) ac_cv_have_broken_isfinite=no ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_MATH_H +#include +#endif +#ifdef HAVE_FLOAT_H +#include +#endif +int main () +{ +#ifdef isfinite +#ifdef LDBL_MAX + if (!isfinite(LDBL_MAX)) return 1; +#endif +#ifdef DBL_MAX + if (!isfinite(DBL_MAX)) return 1; +#endif +#endif +return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_broken_isfinite=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_have_broken_isfinite=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_broken_isfinite" >&5 +$as_echo "$ac_cv_have_broken_isfinite" >&6; } -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" - cat >conftest.$ac_ext <<_ACEOF +case "${target}" in + *-solaris2.8) ac_cv_have_broken_isfinite=yes ;; + *-solaris2.9) ac_cv_have_broken_isfinite=yes ;; +esac + +if test "x$ac_cv_have_broken_isfinite" = "xno"; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_ISFINITE 1 +_ACEOF + +else + +for ac_func in finite +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus -"C" +extern "C" #endif -const char *_nl_expand_alias (const char *); +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + int main () { -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") +return $ac_func (); ; return 0; } @@ -25017,214 +19758,32 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - eval "$gt_func_gnugettext_libintl=yes" - + eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - fi - CPPFLAGS="$gt_save_CPPFLAGS" - LIBS="$gt_save_LIBS" fi -ac_res=`eval 'as_val=${'$gt_func_gnugettext_libintl'} +ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - fi - - if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ - || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ - && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools; }; then - gt_use_preinstalled_gnugettext=yes - else - LIBINTL= - LTLIBINTL= - INCINTL= - fi - - - if test "$gt_use_preinstalled_gnugettext" != "yes"; then - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - BUILD_INCLUDED_LIBINTL=yes - USE_INCLUDED_LIBINTL=yes - LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV $LIBTHREAD" - LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV $LTLIBTHREAD" - LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` - fi - - CATOBJEXT= - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - CATOBJEXT=.gmo - fi - - - if test -n "$INTL_MACOSX_LIBS"; then - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" - LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" - fi - fi - - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define ENABLE_NLS 1 -_ACEOF - - else - USE_NLS=no - fi - fi - - { $as_echo "$as_me:$LINENO: checking whether to use NLS" >&5 -$as_echo_n "checking whether to use NLS... " >&6; } - { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 -$as_echo "$USE_NLS" >&6; } - if test "$USE_NLS" = "yes"; then - { $as_echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 -$as_echo_n "checking where the gettext function comes from... " >&6; } - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - gt_source="external libintl" - else - gt_source="libc" - fi - else - gt_source="included intl directory" - fi - { $as_echo "$as_me:$LINENO: result: $gt_source" >&5 -$as_echo "$gt_source" >&6; } - fi - - if test "$USE_NLS" = "yes"; then - - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - { $as_echo "$as_me:$LINENO: checking how to link with libintl" >&5 -$as_echo_n "checking how to link with libintl... " >&6; } - { $as_echo "$as_me:$LINENO: result: $LIBINTL" >&5 -$as_echo "$LIBINTL" >&6; } - - for element in $INCINTL; do - haveit= - for x in $CPPFLAGS; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" - fi - done - - fi - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETTEXT 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DCGETTEXT 1 +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - fi - - POSUB=po - fi - - - if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then - BUILD_INCLUDED_LIBINTL=yes - fi - - - - - - nls_cv_header_intl= - nls_cv_header_libgt= - - DATADIRNAME=share - - - INSTOBJEXT=.mo - - - GENCAT=gencat - - - INTLOBJS= - if test "$USE_INCLUDED_LIBINTL" = yes; then - INTLOBJS="\$(GETTOBJS)" - fi - - - INTL_LIBTOOL_SUFFIX_PREFIX= - - - - INTLLIBS="$LIBINTL" - - - - - - - - -case $TERM in - # for the most important terminal types we directly know the sequences - xterm|xterm*|vt220|vt220*) - T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' /dev/null` - T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' /dev/null` - ;; - vt100|vt100*|cygwin) - T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' /dev/null` - T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' /dev/null` - ;; - *) - T_MD='' - T_ME='' - ;; -esac - { $as_echo "$as_me:$LINENO: result: " >&5 -$as_echo "" >&6; } - { $as_echo "$as_me:$LINENO: result: ${T_MD}IEEE Math Checks${T_ME}" >&5 -$as_echo "${T_MD}IEEE Math Checks${T_ME}" >&6; } - - - +else -for ac_func in fpclassify +for ac_func in isfinite do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -25322,9 +19881,9 @@ as_val=`eval 'as_val=${'$as_ac_var'} _ACEOF else - { $as_echo "$as_me:$LINENO: checking for fpclassify with " >&5 -$as_echo_n "checking for fpclassify with ... " >&6; } - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for isfinite with " >&5 +$as_echo_n "checking for isfinite with ... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -25335,7 +19894,7 @@ volatile int x;volatile float f; int main () { -x = fpclassify(f) +x = isfinite(f) ; return 0; } @@ -25363,33 +19922,294 @@ $as_echo "$ac_try_echo") >&5 }; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define HAVE_FPCLASSIFY 1 + cat >>confdefs.h <<\_ACEOF +#define HAVE_ISFINITE 1 +_ACEOF + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +done + +fi +done + +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +_cflags=${CFLAGS} + +{ $as_echo "$as_me:$LINENO: checking if IEEE math works out of the box" >&5 +$as_echo_n "checking if IEEE math works out of the box... " >&6; } +if test "${rd_cv_ieee_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include "src/rrd_config_bottom.h" +#include +int main(void){ + double rrdnan,rrdinf,rrdc,rrdzero; + ; + /* some math to see if we get a floating point exception */ + rrdzero=sin(0.0); /* don't let the compiler optimize us away */ + rrdnan=0.0/rrdzero; /* especially here */ + rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ + /* at run time without sig fpe */ + rrdc = rrdinf + rrdnan; + rrdc = rrdinf / rrdnan; + if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} + if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} + if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} + if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} + if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} + if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} + return 0; + } +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rd_cv_ieee_works=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rd_cv_ieee_works=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi + +if test x${rd_cv_ieee_works} = "xyes"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$_cflags -ieee" + +{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -ieee switch" >&5 +$as_echo_n "checking if IEEE math works with the -ieee switch... " >&6; } +if test "${rd_cv_ieee_switch+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include "src/rrd_config_bottom.h" +#include +int main(void){ + double rrdnan,rrdinf,rrdc,rrdzero; + ; + /* some math to see if we get a floating point exception */ + rrdzero=sin(0.0); /* don't let the compiler optimize us away */ + rrdnan=0.0/rrdzero; /* especially here */ + rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ + /* at run time without sig fpe */ + rrdc = rrdinf + rrdnan; + rrdc = rrdinf / rrdnan; + if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} + if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} + if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} + if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} + if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} + if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} + return 0; + } +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rd_cv_ieee_switch=yes +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +rd_cv_ieee_switch=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi + +if test x${rd_cv_ieee_switch} = "xyes"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$_cflags -qfloat=nofold" + +{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -qfloat=nofold switch" >&5 +$as_echo_n "checking if IEEE math works with the -qfloat=nofold switch... " >&6; } +if test "${rd_cv_ieee_nofold+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "src/rrd_config_bottom.h" +#include +int main(void){ + double rrdnan,rrdinf,rrdc,rrdzero; + ; + /* some math to see if we get a floating point exception */ + rrdzero=sin(0.0); /* don't let the compiler optimize us away */ + rrdnan=0.0/rrdzero; /* especially here */ + rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ + /* at run time without sig fpe */ + rrdc = rrdinf + rrdnan; + rrdc = rrdinf / rrdnan; + if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} + if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} + if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} + if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} + if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} + if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} + return 0; + } +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rd_cv_ieee_nofold=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +( exit $ac_status ) +rd_cv_ieee_nofold=no fi - rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -done +fi -for ac_func in isinf -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +if test x${rd_cv_ieee_nofold} = "xyes"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$_cflags -w -qflttrap=enable:zerodivide" + +{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -w -qflttrap=enable:zerodivide" >&5 +$as_echo_n "checking if IEEE math works with the -w -qflttrap=enable:zerodivide... " >&6; } +if test "${rd_cv_ieee_flttrap+set}" = set; then $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25397,46 +20217,29 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} +#include "src/rrd_config_bottom.h" +#include +int main(void){ + double rrdnan,rrdinf,rrdc,rrdzero; + ; + /* some math to see if we get a floating point exception */ + rrdzero=sin(0.0); /* don't let the compiler optimize us away */ + rrdnan=0.0/rrdzero; /* especially here */ + rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ + /* at run time without sig fpe */ + rrdc = rrdinf + rrdnan; + rrdc = rrdinf / rrdnan; + if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} + if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} + if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} + if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} + if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} + if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} + return 0; + } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -25444,117 +20247,52 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - { $as_echo "$as_me:$LINENO: checking for isinf with " >&5 -$as_echo_n "checking for isinf with ... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -volatile int x;volatile float f; -int -main () -{ -x = isinf(f) - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_try") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define HAVE_ISINF 1 -_ACEOF - + (exit $ac_status); }; }; then + rd_cv_ieee_flttrap=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +( exit $ac_status ) +rd_cv_ieee_flttrap=no fi - rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -done -{ $as_echo "$as_me:$LINENO: checking whether isfinite is broken" >&5 -$as_echo_n "checking whether isfinite is broken... " >&6; } -if test "${ac_cv_have_broken_isfinite+set}" = set; then - $as_echo_n "(cached) " >&6 -else +fi -if test "$cross_compiling" = yes; then +if test x${rd_cv_ieee_flttrap} = "xyes"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -case "${target}" in - hppa*-*-hpux*) ac_cv_have_broken_isfinite=yes ;; - *-solaris2.8) ac_cv_have_broken_isfinite=yes ;; - *-solaris2.9) ac_cv_have_broken_isfinite=yes ;; - *) ac_cv_have_broken_isfinite=no ;; -esac +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$_cflags -mieee" + +{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -mieee switch" >&5 +$as_echo_n "checking if IEEE math works with the -mieee switch... " >&6; } +if test "${rd_cv_ieee_mswitch+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25563,24 +20301,26 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef HAVE_MATH_H -#include -#endif -#ifdef HAVE_FLOAT_H -#include -#endif -int main () -{ -#ifdef isfinite -#ifdef LDBL_MAX - if (!isfinite(LDBL_MAX)) return 1; -#endif -#ifdef DBL_MAX - if (!isfinite(DBL_MAX)) return 1; -#endif -#endif -return 0; -} +#include "src/rrd_config_bottom.h" +#include +int main(void){ + double rrdnan,rrdinf,rrdc,rrdzero; + ; + /* some math to see if we get a floating point exception */ + rrdzero=sin(0.0); /* don't let the compiler optimize us away */ + rrdnan=0.0/rrdzero; /* especially here */ + rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ + /* at run time without sig fpe */ + rrdc = rrdinf + rrdnan; + rrdc = rrdinf / rrdnan; + if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} + if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} + if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} + if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} + if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} + if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} + return 0; + } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -25604,44 +20344,38 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_have_broken_isfinite=no + rd_cv_ieee_mswitch=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_have_broken_isfinite=yes +rd_cv_ieee_mswitch=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_broken_isfinite" >&5 -$as_echo "$ac_cv_have_broken_isfinite" >&6; } - -case "${target}" in - *-solaris2.8) ac_cv_have_broken_isfinite=yes ;; - *-solaris2.9) ac_cv_have_broken_isfinite=yes ;; -esac -if test "x$ac_cv_have_broken_isfinite" = "xno"; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_ISFINITE 1 -_ACEOF +if test x${rd_cv_ieee_mswitch} = "xyes"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$_cflags -q float=rndsngl" -for ac_func in finite -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -q float=rndsngl switch" >&5 +$as_echo_n "checking if IEEE math works with the -q float=rndsngl switch... " >&6; } +if test "${rd_cv_ieee_qswitch+set}" = set; then $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25649,46 +20383,29 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} +#include "src/rrd_config_bottom.h" +#include +int main(void){ + double rrdnan,rrdinf,rrdc,rrdzero; + ; + /* some math to see if we get a floating point exception */ + rrdzero=sin(0.0); /* don't let the compiler optimize us away */ + rrdnan=0.0/rrdzero; /* especially here */ + rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ + /* at run time without sig fpe */ + rrdc = rrdinf + rrdnan; + rrdc = rrdinf / rrdnan; + if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} + if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} + if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} + if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} + if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} + if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} + return 0; + } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -25696,51 +20413,52 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rd_cv_ieee_qswitch=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +( exit $ac_status ) +rd_cv_ieee_qswitch=no fi - rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + + +fi + +if test x${rd_cv_ieee_qswitch} = "xyes"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$_cflags -OPT:IEEE_NaN_inf=ON" -for ac_func in isfinite -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -OPT:IEEE_NaN_inf=ON switch" >&5 +$as_echo_n "checking if IEEE math works with the -OPT:IEEE_NaN_inf=ON switch... " >&6; } +if test "${rd_cv_ieee_ieeenaninfswitch+set}" = set; then $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -25748,46 +20466,29 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} +#include "src/rrd_config_bottom.h" +#include +int main(void){ + double rrdnan,rrdinf,rrdc,rrdzero; + ; + /* some math to see if we get a floating point exception */ + rrdzero=sin(0.0); /* don't let the compiler optimize us away */ + rrdnan=0.0/rrdzero; /* especially here */ + rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ + /* at run time without sig fpe */ + rrdc = rrdinf + rrdnan; + rrdc = rrdinf / rrdnan; + if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} + if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} + if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} + if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} + if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} + if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} + return 0; + } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -25795,62 +20496,82 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rd_cv_ieee_ieeenaninfswitch=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +( exit $ac_status ) +rd_cv_ieee_ieeenaninfswitch=no fi - rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + + +fi + +if test x${rd_cv_ieee_ieeenaninfswitch} = "xyes"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: checking for isfinite with " >&5 -$as_echo_n "checking for isfinite with ... " >&6; } - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$_cflags -OPT:IEEE_comparisons=ON" + +{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch" >&5 +$as_echo_n "checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch... " >&6; } +if test "${rd_cv_ieee_ieeecmpswitch+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -volatile int x;volatile float f; -int -main () -{ -x = isfinite(f) - ; - return 0; -} + +#include "src/rrd_config_bottom.h" +#include +int main(void){ + double rrdnan,rrdinf,rrdc,rrdzero; + ; + /* some math to see if we get a floating point exception */ + rrdzero=sin(0.0); /* don't let the compiler optimize us away */ + rrdnan=0.0/rrdzero; /* especially here */ + rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ + /* at run time without sig fpe */ + rrdc = rrdinf + rrdnan; + rrdc = rrdinf / rrdnan; + if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} + if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} + if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} + if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} + if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} + if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} + return 0; + } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -25858,56 +20579,48 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define HAVE_ISFINITE 1 -_ACEOF - + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + rd_cv_ieee_ieeecmpswitch=yes else - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +( exit $ac_status ) +rd_cv_ieee_ieeecmpswitch=no fi - rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -done -fi -done fi +if test x${rd_cv_ieee_ieeecmpswitch} = "xyes"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -_cflags=${CFLAGS} +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS=$_cflags -{ $as_echo "$as_me:$LINENO: checking if IEEE math works out of the box" >&5 -$as_echo_n "checking if IEEE math works out of the box... " >&6; } -if test "${rd_cv_ieee_works+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking if IEEE math works with fpsetmask(0)" >&5 +$as_echo_n "checking if IEEE math works with fpsetmask(0)... " >&6; } +if test "${rd_cv_ieee_mask+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -25919,66 +20632,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - -#if HAVE_MATH_H -# include -#endif - -#if HAVE_FLOAT_H -# include -#endif - -#if HAVE_IEEEFP_H -# include -#endif - -#if HAVE_FP_CLASS_H -# include -#endif - -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) -#endif - -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif - -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) -#endif - -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif - -#if HAVE_MATH_H -#include -#endif - +#include +#include "src/rrd_config_bottom.h" #include int main(void){ double rrdnan,rrdinf,rrdc,rrdzero; - ; + fpsetmask(0); /* some math to see if we get a floating point exception */ rrdzero=sin(0.0); /* don't let the compiler optimize us away */ rrdnan=0.0/rrdzero; /* especially here */ @@ -26017,14 +20676,14 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - rd_cv_ieee_works=yes + rd_cv_ieee_mask=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -rd_cv_ieee_works=no +rd_cv_ieee_mask=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -26033,18 +20692,21 @@ fi fi -if test x${rd_cv_ieee_works} = "xyes"; then +if test x${rd_cv_ieee_mask} = "xyes"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } + cat >>confdefs.h <<\_ACEOF +#define MUST_DISABLE_FPMASK 1 +_ACEOF + PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK" else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - CFLAGS="$_cflags -ieee" -{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -ieee switch" >&5 -$as_echo_n "checking if IEEE math works with the -ieee switch... " >&6; } -if test "${rd_cv_ieee_switch+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking if IEEE math works with signal(SIGFPE,SIG_IGN)" >&5 +$as_echo_n "checking if IEEE math works with signal(SIGFPE,SIG_IGN)... " >&6; } +if test "${rd_cv_ieee_sigfpe+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -26056,66 +20718,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - -#if HAVE_MATH_H -# include -#endif - -#if HAVE_FLOAT_H -# include -#endif - -#if HAVE_IEEEFP_H -# include -#endif - -#if HAVE_FP_CLASS_H -# include -#endif - -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) -#endif - -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif - -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) -#endif - -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif - -#if HAVE_MATH_H -#include -#endif - +#include +#include "src/rrd_config_bottom.h" #include int main(void){ double rrdnan,rrdinf,rrdc,rrdzero; - ; + signal(SIGFPE,SIG_IGN); /* some math to see if we get a floating point exception */ rrdzero=sin(0.0); /* don't let the compiler optimize us away */ rrdnan=0.0/rrdzero; /* especially here */ @@ -26154,14 +20762,14 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - rd_cv_ieee_switch=yes + rd_cv_ieee_sigfpe=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -rd_cv_ieee_switch=no +rd_cv_ieee_sigfpe=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -26170,104 +20778,383 @@ fi fi -if test x${rd_cv_ieee_switch} = "xyes"; then +if test x${rd_cv_ieee_sigfpe} = "xyes"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } + cat >>confdefs.h <<\_ACEOF +#define MUST_DISABLE_SIGFPE 1 +_ACEOF + PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE" else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - CFLAGS="$_cflags -qfloat=nofold" + { { $as_echo "$as_me:$LINENO: error: +Your Compiler does not do propper IEEE math ... Please find out how to +make IEEE math work with your compiler and let me know (tobi@oetiker.ch). +Check config.log to see what went wrong ... +" >&5 +$as_echo "$as_me: error: +Your Compiler does not do propper IEEE math ... Please find out how to +make IEEE math work with your compiler and let me know (tobi@oetiker.ch). +Check config.log to see what went wrong ... +" >&2;} + { (exit 1); exit 1; }; } +fi -{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -qfloat=nofold switch" >&5 -$as_echo_n "checking if IEEE math works with the -qfloat=nofold switch... " >&6; } -if test "${rd_cv_ieee_nofold+set}" = set; then + +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + +case $TERM in + # for the most important terminal types we directly know the sequences + xterm|xterm*|vt220|vt220*) + T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' /dev/null` + T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' /dev/null` + ;; + vt100|vt100*|cygwin) + T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' /dev/null` + T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' /dev/null` + ;; + *) + T_MD='' + T_ME='' + ;; +esac + { $as_echo "$as_me:$LINENO: result: " >&5 +$as_echo "" >&6; } + { $as_echo "$as_me:$LINENO: result: ${T_MD}Resolve Portability Issues${T_ME}" >&5 +$as_echo "${T_MD}Resolve Portability Issues${T_ME}" >&6; } + + + + + { $as_echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 +$as_echo_n "checking tm_gmtoff in struct tm... " >&6; } +if test "${gq_cv_have_tm_gmtoff+set}" = set; then $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - : + gq_cv_have_tm_gmtoff=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include <$ac_cv_struct_tm> + +int +main () +{ +struct tm t; + t.tm_gmtoff = 0; + exit(0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gq_cv_have_tm_gmtoff=yes + else - cat >conftest.$ac_ext <<_ACEOF + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $gq_cv_have_tm_gmtoff" >&5 +$as_echo "$gq_cv_have_tm_gmtoff" >&6; } + + { $as_echo "$as_me:$LINENO: checking __tm_gmtoff in struct tm" >&5 +$as_echo_n "checking __tm_gmtoff in struct tm... " >&6; } +if test "${gq_cv_have___tm_gmtoff+set}" = set; then + $as_echo_n "(cached) " >&6 +else + gq_cv_have___tm_gmtoff=no + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include + #include <$ac_cv_struct_tm> +int +main () +{ +struct tm t; + t.__tm_gmtoff = 0; + exit(0); -#if HAVE_MATH_H -# include -#endif + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gq_cv_have___tm_gmtoff=yes -#if HAVE_FLOAT_H -# include -#endif +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#if HAVE_IEEEFP_H -# include -#endif -#if HAVE_FP_CLASS_H -# include -#endif +fi -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) -#endif +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif +fi +{ $as_echo "$as_me:$LINENO: result: $gq_cv_have___tm_gmtoff" >&5 +$as_echo "$gq_cv_have___tm_gmtoff" >&6; } -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) -#endif + if test "$gq_cv_have_tm_gmtoff" = yes ; then -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) -#endif +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_GMTOFF 1 +_ACEOF -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif +cat >>confdefs.h <<\_ACEOF +#define TM_GMTOFF tm_gmtoff +_ACEOF -#if HAVE_MATH_H -#include -#endif + elif test "$gq_cv_have___tm_gmtoff" = yes ; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_GMTOFF 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define TM_GMTOFF __tm_gmtoff +_ACEOF + + else + { $as_echo "$as_me:$LINENO: checking for timezone" >&5 +$as_echo_n "checking for timezone... " >&6; } +if test "${ac_cv_var_timezone+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + extern long int timezone; + +int +main () +{ +long int l = timezone; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_var_timezone=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_var_timezone=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_timezone" >&5 +$as_echo "$ac_cv_var_timezone" >&6; } + if test $ac_cv_var_timezone = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TIMEZONE 1 +_ACEOF + + fi + fi + + + +{ $as_echo "$as_me:$LINENO: checking if msync with MS_ASYNC updates the files mtime" >&5 +$as_echo_n "checking if msync with MS_ASYNC updates the files mtime... " >&6; } +if test "${rd_cv_ms_async+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +void timeout (int i) { exit (1); } +int main(void){ + int fd; + struct stat stbuf; + char *addr; + int res; + char temp[] = "mmaptestXXXXXX"; + struct utimbuf newtime; + time_t create_ts; + fd = mkstemp(temp); + if (fd == -1){ + perror(temp); + return 1; + } + write(fd,"12345\n", 6); + stat(temp, &stbuf); + create_ts = stbuf.st_mtime; + newtime.actime = 0; + newtime.modtime = 0; + utime(temp,&newtime); + addr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + if (addr == MAP_FAILED) { + perror("mmap"); + goto bad_exit; + } + addr[0]='x'; + res = msync(addr, 4, MS_ASYNC); + if (res == -1) { + perror("msync"); + goto bad_exit; + } + res = close(fd); + if (res == -1) { + perror("close"); + goto bad_exit; + } + /* there were reports of sync hanging + so we better set an alarm */ + signal(SIGALRM,&timeout); + alarm(5); + /* The ASYNC means that we schedule the msync and return immediately. + Since we want to see if the modification time is updated upon + msync(), we have to make sure that our asynchronous request + completes before we stat below. In a real application, the + request would be completed at a random time in the future + but for this test we do not want to wait an arbitrary amount of + time, so force a commit now. */ + sync(); + stat(temp, &stbuf); + if (create_ts > stbuf.st_mtime){ + goto bad_exit; + } + unlink(temp); + return 0; + bad_exit: + unlink(temp); + return 1; +} -#include -int main(void){ - double rrdnan,rrdinf,rrdc,rrdzero; - ; - /* some math to see if we get a floating point exception */ - rrdzero=sin(0.0); /* don't let the compiler optimize us away */ - rrdnan=0.0/rrdzero; /* especially here */ - rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ - /* at run time without sig fpe */ - rrdc = rrdinf + rrdnan; - rrdc = rrdinf / rrdnan; - if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} - if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} - if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} - if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} - if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} - if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} - return 0; - } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -26291,14 +21178,14 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - rd_cv_ieee_nofold=yes + rd_cv_ms_async=ok else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -rd_cv_ieee_nofold=no +rd_cv_ms_async=broken fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -26307,22 +21194,38 @@ fi fi -if test x${rd_cv_ieee_nofold} = "xyes"; then + + +if test "${rd_cv_ms_async}" = "ok"; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - else + +cat >>confdefs.h <<_ACEOF +#define HAVE_BROKEN_MS_ASYNC 1 +_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - CFLAGS="$_cflags -w -qflttrap=enable:zerodivide" + { $as_echo "$as_me:$LINENO: WARNING: With mmap access, your platform fails to update the files" >&5 +$as_echo "$as_me: WARNING: With mmap access, your platform fails to update the files" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mtime. RRDtool will work around this problem by calling utime on each" >&5 +$as_echo "$as_me: WARNING: mtime. RRDtool will work around this problem by calling utime on each" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: file it opens for rw access." >&5 +$as_echo "$as_me: WARNING: file it opens for rw access." >&2;} + sleep 2 +fi -{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -w -qflttrap=enable:zerodivide" >&5 -$as_echo_n "checking if IEEE math works with the -w -qflttrap=enable:zerodivide... " >&6; } -if test "${rd_cv_ieee_flttrap+set}" = set; then + + + +for ac_func in _NL_TIME_WEEK_1STDAY +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26330,83 +21233,108 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#if HAVE_MATH_H -# include -#endif - -#if HAVE_FLOAT_H -# include -#endif - -#if HAVE_IEEEFP_H -# include -#endif - -#if HAVE_FP_CLASS_H -# include -#endif - -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) +#ifdef __STDC__ +# include +#else +# include #endif -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif +#undef $ac_func -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif - -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me #endif -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif + eval "$as_ac_var=no" +fi -#if HAVE_MATH_H -#include -#endif +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -#include -int main(void){ - double rrdnan,rrdinf,rrdc,rrdzero; - ; - /* some math to see if we get a floating point exception */ - rrdzero=sin(0.0); /* don't let the compiler optimize us away */ - rrdnan=0.0/rrdzero; /* especially here */ - rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ - /* at run time without sig fpe */ - rrdc = rrdinf + rrdnan; - rrdc = rrdinf / rrdnan; - if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} - if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} - if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} - if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} - if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} - if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} - return 0; - } +else + { $as_echo "$as_me:$LINENO: checking for nl_langinfo(_NL_TIME_WEEK_1STDAY) with langinfo.h" >&5 +$as_echo_n "checking for nl_langinfo(_NL_TIME_WEEK_1STDAY) with langinfo.h... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -rm -f conftest$ac_exeext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +nl_langinfo(_NL_TIME_WEEK_1STDAY) + ; + 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;; @@ -26414,52 +21342,111 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + cat >>confdefs.h <<\_ACEOF +#define HAVE__NL_TIME_WEEK_1STDAY 1 +_ACEOF + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +done + + + + +{ $as_echo "$as_me:$LINENO: checking for opterr" >&5 +$as_echo_n "checking for opterr... " >&6; } +if test "${rd_cv_var_int_opterr+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +extern int opterr; opterr = 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rd_cv_ieee_flttrap=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + rd_cv_var_int_opterr=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -rd_cv_ieee_flttrap=no + rd_cv_var_int_opterr=no fi + rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:$LINENO: result: $rd_cv_var_int_opterr" >&5 +$as_echo "$rd_cv_var_int_opterr" >&6; } +if test x"$rd_cv_var_int_opterr" = x"yes"; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_INT_OPTERR 1 +_ACEOF fi -if test x${rd_cv_ieee_flttrap} = "xyes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - CFLAGS="$_cflags -mieee" - -{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -mieee switch" >&5 -$as_echo_n "checking if IEEE math works with the -mieee switch... " >&6; } -if test "${rd_cv_ieee_mswitch+set}" = set; then +build_getopt=no +RRD_GETOPT_LONG="LIBC_HAS_GETOPT_LONG" +{ $as_echo "$as_me:$LINENO: checking for getopt_long" >&5 +$as_echo_n "checking for getopt_long... " >&6; } +if test "${ac_cv_func_getopt_long+set}" = set; then $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -26467,81 +21454,121 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define getopt_long to an innocuous variant, in case declares getopt_long. + For example, HP-UX 11i declares gettimeofday. */ +#define getopt_long innocuous_getopt_long +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getopt_long (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#if HAVE_MATH_H -# include +#ifdef __STDC__ +# include +#else +# include #endif -#if HAVE_FLOAT_H -# include -#endif +#undef getopt_long -#if HAVE_IEEEFP_H -# include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif - -#if HAVE_FP_CLASS_H -# include +char getopt_long (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_getopt_long || defined __stub___getopt_long +choke me #endif -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) -#endif +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_getopt_long=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif + ac_cv_func_getopt_long=no +fi -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) -#endif +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5 +$as_echo "$ac_cv_func_getopt_long" >&6; } +if test "x$ac_cv_func_getopt_long" = x""yes; then + : +else -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) -#endif +RRD_GETOPT_LONG="getopt_long" +build_getopt=yes -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif +fi -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif -#if HAVE_MATH_H -#include -#endif + if test $build_getopt = yes; then + BUILD_GETOPT_TRUE= + BUILD_GETOPT_FALSE='#' +else + BUILD_GETOPT_TRUE='#' + BUILD_GETOPT_FALSE= +fi -#include -int main(void){ - double rrdnan,rrdinf,rrdc,rrdzero; - ; - /* some math to see if we get a floating point exception */ - rrdzero=sin(0.0); /* don't let the compiler optimize us away */ - rrdnan=0.0/rrdzero; /* especially here */ - rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ - /* at run time without sig fpe */ - rrdc = rrdinf + rrdnan; - rrdc = rrdinf / rrdnan; - if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} - if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} - if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} - if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} - if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} - if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} - return 0; - } + + +{ $as_echo "$as_me:$LINENO: checking if realloc can deal with NULL" >&5 +$as_echo_n "checking if realloc can deal with NULL... " >&6; } +if test "${rd_cv_null_realloc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + int main(void){ + char *x = NULL; + x = realloc (x,10); + if (x==NULL) return 1; + return 0; + } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -26565,14 +21592,14 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - rd_cv_ieee_mswitch=yes + rd_cv_null_realloc=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -rd_cv_ieee_mswitch=no +rd_cv_null_realloc=nope fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -26580,107 +21607,41 @@ fi fi +{ $as_echo "$as_me:$LINENO: result: $rd_cv_null_realloc" >&5 +$as_echo "$rd_cv_null_realloc" >&6; } -if test x${rd_cv_ieee_mswitch} = "xyes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - CFLAGS="$_cflags -q float=rndsngl" - -{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -q float=rndsngl switch" >&5 -$as_echo_n "checking if IEEE math works with the -q float=rndsngl switch... " >&6; } -if test "${rd_cv_ieee_qswitch+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +if test x"$rd_cv_null_realloc" = xnope; then +cat >>confdefs.h <<\_ACEOF +#define NO_NULL_REALLOC 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -#if HAVE_MATH_H -# include -#endif - -#if HAVE_FLOAT_H -# include -#endif - -#if HAVE_IEEEFP_H -# include -#endif - -#if HAVE_FP_CLASS_H -# include -#endif - -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) -#endif - -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif - -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) -#endif - -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif +fi -#if HAVE_MATH_H -#include -#endif +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -#include -int main(void){ - double rrdnan,rrdinf,rrdc,rrdzero; - ; - /* some math to see if we get a floating point exception */ - rrdzero=sin(0.0); /* don't let the compiler optimize us away */ - rrdnan=0.0/rrdzero; /* especially here */ - rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ - /* at run time without sig fpe */ - rrdc = rrdinf + rrdnan; - rrdc = rrdinf / rrdnan; - if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} - if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} - if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} - if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} - if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} - if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} - return 0; - } +{ $as_echo "$as_me:$LINENO: checking if ctime_r need special care to act posixly correct" >&5 +$as_echo_n "checking if ctime_r need special care to act posixly correct... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +ctime_r(NULL,NULL,0) + + ; + return 0; +} _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -26688,136 +21649,94 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +ctime_r(NULL,NULL) + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rd_cv_ieee_qswitch=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes, this seems to be solaris style" >&5 +$as_echo "yes, this seems to be solaris style" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -rd_cv_ieee_qswitch=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - + { { $as_echo "$as_me:$LINENO: error: Can't figure how to compile ctime_r" >&5 +$as_echo "$as_me: error: Can't figure how to compile ctime_r" >&2;} + { (exit 1); exit 1; }; } fi -if test x${rd_cv_ieee_qswitch} = "xyes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - CFLAGS="$_cflags -OPT:IEEE_NaN_inf=ON" + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -OPT:IEEE_NaN_inf=ON switch" >&5 -$as_echo_n "checking if IEEE math works with the -OPT:IEEE_NaN_inf=ON switch... " >&6; } -if test "${rd_cv_ieee_ieeenaninfswitch+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include +int +main () +{ +ctime_r(NULL,NULL) - -#if HAVE_MATH_H -# include -#endif - -#if HAVE_FLOAT_H -# include -#endif - -#if HAVE_IEEEFP_H -# include -#endif - -#if HAVE_FP_CLASS_H -# include -#endif - -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) -#endif - -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif - -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) -#endif - -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif - -#if HAVE_MATH_H -#include -#endif - -#include -int main(void){ - double rrdnan,rrdinf,rrdc,rrdzero; - ; - /* some math to see if we get a floating point exception */ - rrdzero=sin(0.0); /* don't let the compiler optimize us away */ - rrdnan=0.0/rrdzero; /* especially here */ - rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ - /* at run time without sig fpe */ - rrdc = rrdinf + rrdnan; - rrdc = rrdinf / rrdnan; - if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} - if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} - if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} - if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} - if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} - if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} - return 0; - } + ; + return 0; +} _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -26825,136 +21744,100 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rd_cv_ieee_ieeenaninfswitch=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -rd_cv_ieee_ieeenaninfswitch=no + { { $as_echo "$as_me:$LINENO: error: Can't figure how to compile ctime_r" >&5 +$as_echo "$as_me: error: Can't figure how to compile ctime_r" >&2;} + { (exit 1); exit 1; }; } + fi + rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi -if test x${rd_cv_ieee_ieeenaninfswitch} = "xyes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - CFLAGS="$_cflags -OPT:IEEE_comparisons=ON" - -{ $as_echo "$as_me:$LINENO: checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch" >&5 -$as_echo_n "checking if IEEE math works with the -OPT:IEEE_comparisons=ON switch... " >&6; } -if test "${rd_cv_ieee_ieeecmpswitch+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -#if HAVE_MATH_H -# include -#endif -#if HAVE_FLOAT_H -# include -#endif -#if HAVE_IEEEFP_H -# include -#endif -#if HAVE_FP_CLASS_H -# include -#endif -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) -#endif +if test $enable_pthread != no; then -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) -#endif +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) -#endif +acx_pthread_ok=no -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -#if HAVE_MATH_H -#include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif - -#include -int main(void){ - double rrdnan,rrdinf,rrdc,rrdzero; - ; - /* some math to see if we get a floating point exception */ - rrdzero=sin(0.0); /* don't let the compiler optimize us away */ - rrdnan=0.0/rrdzero; /* especially here */ - rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ - /* at run time without sig fpe */ - rrdc = rrdinf + rrdnan; - rrdc = rrdinf / rrdnan; - if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} - if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} - if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} - if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} - if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} - if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} - return 0; - } +char pthread_join (); +int +main () +{ +return pthread_join (); + ; + return 0; +} _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -26962,136 +21845,184 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rd_cv_ieee_ieeecmpswitch=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + acx_pthread_ok=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -rd_cv_ieee_ieeecmpswitch=no + fi + rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 +$as_echo "$acx_pthread_ok" >&6; } + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" fi +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). -fi +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. -if test x${rd_cv_ieee_ieeecmpswitch} = "xyes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - CFLAGS=$_cflags +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: -{ $as_echo "$as_me:$LINENO: checking if IEEE math works with fpsetmask(0)" >&5 -$as_echo_n "checking if IEEE math works with fpsetmask(0)... " >&6; } -if test "${rd_cv_ieee_mask+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) -#if HAVE_MATH_H -# include -#endif +case "${host_cpu}-${host_os}" in + *solaris*) -#if HAVE_FLOAT_H -# include -#endif + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthread or + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: -#if HAVE_IEEEFP_H -# include -#endif + acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + ;; +esac -#if HAVE_FP_CLASS_H -# include -#endif +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) -#endif + case $flag in + none) + { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 +$as_echo_n "checking whether pthreads work without any flags... " >&6; } + ;; -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif + -*) + { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 +$as_echo_n "checking whether pthreads work with $flag... " >&6; } + PTHREAD_CFLAGS="$flag" + ;; -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) -#endif + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_acx_pthread_config+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$acx_pthread_config"; then + ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_acx_pthread_config="yes" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) -#endif + test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" +fi +fi +acx_pthread_config=$ac_cv_prog_acx_pthread_config +if test -n "$acx_pthread_config"; then + { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5 +$as_echo "$acx_pthread_config" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif + if test x"$acx_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; -#if HAVE_MATH_H -#include -#endif + *) + { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 +$as_echo_n "checking for the pthreads library -l$flag... " >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac -#include -int main(void){ - double rrdnan,rrdinf,rrdc,rrdzero; - fpsetmask(0); - /* some math to see if we get a floating point exception */ - rrdzero=sin(0.0); /* don't let the compiler optimize us away */ - rrdnan=0.0/rrdzero; /* especially here */ - rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ - /* at run time without sig fpe */ - rrdc = rrdinf + rrdnan; - rrdc = rrdinf / rrdnan; - if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} - if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} - if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} - if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} - if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} - if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} - return 0; - } + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); + ; + return 0; +} _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -27099,139 +22030,73 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rd_cv_ieee_mask=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + acx_pthread_ok=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -rd_cv_ieee_mask=no + fi + rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" -fi + { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 +$as_echo "$acx_pthread_ok" >&6; } + if test "x$acx_pthread_ok" = xyes; then + break; + fi -if test x${rd_cv_ieee_mask} = "xyes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define MUST_DISABLE_FPMASK 1 -_ACEOF + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi - PERLFLAGS="CCFLAGS=-DMUST_DISABLE_FPMASK" -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -{ $as_echo "$as_me:$LINENO: checking if IEEE math works with signal(SIGFPE,SIG_IGN)" >&5 -$as_echo_n "checking if IEEE math works with signal(SIGFPE,SIG_IGN)... " >&6; } -if test "${rd_cv_ieee_sigfpe+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 +$as_echo_n "checking for joinable pthread attribute... " >&6; } + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - -#if HAVE_MATH_H -# include -#endif - -#if HAVE_FLOAT_H -# include -#endif - -#if HAVE_IEEEFP_H -# include -#endif - -#if HAVE_FP_CLASS_H -# include -#endif - -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) -#endif - -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif - -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) -#endif - -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif - -#if HAVE_MATH_H -#include -#endif - -#include -int main(void){ - double rrdnan,rrdinf,rrdc,rrdzero; - signal(SIGFPE,SIG_IGN); - /* some math to see if we get a floating point exception */ - rrdzero=sin(0.0); /* don't let the compiler optimize us away */ - rrdnan=0.0/rrdzero; /* especially here */ - rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */ - /* at run time without sig fpe */ - rrdc = rrdinf + rrdnan; - rrdc = rrdinf / rrdnan; - if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;} - if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;} - if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;} - if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;} - if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;} - if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;} - return 0; - } +#include +int +main () +{ +int attr=$attr; + ; + return 0; +} _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -27239,89 +22104,121 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rd_cv_ieee_sigfpe=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + attr_name=$attr; break else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -rd_cv_ieee_sigfpe=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - fi -if test x${rd_cv_ieee_sigfpe} = "xyes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define MUST_DISABLE_SIGFPE 1 +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + done + { $as_echo "$as_me:$LINENO: result: $attr_name" >&5 +$as_echo "$attr_name" >&6; } + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + +cat >>confdefs.h <<_ACEOF +#define PTHREAD_CREATE_JOINABLE $attr_name _ACEOF - PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE" -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:$LINENO: error: -Your Compiler does not do propper IEEE math ... Please find out how to -make IEEE math work with your compiler and let me know (tobi@oetiker.ch). -Check config.log to see what went wrong ... -" >&5 -$as_echo "$as_me: error: -Your Compiler does not do propper IEEE math ... Please find out how to -make IEEE math work with your compiler and let me know (tobi@oetiker.ch). -Check config.log to see what went wrong ... -" >&2;} - { (exit 1); exit 1; }; } -fi + fi + { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 +$as_echo_n "checking if more special flags are required for pthreads... " >&6; } + x_rflag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";; + *-linux* | *-k*bsd*-gnu*) + if test x"$PTHREAD_CFLAGS" = "x-pthread"; then + # For Linux/gcc "-pthread" implies "-lpthread". We need, however, to make this explicit + # in PTHREAD_LIBS such that a shared library to be built properly depends on libpthread. + PTHREAD_LIBS="-lpthread $PTHREAD_LIBS" + fi;; + esac + { $as_echo "$as_me:$LINENO: result: ${x_rflag}" >&5 +$as_echo "${x_rflag}" >&6; } + if test "x$x_rflag" != xno; then + PTHREAD_CFLAGS="$x_rflag $PTHREAD_CFLAGS" + fi -fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + # More AIX lossage: must compile with cc_r + # Extract the first word of "cc_r", so it can be a program name with args. +set dummy cc_r; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_PTHREAD_CC="cc_r" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" fi - - fi - - +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 +$as_echo "$PTHREAD_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +else + PTHREAD_CC="$CC" fi -fi -fi +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then -fi + MULTITHREAD_CFLAGS=$PTHREAD_CFLAGS + MULTITHREAD_LDFLAGS=$PTHREAD_LIBS + : +else + acx_pthread_ok=no fi - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -27329,116 +22226,47 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi +if test "x$x_rflag" != "xno"; then + CPPFLAGS="$CPPFLAGS $x_rflag" +fi -case $TERM in - # for the most important terminal types we directly know the sequences - xterm|xterm*|vt220|vt220*) - T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' /dev/null` - T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' /dev/null` - ;; - vt100|vt100*|cygwin) - T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' /dev/null` - T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' /dev/null` - ;; - *) - T_MD='' - T_ME='' - ;; -esac - { $as_echo "$as_me:$LINENO: result: " >&5 -$as_echo "" >&6; } - { $as_echo "$as_me:$LINENO: result: ${T_MD}Resolve Portability Issues${T_ME}" >&5 -$as_echo "${T_MD}Resolve Portability Issues${T_ME}" >&6; } + if test $enable_pthread != no; then + BUILD_MULTITHREAD_TRUE= + BUILD_MULTITHREAD_FALSE='#' +else + BUILD_MULTITHREAD_TRUE='#' + BUILD_MULTITHREAD_FALSE= +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking if msync with MS_ASYNC updates the files mtime" >&5 -$as_echo_n "checking if msync with MS_ASYNC updates the files mtime... " >&6; } -if test "${rd_cv_ms_async+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:$LINENO: checking do we need malloc/malloc.h" >&5 +$as_echo_n "checking do we need malloc/malloc.h... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#include -#include -#include -#include -#include -#include #include -#include -#include -void timeout (int i) { exit (1); } -int main(void){ - int fd; - struct stat stbuf; - char *addr; - int res; - char temp[] = "mmaptestXXXXXX"; - struct utimbuf newtime; - time_t create_ts; - fd = mkstemp(temp); - if (fd == -1){ - perror(temp); - return 1; - } - write(fd,"12345\n", 6); - stat(temp, &stbuf); - create_ts = stbuf.st_mtime; - newtime.actime = 0; - newtime.modtime = 0; - utime(temp,&newtime); - addr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); - if (addr == MAP_FAILED) { - perror("mmap"); - goto bad_exit; - } - addr[0]='x'; - res = msync(addr, 4, MS_ASYNC); - if (res == -1) { - perror("msync"); - goto bad_exit; - } - res = close(fd); - if (res == -1) { - perror("close"); - goto bad_exit; - } - /* there were reports of sync hanging - so we better set an alarm */ - signal(SIGALRM,&timeout); - alarm(5); - /* The ASYNC means that we schedule the msync and return immediately. - Since we want to see if the modification time is updated upon - msync(), we have to make sure that our asynchronous request - completes before we stat below. In a real application, the - request would be completed at a random time in the future - but for this test we do not want to wait an arbitrary amount of - time, so force a commit now. */ - sync(); - stat(temp, &stbuf); - if (create_ts > stbuf.st_mtime){ - goto bad_exit; - } - unlink(temp); - return 0; - bad_exit: - unlink(temp); - return 1; -} +int +main () +{ +malloc(1) + ; + return 0; +} _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -27446,110 +22274,38 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - rd_cv_ms_async=ok -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -rd_cv_ms_async=broken -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi - - - -if test "${rd_cv_ms_async}" = "ok"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - -cat >>confdefs.h <<_ACEOF -#define HAVE_BROKEN_MS_ASYNC 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: WARNING: With mmap access, your platform fails to update the files" >&5 -$as_echo "$as_me: WARNING: With mmap access, your platform fails to update the files" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mtime. RRDtool will work around this problem by calling utime on each" >&5 -$as_echo "$as_me: WARNING: mtime. RRDtool will work around this problem by calling utime on each" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: file it opens for rw access." >&5 -$as_echo "$as_me: WARNING: file it opens for rw access." >&2;} - sleep 2 -fi - - - - -for ac_func in _NL_TIME_WEEK_1STDAY -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: nope, works out of the box" >&5 +$as_echo "nope, works out of the box" >&6; } else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include int main () { -return $ac_func (); +malloc(1) + ; return 0; } @@ -27575,56 +22331,83 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - eval "$as_ac_var=yes" + + cat >>confdefs.h <<\_ACEOF +#define MUST_HAVE_MALLOC_MALLOC_H 1 +_ACEOF + + { $as_echo "$as_me:$LINENO: result: yes we do" >&5 +$as_echo "yes we do" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + { { $as_echo "$as_me:$LINENO: error: Can not figure how to compile malloc" >&5 +$as_echo "$as_me: error: Can not figure how to compile malloc" >&2;} + { (exit 1); exit 1; }; } + fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext + + fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + + +cat >>confdefs.h <<\_ACEOF +#define TIME_T_IS_32BIT /**/ +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define TIME_T_IS_64BIT /**/ _ACEOF +{ $as_echo "$as_me:$LINENO: checking the type of time_t" >&5 +$as_echo_n "checking the type of time_t... " >&6; } +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5 +$as_echo_n "checking size of time_t... " >&6; } +if test "${ac_cv_sizeof_time_t+set}" = set; then + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:$LINENO: checking for nl_langinfo(_NL_TIME_WEEK_1STDAY) with langinfo.h" >&5 -$as_echo_n "checking for nl_langinfo(_NL_TIME_WEEK_1STDAY) with langinfo.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +$ac_includes_default int main () { -nl_langinfo(_NL_TIME_WEEK_1STDAY) +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= 0)]; +test_array [0] = 0 + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -27633,62 +22416,126 @@ $as_echo "$ac_try_echo") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define HAVE__NL_TIME_WEEK_1STDAY 1 + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) < 0)]; +test_array [0] = 0 -{ $as_echo "$as_me:$LINENO: checking for opterr" >&5 -$as_echo_n "checking for opterr... " >&6; } -if test "${rd_cv_var_int_opterr+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +$ac_includes_default int main () { -extern int opterr; opterr = 1; +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -27697,93 +22544,62 @@ $as_echo "$ac_try_echo") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - rd_cv_var_int_opterr=yes + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - rd_cv_var_int_opterr=no + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $rd_cv_var_int_opterr" >&5 -$as_echo "$rd_cv_var_int_opterr" >&6; } -if test x"$rd_cv_var_int_opterr" = x"yes"; then +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<\_ACEOF -#define HAVE_INT_OPTERR 1 -_ACEOF + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -build_getopt=no -RRD_GETOPT_LONG="LIBC_HAS_GETOPT_LONG" -{ $as_echo "$as_me:$LINENO: checking for getopt_long" >&5 -$as_echo_n "checking for getopt_long... " >&6; } -if test "${ac_cv_func_getopt_long+set}" = set; then - $as_echo_n "(cached) " >&6 -else +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define getopt_long to an innocuous variant, in case declares getopt_long. - For example, HP-UX 11i declares gettimeofday. */ -#define getopt_long innocuous_getopt_long - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getopt_long (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef getopt_long - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getopt_long (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_getopt_long || defined __stub___getopt_long -choke me -#endif - +$ac_includes_default int main () { -return getopt_long (); +static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)]; +test_array [0] = 0 + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -27792,51 +22608,31 @@ $as_echo "$ac_try_echo") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_getopt_long=yes + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getopt_long=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getopt_long" >&5 -$as_echo "$ac_cv_func_getopt_long" >&6; } -if test "x$ac_cv_func_getopt_long" = x""yes; then - : -else - -RRD_GETOPT_LONG="getopt_long" -build_getopt=yes - -fi - - - if test $build_getopt = yes; then - BUILD_GETOPT_TRUE= - BUILD_GETOPT_FALSE='#' -else - BUILD_GETOPT_TRUE='#' - BUILD_GETOPT_FALSE= + ac_lo=`expr '(' $ac_mid ')' + 1` fi - - -{ $as_echo "$as_me:$LINENO: checking if realloc can deal with NULL" >&5 -$as_echo_n "checking if realloc can deal with NULL... " >&6; } -if test "${rd_cv_null_realloc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_time_t=$ac_lo;; +'') if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_time_t=0 + fi ;; +esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -27844,13 +22640,39 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (time_t)); } +static unsigned long int ulongval () { return (long int) (sizeof (time_t)); } +#include #include - int main(void){ - char *x = NULL; - x = realloc (x,10); - if (x==NULL) return 1; - return 0; - } +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (time_t))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (time_t)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (time_t)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -27874,29 +22696,58 @@ $as_echo "$ac_try_echo") >&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - rd_cv_null_realloc=yes + ac_cv_sizeof_time_t=`cat conftest.val` else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -rd_cv_null_realloc=nope +if test "$ac_cv_type_time_t" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (time_t) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_time_t=0 + fi fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 +$as_echo "$ac_cv_sizeof_time_t" >&6; } -fi -{ $as_echo "$as_me:$LINENO: result: $rd_cv_null_realloc" >&5 -$as_echo "$rd_cv_null_realloc" >&6; } -if test x"$rd_cv_null_realloc" = xnope; then -cat >>confdefs.h <<\_ACEOF -#define NO_NULL_REALLOC 1 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_TIME_T $ac_cv_sizeof_time_t +_ACEOF + + +if test "x$ac_cv_sizeof_time_t" = "x4"; then + { $as_echo "$as_me:$LINENO: result: time_t is 32 bit" >&5 +$as_echo "time_t is 32 bit" >&6; } + cat >>confdefs.h <<\_ACEOF +#define TIME_T_IS_32BIT 1 +_ACEOF + +elif test "x$ac_cv_sizeof_time_t" = "x8"; then + { $as_echo "$as_me:$LINENO: result: time_t is 64 bit" >&5 +$as_echo "time_t is 64 bit" >&6; } + cat >>confdefs.h <<\_ACEOF +#define TIME_T_IS_64BIT 1 _ACEOF +else + { { $as_echo "$as_me:$LINENO: error: can not figure type of time_t" >&5 +$as_echo "$as_me: error: can not figure type of time_t" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c @@ -27905,71 +22756,66 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking if ctime_r need special care to act posixly correct" >&5 -$as_echo_n "checking if ctime_r need special care to act posixly correct... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -ctime_r(NULL,NULL,0) - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + +case $TERM in + # for the most important terminal types we directly know the sequences + xterm|xterm*|vt220|vt220*) + T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' /dev/null` + T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' /dev/null` + ;; + vt100|vt100*|cygwin) + T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' /dev/null` + T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' /dev/null` + ;; + *) + T_MD='' + T_ME='' + ;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: result: " >&5 +$as_echo "" >&6; } + { $as_echo "$as_me:$LINENO: result: ${T_MD}Find 3rd-Party Libraries${T_ME}" >&5 +$as_echo "${T_MD}Find 3rd-Party Libraries${T_ME}" >&6; } + + +have_libdbi=no + +# Check whether --enable-libdbi was given. +if test "${enable_libdbi+set}" = set; then + enableval=$enable_libdbi; +else + + if test "${ac_cv_header_dbi_dbi_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for dbi/dbi.h" >&5 +$as_echo_n "checking for dbi/dbi.h... " >&6; } +if test "${ac_cv_header_dbi_dbi_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dbi_dbi_h" >&5 +$as_echo "$ac_cv_header_dbi_dbi_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking dbi/dbi.h usability" >&5 +$as_echo_n "checking dbi/dbi.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -ctime_r(NULL,NULL) - - ; - return 0; -} +$ac_includes_default +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -27978,126 +22824,105 @@ $as_echo "$ac_try_echo") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes, this seems to be solaris style" >&5 -$as_echo "yes, this seems to be solaris style" >&6; } + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Can't figure how to compile ctime_r" >&5 -$as_echo "$as_me: error: Can't figure how to compile ctime_r" >&2;} - { (exit 1); exit 1; }; } - + ac_header_compiler=no fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - cat >conftest.$ac_ext <<_ACEOF +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking dbi/dbi.h presence" >&5 +$as_echo_n "checking dbi/dbi.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -ctime_r(NULL,NULL) - - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Can't figure how to compile ctime_r" >&5 -$as_echo "$as_me: error: Can't figure how to compile ctime_r" >&2;} - { (exit 1); exit 1; }; } - + ac_header_preproc=no fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: dbi/dbi.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: dbi/dbi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dbi/dbi.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: dbi/dbi.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: dbi/dbi.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: dbi/dbi.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dbi/dbi.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: dbi/dbi.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dbi/dbi.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: dbi/dbi.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dbi/dbi.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: dbi/dbi.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dbi/dbi.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: dbi/dbi.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dbi/dbi.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: dbi/dbi.h: in the future, the compiler will take precedence" >&2;} + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for dbi/dbi.h" >&5 +$as_echo_n "checking for dbi/dbi.h... " >&6; } +if test "${ac_cv_header_dbi_dbi_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_dbi_dbi_h=$ac_header_preproc fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dbi_dbi_h" >&5 +$as_echo "$ac_cv_header_dbi_dbi_h" >&6; } -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - -if test $enable_pthread != no; then - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. +fi +if test "x$ac_cv_header_dbi_dbi_h" = x""yes; then -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 -$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for dbi_initialize in -ldbi" >&5 +$as_echo_n "checking for dbi_initialize in -ldbi... " >&6; } +if test "${ac_cv_lib_dbi_dbi_initialize+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldbi $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -28110,11 +22935,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char pthread_join (); +char dbi_initialize (); int main () { -return pthread_join (); +return dbi_initialize (); ; return 0; } @@ -28140,179 +22965,87 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - acx_pthread_ok=yes + ac_cv_lib_dbi_dbi_initialize=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_lib_dbi_dbi_initialize=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 -$as_echo "$acx_pthread_ok" >&6; } - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dbi_dbi_initialize" >&5 +$as_echo "$ac_cv_lib_dbi_dbi_initialize" >&6; } +if test "x$ac_cv_lib_dbi_dbi_initialize" = x""yes; then -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDBI 1 +_ACEOF -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) + LIBS="${LIBS} -ldbi -ldl" + have_libdbi=yes -case "${host_cpu}-${host_os}" in - *solaris*) +fi - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthread or - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" - ;; -esac +fi -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - case $flag in - none) - { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 -$as_echo_n "checking whether pthreads work without any flags... " >&6; } - ;; - -*) - { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 -$as_echo_n "checking whether pthreads work with $flag... " >&6; } - PTHREAD_CFLAGS="$flag" - ;; +fi - pthread-config) - # Extract the first word of "pthread-config", so it can be a program name with args. -set dummy pthread-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_acx_pthread_config+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$acx_pthread_config"; then - ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_acx_pthread_config="yes" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" -fi -fi -acx_pthread_config=$ac_cv_prog_acx_pthread_config -if test -n "$acx_pthread_config"; then - { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5 -$as_echo "$acx_pthread_config" >&6; } + if test $have_libdbi != no; then + BUILD_LIBDBI_TRUE= + BUILD_LIBDBI_FALSE='#' else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + BUILD_LIBDBI_TRUE='#' + BUILD_LIBDBI_FALSE= fi - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 -$as_echo_n "checking for the pthreads library -l$flag... " >&6; } - PTHREAD_LIBS="-l$flag" - ;; - esac +have_libwrap=no - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# Check whether --enable-libwrap was given. +if test "${enable_libwrap+set}" = set; then + enableval=$enable_libwrap; +else - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat >conftest.$ac_ext <<_ACEOF + if test "${ac_cv_header_tcpd_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for tcpd.h" >&5 +$as_echo_n "checking for tcpd.h... " >&6; } +if test "${ac_cv_header_tcpd_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5 +$as_echo "$ac_cv_header_tcpd_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking tcpd.h usability" >&5 +$as_echo_n "checking tcpd.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); - ; - return 0; -} +$ac_includes_default +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -28321,273 +23054,147 @@ $as_echo "$ac_try_echo") >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - acx_pthread_ok=yes + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 -$as_echo "$acx_pthread_ok" >&6; } - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done + ac_header_compiler=no fi -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 -$as_echo_n "checking for joinable pthread attribute... " >&6; } - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - cat >conftest.$ac_ext <<_ACEOF +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking tcpd.h presence" >&5 +$as_echo_n "checking tcpd.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -int attr=$attr; - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext }; then - attr_name=$attr; break + ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_header_preproc=no fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - done - { $as_echo "$as_me:$LINENO: result: $attr_name" >&5 -$as_echo "$attr_name" >&6; } - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - -cat >>confdefs.h <<_ACEOF -#define PTHREAD_CREATE_JOINABLE $attr_name -_ACEOF - - fi - - { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 -$as_echo_n "checking if more special flags are required for pthreads... " >&6; } - x_rflag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";; - *-linux* | *-k*bsd*-gnu*) - if test x"$PTHREAD_CFLAGS" = "x-pthread"; then - # For Linux/gcc "-pthread" implies "-lpthread". We need, however, to make this explicit - # in PTHREAD_LIBS such that a shared library to be built properly depends on libpthread. - PTHREAD_LIBS="-lpthread $PTHREAD_LIBS" - fi;; - esac - { $as_echo "$as_me:$LINENO: result: ${x_rflag}" >&5 -$as_echo "${x_rflag}" >&6; } - if test "x$x_rflag" != xno; then - PTHREAD_CFLAGS="$x_rflag $PTHREAD_CFLAGS" - fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: tcpd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: tcpd.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: tcpd.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: tcpd.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: tcpd.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: tcpd.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: tcpd.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tcpd.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: tcpd.h: in the future, the compiler will take precedence" >&2;} - # More AIX lossage: must compile with cc_r - # Extract the first word of "cc_r", so it can be a program name with args. -set dummy cc_r; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for tcpd.h" >&5 +$as_echo_n "checking for tcpd.h... " >&6; } +if test "${ac_cv_header_tcpd_h+set}" = set; then $as_echo_n "(cached) " >&6 else - if test -n "$PTHREAD_CC"; then - ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_PTHREAD_CC="cc_r" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" -fi -fi -PTHREAD_CC=$ac_cv_prog_PTHREAD_CC -if test -n "$PTHREAD_CC"; then - { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 -$as_echo "$PTHREAD_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -else - PTHREAD_CC="$CC" -fi - - - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - - MULTITHREAD_CFLAGS=$PTHREAD_CFLAGS - MULTITHREAD_LDFLAGS=$PTHREAD_LIBS - - : -else - acx_pthread_ok=no - + ac_cv_header_tcpd_h=$ac_header_preproc fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcpd_h" >&5 +$as_echo "$ac_cv_header_tcpd_h" >&6; } fi +if test "x$ac_cv_header_tcpd_h" = x""yes; then -if test "x$x_rflag" != "xno"; then - CPPFLAGS="$CPPFLAGS $x_rflag" -fi - - if test $enable_pthread != no; then - BUILD_MULTITHREAD_TRUE= - BUILD_MULTITHREAD_FALSE='#' +for ac_func in hosts_access +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - BUILD_MULTITHREAD_TRUE='#' - BUILD_MULTITHREAD_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:$LINENO: checking do we need malloc/malloc.h" >&5 -$as_echo_n "checking do we need malloc/malloc.h... " >&6; } -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -malloc(1) +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: nope, works out of the box" >&5 -$as_echo "nope, works out of the box" >&6; } -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include int main () { -malloc(1) - +return $ac_func (); ; return 0; } @@ -28613,240 +23220,66 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - - cat >>confdefs.h <<\_ACEOF -#define MUST_HAVE_MALLOC_MALLOC_H 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes we do" >&5 -$as_echo "yes we do" >&6; } + eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Can not figure how to compile malloc" >&5 -$as_echo "$as_me: error: Can not figure how to compile malloc" >&2;} - { (exit 1); exit 1; }; } - + eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - - -cat >>confdefs.h <<\_ACEOF -#define TIME_T_IS_32BIT /**/ +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF cat >>confdefs.h <<\_ACEOF -#define TIME_T_IS_64BIT /**/ -_ACEOF - -{ $as_echo "$as_me:$LINENO: checking the type of time_t" >&5 -$as_echo_n "checking the type of time_t... " >&6; } -if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -if (sizeof(time_t) != 4) return 1; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: time_t is 32 bit" >&5 -$as_echo "time_t is 32 bit" >&6; } - cat >>confdefs.h <<\_ACEOF -#define TIME_T_IS_32BIT 1 +#define HAVE_LIBWRAP 1 _ACEOF + have_libwrap=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { $as_echo "$as_me:$LINENO: checking for hosts_access in -lwrap" >&5 +$as_echo_n "checking for hosts_access in -lwrap... " >&6; } +if test "${ac_cv_lib_wrap_hosts_access+set}" = set; then + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lwrap $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -if (sizeof(time_t) != 8) return 1; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - { $as_echo "$as_me:$LINENO: result: time_t is 64 bit" >&5 -$as_echo "time_t is 64 bit" >&6; } - cat >>confdefs.h <<\_ACEOF -#define TIME_T_IS_64BIT 1 -_ACEOF - - -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { $as_echo "$as_me:$LINENO: error: can not figure type of time_t" >&5 -$as_echo "$as_me: error: can not figure type of time_t" >&2;} - { (exit 1); exit 1; }; } -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - - -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -case $TERM in - # for the most important terminal types we directly know the sequences - xterm|xterm*|vt220|vt220*) - T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' /dev/null` - T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' /dev/null` - ;; - vt100|vt100*|cygwin) - T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' /dev/null` - T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' /dev/null` - ;; - *) - T_MD='' - T_ME='' - ;; -esac - { $as_echo "$as_me:$LINENO: result: " >&5 -$as_echo "" >&6; } - { $as_echo "$as_me:$LINENO: result: ${T_MD}Find 3rd-Party Libraries${T_ME}" >&5 -$as_echo "${T_MD}Find 3rd-Party Libraries${T_ME}" >&6; } - - -# Check whether --enable-libdbi was given. -if test "${enable_libdbi+set}" = set; then - enableval=$enable_libdbi; have_libdbi=no -else - - XXX=$LIBS - LIBS="$LIBS -ldbi -ldl" - { $as_echo "$as_me:$LINENO: checking for libdbi" >&5 -$as_echo_n "checking for libdbi... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char hosts_access (); int main () { -dbi_initialize(NULL) - +return hosts_access (); ; return 0; } - _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" @@ -28869,54 +23302,68 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then + ac_cv_lib_wrap_hosts_access=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_wrap_hosts_access=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_wrap_hosts_access" >&5 +$as_echo "$ac_cv_lib_wrap_hosts_access" >&6; } +if test "x$ac_cv_lib_wrap_hosts_access" = x""yes; then + cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBDBI 1 +#define HAVE_LIBWRAP 1 _ACEOF - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - have_libdbi=yes + LIBS="${LIBS} -lwrap" + have_libwrap=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi - LIBS=$XXX - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - have_libdbi=no + +fi +done fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + fi - if test $have_libdbi != no; then - BUILD_LIBDBI_TRUE= - BUILD_LIBDBI_FALSE='#' + + + if test $have_libwrap != no; then + BUILD_LIBWRAP_TRUE= + BUILD_LIBWRAP_FALSE='#' else - BUILD_LIBDBI_TRUE='#' - BUILD_LIBDBI_FALSE= + BUILD_LIBWRAP_TRUE='#' + BUILD_LIBWRAP_FALSE= fi - if test $enable_rrdcgi != no; then - BUILD_RRDCGI_TRUE= - BUILD_RRDCGI_FALSE='#' + if test $enable_rrd_graph != no; then + BUILD_RRDGRAPH_TRUE= + BUILD_RRDGRAPH_FALSE='#' else - BUILD_RRDCGI_TRUE='#' - BUILD_RRDCGI_FALSE= + BUILD_RRDGRAPH_TRUE='#' + BUILD_RRDGRAPH_FALSE= fi CORE_LIBS="$LIBS" +if test $enable_rrd_graph != no; then ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -29419,7 +23866,7 @@ $as_echo "$as_me: WARNING: http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of cairo-png is 1.4.6. + The last tested version of cairo-png is 1.10.2. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -29440,7 +23887,7 @@ $as_echo "$as_me: WARNING: http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of cairo-png is 1.4.6. + The last tested version of cairo-png is 1.10.2. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -29963,7 +24410,7 @@ $as_echo "$as_me: WARNING: http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of cairo-svg is 1.4.6. + The last tested version of cairo-svg is 1.10.2. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -29984,7 +24431,7 @@ $as_echo "$as_me: WARNING: http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of cairo-svg is 1.4.6. + The last tested version of cairo-svg is 1.10.2. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -30507,7 +24954,7 @@ $as_echo "$as_me: WARNING: http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of cairo-pdf is 1.4.6. + The last tested version of cairo-pdf is 1.10.2. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -30528,7 +24975,7 @@ $as_echo "$as_me: WARNING: http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of cairo-pdf is 1.4.6. + The last tested version of cairo-pdf is 1.10.2. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -31051,7 +25498,7 @@ $as_echo "$as_me: WARNING: http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of cairo-ps is 1.4.6. + The last tested version of cairo-ps is 1.10.2. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -31072,7 +25519,7 @@ $as_echo "$as_me: WARNING: http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of cairo-ps is 1.4.6. + The last tested version of cairo-ps is 1.10.2. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -31107,13 +25554,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x""" != "x"; then CPPFLAGS="$CPPFLAGS -I""" fi - { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5 -$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; } -if test "${ac_cv_lib_glib_2_0_glib_check_version+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpangocairo-1.0" >&5 +$as_echo_n "checking for pango_cairo_context_set_font_options in -lpangocairo-1.0... " >&6; } +if test "${ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lglib-2.0 $LIBS" +LIBS="-lpangocairo-1.0 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -31127,11 +25574,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char glib_check_version (); +char pango_cairo_context_set_font_options (); int main () { -return glib_check_version (); +return pango_cairo_context_set_font_options (); ; return 0; } @@ -31157,12 +25604,12 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_glib_2_0_glib_check_version=yes + ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_glib_2_0_glib_check_version=no + ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options=no fi rm -rf conftest.dSYM @@ -31170,22 +25617,22 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_glib_2_0_glib_check_version" >&5 -$as_echo "$ac_cv_lib_glib_2_0_glib_check_version" >&6; } -if test "x$ac_cv_lib_glib_2_0_glib_check_version" = x""yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options" >&5 +$as_echo "$ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options" >&6; } +if test "x$ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options" = x""yes; then - if test "${ac_cv_header_glib_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for glib.h" >&5 -$as_echo_n "checking for glib.h... " >&6; } -if test "${ac_cv_header_glib_h+set}" = set; then + if test "${ac_cv_header_pango_pango_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5 +$as_echo_n "checking for pango/pango.h... " >&6; } +if test "${ac_cv_header_pango_pango_h+set}" = set; then $as_echo_n "(cached) " >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 -$as_echo "$ac_cv_header_glib_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5 +$as_echo "$ac_cv_header_pango_pango_h" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking glib.h usability" >&5 -$as_echo_n "checking glib.h usability... " >&6; } +{ $as_echo "$as_me:$LINENO: checking pango/pango.h usability" >&5 +$as_echo_n "checking pango/pango.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -31193,7 +25640,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -31226,15 +25673,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking glib.h presence" >&5 -$as_echo_n "checking glib.h presence... " >&6; } +{ $as_echo "$as_me:$LINENO: checking pango/pango.h presence" >&5 +$as_echo_n "checking pango/pango.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -31268,41 +25715,41 @@ $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: glib.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: glib.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: glib.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: glib.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: glib.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: glib.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: glib.h: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ $as_echo "$as_me:$LINENO: checking for glib.h" >&5 -$as_echo_n "checking for glib.h... " >&6; } -if test "${ac_cv_header_glib_h+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5 +$as_echo_n "checking for pango/pango.h... " >&6; } +if test "${ac_cv_header_pango_pango_h+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_cv_header_glib_h=$ac_header_preproc + ac_cv_header_pango_pango_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 -$as_echo "$ac_cv_header_glib_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5 +$as_echo "$ac_cv_header_pango_pango_h" >&6; } fi -if test "x$ac_cv_header_glib_h" = x""yes; then - LIBS="-lglib-2.0 ${LIBS}";EX_CHECK_STATE=YES +if test "x$ac_cv_header_pango_pango_h" = x""yes; then + LIBS="-lpangocairo-1.0 ${LIBS}";EX_CHECK_STATE=YES fi @@ -31353,19 +25800,19 @@ done test -n "$PKGCONFIG" || PKGCONFIG="no" if test "$PKGCONFIG" != "no"; then - if $PKGCONFIG --exists glib-2.0; then - CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags glib-2.0` - LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L glib-2.0` - LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other glib-2.0` - LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l glib-2.0` - unset ac_cv_lib_`echo glib-2.0 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_glib_check_version - { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5 -$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; } -if test "${ac_cv_lib_glib_2_0_glib_check_version+set}" = set; then + if $PKGCONFIG --exists pangocairo; then + CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags pangocairo` + LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L pangocairo` + LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other pangocairo` + LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l pangocairo` + unset ac_cv_lib_`echo pangocairo-1.0 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_pango_cairo_context_set_font_options + { $as_echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpangocairo-1.0" >&5 +$as_echo_n "checking for pango_cairo_context_set_font_options in -lpangocairo-1.0... " >&6; } +if test "${ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lglib-2.0 $LIBS" +LIBS="-lpangocairo-1.0 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -31379,11 +25826,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char glib_check_version (); +char pango_cairo_context_set_font_options (); int main () { -return glib_check_version (); +return pango_cairo_context_set_font_options (); ; return 0; } @@ -31409,12 +25856,12 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_glib_2_0_glib_check_version=yes + ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_glib_2_0_glib_check_version=no + ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options=no fi rm -rf conftest.dSYM @@ -31422,23 +25869,23 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_glib_2_0_glib_check_version" >&5 -$as_echo "$ac_cv_lib_glib_2_0_glib_check_version" >&6; } -if test "x$ac_cv_lib_glib_2_0_glib_check_version" = x""yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options" >&5 +$as_echo "$ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options" >&6; } +if test "x$ac_cv_lib_pangocairo_1_0_pango_cairo_context_set_font_options" = x""yes; then - unset ac_cv_header_`echo glib.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'` - if test "${ac_cv_header_glib_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for glib.h" >&5 -$as_echo_n "checking for glib.h... " >&6; } -if test "${ac_cv_header_glib_h+set}" = set; then + unset ac_cv_header_`echo pango/pango.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'` + if test "${ac_cv_header_pango_pango_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5 +$as_echo_n "checking for pango/pango.h... " >&6; } +if test "${ac_cv_header_pango_pango_h+set}" = set; then $as_echo_n "(cached) " >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 -$as_echo "$ac_cv_header_glib_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5 +$as_echo "$ac_cv_header_pango_pango_h" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking glib.h usability" >&5 -$as_echo_n "checking glib.h usability... " >&6; } +{ $as_echo "$as_me:$LINENO: checking pango/pango.h usability" >&5 +$as_echo_n "checking pango/pango.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -31446,7 +25893,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -31479,15 +25926,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking glib.h presence" >&5 -$as_echo_n "checking glib.h presence... " >&6; } +{ $as_echo "$as_me:$LINENO: checking pango/pango.h presence" >&5 +$as_echo_n "checking pango/pango.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -31521,40 +25968,40 @@ $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: glib.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: glib.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: glib.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: glib.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: glib.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: glib.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: glib.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: glib.h: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ $as_echo "$as_me:$LINENO: checking for glib.h" >&5 -$as_echo_n "checking for glib.h... " >&6; } -if test "${ac_cv_header_glib_h+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5 +$as_echo_n "checking for pango/pango.h... " >&6; } +if test "${ac_cv_header_pango_pango_h+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_cv_header_glib_h=$ac_header_preproc + ac_cv_header_pango_pango_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 -$as_echo "$ac_cv_header_glib_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5 +$as_echo "$ac_cv_header_pango_pango_h" >&6; } fi -if test "x$ac_cv_header_glib_h" = x""yes; then +if test "x$ac_cv_header_pango_pango_h" = x""yes; then EX_CHECK_STATE=YES fi @@ -31565,14 +26012,14 @@ fi else { $as_echo "$as_me:$LINENO: WARNING: ---------------------------------------------------------------------------- -* I found a copy of pkgconfig, but there is no glib-2.0.pc file around. +* I found a copy of pkgconfig, but there is no pangocairo.pc file around. You may want to set the PKG_CONFIG_PATH variable to point to its location. ---------------------------------------------------------------------------- " >&5 $as_echo "$as_me: WARNING: ---------------------------------------------------------------------------- -* I found a copy of pkgconfig, but there is no glib-2.0.pc file around. +* I found a copy of pkgconfig, but there is no pangocairo.pc file around. You may want to set the PKG_CONFIG_PATH variable to point to its location. ---------------------------------------------------------------------------- @@ -31584,18 +26031,18 @@ $as_echo "$as_me: WARNING: if test ${EX_CHECK_STATE} = NO; then { $as_echo "$as_me:$LINENO: WARNING: ---------------------------------------------------------------------------- -* I could not find a working copy of glib-2.0. Check config.log for hints on why +* I could not find a working copy of pangocairo. Check config.log for hints on why this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately - so that compiler and the linker can find libglib-2.0 and its header files. If - you have not installed glib-2.0, you can get it either from its original home on + so that compiler and the linker can find libpangocairo-1.0 and its header files. If + you have not installed pangocairo, you can get it either from its original home on - ftp://ftp.gtk.org/pub/glib/2.12/ + http://ftp.gnome.org/pub/GNOME/sources/pango/1.28 You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of glib-2.0 is 2.12.12. + The last tested version of pangocairo is 1.28.4. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -31605,18 +26052,18 @@ $as_echo "$as_me: WARNING: " >&5 $as_echo "$as_me: WARNING: ---------------------------------------------------------------------------- -* I could not find a working copy of glib-2.0. Check config.log for hints on why +* I could not find a working copy of pangocairo. Check config.log for hints on why this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately - so that compiler and the linker can find libglib-2.0 and its header files. If - you have not installed glib-2.0, you can get it either from its original home on + so that compiler and the linker can find libpangocairo-1.0 and its header files. If + you have not installed pangocairo, you can get it either from its original home on - ftp://ftp.gtk.org/pub/glib/2.12/ + http://ftp.gnome.org/pub/GNOME/sources/pango/1.28 You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of glib-2.0 is 2.12.12. + The last tested version of pangocairo is 1.28.4. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -31638,6 +26085,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -31651,13 +26100,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x""" != "x"; then CPPFLAGS="$CPPFLAGS -I""" fi - { $as_echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpango-1.0" >&5 -$as_echo_n "checking for pango_cairo_context_set_font_options in -lpango-1.0... " >&6; } -if test "${ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5 +$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; } +if test "${ac_cv_lib_glib_2_0_glib_check_version+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpango-1.0 $LIBS" +LIBS="-lglib-2.0 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -31671,11 +26120,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char pango_cairo_context_set_font_options (); +char glib_check_version (); int main () { -return pango_cairo_context_set_font_options (); +return glib_check_version (); ; return 0; } @@ -31701,12 +26150,12 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=yes + ac_cv_lib_glib_2_0_glib_check_version=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=no + ac_cv_lib_glib_2_0_glib_check_version=no fi rm -rf conftest.dSYM @@ -31714,22 +26163,22 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&5 -$as_echo "$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&6; } -if test "x$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" = x""yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_glib_2_0_glib_check_version" >&5 +$as_echo "$ac_cv_lib_glib_2_0_glib_check_version" >&6; } +if test "x$ac_cv_lib_glib_2_0_glib_check_version" = x""yes; then - if test "${ac_cv_header_pango_pango_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5 -$as_echo_n "checking for pango/pango.h... " >&6; } -if test "${ac_cv_header_pango_pango_h+set}" = set; then + if test "${ac_cv_header_glib_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for glib.h" >&5 +$as_echo_n "checking for glib.h... " >&6; } +if test "${ac_cv_header_glib_h+set}" = set; then $as_echo_n "(cached) " >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5 -$as_echo "$ac_cv_header_pango_pango_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 +$as_echo "$ac_cv_header_glib_h" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking pango/pango.h usability" >&5 -$as_echo_n "checking pango/pango.h usability... " >&6; } +{ $as_echo "$as_me:$LINENO: checking glib.h usability" >&5 +$as_echo_n "checking glib.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -31737,7 +26186,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -31770,15 +26219,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking pango/pango.h presence" >&5 -$as_echo_n "checking pango/pango.h presence... " >&6; } +{ $as_echo "$as_me:$LINENO: checking glib.h presence" >&5 +$as_echo_n "checking glib.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -31812,41 +26261,41 @@ $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: glib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: glib.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: glib.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: glib.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: glib.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: glib.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5 -$as_echo_n "checking for pango/pango.h... " >&6; } -if test "${ac_cv_header_pango_pango_h+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking for glib.h" >&5 +$as_echo_n "checking for glib.h... " >&6; } +if test "${ac_cv_header_glib_h+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_cv_header_pango_pango_h=$ac_header_preproc + ac_cv_header_glib_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5 -$as_echo "$ac_cv_header_pango_pango_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 +$as_echo "$ac_cv_header_glib_h" >&6; } fi -if test "x$ac_cv_header_pango_pango_h" = x""yes; then - LIBS="-lpango-1.0 ${LIBS}";EX_CHECK_STATE=YES +if test "x$ac_cv_header_glib_h" = x""yes; then + LIBS="-lglib-2.0 ${LIBS}";EX_CHECK_STATE=YES fi @@ -31897,19 +26346,19 @@ done test -n "$PKGCONFIG" || PKGCONFIG="no" if test "$PKGCONFIG" != "no"; then - if $PKGCONFIG --exists pangocairo; then - CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags pangocairo` - LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L pangocairo` - LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other pangocairo` - LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l pangocairo` - unset ac_cv_lib_`echo pango-1.0 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_pango_cairo_context_set_font_options - { $as_echo "$as_me:$LINENO: checking for pango_cairo_context_set_font_options in -lpango-1.0" >&5 -$as_echo_n "checking for pango_cairo_context_set_font_options in -lpango-1.0... " >&6; } -if test "${ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options+set}" = set; then + if $PKGCONFIG --exists glib-2.0; then + CPPFLAGS=${CPPFLAGS}" "`$PKGCONFIG --cflags glib-2.0` + LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-L glib-2.0` + LDFLAGS=${LDFLAGS}" "`$PKGCONFIG --libs-only-other glib-2.0` + LIBS=${LIBS}" "`$PKGCONFIG --libs-only-l glib-2.0` + unset ac_cv_lib_`echo glib-2.0 | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'`_glib_check_version + { $as_echo "$as_me:$LINENO: checking for glib_check_version in -lglib-2.0" >&5 +$as_echo_n "checking for glib_check_version in -lglib-2.0... " >&6; } +if test "${ac_cv_lib_glib_2_0_glib_check_version+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpango-1.0 $LIBS" +LIBS="-lglib-2.0 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -31923,11 +26372,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char pango_cairo_context_set_font_options (); +char glib_check_version (); int main () { -return pango_cairo_context_set_font_options (); +return glib_check_version (); ; return 0; } @@ -31953,12 +26402,12 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=yes + ac_cv_lib_glib_2_0_glib_check_version=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options=no + ac_cv_lib_glib_2_0_glib_check_version=no fi rm -rf conftest.dSYM @@ -31966,23 +26415,23 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&5 -$as_echo "$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" >&6; } -if test "x$ac_cv_lib_pango_1_0_pango_cairo_context_set_font_options" = x""yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_glib_2_0_glib_check_version" >&5 +$as_echo "$ac_cv_lib_glib_2_0_glib_check_version" >&6; } +if test "x$ac_cv_lib_glib_2_0_glib_check_version" = x""yes; then - unset ac_cv_header_`echo pango/pango.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'` - if test "${ac_cv_header_pango_pango_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5 -$as_echo_n "checking for pango/pango.h... " >&6; } -if test "${ac_cv_header_pango_pango_h+set}" = set; then + unset ac_cv_header_`echo glib.h | sed 's/[^_a-zA-Z0-9]/_/g;s/^[0-9]/_/'` + if test "${ac_cv_header_glib_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for glib.h" >&5 +$as_echo_n "checking for glib.h... " >&6; } +if test "${ac_cv_header_glib_h+set}" = set; then $as_echo_n "(cached) " >&6 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5 -$as_echo "$ac_cv_header_pango_pango_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 +$as_echo "$ac_cv_header_glib_h" >&6; } else # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking pango/pango.h usability" >&5 -$as_echo_n "checking pango/pango.h usability... " >&6; } +{ $as_echo "$as_me:$LINENO: checking glib.h usability" >&5 +$as_echo_n "checking glib.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -31990,7 +26439,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -32023,15 +26472,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext $as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ $as_echo "$as_me:$LINENO: checking pango/pango.h presence" >&5 -$as_echo_n "checking pango/pango.h presence... " >&6; } +{ $as_echo "$as_me:$LINENO: checking glib.h presence" >&5 +$as_echo_n "checking glib.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -32065,40 +26514,40 @@ $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: glib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: glib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: pango/pango.h: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: glib.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: glib.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: glib.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: glib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: glib.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: glib.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: glib.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ $as_echo "$as_me:$LINENO: checking for pango/pango.h" >&5 -$as_echo_n "checking for pango/pango.h... " >&6; } -if test "${ac_cv_header_pango_pango_h+set}" = set; then +{ $as_echo "$as_me:$LINENO: checking for glib.h" >&5 +$as_echo_n "checking for glib.h... " >&6; } +if test "${ac_cv_header_glib_h+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_cv_header_pango_pango_h=$ac_header_preproc + ac_cv_header_glib_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pango_pango_h" >&5 -$as_echo "$ac_cv_header_pango_pango_h" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_glib_h" >&5 +$as_echo "$ac_cv_header_glib_h" >&6; } fi -if test "x$ac_cv_header_pango_pango_h" = x""yes; then +if test "x$ac_cv_header_glib_h" = x""yes; then EX_CHECK_STATE=YES fi @@ -32109,14 +26558,14 @@ fi else { $as_echo "$as_me:$LINENO: WARNING: ---------------------------------------------------------------------------- -* I found a copy of pkgconfig, but there is no pangocairo.pc file around. +* I found a copy of pkgconfig, but there is no glib-2.0.pc file around. You may want to set the PKG_CONFIG_PATH variable to point to its location. ---------------------------------------------------------------------------- " >&5 $as_echo "$as_me: WARNING: ---------------------------------------------------------------------------- -* I found a copy of pkgconfig, but there is no pangocairo.pc file around. +* I found a copy of pkgconfig, but there is no glib-2.0.pc file around. You may want to set the PKG_CONFIG_PATH variable to point to its location. ---------------------------------------------------------------------------- @@ -32128,18 +26577,18 @@ $as_echo "$as_me: WARNING: if test ${EX_CHECK_STATE} = NO; then { $as_echo "$as_me:$LINENO: WARNING: ---------------------------------------------------------------------------- -* I could not find a working copy of pangocairo. Check config.log for hints on why +* I could not find a working copy of glib-2.0. Check config.log for hints on why this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately - so that compiler and the linker can find libpango-1.0 and its header files. If - you have not installed pangocairo, you can get it either from its original home on + so that compiler and the linker can find libglib-2.0 and its header files. If + you have not installed glib-2.0, you can get it either from its original home on - http://ftp.gnome.org/pub/GNOME/sources/pango/1.17 + ftp://ftp.gtk.org/pub/glib/2.28/ You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of pangocairo is 1.17. + The last tested version of glib-2.0 is 2.28.7. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -32149,18 +26598,18 @@ $as_echo "$as_me: WARNING: " >&5 $as_echo "$as_me: WARNING: ---------------------------------------------------------------------------- -* I could not find a working copy of pangocairo. Check config.log for hints on why +* I could not find a working copy of glib-2.0. Check config.log for hints on why this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately - so that compiler and the linker can find libpango-1.0 and its header files. If - you have not installed pangocairo, you can get it either from its original home on + so that compiler and the linker can find libglib-2.0 and its header files. If + you have not installed glib-2.0, you can get it either from its original home on - http://ftp.gnome.org/pub/GNOME/sources/pango/1.17 + ftp://ftp.gtk.org/pub/glib/2.28/ You can find also find an archive copy on http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of pangocairo is 1.17. + The last tested version of glib-2.0 is 2.28.7. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -32683,7 +27132,7 @@ $as_echo "$as_me: WARNING: http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of libxml-2.0 is 2.6.31. + The last tested version of libxml-2.0 is 2.7.8. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -32704,7 +27153,7 @@ $as_echo "$as_me: WARNING: http://oss.oetiker.ch/rrdtool/pub/libs - The last tested version of libxml-2.0 is 2.6.31. + The last tested version of libxml-2.0 is 2.7.8. LIBS=$LIBS LDFLAGS=$LDFLAGS @@ -34968,7 +29417,7 @@ if test "${with_tcllib+set}" = set; then fi enable_tcl=no - for dir in $withval /usr/lib /usr/local/lib /usr/lib/tcl8.4 /usr/lib/tcl8.3 ; do + for dir in $withval /usr/lib /usr/lib64 /usr/local/lib /usr/lib/tcl8.4 /usr/lib/tcl8.3 ; do { $as_echo "$as_me:$LINENO: checking for tclConfig.sh in $dir" >&5 $as_echo_n "checking for tclConfig.sh in $dir... " >&6; } if test -f "$dir/tclConfig.sh" ; then @@ -34993,9 +29442,9 @@ $as_echo "$as_me: WARNING: tclConfig.sh not found - Tcl interface will not be bu 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 - enableval=$enable_tcl; + # Check whether --enable-tcl-site was given. +if test "${enable_tcl_site+set}" = set; then + enableval=$enable_tcl_site; else enable_tcl_site=yes fi @@ -35318,6 +29767,7 @@ fi + for ac_prog in gnroff nroff do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -35363,6 +29813,12 @@ fi test -n "$NROFF" && break done +if test x$NROFF = x; then + { { $as_echo "$as_me:$LINENO: error: I need a copy of *nroff to format the documentation" >&5 +$as_echo "$as_me: error: I need a copy of *nroff to format the documentation" >&2;} + { (exit 1); exit 1; }; } +fi + for ac_prog in groff troff do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -35408,6 +29864,11 @@ fi test -n "$TROFF" && break done +if test x$TROFF = x; then + { { $as_echo "$as_me:$LINENO: error: I need a copy of *troff to format the documentation" >&5 +$as_echo "$as_me: error: I need a copy of *troff to format the documentation" >&2;} + { (exit 1); exit 1; }; } +fi if test -z "$RRDDOCDIR"; then @@ -35458,8 +29919,6 @@ ac_config_files="$ac_config_files doc/Makefile" ac_config_files="$ac_config_files po/Makefile.in" -ac_config_files="$ac_config_files intl/Makefile" - ac_config_files="$ac_config_files src/Makefile" ac_config_files="$ac_config_files src/librrd.sym.in" @@ -35608,6 +30067,13 @@ $as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${BUILD_RRDCGI_TRUE}" && test -z "${BUILD_RRDCGI_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_RRDCGI\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"BUILD_RRDCGI\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${STATIC_PROGRAMS_TRUE}" && test -z "${STATIC_PROGRAMS_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"STATIC_PROGRAMS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -35637,10 +30103,17 @@ $as_echo "$as_me: error: conditional \"BUILD_LIBDBI\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${BUILD_RRDCGI_TRUE}" && test -z "${BUILD_RRDCGI_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_RRDCGI\" was never defined. +if test -z "${BUILD_LIBWRAP_TRUE}" && test -z "${BUILD_LIBWRAP_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_LIBWRAP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_RRDCGI\" was never defined. +$as_echo "$as_me: error: conditional \"BUILD_LIBWRAP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_RRDGRAPH_TRUE}" && test -z "${BUILD_RRDGRAPH_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_RRDGRAPH\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"BUILD_RRDGRAPH\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi @@ -36015,7 +30488,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.4.3, which was +This file was extended by rrdtool $as_me 1.4.7, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -36078,7 +30551,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -rrdtool config.status 1.4.3 +rrdtool config.status 1.4.7 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -36479,7 +30952,6 @@ do "examples/rrdcached/Makefile") CONFIG_FILES="$CONFIG_FILES examples/rrdcached/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; - "intl/Makefile") CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/librrd.sym.in") CONFIG_FILES="$CONFIG_FILES src/librrd.sym.in" ;; "src/librrd.pc") CONFIG_FILES="$CONFIG_FILES src/librrd.pc" ;; @@ -38093,6 +32565,7 @@ echo "Config is DONE!" echo echo " With MMAP IO: $enable_mmap" echo " Build rrd_getopt: $build_getopt" +echo " Build rrd_graph: $enable_rrd_graph" echo " Static programs: $staticprogs" echo " Perl Modules: $COMP_PERL" echo " Perl Binary: $PERL" @@ -38116,6 +32589,7 @@ echo " Build rrdcgi: $enable_rrdcgi" echo " Build librrd MT: $enable_pthread" echo " Use gettext: $USE_NLS" echo " With libDBI: $have_libdbi" +echo " With libwrap: $have_libwrap" echo echo " Libraries: $ALL_LIBS" echo diff --git a/configure.ac b/configure.ac index 95e0562..73ef4ec 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl RRDtool AutoConf script ... dnl --------------------------- -dnl $Id: configure.ac 2044 2010-03-22 17:02:55Z oetiker $ +dnl $Id: configure.ac 2267 2012-01-24 10:08:48Z oetiker $ dnl dnl Created by Jeff Allen, Tobi Oetiker, Blair Zajac dnl @@ -13,14 +13,14 @@ AC_PREREQ(2.59) dnl the official version number is dnl a.b.c -AC_INIT([rrdtool],[1.4.3]) +AC_INIT([rrdtool],[1.4.7]) 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.4003 +NUMVERS=1.4007 AC_SUBST(NUMVERS) dnl for the linker to understand which versions the library are compatible with @@ -31,7 +31,7 @@ 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=5:3:1 +LIBVERS=6:0:2 AC_SUBST(LIBVERS) AC_CANONICAL_TARGET @@ -102,6 +102,15 @@ AC_DEFINE_UNQUOTED(RRDGRAPH_YLEGEND_ANGLE,${RRDGRAPH_YLEGEND_ANGLE:-90.0}, AC_ARG_ENABLE(rrdcgi,AS_HELP_STRING([--disable-rrdcgi],[disable building of rrdcgi]), [],[enable_rrdcgi=yes]) +AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no]) + +AC_ARG_ENABLE(rrd_graph,AS_HELP_STRING([--disable-rrd_graph],[disable all rrd_graph functions]), +[enable_rrdcgi=no],[enable_rrd_graph=yes]) + +if test $enable_rrd_graph != no; then + AC_DEFINE([HAVE_RRD_GRAPH], [], [is rrd_graph supported by this install]) +fi + dnl Check if we run on a system that has fonts AC_ARG_WITH(rrd-default-font, [ --with-rrd-default-font=[OPTIONS] set the full path to your default font.], @@ -161,7 +170,7 @@ AC_SUBST(WERROR) dnl which flags does the compiler support? if test "x$GCC" = "xyes"; then - for flag in -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do + for flag in -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W; do oCFLAGS="$CFLAGS" CFLAGS="$CFLAGS $flag" cachename=rd_cv_gcc_flag_`echo $flag|sed 's/[[^A-Za-z]]/_/g'` @@ -196,7 +205,7 @@ AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos)) dnl add pic flag in any case this makes sure all our code is relocatable -eval `./libtool --config | grep pic_flag` +eval `./libtool --config | grep pic_flag=` CFLAGS="$CFLAGS $pic_flag" @@ -209,7 +218,7 @@ AC_C_BIGENDIAN dnl for each function found we get a definition in config.h dnl of the form HAVE_FUNCTION -AC_CHECK_FUNCS(nl_langinfo tzset fsync mbstowcs opendir readdir chdir chroot getuid strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday) +AC_CHECK_FUNCS(nl_langinfo tzset round rint fsync mbstowcs opendir readdir chdir chroot getuid strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday) AC_FUNC_STRERROR_R @@ -274,7 +283,7 @@ AC_CHECK_FUNCS(posix_fadvise) CONFIGURE_PART(Libintl Processing) AM_GNU_GETTEXT_VERSION(0.17) -AM_GNU_GETTEXT() +AM_GNU_GETTEXT(external) CONFIGURE_PART(IEEE Math Checks) @@ -343,6 +352,8 @@ AC_FULL_IEEE CONFIGURE_PART(Resolve Portability Issues) +GC_TIMEZONE() + CHECK_FOR_WORKING_MS_ASYNC dnl do we have nl_langinfo(_NL_TIME_WEEK_1STDAY) @@ -469,67 +480,75 @@ dnl is time_t 32 of 64 bit ? AC_DEFINE([TIME_T_IS_32BIT], [], [time_t is 32bit]) AC_DEFINE([TIME_T_IS_64BIT], [], [time_t is 64bit]) AC_MSG_CHECKING([the type of time_t]) -AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [[#include ]], - [[if (sizeof(time_t) != 4) return 1; ]] - ), - [ AC_MSG_RESULT([time_t is 32 bit]) - AC_DEFINE([TIME_T_IS_32BIT]) - ], - [ AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [[#include ]], - [[if (sizeof(time_t) != 8) return 1; ]] - ), - [ - AC_MSG_RESULT([time_t is 64 bit]) - AC_DEFINE([TIME_T_IS_64BIT]) - ], - [AC_MSG_ERROR([can not figure type of time_t])] - ) - ] -) +AC_CHECK_SIZEOF([time_t]) +if test "x$ac_cv_sizeof_time_t" = "x4"; then + AC_MSG_RESULT([time_t is 32 bit]) + AC_DEFINE([TIME_T_IS_32BIT]) +elif test "x$ac_cv_sizeof_time_t" = "x8"; then + AC_MSG_RESULT([time_t is 64 bit]) + AC_DEFINE([TIME_T_IS_64BIT]) +else + AC_MSG_ERROR([can not figure type of time_t]) +fi AC_LANG_POP(C) CONFIGURE_PART(Find 3rd-Party Libraries) -AC_ARG_ENABLE(libdbi,AS_HELP_STRING([--disable-libdbi],[do not build in support for libdbi]),[have_libdbi=no],[ - XXX=$LIBS - LIBS="$LIBS -ldbi -ldl" - AC_MSG_CHECKING(for libdbi) - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[#include ]], - [[dbi_initialize(NULL)]] - ) - ],[AC_DEFINE(HAVE_LIBDBI,[1],[have got libdbi installed]) - AC_MSG_RESULT([yes]) - have_libdbi=yes - ],[LIBS=$XXX - AC_MSG_RESULT([no]) - have_libdbi=no - ] - ) +have_libdbi=no + +AC_ARG_ENABLE(libdbi,AS_HELP_STRING([--disable-libdbi],[do not build in support for libdbi]),[],[ + AC_CHECK_HEADER(dbi/dbi.h, [ + AC_CHECK_LIB(dbi, dbi_initialize, [ + AC_DEFINE(HAVE_LIBDBI,[1],[have got libdbi installed]) + LIBS="${LIBS} -ldbi -ldl" + have_libdbi=yes + ]) + ]) ]) + AM_CONDITIONAL(BUILD_LIBDBI,[test $have_libdbi != no]) -AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no]) +have_libwrap=no + +AC_ARG_ENABLE(libwrap, AS_HELP_STRING([--disable-libwrap], [do not build in support for libwrap (tcp wrapper)]),[],[ + AC_CHECK_HEADER(tcpd.h,[ + AC_CHECK_FUNCS(hosts_access, [ + AC_DEFINE(HAVE_LIBWRAP,[1],[have got libwrap installed]) + have_libwrap=yes + ], + [ + AC_CHECK_LIB(wrap, hosts_access, [ + AC_DEFINE(HAVE_LIBWRAP,[1],[have got libwrap installed]) + LIBS="${LIBS} -lwrap" + have_libwrap=yes + ]) + ]) + ]) +]) + + +AM_CONDITIONAL(BUILD_LIBWRAP,[test $have_libwrap != no]) + +AM_CONDITIONAL(BUILD_RRDGRAPH,[test $enable_rrd_graph != no]) CORE_LIBS="$LIBS" -dnl EX_CHECK_ALL(z, zlibVersion, zlib.h, zlib, 1.2.3, http://www.gzip.org/zlib/, "") -dnl EX_CHECK_ALL(png, png_access_version_number, png.h, libpng, 1.2.10, http://prdownloads.sourceforge.net/libpng/, "") -dnl EX_CHECK_ALL(freetype, FT_Init_FreeType, ft2build.h, freetype2, 2.1.10, http://prdownloads.sourceforge.net/freetype/, /usr/include/freetype2) -dnl EX_CHECK_ALL(fontconfig, FcInit, fontconfig.h, fontconfig, 2.3.1, http://fontconfig.org/release/, /usr/include) -EX_CHECK_ALL(cairo, cairo_font_options_create, cairo.h, cairo-png, 1.4.6, http://cairographics.org/releases/, "") -EX_CHECK_ALL(cairo, cairo_svg_surface_create, cairo-svg.h, cairo-svg, 1.4.6, http://cairographics.org/releases/, "") -EX_CHECK_ALL(cairo, cairo_pdf_surface_create, cairo-pdf.h, cairo-pdf, 1.4.6, http://cairographics.org/releases/, "") -EX_CHECK_ALL(cairo, cairo_ps_surface_create, cairo-ps.h, cairo-ps, 1.4.6, http://cairographics.org/releases/, "") -EX_CHECK_ALL(glib-2.0, glib_check_version, glib.h, glib-2.0, 2.12.12, ftp://ftp.gtk.org/pub/glib/2.12/, "") -EX_CHECK_ALL(pango-1.0, pango_cairo_context_set_font_options, pango/pango.h, pangocairo, 1.17, http://ftp.gnome.org/pub/GNOME/sources/pango/1.17, "") -EX_CHECK_ALL(xml2, xmlParseFile, libxml/parser.h, libxml-2.0, 2.6.31, http://xmlsoft.org/downloads.html, /usr/include/libxml2) +if test $enable_rrd_graph != no; then +dnl EX_CHECK_ALL(z, zlibVersion, zlib.h, zlib, 1.2.5, http://zlib.net/, "") +dnl EX_CHECK_ALL(png, png_access_version_number, png.h, libpng, 1.4.8, ftp://ftp.simplesystems.org/pub/libpng/png/src/, "") +dnl EX_CHECK_ALL(freetype, FT_Init_FreeType, ft2build.h, freetype2, 2.4.6, http://download.savannah.gnu.org/releases/freetype/, /usr/include/freetype2) +dnl EX_CHECK_ALL(fontconfig, FcInit, fontconfig.h, fontconfig, 2.8.0, http://www.freedesktop.org/software/fontconfig/release/, /usr/include) +EX_CHECK_ALL(cairo, cairo_font_options_create, cairo.h, cairo-png, 1.10.2, http://cairographics.org/releases/, "") +EX_CHECK_ALL(cairo, cairo_svg_surface_create, cairo-svg.h, cairo-svg, 1.10.2, http://cairographics.org/releases/, "") +EX_CHECK_ALL(cairo, cairo_pdf_surface_create, cairo-pdf.h, cairo-pdf, 1.10.2, http://cairographics.org/releases/, "") +EX_CHECK_ALL(cairo, cairo_ps_surface_create, cairo-ps.h, cairo-ps, 1.10.2, http://cairographics.org/releases/, "") +EX_CHECK_ALL(pangocairo-1.0, pango_cairo_context_set_font_options, pango/pango.h, pangocairo, 1.28.4, http://ftp.gnome.org/pub/GNOME/sources/pango/1.28, "") + +fi +EX_CHECK_ALL(glib-2.0, glib_check_version, glib.h, glib-2.0, 2.28.7, ftp://ftp.gtk.org/pub/glib/2.28/, "") +EX_CHECK_ALL(xml2, xmlParseFile, libxml/parser.h, libxml-2.0, 2.7.8, http://xmlsoft.org/downloads.html, /usr/include/libxml2) if test "$EX_CHECK_ALL_ERR" = "YES"; then AC_MSG_ERROR([Please fix the library issues listed above and try again.]) @@ -821,7 +840,7 @@ if test "$enable_tcl" = "yes"; then withval="" AC_ARG_WITH(tcllib,[ --with-tcllib=DIR location of the tclConfig.sh]) enable_tcl=no - for dir in $withval /usr/lib /usr/local/lib /usr/lib/tcl8.4 /usr/lib/tcl8.3 ; do + for dir in $withval /usr/lib /usr/lib64 /usr/local/lib /usr/lib/tcl8.4 /usr/lib/tcl8.3 ; do AC_MSG_CHECKING(for tclConfig.sh in $dir) if test -f "$dir/tclConfig.sh" ; then tcl_config=$dir/tclConfig.sh @@ -842,7 +861,7 @@ if test "$enable_tcl" = "yes"; then TCL_INCLUDE_SPEC="$TCL_INCLUDE_SPEC -I$TCL_INC_DIR" fi fi - AC_ARG_ENABLE(tcl,AS_HELP_STRING([--enable-tcl-site],[install the tcl extension in the tcl tree]), + AC_ARG_ENABLE(tcl-site,AS_HELP_STRING([--enable-tcl-site],[install the tcl extension in the tcl tree]), [],[enable_tcl_site=yes]) fi @@ -880,8 +899,16 @@ fi AC_SUBST(COMP_PYTHON) dnl Check for nroff -AC_PATH_PROGS(NROFF, gnroff nroff) -AC_PATH_PROGS(TROFF, groff troff) +AC_ARG_VAR(NROFF, [path to the local nroff version]) +AC_PATH_PROGS(NROFF, [gnroff nroff]) +if test x$NROFF = x; then + AC_MSG_ERROR([I need a copy of *nroff to format the documentation]) +fi +AC_ARG_VAR(TROFF, [path to the local troff version]) +AC_PATH_PROGS(TROFF, [groff troff]) +if test x$TROFF = x; then + AC_MSG_ERROR([I need a copy of *troff to format the documentation]) +fi AC_ARG_VAR(RRDDOCDIR, [[DATADIR/doc/PACKAGE-VERSION] Documentation directory]) if test -z "$RRDDOCDIR"; then @@ -901,7 +928,6 @@ AC_CONFIG_FILES([examples/Makefile]) AC_CONFIG_FILES([examples/rrdcached/Makefile]) AC_CONFIG_FILES([doc/Makefile]) AC_CONFIG_FILES([po/Makefile.in]) -AC_CONFIG_FILES([intl/Makefile]) AC_CONFIG_FILES([src/Makefile]) AC_CONFIG_FILES([src/librrd.sym.in]) AC_CONFIG_FILES([src/librrd.pc]) @@ -938,6 +964,7 @@ echo "Config is DONE!" echo echo " With MMAP IO: $enable_mmap" echo " Build rrd_getopt: $build_getopt" +echo " Build rrd_graph: $enable_rrd_graph" echo " Static programs: $staticprogs" echo " Perl Modules: $COMP_PERL" echo " Perl Binary: $PERL" @@ -961,6 +988,7 @@ echo " Build rrdcgi: $enable_rrdcgi" echo " Build librrd MT: $enable_pthread" echo " Use gettext: $USE_NLS" echo " With libDBI: $have_libdbi" +echo " With libwrap: $have_libwrap" echo echo " Libraries: $ALL_LIBS" echo diff --git a/doc/Makefile.in b/doc/Makefile.in index 6abc897..107c606 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -41,23 +41,14 @@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \ - $(top_srcdir)/m4/intl.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -98,7 +89,6 @@ am__installdirs = "$(DESTDIR)$(idocdir)" "$(DESTDIR)$(ihtmldir)" \ DATA = $(idoc_DATA) $(ihtml_DATA) $(iman_DATA) $(iman3_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ ALL_LIBS = @ALL_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -107,12 +97,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ COMP_LUA = @COMP_LUA@ COMP_PERL = @COMP_PERL@ COMP_PYTHON = @COMP_PYTHON@ @@ -121,7 +108,6 @@ CORE_LIBS = @CORE_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -132,50 +118,30 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GENCAT = @GENCAT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC2 = @GLIBC2@ -GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ -HAVE_ASPRINTF = @HAVE_ASPRINTF@ -HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ -HAVE_SNPRINTF = @HAVE_SNPRINTF@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ -HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBVERS = @LIBVERS@ LIPO = @LIPO@ LN_S = @LN_S@ -LTLIBC = @LTLIBC@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ LUA = @LUA@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DEFINES = @LUA_DEFINES@ @@ -218,7 +184,6 @@ PKGCONFIG = @PKGCONFIG@ POD2HTML = @POD2HTML@ POD2MAN = @POD2MAN@ POSUB = @POSUB@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ @@ -250,13 +215,9 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_VERSION = @TCL_VERSION@ TROFF = @TROFF@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WERROR = @WERROR@ -WINDRES = @WINDRES@ -WOE32 = @WOE32@ -WOE32DLL = @WOE32DLL@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ diff --git a/doc/bin_dec_hex.1 b/doc/bin_dec_hex.1 index 6bc12b7..2f146f1 100644 --- a/doc/bin_dec_hex.1 +++ b/doc/bin_dec_hex.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "BIN_DEC_HEX 1" -.TH BIN_DEC_HEX 1 "2009-06-10" "1.4.3" "rrdtool" +.TH BIN_DEC_HEX 1 "2009-06-10" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/bin_dec_hex.txt b/doc/bin_dec_hex.txt index dd53ebd..cd9097e 100644 --- a/doc/bin_dec_hex.txt +++ b/doc/bin_dec_hex.txt @@ -373,4 +373,4 @@ AAUUTTHHOORR -1.4.3 2009-06-10 BIN_DEC_HEX(1) +1.4.7 2009-06-10 BIN_DEC_HEX(1) diff --git a/doc/cdeftutorial.1 b/doc/cdeftutorial.1 index 9480827..3266c82 100644 --- a/doc/cdeftutorial.1 +++ b/doc/cdeftutorial.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "CDEFTUTORIAL 1" -.TH CDEFTUTORIAL 1 "2009-02-21" "1.4.3" "rrdtool" +.TH CDEFTUTORIAL 1 "2010-05-10" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -954,7 +954,7 @@ You may do some complex data filtering: \& \& DEF:var=database.rrd:traffic:AVERAGE \& CDEF:prev1=PREV(var) -\& CDEF:time=TIME +\& CDEF:time=var,POP,TIME \& CDEF:prevtime=PREV(time) \& CDEF:derivate=var,prev1,\-,time,prevtime,\-,/ \& LINE3:derivate#000077:derivate diff --git a/doc/cdeftutorial.html b/doc/cdeftutorial.html index 63c40b6..eb02b66 100644 --- a/doc/cdeftutorial.html +++ b/doc/cdeftutorial.html @@ -810,7 +810,7 @@ sign before it: "CDEF:wipeout2=wipeout,-1,*"

     DEF:var=database.rrd:traffic:AVERAGE
     CDEF:prev1=PREV(var)
-    CDEF:time=TIME
+    CDEF:time=var,POP,TIME
     CDEF:prevtime=PREV(time)
     CDEF:derivate=var,prev1,-,time,prevtime,-,/
     LINE3:derivate#000077:derivate
diff --git a/doc/cdeftutorial.pod b/doc/cdeftutorial.pod
index 1c17046..b2016a2 100644
--- a/doc/cdeftutorial.pod
+++ b/doc/cdeftutorial.pod
@@ -862,7 +862,7 @@ You may do some complex data filtering:
 
     DEF:var=database.rrd:traffic:AVERAGE
     CDEF:prev1=PREV(var)
-    CDEF:time=TIME
+    CDEF:time=var,POP,TIME
     CDEF:prevtime=PREV(time)
     CDEF:derivate=var,prev1,-,time,prevtime,-,/
     LINE3:derivate#000077:derivate
diff --git a/doc/cdeftutorial.txt b/doc/cdeftutorial.txt
index e277f94..25edc7f 100644
--- a/doc/cdeftutorial.txt
+++ b/doc/cdeftutorial.txt
@@ -762,7 +762,7 @@ TThhee eexxaammpplleess ffrroomm tthhee RRRRDD ggrraapp
 
            DEF:var=database.rrd:traffic:AVERAGE
            CDEF:prev1=PREV(var)
-           CDEF:time=TIME
+           CDEF:time=var,POP,TIME
            CDEF:prevtime=PREV(time)
            CDEF:derivate=var,prev1,-,time,prevtime,-,/
            LINE3:derivate#000077:derivate
@@ -784,4 +784,4 @@ AAUUTTHHOORR
 
 
 
-1.4.3                             2009-02-21                   CDEFTUTORIAL(1)
+1.4.7                             2010-05-10                   CDEFTUTORIAL(1)
diff --git a/doc/librrd.3 b/doc/librrd.3
index f684194..a681910 100644
--- a/doc/librrd.3
+++ b/doc/librrd.3
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "librrd 3"
-.TH librrd 3 "2009-11-15" "1.4.3" "rrdtool"
+.TH librrd 3 "2009-11-15" "1.4.7" "rrdtool"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/doc/librrd.txt b/doc/librrd.txt
index 0dc4d10..b506c26 100644
--- a/doc/librrd.txt
+++ b/doc/librrd.txt
@@ -121,4 +121,4 @@ AAUUTTHHOORR
 
 
 
-1.4.3                             2009-11-15                         librrd(3)
+1.4.7                             2009-11-15                         librrd(3)
diff --git a/doc/rpntutorial.1 b/doc/rpntutorial.1
index ac7cde5..87d570a 100644
--- a/doc/rpntutorial.1
+++ b/doc/rpntutorial.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RPNTUTORIAL 1"
-.TH RPNTUTORIAL 1 "2009-12-08" "1.4.3" "rrdtool"
+.TH RPNTUTORIAL 1 "2009-12-08" "1.4.7" "rrdtool"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/doc/rpntutorial.txt b/doc/rpntutorial.txt
index f34ffb2..3070c37 100644
--- a/doc/rpntutorial.txt
+++ b/doc/rpntutorial.txt
@@ -187,4 +187,4 @@ AAUUTTHHOORR
 
 
 
-1.4.3                             2009-12-08                    RPNTUTORIAL(1)
+1.4.7                             2009-12-08                    RPNTUTORIAL(1)
diff --git a/doc/rrd-beginners.1 b/doc/rrd-beginners.1
index 9697d0a..3f8a41f 100644
--- a/doc/rrd-beginners.1
+++ b/doc/rrd-beginners.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RRD-BEGINNERS 1"
-.TH RRD-BEGINNERS 1 "2009-10-14" "1.4.3" "rrdtool"
+.TH RRD-BEGINNERS 1 "2009-10-14" "1.4.7" "rrdtool"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/doc/rrd-beginners.txt b/doc/rrd-beginners.txt
index 81c4bf0..d1c6273 100644
--- a/doc/rrd-beginners.txt
+++ b/doc/rrd-beginners.txt
@@ -315,4 +315,4 @@ AAUUTTHHOORR
 
 
 
-1.4.3                             2009-10-14                  RRD-BEGINNERS(1)
+1.4.7                             2009-10-14                  RRD-BEGINNERS(1)
diff --git a/doc/rrdbuild.1 b/doc/rrdbuild.1
index 4200abf..29f5f0c 100644
--- a/doc/rrdbuild.1
+++ b/doc/rrdbuild.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RRDBUILD 1"
-.TH RRDBUILD 1 "2010-03-22" "1.4.3" "rrdtool"
+.TH RRDBUILD 1 "2012-01-24" "1.4.7" "rrdtool"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -162,7 +162,7 @@ Once you have decided. Save the two locations into environment variables.
 .PP
 .Vb 2
 \& BUILD_DIR=/tmp/rrdbuild
-\& INSTALL_DIR=/opt/rrdtool\-1.4.3
+\& INSTALL_DIR=/opt/rrdtool\-1.4.7
 .Ve
 .PP
 If your \fI/tmp\fR is mounted with the option noexec (\s-1RHEL\s0 seems todo that) you have to choose
@@ -179,9 +179,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.4.3.tar.gz
-\& gunzip \-c rrdtool\-1.4.3.tar.gz | tar xf \-
-\& cd rrdtool\-1.4.3
+\& wget http://oss.oetiker.ch/rrdtool/pub/rrdtool\-1.4.7.tar.gz
+\& gunzip \-c rrdtool\-1.4.7.tar.gz | tar xf \-
+\& cd rrdtool\-1.4.7
 \& ./configure \-\-prefix=$INSTALL_DIR && make && make install
 .Ve
 .PP
@@ -220,15 +220,6 @@ Make sure the RRDtool build system finds your new compiler
 .Vb 1
 \& export PATH=/opt/SunStudioExpress/bin
 .Ve
-.PP
-Since there does not seem to be a viable msgfmt tool on OpenSolaris (short
-of installing it yourself). You have to call configure with the
-.PP
-.Vb 1
-\& \-\-disable\-libintl
-.Ve
-.PP
-option.
 .SS "Debian / Ubuntu"
 .IX Subsection "Debian / Ubuntu"
 Use apt-get to make sure you have all that is required. A number
@@ -482,6 +473,16 @@ config file.
 \& $MAKE install
 .Ve
 .PP
+When building on Solaris you may want todo
+.PP
+.Vb 5
+\& ./configure \-\-prefix=$INSTALL_DIR \e
+\&    \-\-enable\-xlib=no \e
+\&    \-\-enable\-xlib\-render=no \e
+\&    \-\-enable\-win32=no \e
+\&    CFLAGS="\-O3 \-fPIC \-D_POSIX_PTHREAD_SEMANTICS"
+.Ve
+.PP
 \fIBuilding Glib\fR
 .IX Subsection "Building Glib"
 .PP
@@ -520,7 +521,7 @@ tcl setups that would prevent RRDtool from building if they are included in
 their current state.
 .PP
 .Vb 5
-\& cd $BUILD_DIR/rrdtool\-1.4.3
+\& cd $BUILD_DIR/rrdtool\-1.4.7
 \& ./configure \-\-prefix=$INSTALL_DIR \-\-disable\-tcl \-\-disable\-python
 \& $MAKE clean
 \& $MAKE
diff --git a/doc/rrdbuild.html b/doc/rrdbuild.html
index f6a0956..f7585a6 100644
--- a/doc/rrdbuild.html
+++ b/doc/rrdbuild.html
@@ -96,7 +96,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=/opt/rrdtool-1.4.3
+ INSTALL_DIR=/opt/rrdtool-1.4.7

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:

@@ -106,9 +106,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.4.3.tar.gz
- gunzip -c rrdtool-1.4.3.tar.gz | tar xf -
- cd rrdtool-1.4.3
+ wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz
+ gunzip -c rrdtool-1.4.7.tar.gz | tar xf -
+ cd rrdtool-1.4.7
  ./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.

@@ -139,11 +139,6 @@ fix this:

Make sure the RRDtool build system finds your new compiler

  export PATH=/opt/SunStudioExpress/bin
-

Since there does not seem to be a viable msgfmt tool on OpenSolaris (short -of installing it yourself). You have to call configure with the

-
- --disable-libintl
-

option.

Debian / Ubuntu

@@ -357,6 +352,13 @@ config file.

CFLAGS="-O3 -fPIC" $MAKE $MAKE install +

When building on Solaris you may want todo

+
+ ./configure --prefix=$INSTALL_DIR \
+    --enable-xlib=no \
+    --enable-xlib-render=no \
+    --enable-win32=no \
+    CFLAGS="-O3 -fPIC -D_POSIX_PTHREAD_SEMANTICS"

Building Glib

@@ -391,7 +393,7 @@ because it seems that a fair number of people have ill configured python and tcl setups that would prevent RRDtool from building if they are included in their current state.

- cd $BUILD_DIR/rrdtool-1.4.3
+ cd $BUILD_DIR/rrdtool-1.4.7
  ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
  $MAKE clean
  $MAKE
diff --git a/doc/rrdbuild.pod b/doc/rrdbuild.pod
index 99bab00..7e1c0fe 100644
--- a/doc/rrdbuild.pod
+++ b/doc/rrdbuild.pod
@@ -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=/opt/rrdtool-1.4.3
+ INSTALL_DIR=/opt/rrdtool-1.4.7
 
 
 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.4.3.tar.gz
- gunzip -c rrdtool-1.4.3.tar.gz | tar xf -
- cd rrdtool-1.4.3
+ wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz
+ gunzip -c rrdtool-1.4.7.tar.gz | tar xf -
+ cd rrdtool-1.4.7
  ./configure --prefix=$INSTALL_DIR && make && make install
 
 Ok, this was very optimistic. This try will probably have ended with
@@ -92,13 +92,6 @@ Make sure the RRDtool build system finds your new compiler
 
  export PATH=/opt/SunStudioExpress/bin
 
-Since there does not seem to be a viable msgfmt tool on OpenSolaris (short
-of installing it yourself). You have to call configure with the
-
- --disable-libintl
-
-option.
-
 =head2 Debian / Ubuntu
 
 Use apt-get to make sure you have all that is required. A number
@@ -312,6 +305,14 @@ config file.
  $MAKE
  $MAKE install
 
+When building on Solaris you may want todo
+
+ ./configure --prefix=$INSTALL_DIR \
+    --enable-xlib=no \
+    --enable-xlib-render=no \
+    --enable-win32=no \
+    CFLAGS="-O3 -fPIC -D_POSIX_PTHREAD_SEMANTICS"
+
 =head3 Building Glib
 
  cd $BUILD_DIR
@@ -344,7 +345,7 @@ because it seems that a fair number of people have ill configured python and
 tcl setups that would prevent RRDtool from building if they are included in
 their current state.
 
- cd $BUILD_DIR/rrdtool-1.4.3
+ cd $BUILD_DIR/rrdtool-1.4.7
  ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
  $MAKE clean
  $MAKE
diff --git a/doc/rrdbuild.txt b/doc/rrdbuild.txt
index f58f4a2..8d6e5a6 100644
--- a/doc/rrdbuild.txt
+++ b/doc/rrdbuild.txt
@@ -35,7 +35,7 @@ OOPPTTIIMMIISSTTIICC BBUUIILLDD
        variables.
 
         BUILD_DIR=/tmp/rrdbuild
-        INSTALL_DIR=/opt/rrdtool-1.4.3
+        INSTALL_DIR=/opt/rrdtool-1.4.7
 
        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.4.3.tar.gz
-        gunzip -c rrdtool-1.4.3.tar.gz | tar xf -
-        cd rrdtool-1.4.3
+        wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz
+        gunzip -c rrdtool-1.4.7.tar.gz | tar xf -
+        cd rrdtool-1.4.7
         ./configure --prefix=$INSTALL_DIR && make && make install
 
        Ok, this was very optimistic. This try will probably have ended with
@@ -84,13 +84,6 @@ IINNSSTTAALLLLIINNGG DDEEPPEENNDDEENNCCIIEESS
 
         export PATH=/opt/SunStudioExpress/bin
 
-       Since there does not seem to be a viable msgfmt tool on OpenSolaris
-       (short of installing it yourself). You have to call configure with the
-
-        --disable-libintl
-
-       option.
-
    DDeebbiiaann // UUbbuunnttuu
        Use apt-get to make sure you have all that is required. A number of
        packages will get added through dependencies.
@@ -293,6 +286,14 @@ BBUUIILLDDIINNGG DDEEPPEENNDDEENNCCIIEESS
         $MAKE
         $MAKE install
 
+       When building on Solaris you may want todo
+
+        ./configure --prefix=$INSTALL_DIR \
+           --enable-xlib=no \
+           --enable-xlib-render=no \
+           --enable-win32=no \
+           CFLAGS="-O3 -fPIC -D_POSIX_PTHREAD_SEMANTICS"
+
        _B_u_i_l_d_i_n_g _G_l_i_b
 
         cd $BUILD_DIR
@@ -325,7 +326,7 @@ 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.4.3
+        cd $BUILD_DIR/rrdtool-1.4.7
         ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python
         $MAKE clean
         $MAKE
@@ -344,4 +345,4 @@ AAUUTTHHOORR
 
 
 
-1.4.3                             2010-03-22                       RRDBUILD(1)
+1.4.7                             2012-01-24                       RRDBUILD(1)
diff --git a/doc/rrdcached.1 b/doc/rrdcached.1
index c3d2e4e..8c2324e 100644
--- a/doc/rrdcached.1
+++ b/doc/rrdcached.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RRDCACHED 1"
-.TH RRDCACHED 1 "2010-03-22" "1.4.3" "rrdtool"
+.TH RRDCACHED 1 "2011-03-15" "1.4.7" "rrdtool"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -173,7 +173,7 @@ For network sockets, a port may be specified by using the form
 \&\f(CW\*(C`\f(CB[\f(CW\f(CIaddress\f(CW\f(CB]:\f(CW\f(CIport\f(CW\*(C'\fR. If the address is an IPv4 address or a fully
 qualified domain name (i.\ e. the address contains at least one dot
 (\f(CW\*(C`.\*(C'\fR)), the square brackets can be omitted, resulting in the (simpler)
-\&\f(CW\*(C`\f(CIaddress\f(CW\f(CB:\f(CW\f(CIport\f(CW\*(C'\fR pattern. The default port is \fB42217/udp\fR. If you
+\&\f(CW\*(C`\f(CIaddress\f(CW\f(CB:\f(CW\f(CIport\f(CW\*(C'\fR pattern. The default port is \fB42217/tcp\fR. If you
 specify a network socket, it is mandatory to read the
 \&\*(L"\s-1SECURITY\s0 \s-1CONSIDERATIONS\s0\*(R" section.
 .Sp
@@ -201,7 +201,8 @@ user privileges (e.g. graph generating \s-1CGI\s0 scripts that typically run in
 permission context of the web server).
 .Sp
 This option affects the \fIfollowing\fR \s-1UNIX\s0 socket addresses (the following
-\&\fB\-l\fR options), i.e., you may specify different settings for different
+\&\fB\-l\fR options) or the default socket (if no \fB\-l\fR options have been
+specified), i.e., you may specify different settings for different
 sockets.
 .Sp
 The default is not to change ownership or permissions of the socket and, thus,
@@ -218,7 +219,8 @@ BSD-derived systems ignore permissions for \s-1UNIX\s0 sockets. See \fIunix\fR\|
 details.
 .Sp
 This option affects the \fIfollowing\fR \s-1UNIX\s0 socket addresses (the following
-\&\fB\-l\fR options), i.e., you may specify different settings for different
+\&\fB\-l\fR options) or the default socket (if no \fB\-l\fR options have been
+specified), i.e., you may specify different settings for different
 sockets.
 .Sp
 The default is not to change ownership or permissions of the socket and, thus,
@@ -237,7 +239,8 @@ For example, to allow the \f(CW\*(C`FLUSH\*(C'\fR and \f(CW\*(C`PENDING\*(C'\fR
 .Ve
 .Sp
 The \fB\-P\fR option affects the \fIfollowing\fR socket addresses (the following \fB\-l\fR
-options). In the following example, only the IPv4 network socket (address
+options) or the default socket (if no \fB\-l\fR options have been
+specified). In the following example, only the IPv4 network socket (address
 \&\f(CW10.0.0.1\fR) will be restricted to the \f(CW\*(C`FLUSH\*(C'\fR and \f(CW\*(C`PENDING\*(C'\fR commands:
 .Sp
 .Vb 1
@@ -470,14 +473,15 @@ Explicitly flushed values are inserted at the \*(L"head\*(R".
 .IX Header "SECURITY CONSIDERATIONS"
 .SS "Authentication"
 .IX Subsection "Authentication"
-There is no authentication.
+If your rrdtool installation was built without libwrap there is no form of 
+authentication for clients connecting to the rrdcache daemon!
 .PP
-The client/server protocol does not yet have any authentication mechanism. It
-is likely that authentication and encryption will be added in a future version,
-but for the time being it is the administrator's responsibility to secure the
-traffic from/to the daemon!
+If your rrdtool installation was built with libwrap then you can use
+hosts_access to restrict client access to the rrdcache daemon (rrdcached).  For more
+information on how to use hosts_access to restrict access to the rrdcache
+daemon you should read the \fIhosts_access\fR\|(5) man pages.
 .PP
-It is highly recommended to install a packet filter or similar mechanism to
+It is still highly recommended to install a packet filter or similar mechanism to
 prevent unauthorized connections. Unless you have a dedicated \s-1VLAN\s0 or \s-1VPN\s0 for
 this, using network sockets is probably a bad idea!
 .SS "Authorization"
diff --git a/doc/rrdcached.html b/doc/rrdcached.html
index f8ace3d..bd84790 100644
--- a/doc/rrdcached.html
+++ b/doc/rrdcached.html
@@ -107,7 +107,7 @@ name are resolved using getaddrinfo().

[address]:port. If the address is an IPv4 address or a fully qualified domain name (i. e. the address contains at least one dot (.)), the square brackets can be omitted, resulting in the (simpler) -address:port pattern. The default port is 42217/udp. If you +address:port pattern. The default port is 42217/tcp. If you specify a network socket, it is mandatory to read the SECURITY CONSIDERATIONS section.

The following formats are accepted. Please note that the address of the UNIX @@ -132,7 +132,8 @@ may be useful in cases where you cannot easily run all RRD processes with the sa user privileges (e.g. graph generating CGI scripts that typically run in the permission context of the web server).

This option affects the following UNIX socket addresses (the following --l options), i.e., you may specify different settings for different +-l options) or the default socket (if no -l options have been +specified), i.e., you may specify different settings for different sockets.

The default is not to change ownership or permissions of the socket and, thus, use the system default.

@@ -148,7 +149,8 @@ permissions are required to connect to a UNIX socket. However, many BSD-derived systems ignore permissions for UNIX sockets. See unix(7) for details.

This option affects the following UNIX socket addresses (the following --l options), i.e., you may specify different settings for different +-l options) or the default socket (if no -l options have been +specified), i.e., you may specify different settings for different sockets.

The default is not to change ownership or permissions of the socket and, thus, use the system default.

@@ -164,7 +166,8 @@ For example, to allow the FLUSH and PENDING commands o
   rrdcached -P FLUSH,PENDING $MORE_ARGUMENTS

The -P option affects the following socket addresses (the following -l -options). In the following example, only the IPv4 network socket (address +options) or the default socket (if no -l options have been +specified). In the following example, only the IPv4 network socket (address 10.0.0.1) will be restricted to the FLUSH and PENDING commands:

   rrdcached -l unix:/some/path -P FLUSH,PENDING -l 10.0.0.1
@@ -424,12 +427,13 @@ to disk.

Authentication

-

There is no authentication.

-

The client/server protocol does not yet have any authentication mechanism. It -is likely that authentication and encryption will be added in a future version, -but for the time being it is the administrator's responsibility to secure the -traffic from/to the daemon!

-

It is highly recommended to install a packet filter or similar mechanism to +

If your rrdtool installation was built without libwrap there is no form of +authentication for clients connecting to the rrdcache daemon!

+

If your rrdtool installation was built with libwrap then you can use +hosts_access to restrict client access to the rrdcache daemon (rrdcached). For more +information on how to use hosts_access to restrict access to the rrdcache +daemon you should read the hosts_access(5) man pages.

+

It is still highly recommended to install a packet filter or similar mechanism to prevent unauthorized connections. Unless you have a dedicated VLAN or VPN for this, using network sockets is probably a bad idea!

diff --git a/doc/rrdcached.pod b/doc/rrdcached.pod index d6bfec3..7f9c2a1 100644 --- a/doc/rrdcached.pod +++ b/doc/rrdcached.pod @@ -50,7 +50,7 @@ For network sockets, a port may be specified by using the form CI

B<]:>I>. If the address is an IPv4 address or a fully qualified domain name (i.Ee. the address contains at least one dot (C<.>)), the square brackets can be omitted, resulting in the (simpler) -CB<:>I> pattern. The default port is B<42217/udp>. If you +CB<:>I> pattern. The default port is B<42217/tcp>. If you specify a network socket, it is mandatory to read the L section. @@ -77,7 +77,8 @@ user privileges (e.g. graph generating CGI scripts that typically run in the permission context of the web server). This option affects the I UNIX socket addresses (the following -B<-l> options), i.e., you may specify different settings for different +B<-l> options) or the default socket (if no B<-l> options have been +specified), i.e., you may specify different settings for different sockets. The default is not to change ownership or permissions of the socket and, thus, @@ -95,7 +96,8 @@ BSD-derived systems ignore permissions for UNIX sockets. See L for details. This option affects the I UNIX socket addresses (the following -B<-l> options), i.e., you may specify different settings for different +B<-l> options) or the default socket (if no B<-l> options have been +specified), i.e., you may specify different settings for different sockets. The default is not to change ownership or permissions of the socket and, thus, @@ -113,7 +115,8 @@ For example, to allow the C and C commands one could specify: rrdcached -P FLUSH,PENDING $MORE_ARGUMENTS The B<-P> option affects the I socket addresses (the following B<-l> -options). In the following example, only the IPv4 network socket (address +options) or the default socket (if no B<-l> options have been +specified). In the following example, only the IPv4 network socket (address C<10.0.0.1>) will be restricted to the C and C commands: rrdcached -l unix:/some/path -P FLUSH,PENDING -l 10.0.0.1 @@ -396,14 +399,15 @@ ASCII art rocks. =head2 Authentication -There is no authentication. +If your rrdtool installation was built without libwrap there is no form of +authentication for clients connecting to the rrdcache daemon! -The client/server protocol does not yet have any authentication mechanism. It -is likely that authentication and encryption will be added in a future version, -but for the time being it is the administrator's responsibility to secure the -traffic from/to the daemon! +If your rrdtool installation was built with libwrap then you can use +hosts_access to restrict client access to the rrdcache daemon (rrdcached). For more +information on how to use hosts_access to restrict access to the rrdcache +daemon you should read the hosts_access(5) man pages. -It is highly recommended to install a packet filter or similar mechanism to +It is still highly recommended to install a packet filter or similar mechanism to prevent unauthorized connections. Unless you have a dedicated VLAN or VPN for this, using network sockets is probably a bad idea! diff --git a/doc/rrdcached.txt b/doc/rrdcached.txt index f2091de..34262a0 100644 --- a/doc/rrdcached.txt +++ b/doc/rrdcached.txt @@ -36,7 +36,7 @@ OOPPTTIIOONNSS "[[_a_d_d_r_e_s_s]]::_p_o_r_t_". If the address is an IPv4 address or a fully qualified domain name (i. e. the address contains at least one dot (".")), the square brackets can be omitted, resulting in the - (simpler) "_a_d_d_r_e_s_s::_p_o_r_t_" pattern. The default port is 4422221177//uuddpp. If + (simpler) "_a_d_d_r_e_s_s::_p_o_r_t_" pattern. The default port is 4422221177//ttccpp. If you specify a network socket, it is mandatory to read the "SECURITY CONSIDERATIONS" section. @@ -63,7 +63,8 @@ OOPPTTIIOONNSS permission context of the web server). This option affects the _f_o_l_l_o_w_i_n_g UNIX socket addresses (the - following --ll options), i.e., you may specify different settings for + following --ll options) or the default socket (if no --ll options have + been specified), i.e., you may specify different settings for different sockets. The default is not to change ownership or permissions of the socket @@ -80,7 +81,8 @@ OOPPTTIIOONNSS sockets. See _u_n_i_x(7) for details. This option affects the _f_o_l_l_o_w_i_n_g UNIX socket addresses (the - following --ll options), i.e., you may specify different settings for + following --ll options) or the default socket (if no --ll options have + been specified), i.e., you may specify different settings for different sockets. The default is not to change ownership or permissions of the socket @@ -98,7 +100,8 @@ OOPPTTIIOONNSS rrdcached -P FLUSH,PENDING $MORE_ARGUMENTS The --PP option affects the _f_o_l_l_o_w_i_n_g socket addresses (the following - --ll options). In the following example, only the IPv4 network socket + --ll options) or the default socket (if no --ll options have been + specified). In the following example, only the IPv4 network socket (address 10.0.0.1) will be restricted to the "FLUSH" and "PENDING" commands: @@ -323,15 +326,16 @@ HHOOWW IITT WWOORRKKSS SSEECCUURRIITTYY CCOONNSSIIDDEERRAATTIIOONNSS AAuutthheennttiiccaattiioonn - There is no authentication. + If your rrdtool installation was built without libwrap there is no form + of authentication for clients connecting to the rrdcache daemon! - The client/server protocol does not yet have any authentication - mechanism. It is likely that authentication and encryption will be - added in a future version, but for the time being it is the - administrator's responsibility to secure the traffic from/to the - daemon! + If your rrdtool installation was built with libwrap then you can use + hosts_access to restrict client access to the rrdcache daemon + (rrdcached). For more information on how to use hosts_access to + restrict access to the rrdcache daemon you should read the + _h_o_s_t_s___a_c_c_e_s_s(5) man pages. - It is highly recommended to install a packet filter or similar + It is still highly recommended to install a packet filter or similar mechanism to prevent unauthorized connections. Unless you have a dedicated VLAN or VPN for this, using network sockets is probably a bad idea! @@ -577,4 +581,4 @@ CCOONNTTRRIIBBUUTTOORRSS -1.4.3 2010-03-22 RRDCACHED(1) +1.4.7 2011-03-15 RRDCACHED(1) diff --git a/doc/rrdcgi.1 b/doc/rrdcgi.1 index bbb3d50..47ba14e 100644 --- a/doc/rrdcgi.1 +++ b/doc/rrdcgi.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDCGI 1" -.TH RRDCGI 1 "2008-12-22" "1.4.3" "rrdtool" +.TH RRDCGI 1 "2008-12-22" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdcgi.txt b/doc/rrdcgi.txt index 8199b78..b6700ce 100644 --- a/doc/rrdcgi.txt +++ b/doc/rrdcgi.txt @@ -202,4 +202,4 @@ AAUUTTHHOORR -1.4.3 2008-12-22 RRDCGI(1) +1.4.7 2008-12-22 RRDCGI(1) diff --git a/doc/rrdcreate.1 b/doc/rrdcreate.1 index 0203789..94ac5fc 100644 --- a/doc/rrdcreate.1 +++ b/doc/rrdcreate.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDCREATE 1" -.TH RRDCREATE 1 "2010-03-08" "1.4.3" "rrdtool" +.TH RRDCREATE 1 "2011-01-06" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -251,7 +251,7 @@ between two updates of this data source before the value of the data source is assumed to be \fI*UNKNOWN*\fR. .PP \&\fImin\fR and \fImax\fR define the expected range values for data supplied by a -data source. If \fImin\fR and/or \fImax\fR any value outside the defined range +data source. If \fImin\fR and/or \fImax\fR are specified any value outside the defined range will be regarded as \fI*UNKNOWN*\fR. If you do not know or care about min and max, set them to U for unknown. Note that min and max always refer to the processed values of the \s-1DS\s0. For a traffic\-\fB\s-1COUNTER\s0\fR type \s-1DS\s0 this would be diff --git a/doc/rrdcreate.html b/doc/rrdcreate.html index 05da84c..521e3b6 100644 --- a/doc/rrdcreate.html +++ b/doc/rrdcreate.html @@ -177,7 +177,7 @@ to as "virtual" or "computed" columns.

between two updates of this data source before the value of the data source is assumed to be *UNKNOWN*.

min and max define the expected range values for data supplied by a -data source. If min and/or max any value outside the defined range +data source. If min and/or max are specified any value outside the defined range will be regarded as *UNKNOWN*. If you do not know or care about min and max, set them to U for unknown. Note that min and max always refer to the processed values of the DS. For a traffic-COUNTER type DS this would be diff --git a/doc/rrdcreate.pod b/doc/rrdcreate.pod index b321de6..3e6451d 100644 --- a/doc/rrdcreate.pod +++ b/doc/rrdcreate.pod @@ -137,7 +137,7 @@ between two updates of this data source before the value of the data source is assumed to be I<*UNKNOWN*>. I and I define the expected range values for data supplied by a -data source. If I and/or I any value outside the defined range +data source. If I and/or I are specified any value outside the defined range will be regarded as I<*UNKNOWN*>. If you do not know or care about min and max, set them to U for unknown. Note that min and max always refer to the processed values of the DS. For a traffic-B type DS this would be diff --git a/doc/rrdcreate.txt b/doc/rrdcreate.txt index 59acdc6..fafa9c3 100644 --- a/doc/rrdcreate.txt +++ b/doc/rrdcreate.txt @@ -120,11 +120,12 @@ DDEESSCCRRIIPPTTIIOONN assumed to be _*_U_N_K_N_O_W_N_*. _m_i_n and _m_a_x define the expected range values for data supplied by a - data source. If _m_i_n and/or _m_a_x any value outside the defined range will - be regarded as _*_U_N_K_N_O_W_N_*. If you do not know or care about min and max, - set them to U for unknown. Note that min and max always refer to the - processed values of the DS. For a traffic-CCOOUUNNTTEERR type DS this would be - the maximum and minimum data-rate expected from the device. + data source. If _m_i_n and/or _m_a_x are specified any value outside the + defined range will be regarded as _*_U_N_K_N_O_W_N_*. If you do not know or care + about min and max, set them to U for unknown. Note that min and max + always refer to the processed values of the DS. For a traffic-CCOOUUNNTTEERR + type DS this would be the maximum and minimum data-rate expected from + the device. _I_f _i_n_f_o_r_m_a_t_i_o_n _o_n _m_i_n_i_m_a_l_/_m_a_x_i_m_a_l _e_x_p_e_c_t_e_d _v_a_l_u_e_s _i_s _a_v_a_i_l_a_b_l_e_, _a_l_w_a_y_s _s_e_t _t_h_e _m_i_n _a_n_d_/_o_r _m_a_x _p_r_o_p_e_r_t_i_e_s_. _T_h_i_s _w_i_l_l _h_e_l_p _R_R_D_t_o_o_l _i_n _d_o_i_n_g _a @@ -531,4 +532,4 @@ AAUUTTHHOORR -1.4.3 2010-03-08 RRDCREATE(1) +1.4.7 2011-01-06 RRDCREATE(1) diff --git a/doc/rrddump.1 b/doc/rrddump.1 index 3fc50b6..af35ce6 100644 --- a/doc/rrddump.1 +++ b/doc/rrddump.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDDUMP 1" -.TH RRDDUMP 1 "2009-10-14" "1.4.3" "rrdtool" +.TH RRDDUMP 1 "2009-10-14" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrddump.txt b/doc/rrddump.txt index 180f399..a8f8a55 100644 --- a/doc/rrddump.txt +++ b/doc/rrddump.txt @@ -67,4 +67,4 @@ AAUUTTHHOORR -1.4.3 2009-10-14 RRDDUMP(1) +1.4.7 2009-10-14 RRDDUMP(1) diff --git a/doc/rrdfetch.1 b/doc/rrdfetch.1 index 7488b4d..f23095c 100644 --- a/doc/rrdfetch.1 +++ b/doc/rrdfetch.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDFETCH 1" -.TH RRDFETCH 1 "2008-09-25" "1.4.3" "rrdtool" +.TH RRDFETCH 1 "2010-11-11" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -276,11 +276,16 @@ single-number date is interpreted as MMDD[\s-1YY\s0]YY. \&\fI\s-1NOTE2\s0\fR: if you specify the \fIday\fR in this way, the \fItime-of-day\fR is \&\s-1REQUIRED\s0 as well. .PP -Finally, you can use the words \fBnow\fR, \fBstart\fR, or \fBend\fR as your time +Finally, you can use the words \fBnow\fR, \fBstart\fR, \fBend\fR or \fBepoch\fR as your time reference. \fBNow\fR refers to the current moment (and is also the default time reference). \fBStart\fR (\fBend\fR) can be used to specify a time relative to the start (end) time for those tools that use these -categories (\fBrrdfetch\fR, rrdgraph). +categories (\fBrrdfetch\fR, rrdgraph) and \fBepoch\fR indicates the +*IX epoch (*IX timestamp 0 = 1970\-01\-01 00:00:00 \s-1UTC\s0). \fBepoch\fR is +useful to disambiguate between a timestamp value and some forms +of abbreviated date/time specifications, because it allows to use +time offset specifications using units, eg. \fBepoch\fR+19711205s unambiguously +denotes timestamp 19711205 and not 1971\-12\-05 00:00:00 \s-1UTC\s0. .PP Month and day of the week names can be used in their naturally abbreviated form (e.g., Dec for December, Sun for Sunday, etc.). The diff --git a/doc/rrdfetch.html b/doc/rrdfetch.html index 97e72da..392bdb2 100644 --- a/doc/rrdfetch.html +++ b/doc/rrdfetch.html @@ -189,11 +189,16 @@ full date in several numerical formats, including MM/DD/[YY]YY, single-number date is interpreted as MMDD[YY]YY.

NOTE2: if you specify the day in this way, the time-of-day is REQUIRED as well.

-

Finally, you can use the words now, start, or end as your time +

Finally, you can use the words now, start, end or epoch as your time reference. Now refers to the current moment (and is also the default time reference). Start (end) can be used to specify a time relative to the start (end) time for those tools that use these -categories (rrdfetch, the rrdgraph manpage).

+categories (rrdfetch, the rrdgraph manpage) and epoch indicates the +*IX epoch (*IX timestamp 0 = 1970-01-01 00:00:00 UTC). epoch is +useful to disambiguate between a timestamp value and some forms +of abbreviated date/time specifications, because it allows to use +time offset specifications using units, eg. epoch+19711205s unambiguously +denotes timestamp 19711205 and not 1971-12-05 00:00:00 UTC.

Month and day of the week names can be used in their naturally abbreviated form (e.g., Dec for December, Sun for Sunday, etc.). The words now, start, end can be abbreviated as n, s, e.

diff --git a/doc/rrdfetch.pod b/doc/rrdfetch.pod index 0052aa6..1c31347 100644 --- a/doc/rrdfetch.pod +++ b/doc/rrdfetch.pod @@ -158,11 +158,16 @@ single-number date is interpreted as MMDD[YY]YY. I: if you specify the I in this way, the I is REQUIRED as well. -Finally, you can use the words B, B, or B as your time +Finally, you can use the words B, B, B or B as your time reference. B refers to the current moment (and is also the default time reference). B (B) can be used to specify a time relative to the start (end) time for those tools that use these -categories (B, L). +categories (B, L) and B indicates the +*IX epoch (*IX timestamp 0 = 1970-01-01 00:00:00 UTC). B is +useful to disambiguate between a timestamp value and some forms +of abbreviated date/time specifications, because it allows to use +time offset specifications using units, eg. B+19711205s unambiguously +denotes timestamp 19711205 and not 1971-12-05 00:00:00 UTC. Month and day of the week names can be used in their naturally abbreviated form (e.g., Dec for December, Sun for Sunday, etc.). The diff --git a/doc/rrdfetch.txt b/doc/rrdfetch.txt index 88e5ca7..eb6dd0b 100644 --- a/doc/rrdfetch.txt +++ b/doc/rrdfetch.txt @@ -132,11 +132,16 @@ DDEESSCCRRIIPPTTIIOONN _N_O_T_E_2: if you specify the _d_a_y in this way, the _t_i_m_e_-_o_f_-_d_a_y is REQUIRED as well. - Finally, you can use the words nnooww, ssttaarrtt, or eenndd as your time + Finally, you can use the words nnooww, ssttaarrtt, eenndd or eeppoocchh as your time reference. NNooww refers to the current moment (and is also the default time reference). SSttaarrtt (eenndd) can be used to specify a time relative to the start (end) time for those tools that use these categories - (rrrrddffeettcchh, rrdgraph). + (rrrrddffeettcchh, rrdgraph) and eeppoocchh indicates the *IX epoch (*IX timestamp 0 + = 1970-01-01 00:00:00 UTC). eeppoocchh is useful to disambiguate between a + timestamp value and some forms of abbreviated date/time specifications, + because it allows to use time offset specifications using units, eg. + eeppoocchh+19711205s unambiguously denotes timestamp 19711205 and not + 1971-12-05 00:00:00 UTC. Month and day of the week names can be used in their naturally abbreviated form (e.g., Dec for December, Sun for Sunday, etc.). The @@ -241,4 +246,4 @@ AAUUTTHHOORR -1.4.3 2008-09-25 RRDFETCH(1) +1.4.7 2010-11-11 RRDFETCH(1) diff --git a/doc/rrdfirst.1 b/doc/rrdfirst.1 index 520c8ef..976a95e 100644 --- a/doc/rrdfirst.1 +++ b/doc/rrdfirst.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDFIRST 1" -.TH RRDFIRST 1 "2008-03-15" "1.4.3" "rrdtool" +.TH RRDFIRST 1 "2008-03-15" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdfirst.txt b/doc/rrdfirst.txt index 14636cb..606fd80 100644 --- a/doc/rrdfirst.txt +++ b/doc/rrdfirst.txt @@ -26,4 +26,4 @@ AAUUTTHHOORR -1.4.3 2008-03-15 RRDFIRST(1) +1.4.7 2008-03-15 RRDFIRST(1) diff --git a/doc/rrdflushcached.1 b/doc/rrdflushcached.1 index c817d55..5e08101 100644 --- a/doc/rrdflushcached.1 +++ b/doc/rrdflushcached.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDFLUSHCACHED 1" -.TH RRDFLUSHCACHED 1 "2009-10-14" "1.4.3" "rrdtool" +.TH RRDFLUSHCACHED 1 "2009-10-14" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdflushcached.txt b/doc/rrdflushcached.txt index 63d9e99..a5637f0 100644 --- a/doc/rrdflushcached.txt +++ b/doc/rrdflushcached.txt @@ -40,4 +40,4 @@ AAUUTTHHOORR -1.4.3 2009-10-14 RRDFLUSHCACHED(1) +1.4.7 2009-10-14 RRDFLUSHCACHED(1) diff --git a/doc/rrdgraph.1 b/doc/rrdgraph.1 index 9a8d27f..66e3d07 100644 --- a/doc/rrdgraph.1 +++ b/doc/rrdgraph.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH 1" -.TH RRDGRAPH 1 "2010-03-22" "1.4.3" "rrdtool" +.TH RRDGRAPH 1 "2010-12-07" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -383,7 +383,7 @@ for the right axis. .PP By default the format of the axis labels gets determined automatically. If you want to do this your self, use this option with the same \f(CW%lf\fR arguments -you know from the \s-1PRING\s0 and \s-1GPRINT\s0 commands. +you know from the \s-1PRINT\s0 and \s-1GPRINT\s0 commands. .SS "Legend" .IX Subsection "Legend" [\fB\-g\fR|\fB\-\-no\-legend\fR] @@ -611,8 +611,9 @@ of the graph. .PP \&\fB\s-1VDEF:\s0\fR\fIvname\fR\fB=\fR\fI\s-1RPN\s0 expression\fR .PP -You need at least one \fB\s-1DEF\s0\fR statement to generate anything. The -other statements are useful but optional. +You need at least one \fB\s-1DEF\s0\fR and one \fB\s-1LINE\s0\fR, \fB\s-1AREA\s0\fR, \fB\s-1GPRINT\s0\fR, \fB\s-1PRINT\s0\fR +statement to generate anything useful. +.PP See rrdgraph_data and rrdgraph_rpn for the exact format. .PP \&\s-1NOTE:\s0 \fBGraph and print elements\fR diff --git a/doc/rrdgraph.html b/doc/rrdgraph.html index 13b3e4f..e8e60a7 100644 --- a/doc/rrdgraph.html +++ b/doc/rrdgraph.html @@ -273,7 +273,7 @@ for the right axis.

[--right-axis-format format-string]

By default the format of the axis labels gets determined automatically. If you want to do this your self, use this option with the same %lf arguments -you know from the PRING and GPRINT commands.

+you know from the PRINT and GPRINT commands.

Legend

@@ -430,9 +430,9 @@ of the graph.

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.

+

You need at least one DEF and one LINE, AREA, GPRINT, PRINT +statement to generate anything useful.

+

See the rrdgraph_data manpage and the rrdgraph_rpn manpage for the exact format.

NOTE: 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. diff --git a/doc/rrdgraph.pod b/doc/rrdgraph.pod index fbc217b..be421e8 100644 --- a/doc/rrdgraph.pod +++ b/doc/rrdgraph.pod @@ -263,7 +263,7 @@ for the right axis. By default the format of the axis labels gets determined automatically. If you want to do this your self, use this option with the same %lf arguments -you know from the PRING and GPRINT commands. +you know from the PRINT and GPRINT commands. =head2 Legend @@ -485,8 +485,9 @@ BIB<=>I BIB<=>I -You need at least one B statement to generate anything. The -other statements are useful but optional. +You need at least one B and one B, B, B, B +statement to generate anything useful. + See L and L for the exact format. NOTE: B diff --git a/doc/rrdgraph.txt b/doc/rrdgraph.txt index 8e869f7..cf8f542 100644 --- a/doc/rrdgraph.txt +++ b/doc/rrdgraph.txt @@ -236,7 +236,7 @@ OOPPTTIIOONNSS By default the format of the axis labels gets determined automatically. If you want to do this your self, use this option with the same %lf - arguments you know from the PRING and GPRINT commands. + arguments you know from the PRINT and GPRINT commands. LLeeggeenndd [--gg|----nnoo--lleeggeenndd] @@ -459,9 +459,10 @@ OOPPTTIIOONNSS VVDDEEFF::_v_n_a_m_e==_R_P_N _e_x_p_r_e_s_s_i_o_n - You need at least one DDEEFF statement to generate anything. The other - statements are useful but optional. See rrdgraph_data and rrdgraph_rpn - for the exact format. + You need at least one DDEEFF and one LLIINNEE, AARREEAA, GGPPRRIINNTT, PPRRIINNTT statement + to generate anything useful. + + See rrdgraph_data and rrdgraph_rpn for the exact format. NOTE: GGrraapphh aanndd pprriinntt eelleemmeennttss @@ -523,4 +524,4 @@ AAUUTTHHOORR -1.4.3 2010-03-22 RRDGRAPH(1) +1.4.7 2010-12-07 RRDGRAPH(1) diff --git a/doc/rrdgraph_data.1 b/doc/rrdgraph_data.1 index e5110b9..a53cac8 100644 --- a/doc/rrdgraph_data.1 +++ b/doc/rrdgraph_data.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_DATA 1" -.TH RRDGRAPH_DATA 1 "2009-10-14" "1.4.3" "rrdtool" +.TH RRDGRAPH_DATA 1 "2009-10-14" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdgraph_data.txt b/doc/rrdgraph_data.txt index eb8817d..2563b31 100644 --- a/doc/rrdgraph_data.txt +++ b/doc/rrdgraph_data.txt @@ -128,4 +128,4 @@ AAUUTTHHOORR -1.4.3 2009-10-14 RRDGRAPH_DATA(1) +1.4.7 2009-10-14 RRDGRAPH_DATA(1) diff --git a/doc/rrdgraph_examples.1 b/doc/rrdgraph_examples.1 index c141a92..8656b91 100644 --- a/doc/rrdgraph_examples.1 +++ b/doc/rrdgraph_examples.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_EXAMPLES 1" -.TH RRDGRAPH_EXAMPLES 1 "2009-02-21" "1.4.3" "rrdtool" +.TH RRDGRAPH_EXAMPLES 1 "2009-02-21" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdgraph_examples.txt b/doc/rrdgraph_examples.txt index cbe61a1..e94b642 100644 --- a/doc/rrdgraph_examples.txt +++ b/doc/rrdgraph_examples.txt @@ -189,4 +189,4 @@ AAUUTTHHOORR -1.4.3 2009-02-21 RRDGRAPH_EXAMPLES(1) +1.4.7 2009-02-21 RRDGRAPH_EXAMPLES(1) diff --git a/doc/rrdgraph_graph.1 b/doc/rrdgraph_graph.1 index 4e5342c..e41dbff 100644 --- a/doc/rrdgraph_graph.1 +++ b/doc/rrdgraph_graph.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_GRAPH 1" -.TH RRDGRAPH_GRAPH 1 "2010-01-25" "1.4.3" "rrdtool" +.TH RRDGRAPH_GRAPH 1 "2012-01-20" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -476,6 +476,13 @@ to go one line back like this: \& COMMENT:right\er .Ve .PP +There is also a 'nop' control for situations where you want a string to +actually end in a backslash character sequence \fB\e.\fR +.PP +.Vb 1 +\& COMMENT:OS\e2\e. +.Ve +.PP When using a proportional font in your graph, the tab characters or the sequence \fB\et\fR will line-up legend elements. Note that the tabs inserted are relative to the start of the current legend diff --git a/doc/rrdgraph_graph.html b/doc/rrdgraph_graph.html index e6406af..ac595c0 100644 --- a/doc/rrdgraph_graph.html +++ b/doc/rrdgraph_graph.html @@ -418,6 +418,10 @@ to go one line back like this:

COMMENT:left\l COMMENT:\u COMMENT:right\r
+

There is also a 'nop' control for situations where you want a string to +actually end in a backslash character sequence \.

+
+ COMMENT:OS\2\.

When using a proportional font in your graph, the tab characters or the sequence \t will line-up legend elements. Note that the tabs inserted are relative to the start of the current legend diff --git a/doc/rrdgraph_graph.pod b/doc/rrdgraph_graph.pod index c740aad..56a774a 100644 --- a/doc/rrdgraph_graph.pod +++ b/doc/rrdgraph_graph.pod @@ -372,6 +372,11 @@ to go one line back like this: COMMENT:\u COMMENT:right\r +There is also a 'nop' control for situations where you want a string to +actually end in a backslash character sequence B<\.> + + COMMENT:OS\2\. + When using a proportional font in your graph, the tab characters or the sequence B<\t> will line-up legend elements. Note that the tabs inserted are relative to the start of the current legend diff --git a/doc/rrdgraph_graph.txt b/doc/rrdgraph_graph.txt index 6c13c83..1f233df 100644 --- a/doc/rrdgraph_graph.txt +++ b/doc/rrdgraph_graph.txt @@ -292,6 +292,11 @@ NNOOTTEESS oonn lleeggeenndd aarrgguummeennttss COMMENT:\u COMMENT:right\r + There is also a 'nop' control for situations where you want a string to + actually end in a backslash character sequence \\.. + + COMMENT:OS\2\. + When using a proportional font in your graph, the tab characters or the sequence \\tt will line-up legend elements. Note that the tabs inserted are relative to the start of the current legend element! @@ -425,4 +430,4 @@ AAUUTTHHOORR -1.4.3 2010-01-25 RRDGRAPH_GRAPH(1) +1.4.7 2012-01-20 RRDGRAPH_GRAPH(1) diff --git a/doc/rrdgraph_rpn.1 b/doc/rrdgraph_rpn.1 index 3d32e93..2a34298 100644 --- a/doc/rrdgraph_rpn.1 +++ b/doc/rrdgraph_rpn.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_RPN 1" -.TH RRDGRAPH_RPN 1 "2009-10-14" "1.4.3" "rrdtool" +.TH RRDGRAPH_RPN 1 "2012-01-18" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -176,7 +176,8 @@ would do \f(CW\*(C`a = b, 3, +, 5, *\*(C'\fR without the need for parentheses. .Sp Pop two elements from the stack, compare them for the selected condition and return 1 for true or 0 for false. Comparing an \fIunknown\fR or an -\&\fIinfinite\fR value will always result in 0 (false). +\&\fIinfinite\fR value will result in \fIunknown\fR returned ... which will also be +treated as false by the \fB\s-1IF\s0\fR call. .Sp \&\fB\s-1UN\s0, \s-1ISINF\s0\fR .Sp @@ -457,9 +458,8 @@ Returns the standard deviation of the values. Example: \f(CW\*(C`VDEF:stdev=mydata,STDEV\*(C'\fR .IP "\s-1LAST\s0, \s-1FIRST\s0" 4 .IX Item "LAST, FIRST" -Return the last/first value including its time. The time for -\&\s-1FIRST\s0 is actually the start of the corresponding interval, whereas -\&\s-1LAST\s0 returns the end of the corresponding interval. +Return the last/first non-nan or infinite value for the selected data +stream, including its timestamp. .Sp Example: \f(CW\*(C`VDEF:first=mydata,FIRST\*(C'\fR .IP "\s-1TOTAL\s0" 4 diff --git a/doc/rrdgraph_rpn.html b/doc/rrdgraph_rpn.html index a97d598..35097c8 100644 --- a/doc/rrdgraph_rpn.html +++ b/doc/rrdgraph_rpn.html @@ -83,7 +83,8 @@ would do a = b, 3, +, 5, * without the need for parentheses.

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

+infinite value will result in unknown returned ... which will also be +treated as false by the IF call.

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.

@@ -313,9 +314,8 @@ the first occurrence of that value in the time component.

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.

+

Return the last/first non-nan or infinite value for the selected data +stream, including its timestamp.

Example: VDEF:first=mydata,FIRST

TOTAL
diff --git a/doc/rrdgraph_rpn.pod b/doc/rrdgraph_rpn.pod index 16f7610..894fef1 100644 --- a/doc/rrdgraph_rpn.pod +++ b/doc/rrdgraph_rpn.pod @@ -51,7 +51,8 @@ B Pop two elements from the stack, compare them for the selected condition and return 1 for true or 0 for false. Comparing an I or an -I value will always result in 0 (false). +I value will result in I returned ... which will also be +treated as false by the B call. B @@ -343,9 +344,8 @@ Example: C =item 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. +Return the last/first non-nan or infinite value for the selected data +stream, including its timestamp. Example: C diff --git a/doc/rrdgraph_rpn.txt b/doc/rrdgraph_rpn.txt index 12a1cac..cfca6f7 100644 --- a/doc/rrdgraph_rpn.txt +++ b/doc/rrdgraph_rpn.txt @@ -46,7 +46,8 @@ OOPPEERRAATTOORRSS Pop two elements from the stack, compare them for the selected condition and return 1 for true or 0 for false. Comparing an - _u_n_k_n_o_w_n or an _i_n_f_i_n_i_t_e value will always result in 0 (false). + _u_n_k_n_o_w_n or an _i_n_f_i_n_i_t_e value will result in _u_n_k_n_o_w_n returned ... + which will also be treated as false by the IIFF call. UUNN,, IISSIINNFF @@ -332,9 +333,8 @@ VVAARRIIAABBLLEESS Example: "VDEF:stdev=mydata,STDEV" 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. + Return the last/first non-nan or infinite value for the selected + data stream, including its timestamp. Example: "VDEF:first=mydata,FIRST" @@ -389,4 +389,4 @@ AAUUTTHHOORR -1.4.3 2009-10-14 RRDGRAPH_RPN(1) +1.4.7 2012-01-18 RRDGRAPH_RPN(1) diff --git a/doc/rrdinfo.1 b/doc/rrdinfo.1 index 9a01ca9..0e896d1 100644 --- a/doc/rrdinfo.1 +++ b/doc/rrdinfo.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDINFO 1" -.TH RRDINFO 1 "2009-04-20" "1.4.3" "rrdtool" +.TH RRDINFO 1 "2009-04-20" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdinfo.txt b/doc/rrdinfo.txt index 658bbb3..7d1b9fc 100644 --- a/doc/rrdinfo.txt +++ b/doc/rrdinfo.txt @@ -74,4 +74,4 @@ AAUUTTHHOORR -1.4.3 2009-04-20 RRDINFO(1) +1.4.7 2009-04-20 RRDINFO(1) diff --git a/doc/rrdlast.1 b/doc/rrdlast.1 index 0f9b262..bce4ad1 100644 --- a/doc/rrdlast.1 +++ b/doc/rrdlast.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDLAST 1" -.TH RRDLAST 1 "2008-09-25" "1.4.3" "rrdtool" +.TH RRDLAST 1 "2008-09-25" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdlast.txt b/doc/rrdlast.txt index 84e4b59..327a4bc 100644 --- a/doc/rrdlast.txt +++ b/doc/rrdlast.txt @@ -38,4 +38,4 @@ AAUUTTHHOORR -1.4.3 2008-09-25 RRDLAST(1) +1.4.7 2008-09-25 RRDLAST(1) diff --git a/doc/rrdlastupdate.1 b/doc/rrdlastupdate.1 index 1382a12..d9eba32 100644 --- a/doc/rrdlastupdate.1 +++ b/doc/rrdlastupdate.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDLASTUPDATE 1" -.TH RRDLASTUPDATE 1 "2008-09-25" "1.4.3" "rrdtool" +.TH RRDLASTUPDATE 1 "2008-09-25" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdlastupdate.txt b/doc/rrdlastupdate.txt index b3c1935..48d5482 100644 --- a/doc/rrdlastupdate.txt +++ b/doc/rrdlastupdate.txt @@ -38,4 +38,4 @@ AAUUTTHHOORR -1.4.3 2008-09-25 RRDLASTUPDATE(1) +1.4.7 2008-09-25 RRDLASTUPDATE(1) diff --git a/doc/rrdresize.1 b/doc/rrdresize.1 index 93bf094..26818c5 100644 --- a/doc/rrdresize.1 +++ b/doc/rrdresize.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDRESIZE 1" -.TH RRDRESIZE 1 "2009-02-21" "1.4.3" "rrdtool" +.TH RRDRESIZE 1 "2009-02-21" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdresize.txt b/doc/rrdresize.txt index 7b15755..5036178 100644 --- a/doc/rrdresize.txt +++ b/doc/rrdresize.txt @@ -41,4 +41,4 @@ AAUUTTHHOORR -1.4.3 2009-02-21 RRDRESIZE(1) +1.4.7 2009-02-21 RRDRESIZE(1) diff --git a/doc/rrdrestore.1 b/doc/rrdrestore.1 index c716723..0270cc8 100644 --- a/doc/rrdrestore.1 +++ b/doc/rrdrestore.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDRESTORE 1" -.TH RRDRESTORE 1 "2008-03-15" "1.4.3" "rrdtool" +.TH RRDRESTORE 1 "2008-03-15" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdrestore.txt b/doc/rrdrestore.txt index 92c39c2..c494586 100644 --- a/doc/rrdrestore.txt +++ b/doc/rrdrestore.txt @@ -30,4 +30,4 @@ AAUUTTHHOORR -1.4.3 2008-03-15 RRDRESTORE(1) +1.4.7 2008-03-15 RRDRESTORE(1) diff --git a/doc/rrdthreads.1 b/doc/rrdthreads.1 index a56c65e..d327fe9 100644 --- a/doc/rrdthreads.1 +++ b/doc/rrdthreads.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDTHREADS 1" -.TH RRDTHREADS 1 "2008-06-08" "1.4.3" "rrdtool" +.TH RRDTHREADS 1 "2008-06-08" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdthreads.txt b/doc/rrdthreads.txt index 3b65995..0b37e1f 100644 --- a/doc/rrdthreads.txt +++ b/doc/rrdthreads.txt @@ -100,4 +100,4 @@ AAUUTTHHOORR -1.4.3 2008-06-08 RRDTHREADS(1) +1.4.7 2008-06-08 RRDTHREADS(1) diff --git a/doc/rrdtool.1 b/doc/rrdtool.1 index 5f82b61..fec995d 100644 --- a/doc/rrdtool.1 +++ b/doc/rrdtool.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDTOOL 1" -.TH RRDTOOL 1 "2009-10-14" "1.4.3" "rrdtool" +.TH RRDTOOL 1 "2009-10-14" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdtool.txt b/doc/rrdtool.txt index a6d8444..0fb340b 100644 --- a/doc/rrdtool.txt +++ b/doc/rrdtool.txt @@ -278,4 +278,4 @@ AAUUTTHHOORR -1.4.3 2009-10-14 RRDTOOL(1) +1.4.7 2009-10-14 RRDTOOL(1) diff --git a/doc/rrdtune.1 b/doc/rrdtune.1 index 371d4bf..17fc235 100644 --- a/doc/rrdtune.1 +++ b/doc/rrdtune.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDTUNE 1" -.TH RRDTUNE 1 "2008-03-15" "1.4.3" "rrdtool" +.TH RRDTUNE 1 "2008-03-15" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdtune.txt b/doc/rrdtune.txt index 3dba111..abd1ba5 100644 --- a/doc/rrdtune.txt +++ b/doc/rrdtune.txt @@ -160,4 +160,4 @@ AAUUTTHHOORR -1.4.3 2008-03-15 RRDTUNE(1) +1.4.7 2008-03-15 RRDTUNE(1) diff --git a/doc/rrdtutorial.1 b/doc/rrdtutorial.1 index d0bad20..4929c03 100644 --- a/doc/rrdtutorial.1 +++ b/doc/rrdtutorial.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDTUTORIAL 1" -.TH RRDTUTORIAL 1 "2009-10-15" "1.4.3" "rrdtool" +.TH RRDTUTORIAL 1 "2011-01-15" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -181,7 +181,7 @@ element. As we are on a circle there is neither a beginning nor an end, you can go on and on and on. After a while, all the available places will be used and the process automatically reuses old locations. This way, the dataset will not grow in size and therefore requires no maintenance. -RRDtool works with with Round Robin Databases (RRDs). It stores and retrieves +RRDtool works with Round Robin Databases (RRDs). It stores and retrieves data from them. .SS "What data can be put into an \s-1RRD\s0?" .IX Subsection "What data can be put into an RRD?" @@ -447,14 +447,19 @@ It should return the following output: \& 920808600: 6.6666666667e\-03 \& 920808900: 3.3333333333e\-03 \& 920809200: nan +\& 920809500: nan .Ve .PP -If it doesn't, something may be wrong. Perhaps your \s-1OS\s0 will print -\&\*(L"NaN\*(R" in a different form. \*(L"NaN\*(R" stands for \*(L"Not A Number\*(R". If your \s-1OS\s0 -writes \*(L"U\*(R" or \*(L"\s-1UNKN\s0\*(R" or something similar that's okay. If something -else is wrong, it will probably be due to an error you made (assuming -that my tutorial is correct of course :\-). In that case: delete the -database and try again. +Note that you might get more rows than you expect. The reason for this is +that you ask for a time range that ends on 920809200. The number that is +written behind 920809200: in the list above covers the time range from +920808900 to 920809200, \s-1EXCLUDING\s0 920809200. Hence to be on the sure side, +you receive the entry from 920809200 to 920809500 as well since it \s-1INCLUDES\s0 +920809200. You may also see \*(L"NaN\*(R" instead of \*(L"nan\*(R" this is \s-1OS\s0 dependent. +\&\*(L"NaN\*(R" stands for \*(L"Not A Number\*(R". If your \s-1OS\s0 writes \*(L"U\*(R" or \*(L"\s-1UNKN\s0\*(R" or +something similar that's okay. If something else is wrong, it will probably +be due to an error you made (assuming that my tutorial is correct of course +:\-). In that case: delete the database and try again. .PP The meaning of the above output will become clear below. .SS "Time to create some graphics" diff --git a/doc/rrdtutorial.html b/doc/rrdtutorial.html index 4d8dede..4749780 100644 --- a/doc/rrdtutorial.html +++ b/doc/rrdtutorial.html @@ -113,7 +113,7 @@ element. As we are on a circle there is neither a beginning nor an end, you can go on and on and on. After a while, all the available places will be used and the process automatically reuses old locations. This way, the dataset will not grow in size and therefore requires no maintenance. -RRDtool works with with Round Robin Databases (RRDs). It stores and retrieves +RRDtool works with Round Robin Databases (RRDs). It stores and retrieves data from them.

@@ -345,13 +345,18 @@ the real maximum per line is OS dependent.

920808300: 1.6666666667e-02 920808600: 6.6666666667e-03 920808900: 3.3333333333e-03 - 920809200: nan -

If it doesn't, something may be wrong. Perhaps your OS will print -"NaN" in a different form. "NaN" stands for "Not A Number". If your OS -writes "U" or "UNKN" or something similar that's okay. If something -else is wrong, it will probably be due to an error you made (assuming -that my tutorial is correct of course :-). In that case: delete the -database and try again.

+ 920809200: nan + 920809500: nan +

Note that you might get more rows than you expect. The reason for this is +that you ask for a time range that ends on 920809200. The number that is +written behind 920809200: in the list above covers the time range from +920808900 to 920809200, EXCLUDING 920809200. Hence to be on the sure side, +you receive the entry from 920809200 to 920809500 as well since it INCLUDES +920809200. You may also see "NaN" instead of "nan" this is OS dependent. +"NaN" stands for "Not A Number". If your OS writes "U" or "UNKN" or +something similar that's okay. If something else is wrong, it will probably +be due to an error you made (assuming that my tutorial is correct of course +:-). In that case: delete the database and try again.

The meaning of the above output will become clear below.

diff --git a/doc/rrdtutorial.pod b/doc/rrdtutorial.pod index d6ec09d..e29cd50 100644 --- a/doc/rrdtutorial.pod +++ b/doc/rrdtutorial.pod @@ -56,7 +56,7 @@ element. As we are on a circle there is neither a beginning nor an end, you can go on and on and on. After a while, all the available places will be used and the process automatically reuses old locations. This way, the dataset will not grow in size and therefore requires no maintenance. -RRDtool works with with Round Robin Databases (RRDs). It stores and retrieves +RRDtool works with Round Robin Databases (RRDs). It stores and retrieves data from them. =head2 What data can be put into an RRD? @@ -323,13 +323,18 @@ It should return the following output: 920808600: 6.6666666667e-03 920808900: 3.3333333333e-03 920809200: nan - -If it doesn't, something may be wrong. Perhaps your OS will print -"NaN" in a different form. "NaN" stands for "Not A Number". If your OS -writes "U" or "UNKN" or something similar that's okay. If something -else is wrong, it will probably be due to an error you made (assuming -that my tutorial is correct of course :-). In that case: delete the -database and try again. + 920809500: nan + +Note that you might get more rows than you expect. The reason for this is +that you ask for a time range that ends on 920809200. The number that is +written behind 920809200: in the list above covers the time range from +920808900 to 920809200, EXCLUDING 920809200. Hence to be on the sure side, +you receive the entry from 920809200 to 920809500 as well since it INCLUDES +920809200. You may also see "NaN" instead of "nan" this is OS dependent. +"NaN" stands for "Not A Number". If your OS writes "U" or "UNKN" or +something similar that's okay. If something else is wrong, it will probably +be due to an error you made (assuming that my tutorial is correct of course +:-). In that case: delete the database and try again. The meaning of the above output will become clear below. diff --git a/doc/rrdtutorial.txt b/doc/rrdtutorial.txt index 97bf96b..b3f8e61 100644 --- a/doc/rrdtutorial.txt +++ b/doc/rrdtutorial.txt @@ -53,7 +53,7 @@ TTUUTTOORRIIAALL you can go on and on and on. After a while, all the available places will be used and the process automatically reuses old locations. This way, the dataset will not grow in size and therefore requires no - maintenance. RRDtool works with with Round Robin Databases (RRDs). It + maintenance. RRDtool works with Round Robin Databases (RRDs). It stores and retrieves data from them. WWhhaatt ddaattaa ccaann bbee ppuutt iinnttoo aann RRRRDD?? @@ -309,10 +309,16 @@ TTUUTTOORRIIAALL 920808600: 6.6666666667e-03 920808900: 3.3333333333e-03 920809200: nan - - If it doesn't, something may be wrong. Perhaps your OS will print - "NaN" in a different form. "NaN" stands for "Not A Number". If your OS - writes "U" or "UNKN" or something similar that's okay. If something + 920809500: nan + + Note that you might get more rows than you expect. The reason for this + is that you ask for a time range that ends on 920809200. The number + that is written behind 920809200: in the list above covers the time + range from 920808900 to 920809200, EXCLUDING 920809200. Hence to be on + the sure side, you receive the entry from 920809200 to 920809500 as + well since it INCLUDES 920809200. You may also see "NaN" instead of + "nan" this is OS dependent. "NaN" stands for "Not A Number". If your + OS writes "U" or "UNKN" or something similar that's okay. If something else is wrong, it will probably be due to an error you made (assuming that my tutorial is correct of course :-). In that case: delete the database and try again. @@ -1154,4 +1160,4 @@ AAUUTTHHOORR -1.4.3 2009-10-15 RRDTUTORIAL(1) +1.4.7 2011-01-15 RRDTUTORIAL(1) diff --git a/doc/rrdupdate.1 b/doc/rrdupdate.1 index 7caae55..4b21ea6 100644 --- a/doc/rrdupdate.1 +++ b/doc/rrdupdate.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDUPDATE 1" -.TH RRDUPDATE 1 "2009-06-02" "1.4.3" "rrdtool" +.TH RRDUPDATE 1 "2009-06-02" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/doc/rrdupdate.txt b/doc/rrdupdate.txt index 4bc3269..db9a58f 100644 --- a/doc/rrdupdate.txt +++ b/doc/rrdupdate.txt @@ -146,4 +146,4 @@ AAUUTTHHOORRSS -1.4.3 2009-06-02 RRDUPDATE(1) +1.4.7 2009-06-02 RRDUPDATE(1) diff --git a/doc/rrdxport.1 b/doc/rrdxport.1 index fef0466..acbbb15 100644 --- a/doc/rrdxport.1 +++ b/doc/rrdxport.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05) +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" Standard preamble: .\" ======================================================================== @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "RRDXPORT 1" -.TH RRDXPORT 1 "2008-09-25" "1.4.3" "rrdtool" +.TH RRDXPORT 1 "2012-01-16" "1.4.7" "rrdtool" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -138,6 +138,7 @@ rrdxport \- Export data in XML format based on data from one or several RRD [\fB\-e\fR|\fB\-\-end\fR\ \fIseconds\fR] [\fB\-m\fR|\fB\-\-maxrows\fR\ \fIrows\fR] [\fB\-\-step\fR\ \fIvalue\fR] +[\fB\-\-json\fR] [\fB\-\-daemon\fR\ \fIaddress\fR] [\fB\s-1DEF:\s0\fR\fIvname\fR\fB=\fR\fIrrd\fR\fB:\fR\fIds-name\fR\fB:\fR\fI\s-1CF\s0\fR] [\fB\s-1CDEF:\s0\fR\fIvname\fR\fB=\fR\fIrpn-expression\fR] @@ -180,6 +181,9 @@ For a list of accepted formats, see the \fB\-l\fR option in the rrdcached manual .Vb 1 \& rrdtool xport \-\-daemon unix:/var/run/rrdcached.sock ... .Ve +.IP "\fB\-\-json\fR" 4 +.IX Item "--json" +produce json formated output (instead of xml) .IP "\fB\-\-enumds\fR" 4 .IX Item "--enumds" The generated xml should contain the data values in enumerated tags. diff --git a/doc/rrdxport.html b/doc/rrdxport.html index a869c05..a20adda 100644 --- a/doc/rrdxport.html +++ b/doc/rrdxport.html @@ -46,6 +46,7 @@ [-e|--end seconds] [-m|--maxrows rows] [--step value] +[--json] [--daemon address] [DEF:vname=rrd:ds-name:CF] [CDEF:vname=rpn-expression] @@ -98,6 +99,11 @@ For a list of accepted formats, see the -l option in the rrdtool xport --daemon unix:/var/run/rrdcached.sock ... +
--json
+ +
+

produce json formated output (instead of xml)

+
--enumds
diff --git a/doc/rrdxport.pod b/doc/rrdxport.pod index d7e6bb3..bf9fd52 100644 --- a/doc/rrdxport.pod +++ b/doc/rrdxport.pod @@ -9,6 +9,7 @@ S<[B<-s>|B<--start> I]> S<[B<-e>|B<--end> I]> S<[B<-m>|B<--maxrows> I]> S<[B<--step> I]> +S<[B<--json>]> S<[B<--daemon> I
]> S<[BIB<=>IB<:>IB<:>I]> S<[BIB<=>I]> @@ -58,6 +59,10 @@ For a list of accepted formats, see the B<-l> option in the L manual. rrdtool xport --daemon unix:/var/run/rrdcached.sock ... +=item B<--json> + +produce json formated output (instead of xml) + =item B<--enumds> The generated xml should contain the data values in enumerated tags. diff --git a/doc/rrdxport.txt b/doc/rrdxport.txt index 4a1a0ec..a1e2ac8 100644 --- a/doc/rrdxport.txt +++ b/doc/rrdxport.txt @@ -8,7 +8,7 @@ NNAAMMEE SSYYNNOOPPSSIISS rrrrddttooooll xxppoorrtt [--ss|----ssttaarrtt _s_e_c_o_n_d_s] [--ee|----eenndd _s_e_c_o_n_d_s] - [--mm|----mmaaxxrroowwss _r_o_w_s] [----sstteepp _v_a_l_u_e] [----ddaaeemmoonn _a_d_d_r_e_s_s] + [--mm|----mmaaxxrroowwss _r_o_w_s] [----sstteepp _v_a_l_u_e] [----jjssoonn] [----ddaaeemmoonn _a_d_d_r_e_s_s] [DDEEFF::_v_n_a_m_e==_r_r_d::_d_s_-_n_a_m_e::_C_F] [CCDDEEFF::_v_n_a_m_e==_r_p_n_-_e_x_p_r_e_s_s_i_o_n] [XXPPOORRTT::_v_n_a_m_e[::_l_e_g_e_n_d]] @@ -50,6 +50,9 @@ DDEESSCCRRIIPPTTIIOONN rrdtool xport --daemon unix:/var/run/rrdcached.sock ... + ----jjssoonn + produce json formated output (instead of xml) + ----eennuummddss The generated xml should contain the data values in enumerated tags. @@ -144,4 +147,4 @@ AAUUTTHHOORR -1.4.3 2008-09-25 RRDXPORT(1) +1.4.7 2012-01-16 RRDXPORT(1) diff --git a/examples/Makefile.in b/examples/Makefile.in index 143f5ea..f6532d9 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -47,23 +47,14 @@ DIST_COMMON = $(srcdir)/4charts.pl.in $(srcdir)/Makefile.am \ $(srcdir)/stripes.pl.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \ - $(top_srcdir)/m4/intl.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -144,7 +135,6 @@ am__relativize = \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ ALL_LIBS = @ALL_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -153,12 +143,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ COMP_LUA = @COMP_LUA@ COMP_PERL = @COMP_PERL@ COMP_PYTHON = @COMP_PYTHON@ @@ -167,7 +154,6 @@ CORE_LIBS = @CORE_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -178,50 +164,30 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GENCAT = @GENCAT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC2 = @GLIBC2@ -GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ -HAVE_ASPRINTF = @HAVE_ASPRINTF@ -HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ -HAVE_SNPRINTF = @HAVE_SNPRINTF@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ -HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBVERS = @LIBVERS@ LIPO = @LIPO@ LN_S = @LN_S@ -LTLIBC = @LTLIBC@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ LUA = @LUA@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DEFINES = @LUA_DEFINES@ @@ -264,7 +230,6 @@ PKGCONFIG = @PKGCONFIG@ POD2HTML = @POD2HTML@ POD2MAN = @POD2MAN@ POSUB = @POSUB@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ @@ -296,13 +261,9 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_VERSION = @TCL_VERSION@ TROFF = @TROFF@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WERROR = @WERROR@ -WINDRES = @WINDRES@ -WOE32 = @WOE32@ -WOE32DLL = @WOE32DLL@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ diff --git a/examples/rrdcached/Makefile.in b/examples/rrdcached/Makefile.in index dd3dc9d..2f614f2 100644 --- a/examples/rrdcached/Makefile.in +++ b/examples/rrdcached/Makefile.in @@ -43,23 +43,14 @@ subdir = examples/rrdcached DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \ - $(top_srcdir)/m4/intl.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -99,7 +90,6 @@ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ ALL_LIBS = @ALL_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -108,12 +98,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ COMP_LUA = @COMP_LUA@ COMP_PERL = @COMP_PERL@ COMP_PYTHON = @COMP_PYTHON@ @@ -122,7 +109,6 @@ CORE_LIBS = @CORE_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -133,50 +119,30 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GENCAT = @GENCAT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC2 = @GLIBC2@ -GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ -HAVE_ASPRINTF = @HAVE_ASPRINTF@ -HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ -HAVE_SNPRINTF = @HAVE_SNPRINTF@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ -HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBVERS = @LIBVERS@ LIPO = @LIPO@ LN_S = @LN_S@ -LTLIBC = @LTLIBC@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ LUA = @LUA@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DEFINES = @LUA_DEFINES@ @@ -219,7 +185,6 @@ PKGCONFIG = @PKGCONFIG@ POD2HTML = @POD2HTML@ POD2MAN = @POD2MAN@ POSUB = @POSUB@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ @@ -251,13 +216,9 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_VERSION = @TCL_VERSION@ TROFF = @TROFF@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WERROR = @WERROR@ -WINDRES = @WINDRES@ -WOE32 = @WOE32@ -WOE32DLL = @WOE32DLL@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ diff --git a/intl/Makefile.in b/intl/Makefile.in deleted file mode 100644 index cfed085..0000000 --- a/intl/Makefile.in +++ /dev/null @@ -1,587 +0,0 @@ -# Makefile for directory with message catalog handling library of GNU gettext -# Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU Library General Public License as published -# by the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -# USA. - -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - -SHELL = /bin/sh - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = .. - -# The VPATH variables allows builds with $builddir != $srcdir, assuming a -# 'make' program that supports VPATH (such as GNU make). This line is removed -# by autoconf automatically when "$(srcdir)" = ".". -# In this directory, the VPATH handling is particular: -# 1. If INTL_LIBTOOL_SUFFIX_PREFIX is 'l' (indicating a build with libtool), -# the .c -> .lo rules carefully use $(srcdir), so that VPATH can be omitted. -# 2. If PACKAGE = gettext-tools, VPATH _must_ be omitted, because otherwise -# 'make' does the wrong thing if GNU gettext was configured with -# "./configure --srcdir=`pwd`", namely it gets confused by the .lo and .la -# files it finds in srcdir = ../../gettext-runtime/intl. -VPATH = $(srcdir) - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -transform = @program_transform_name@ -libdir = @libdir@ -includedir = @includedir@ -datarootdir = @datarootdir@ -datadir = @datadir@ -localedir = $(datadir)/locale -gettextsrcdir = $(datadir)/gettext/intl -aliaspath = $(localedir) -subdir = intl - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ - -# We use $(mkdir_p). -# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as -# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, -# @install_sh@ does not start with $(SHELL), so we add it. -# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined -# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake -# versions, $(mkinstalldirs) and $(install_sh) are unused. -mkinstalldirs = $(SHELL) @install_sh@ -d -install_sh = $(SHELL) @install_sh@ -MKDIR_P = @MKDIR_P@ -mkdir_p = @mkdir_p@ - -l = @INTL_LIBTOOL_SUFFIX_PREFIX@ - -AR = ar -CC = @CC@ -LIBTOOL = @LIBTOOL@ -RANLIB = @RANLIB@ -YACC = @INTLBISON@ -y -d -YFLAGS = --name-prefix=__gettext -WINDRES = @WINDRES@ - -# -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro. -# -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro. -DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ --DLIBDIR=\"$(libdir)\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL \ --DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ --Dset_relocation_prefix=libintl_set_relocation_prefix \ --Drelocate=libintl_relocate \ --DDEPENDS_ON_LIBICONV=1 @DEFS@ -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@ -LDFLAGS = @LDFLAGS@ $(LDFLAGS_@WOE32DLL@) -LDFLAGS_yes = -Wl,--export-all-symbols -LDFLAGS_no = -LIBS = @LIBS@ - -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - -HEADERS = \ - gmo.h \ - gettextP.h \ - hash-string.h \ - loadinfo.h \ - plural-exp.h \ - eval-plural.h \ - localcharset.h \ - lock.h \ - relocatable.h \ - tsearch.h tsearch.c \ - xsize.h \ - printf-args.h printf-args.c \ - printf-parse.h wprintf-parse.h printf-parse.c \ - vasnprintf.h vasnwprintf.h vasnprintf.c \ - os2compat.h \ - libgnuintl.h.in -SOURCES = \ - bindtextdom.c \ - dcgettext.c \ - dgettext.c \ - gettext.c \ - finddomain.c \ - hash-string.c \ - loadmsgcat.c \ - localealias.c \ - textdomain.c \ - l10nflist.c \ - explodename.c \ - dcigettext.c \ - dcngettext.c \ - dngettext.c \ - ngettext.c \ - plural.y \ - plural-exp.c \ - localcharset.c \ - lock.c \ - relocatable.c \ - langprefs.c \ - localename.c \ - log.c \ - printf.c \ - version.c \ - osdep.c \ - os2compat.c \ - intl-exports.c \ - intl-compat.c -OBJECTS = \ - bindtextdom.$lo \ - dcgettext.$lo \ - dgettext.$lo \ - gettext.$lo \ - finddomain.$lo \ - hash-string.$lo \ - loadmsgcat.$lo \ - localealias.$lo \ - textdomain.$lo \ - l10nflist.$lo \ - explodename.$lo \ - dcigettext.$lo \ - dcngettext.$lo \ - dngettext.$lo \ - ngettext.$lo \ - plural.$lo \ - plural-exp.$lo \ - localcharset.$lo \ - lock.$lo \ - relocatable.$lo \ - langprefs.$lo \ - localename.$lo \ - log.$lo \ - printf.$lo \ - version.$lo \ - osdep.$lo \ - intl-compat.$lo -OBJECTS_RES_yes = libintl.res -OBJECTS_RES_no = -DISTFILES.common = Makefile.in \ -config.charset locale.alias ref-add.sin ref-del.sin export.h libintl.rc \ -$(HEADERS) $(SOURCES) -DISTFILES.generated = plural.c -DISTFILES.normal = VERSION -DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc README.woe32 -DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ -COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h \ -libgnuintl.h_vms Makefile.vms libgnuintl.h.msvc-static \ -libgnuintl.h.msvc-shared Makefile.msvc - -all: all-@USE_INCLUDED_LIBINTL@ -all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed -all-no: all-no-@BUILD_INCLUDED_LIBINTL@ -all-no-yes: libgnuintl.$la -all-no-no: - -libintl.a libgnuintl.a: $(OBJECTS) - rm -f $@ - $(AR) cru $@ $(OBJECTS) - $(RANLIB) $@ - -libintl.la libgnuintl.la: $(OBJECTS) $(OBJECTS_RES_@WOE32@) - $(LIBTOOL) --mode=link \ - $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ - $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) @LTLIBTHREAD@ @LTLIBC@ \ - $(OBJECTS_RES_@WOE32@) \ - -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ - -rpath $(libdir) \ - -no-undefined - -# Libtool's library version information for libintl. -# Before making a gettext release, the gettext maintainer must change this -# according to the libtool documentation, section "Library interface versions". -# Maintainers of other packages that include the intl directory must *not* -# change these values. -LTV_CURRENT=8 -LTV_REVISION=2 -LTV_AGE=0 - -.SUFFIXES: -.SUFFIXES: .c .y .o .lo .sin .sed - -.c.o: - $(COMPILE) $< - -.y.c: - $(YACC) $(YFLAGS) --output $@ $< - rm -f $*.h - -bindtextdom.lo: $(srcdir)/bindtextdom.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c -dcgettext.lo: $(srcdir)/dcgettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c -dgettext.lo: $(srcdir)/dgettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c -gettext.lo: $(srcdir)/gettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c -finddomain.lo: $(srcdir)/finddomain.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c -hash-string.lo: $(srcdir)/hash-string.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/hash-string.c -loadmsgcat.lo: $(srcdir)/loadmsgcat.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c -localealias.lo: $(srcdir)/localealias.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c -textdomain.lo: $(srcdir)/textdomain.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c -l10nflist.lo: $(srcdir)/l10nflist.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c -explodename.lo: $(srcdir)/explodename.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c -dcigettext.lo: $(srcdir)/dcigettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c -dcngettext.lo: $(srcdir)/dcngettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c -dngettext.lo: $(srcdir)/dngettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c -ngettext.lo: $(srcdir)/ngettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c -plural.lo: $(srcdir)/plural.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c -plural-exp.lo: $(srcdir)/plural-exp.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c -localcharset.lo: $(srcdir)/localcharset.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c -lock.lo: $(srcdir)/lock.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/lock.c -relocatable.lo: $(srcdir)/relocatable.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c -langprefs.lo: $(srcdir)/langprefs.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/langprefs.c -localename.lo: $(srcdir)/localename.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c -log.lo: $(srcdir)/log.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c -printf.lo: $(srcdir)/printf.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c -version.lo: $(srcdir)/version.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/version.c -osdep.lo: $(srcdir)/osdep.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c -intl-compat.lo: $(srcdir)/intl-compat.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c - -# This rule is executed only on Woe32 systems. -# The following sed expressions come from the windres-options script. They are -# inlined here, so that they can be written in a Makefile without requiring a -# temporary file. They must contain literal newlines rather than semicolons, -# so that they work with the sed-3.02 that is shipped with MSYS. We can use -# GNU bash's $'\n' syntax to obtain such a newline. -libintl.res: $(srcdir)/libintl.rc - nl=$$'\n'; \ - sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ - sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ - sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ - $(WINDRES) \ - "-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \ - "-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \ - "-DPACKAGE_VERSION_MINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_minor"` \ - "-DPACKAGE_VERSION_SUBMINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_subminor"` \ - -i $(srcdir)/libintl.rc -o libintl.res --output-format=coff - -ref-add.sed: $(srcdir)/ref-add.sin - sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed - mv t-ref-add.sed ref-add.sed -ref-del.sed: $(srcdir)/ref-del.sin - sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed - mv t-ref-del.sed ref-del.sed - -INCLUDES = -I. -I$(srcdir) -I.. - -libgnuintl.h: $(srcdir)/libgnuintl.h.in - sed -e '/IN_LIBGLOCALE/d' \ - -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \ - -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ - -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ - -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ - < $(srcdir)/libgnuintl.h.in \ - | if test '@WOE32DLL@' = yes; then \ - sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/'; \ - else \ - cat; \ - fi \ - | sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' \ - -e "/#define _LIBINTL_H/r $(srcdir)/export.h" \ - | sed -e 's,@''HAVE_VISIBILITY''@,@HAVE_VISIBILITY@,g' \ - > libgnuintl.h - -libintl.h: $(srcdir)/libgnuintl.h.in - sed -e '/IN_LIBGLOCALE/d' \ - -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \ - -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ - -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ - -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ - < $(srcdir)/libgnuintl.h.in > libintl.h - -charset.alias: $(srcdir)/config.charset - $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ - mv t-$@ $@ - -check: all - -# We must not install the libintl.h/libintl.a files if we are on a -# system which has the GNU gettext() function in its C library or in a -# separate library. -# If you want to use the one which comes with this version of the -# package, you have to use `configure --with-included-gettext'. -install: install-exec install-data -install-exec: all - if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ - && test '@USE_INCLUDED_LIBINTL@' = yes; then \ - $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ - $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ - $(LIBTOOL) --mode=install \ - $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \ - if test "@RELOCATABLE@" = yes; then \ - dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \ - if test -n "$$dependencies"; then \ - rm -f $(DESTDIR)$(libdir)/libintl.la; \ - fi; \ - fi; \ - else \ - : ; \ - fi - if test "$(PACKAGE)" = "gettext-tools" \ - && test '@USE_INCLUDED_LIBINTL@' = no \ - && test @GLIBC2@ != no; then \ - $(mkdir_p) $(DESTDIR)$(libdir); \ - $(LIBTOOL) --mode=install \ - $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \ - rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ - $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \ - $(LIBTOOL) --mode=uninstall \ - rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \ - else \ - : ; \ - fi - if test '@USE_INCLUDED_LIBINTL@' = yes; then \ - test @GLIBC21@ != no || $(mkdir_p) $(DESTDIR)$(libdir); \ - temp=$(DESTDIR)$(libdir)/t-charset.alias; \ - dest=$(DESTDIR)$(libdir)/charset.alias; \ - if test -f $(DESTDIR)$(libdir)/charset.alias; then \ - orig=$(DESTDIR)$(libdir)/charset.alias; \ - sed -f ref-add.sed $$orig > $$temp; \ - $(INSTALL_DATA) $$temp $$dest; \ - rm -f $$temp; \ - else \ - if test @GLIBC21@ = no; then \ - orig=charset.alias; \ - sed -f ref-add.sed $$orig > $$temp; \ - $(INSTALL_DATA) $$temp $$dest; \ - rm -f $$temp; \ - fi; \ - fi; \ - $(mkdir_p) $(DESTDIR)$(localedir); \ - test -f $(DESTDIR)$(localedir)/locale.alias \ - && orig=$(DESTDIR)$(localedir)/locale.alias \ - || orig=$(srcdir)/locale.alias; \ - temp=$(DESTDIR)$(localedir)/t-locale.alias; \ - dest=$(DESTDIR)$(localedir)/locale.alias; \ - sed -f ref-add.sed $$orig > $$temp; \ - $(INSTALL_DATA) $$temp $$dest; \ - rm -f $$temp; \ - else \ - : ; \ - fi -install-data: all - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ - $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ - $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \ - dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \ - for file in $$dists; do \ - $(INSTALL_DATA) $(srcdir)/$$file \ - $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \ - dists="$(DISTFILES.generated)"; \ - for file in $$dists; do \ - if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ - $(INSTALL_DATA) $$dir/$$file \ - $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - dists="$(DISTFILES.obsolete)"; \ - for file in $$dists; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi - -install-strip: install - -install-dvi install-html install-info install-ps install-pdf: - -installdirs: - if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ - && test '@USE_INCLUDED_LIBINTL@' = yes; then \ - $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ - else \ - : ; \ - fi - if test "$(PACKAGE)" = "gettext-tools" \ - && test '@USE_INCLUDED_LIBINTL@' = no \ - && test @GLIBC2@ != no; then \ - $(mkdir_p) $(DESTDIR)$(libdir); \ - else \ - : ; \ - fi - if test '@USE_INCLUDED_LIBINTL@' = yes; then \ - test @GLIBC21@ != no || $(mkdir_p) $(DESTDIR)$(libdir); \ - $(mkdir_p) $(DESTDIR)$(localedir); \ - else \ - : ; \ - fi - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ - else \ - : ; \ - fi - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: - if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ - && test '@USE_INCLUDED_LIBINTL@' = yes; then \ - rm -f $(DESTDIR)$(includedir)/libintl.h; \ - $(LIBTOOL) --mode=uninstall \ - rm -f $(DESTDIR)$(libdir)/libintl.$la; \ - else \ - : ; \ - fi - if test "$(PACKAGE)" = "gettext-tools" \ - && test '@USE_INCLUDED_LIBINTL@' = no \ - && test @GLIBC2@ != no; then \ - rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ - else \ - : ; \ - fi - if test '@USE_INCLUDED_LIBINTL@' = yes; then \ - if test -f $(DESTDIR)$(libdir)/charset.alias; then \ - temp=$(DESTDIR)$(libdir)/t-charset.alias; \ - dest=$(DESTDIR)$(libdir)/charset.alias; \ - sed -f ref-del.sed $$dest > $$temp; \ - if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ - rm -f $$dest; \ - else \ - $(INSTALL_DATA) $$temp $$dest; \ - fi; \ - rm -f $$temp; \ - fi; \ - if test -f $(DESTDIR)$(localedir)/locale.alias; then \ - temp=$(DESTDIR)$(localedir)/t-locale.alias; \ - dest=$(DESTDIR)$(localedir)/locale.alias; \ - sed -f ref-del.sed $$dest > $$temp; \ - if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ - rm -f $$dest; \ - else \ - $(INSTALL_DATA) $$temp $$dest; \ - fi; \ - rm -f $$temp; \ - fi; \ - else \ - : ; \ - fi - if test "$(PACKAGE)" = "gettext-tools"; then \ - for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi - -info dvi ps pdf html: - -$(OBJECTS): ../config.h libgnuintl.h -bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h -hash-string.$lo dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h -explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h -dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h -dcigettext.$lo: $(srcdir)/eval-plural.h -localcharset.$lo: $(srcdir)/localcharset.h -bindtextdom.$lo dcigettext.$lo finddomain.$lo loadmsgcat.$lo localealias.$lo lock.$lo log.$lo: $(srcdir)/lock.h -localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h -printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c - -# A bison-2.1 generated plural.c includes if ENABLE_NLS. -PLURAL_DEPS_yes = libintl.h -PLURAL_DEPS_no = -plural.$lo: $(PLURAL_DEPS_@USE_INCLUDED_LIBINTL@) - -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) - -ctags: CTAGS - -CTAGS: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES) - -id: ID - -ID: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) - - -mostlyclean: - rm -f *.a *.la *.o *.obj *.lo libintl.res core core.* - rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed - rm -f -r .libs _libs - -clean: mostlyclean - -distclean: clean - rm -f Makefile ID TAGS - if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \ - rm -f ChangeLog.inst $(DISTFILES.normal); \ - else \ - : ; \ - fi - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - - -# GNU gettext needs not contain the file `VERSION' but contains some -# other files which should not be distributed in other packages. -distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: Makefile - if test "$(PACKAGE)" = "gettext-tools"; then \ - : ; \ - else \ - if test "$(PACKAGE)" = "gettext-runtime"; then \ - additional="$(DISTFILES.gettext)"; \ - else \ - additional="$(DISTFILES.normal)"; \ - fi; \ - $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ - for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ - if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ - cp -p $$dir/$$file $(distdir) || test $$file = Makefile.in || exit 1; \ - done; \ - fi - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status -# This would be more efficient, but doesn't work any more with autoconf-2.57, -# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used. -# cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libtool b/libtool index d8ea1e8..5a7c7de 100755 --- a/libtool +++ b/libtool @@ -1,8 +1,8 @@ #! /bin/bash # libtool - Provide generalized library-building support services. -# Generated automatically by config.status (rrdtool) 1.4.3 -# Libtool was configured on host froburg: +# Generated automatically by config.status (rrdtool) 1.4.7 +# Libtool was configured on host born: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, @@ -132,7 +132,7 @@ old_postuninstall_cmds="" LTCC="gcc" # LTCC compiler flags. -LTCFLAGS="-g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W -fPIC -DPIC" +LTCFLAGS="-g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wold-style-definition -W -fPIC -DPIC" # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" @@ -234,10 +234,10 @@ finish_eval="" hardcode_into_libs=yes # Compile-time system search path for libraries. -sys_lib_search_path_spec="/usr/lib/gcc/x86_64-linux-gnu/4.3.3 /usr/lib /lib" +sys_lib_search_path_spec="/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2 /usr/lib/x86_64-linux-gnu /lib /usr/lib" # Run-time system search path for libraries. -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib32/alsa-lib /usr/lib/alsa-lib /usr/local/lib /opt/SUNWut/lib /usr/pack/srss-4.1-mo/usr/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu " +sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/nvidia-current /usr/lib32/nvidia-current /lib32 /usr/lib32 /usr/lib32/alsa-lib /usr/lib/alsa-lib /usr/local/lib /opt/SUNWut/lib /usr/pack/srss-4.3-mo/usr/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu " # Whether dlopen is supported. dlopen_support=unknown diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index ee2fc1b..e12477f 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -339,61 +339,7 @@ AC_DEFUN([AC_IEEE], [ AC_MSG_CHECKING([if IEEE math works $1]) AC_CACHE_VAL([rd_cv_ieee_$2], [AC_RUN_IFELSE([AC_LANG_SOURCE([[$3 - -#if HAVE_MATH_H -# include -#endif - -#if HAVE_FLOAT_H -# include -#endif - -#if HAVE_IEEEFP_H -# include -#endif - -#if HAVE_FP_CLASS_H -# include -#endif - -/* Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) -#endif - -/* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) -# undef isnan -# define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) -#endif - -/* Digital UNIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF) ) -# define HAVE_ISINF 1 -# define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) -#endif - -/* AIX */ -#if (! defined(HAVE_ISINF) && defined(HAVE_CLASS)) -# define HAVE_ISINF 1 -# define isinf(a) (class(a) == FP_MINUS_INF || class(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_PLUS_INF) && defined(FP_MINUS_INF)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_MINUS_INF || fpclassify(a) == FP_PLUS_INF) -#endif - -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASSIFY) && defined(FP_INFINITE)) -# define HAVE_ISINF 1 -# define isinf(a) (fpclassify(a) == FP_INFINITE) -#endif - -#if HAVE_MATH_H -#include -#endif - +#include "src/rrd_config_bottom.h" #include int main(void){ double rrdnan,rrdinf,rrdc,rrdzero; @@ -599,3 +545,68 @@ fi ]) +dnl idea taken from the autoconf mailing list, posted by +dnl Timur I. Bakeyev timur@gnu.org, +dnl http://mail.gnu.org/pipermail/autoconf/1999-October/008311.html +dnl partly rewritten by Peter Stamfest + +dnl This determines, if struct tm containes tm_gmtoff field +dnl or we should use extern long int timezone. + +dnl Add the following to your acconfig.h: + +dnl /* Define if your struct tm has tm_gmtoff. */ +dnl #undef HAVE_TM_GMTOFF +dnl #undef TM_GMTOFF +dnl +dnl /* Define if you don't have tm_gmtoff but do have the external timezone. */ +dnl #undef HAVE_TIMEZONE + +AC_DEFUN([GC_TIMEZONE], [ + AC_REQUIRE([AC_STRUCT_TM]) + AC_CACHE_CHECK([tm_gmtoff in struct tm], gq_cv_have_tm_gmtoff, + gq_cv_have_tm_gmtoff=no + AC_TRY_COMPILE([#include + #include <$ac_cv_struct_tm> + ], + [struct tm t; + t.tm_gmtoff = 0; + exit(0); + ], + gq_cv_have_tm_gmtoff=yes + ) + ) + + AC_CACHE_CHECK([__tm_gmtoff in struct tm], gq_cv_have___tm_gmtoff, + gq_cv_have___tm_gmtoff=no + AC_TRY_COMPILE([#include + #include <$ac_cv_struct_tm> + ], + [struct tm t; + t.__tm_gmtoff = 0; + exit(0); + ], + gq_cv_have___tm_gmtoff=yes + ) + ) + + if test "$gq_cv_have_tm_gmtoff" = yes ; then + AC_DEFINE(HAVE_TM_GMTOFF,1,[does tm have a tm_gmtoff member]) + AC_DEFINE(TM_GMTOFF, tm_gmtoff,[the real name of tm_gmtoff]) + elif test "$gq_cv_have___tm_gmtoff" = yes ; then + AC_DEFINE(HAVE_TM_GMTOFF) + AC_DEFINE(TM_GMTOFF, __tm_gmtoff) + else + AC_CACHE_CHECK(for timezone, ac_cv_var_timezone, + [AC_TRY_LINK([ + #include + extern long int timezone; + ], + [long int l = timezone;], + ac_cv_var_timezone=yes, + ac_cv_var_timezone=no)]) + if test $ac_cv_var_timezone = yes; then + AC_DEFINE(HAVE_TIMEZONE,1,[is there an external timezone variable instead ?]) + fi + fi +]) diff --git a/m4/codeset.m4 b/m4/codeset.m4 deleted file mode 100644 index 223955b..0000000 --- a/m4/codeset.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# codeset.m4 serial 2 (gettext-0.16) -dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([AM_LANGINFO_CODESET], -[ - AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, - [AC_TRY_LINK([#include ], - [char* cs = nl_langinfo(CODESET); return !cs;], - am_cv_langinfo_codeset=yes, - am_cv_langinfo_codeset=no) - ]) - if test $am_cv_langinfo_codeset = yes; then - AC_DEFINE(HAVE_LANGINFO_CODESET, 1, - [Define if you have and nl_langinfo(CODESET).]) - fi -]) diff --git a/m4/glibc2.m4 b/m4/glibc2.m4 deleted file mode 100644 index e8f5bfe..0000000 --- a/m4/glibc2.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# glibc2.m4 serial 1 -dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Test for the GNU C Library, version 2.0 or newer. -# From Bruno Haible. - -AC_DEFUN([gt_GLIBC2], - [ - AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, - ac_cv_gnu_library_2, - [AC_EGREP_CPP([Lucky GNU user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) - Lucky GNU user - #endif -#endif - ], - ac_cv_gnu_library_2=yes, - ac_cv_gnu_library_2=no) - ] - ) - AC_SUBST(GLIBC2) - GLIBC2="$ac_cv_gnu_library_2" - ] -) diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 deleted file mode 100644 index d95fd98..0000000 --- a/m4/glibc21.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# glibc21.m4 serial 3 -dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Test for the GNU C Library, version 2.1 or newer. -# From Bruno Haible. - -AC_DEFUN([gl_GLIBC21], - [ - AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, - ac_cv_gnu_library_2_1, - [AC_EGREP_CPP([Lucky GNU user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif - ], - ac_cv_gnu_library_2_1=yes, - ac_cv_gnu_library_2_1=no) - ] - ) - AC_SUBST(GLIBC21) - GLIBC21="$ac_cv_gnu_library_2_1" - ] -) diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4 deleted file mode 100644 index 8c8a670..0000000 --- a/m4/intdiv0.m4 +++ /dev/null @@ -1,84 +0,0 @@ -# intdiv0.m4 serial 2 (gettext-0.17) -dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([gt_INTDIV0], -[ - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - - AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], - gt_cv_int_divbyzero_sigfpe, - [ - gt_cv_int_divbyzero_sigfpe= -changequote(,)dnl - case "$host_os" in - macos* | darwin[6-9]* | darwin[1-9][0-9]*) - # On MacOS X 10.2 or newer, just assume the same as when cross- - # compiling. If we were to perform the real test, 1 Crash Report - # dialog window would pop up. - case "$host_cpu" in - i[34567]86 | x86_64) - gt_cv_int_divbyzero_sigfpe="guessing yes" ;; - esac - ;; - esac -changequote([,])dnl - if test -z "$gt_cv_int_divbyzero_sigfpe"; then - AC_TRY_RUN([ -#include -#include - -static void -sigfpe_handler (int sig) -{ - /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ - exit (sig != SIGFPE); -} - -int x = 1; -int y = 0; -int z; -int nan; - -int main () -{ - signal (SIGFPE, sigfpe_handler); -/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ -#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) - signal (SIGTRAP, sigfpe_handler); -#endif -/* Linux/SPARC yields signal SIGILL. */ -#if defined (__sparc__) && defined (__linux__) - signal (SIGILL, sigfpe_handler); -#endif - - z = x / y; - nan = y / y; - exit (1); -} -], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, - [ - # Guess based on the CPU. -changequote(,)dnl - case "$host_cpu" in - alpha* | i[34567]86 | x86_64 | m68k | s390*) - gt_cv_int_divbyzero_sigfpe="guessing yes";; - *) - gt_cv_int_divbyzero_sigfpe="guessing no";; - esac -changequote([,])dnl - ]) - fi - ]) - case "$gt_cv_int_divbyzero_sigfpe" in - *yes) value=1;; - *) value=0;; - esac - AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, - [Define if integer division by zero raises signal SIGFPE.]) -]) diff --git a/m4/intl.m4 b/m4/intl.m4 deleted file mode 100644 index 934408b..0000000 --- a/m4/intl.m4 +++ /dev/null @@ -1,285 +0,0 @@ -# intl.m4 serial 8 (gettext-0.17) -dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2006. - -AC_PREREQ(2.52) - -dnl Checks for all prerequisites of the intl subdirectory, -dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, -dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. -AC_DEFUN([AM_INTL_SUBDIR], -[ - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - AC_REQUIRE([gt_GLIBC2])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([gl_VISIBILITY])dnl - AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl - AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl - AC_REQUIRE([gt_TYPE_WCHAR_T])dnl - AC_REQUIRE([gt_TYPE_WINT_T])dnl - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gt_TYPE_INTMAX_T]) - AC_REQUIRE([gt_PRINTF_POSIX]) - AC_REQUIRE([gl_GLIBC21])dnl - AC_REQUIRE([gl_XSIZE])dnl - AC_REQUIRE([gt_INTL_MACOSX])dnl - - AC_CHECK_TYPE([ptrdiff_t], , - [AC_DEFINE([ptrdiff_t], [long], - [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) - ]) - AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) - AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen]) - - dnl Use the _snprintf function only if it is declared (because on NetBSD it - dnl is defined as a weak alias of snprintf; we prefer to use the latter). - gt_CHECK_DECL(_snprintf, [#include ]) - gt_CHECK_DECL(_snwprintf, [#include ]) - - dnl Use the *_unlocked functions only if they are declared. - dnl (because some of them were defined without being declared in Solaris - dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built - dnl on Solaris 2.5.1 to run on Solaris 2.6). - dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. - gt_CHECK_DECL(getc_unlocked, [#include ]) - - case $gt_cv_func_printf_posix in - *yes) HAVE_POSIX_PRINTF=1 ;; - *) HAVE_POSIX_PRINTF=0 ;; - esac - AC_SUBST([HAVE_POSIX_PRINTF]) - if test "$ac_cv_func_asprintf" = yes; then - HAVE_ASPRINTF=1 - else - HAVE_ASPRINTF=0 - fi - AC_SUBST([HAVE_ASPRINTF]) - if test "$ac_cv_func_snprintf" = yes; then - HAVE_SNPRINTF=1 - else - HAVE_SNPRINTF=0 - fi - AC_SUBST([HAVE_SNPRINTF]) - if test "$ac_cv_func_wprintf" = yes; then - HAVE_WPRINTF=1 - else - HAVE_WPRINTF=0 - fi - AC_SUBST([HAVE_WPRINTF]) - - AM_LANGINFO_CODESET - gt_LC_MESSAGES - - dnl Compilation on mingw and Cygwin needs special Makefile rules, because - dnl 1. when we install a shared library, we must arrange to export - dnl auxiliary pointer variables for every exported variable, - dnl 2. when we install a shared library and a static library simultaneously, - dnl the include file specifies __declspec(dllimport) and therefore we - dnl must arrange to define the auxiliary pointer variables for the - dnl exported variables _also_ in the static library. - if test "$enable_shared" = yes; then - case "$host_os" in - mingw* | cygwin*) is_woe32dll=yes ;; - *) is_woe32dll=no ;; - esac - else - is_woe32dll=no - fi - WOE32DLL=$is_woe32dll - AC_SUBST([WOE32DLL]) - - dnl On mingw and Cygwin, we can activate special Makefile rules which add - dnl version information to the shared libraries and executables. - case "$host_os" in - mingw* | cygwin*) is_woe32=yes ;; - *) is_woe32=no ;; - esac - WOE32=$is_woe32 - AC_SUBST([WOE32]) - if test $WOE32 = yes; then - dnl Check for a program that compiles Windows resource files. - AC_CHECK_TOOL([WINDRES], [windres]) - fi - - dnl Determine whether when creating a library, "-lc" should be passed to - dnl libtool or not. On many platforms, it is required for the libtool option - dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool - dnl in the *.la files - makes it impossible to create multithreaded programs, - dnl because libtool also reorders the -lc to come before the -pthread, and - dnl this disables pthread_create() . - case "$host_os" in - hpux*) LTLIBC="" ;; - *) LTLIBC="-lc" ;; - esac - AC_SUBST([LTLIBC]) - - dnl Rename some macros and functions used for locking. - AH_BOTTOM([ -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init libintl_lock_init -#define glthread_lock_lock libintl_lock_lock -#define glthread_lock_unlock libintl_lock_unlock -#define glthread_lock_destroy libintl_lock_destroy -#define glthread_rwlock_init libintl_rwlock_init -#define glthread_rwlock_rdlock libintl_rwlock_rdlock -#define glthread_rwlock_wrlock libintl_rwlock_wrlock -#define glthread_rwlock_unlock libintl_rwlock_unlock -#define glthread_rwlock_destroy libintl_rwlock_destroy -#define glthread_recursive_lock_init libintl_recursive_lock_init -#define glthread_recursive_lock_lock libintl_recursive_lock_lock -#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock -#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy -#define glthread_once libintl_once -#define glthread_once_call libintl_once_call -#define glthread_once_singlethreaded libintl_once_singlethreaded -]) -]) - - -dnl Checks for the core files of the intl subdirectory: -dnl dcigettext.c -dnl eval-plural.h -dnl explodename.c -dnl finddomain.c -dnl gettextP.h -dnl gmo.h -dnl hash-string.h hash-string.c -dnl l10nflist.c -dnl libgnuintl.h.in (except the *printf stuff) -dnl loadinfo.h -dnl loadmsgcat.c -dnl localealias.c -dnl log.c -dnl plural-exp.h plural-exp.c -dnl plural.y -dnl Used by libglocale. -AC_DEFUN([gt_INTL_SUBDIR_CORE], -[ - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - AC_REQUIRE([gt_INTDIV0])dnl - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl - AC_REQUIRE([gt_INTTYPES_PRI])dnl - AC_REQUIRE([gl_LOCK])dnl - - AC_TRY_LINK( - [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], - [], - [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, - [Define to 1 if the compiler understands __builtin_expect.])]) - - AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) - AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ - stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ - argz_next __fsetlocking]) - - dnl Use the *_unlocked functions only if they are declared. - dnl (because some of them were defined without being declared in Solaris - dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built - dnl on Solaris 2.5.1 to run on Solaris 2.6). - dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. - gt_CHECK_DECL(feof_unlocked, [#include ]) - gt_CHECK_DECL(fgets_unlocked, [#include ]) - - AM_ICONV - - dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined, - dnl and a _NL_LOCALE_NAME macro always. - AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name, - [AC_TRY_LINK([#include -#include ], - [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES)); - return !cs; - ], - gt_cv_nl_locale_name=yes, - gt_cv_nl_locale_name=no) - ]) - if test $gt_cv_nl_locale_name = yes; then - AC_DEFINE(HAVE_NL_LOCALE_NAME, 1, - [Define if you have and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.]) - fi - - dnl intl/plural.c is generated from intl/plural.y. It requires bison, - dnl because plural.y uses bison specific features. It requires at least - dnl bison-1.26 because earlier versions generate a plural.c that doesn't - dnl compile. - dnl bison is only needed for the maintainer (who touches plural.y). But in - dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put - dnl the rule in general Makefile. Now, some people carelessly touch the - dnl files or have a broken "make" program, hence the plural.c rule will - dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not - dnl present or too old. - AC_CHECK_PROGS([INTLBISON], [bison]) - if test -z "$INTLBISON"; then - ac_verc_fail=yes - else - dnl Found it, now check the version. - AC_MSG_CHECKING([version of bison]) -changequote(<<,>>)dnl - ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) -changequote([,])dnl - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - esac - AC_MSG_RESULT([$ac_prog_version]) - fi - if test $ac_verc_fail = yes; then - INTLBISON=: - fi -]) - - -dnl gt_CHECK_DECL(FUNC, INCLUDES) -dnl Check whether a function is declared. -AC_DEFUN([gt_CHECK_DECL], -[ - AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, - [AC_TRY_COMPILE([$2], [ -#ifndef $1 - char *p = (char *) $1; -#endif -], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) - if test $ac_cv_have_decl_$1 = yes; then - gt_value=1 - else - gt_value=0 - fi - AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], - [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) -]) diff --git a/m4/intmax.m4 b/m4/intmax.m4 deleted file mode 100644 index ce7a8a4..0000000 --- a/m4/intmax.m4 +++ /dev/null @@ -1,33 +0,0 @@ -# intmax.m4 serial 3 (gettext-0.16) -dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether the system has the 'intmax_t' type, but don't attempt to -dnl find a replacement if it is lacking. - -AC_DEFUN([gt_TYPE_INTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, - [AC_TRY_COMPILE([ -#include -#include -#if HAVE_STDINT_H_WITH_UINTMAX -#include -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include -#endif -], [intmax_t x = -1; - return !x;], - gt_cv_c_intmax_t=yes, - gt_cv_c_intmax_t=no)]) - if test $gt_cv_c_intmax_t = yes; then - AC_DEFINE(HAVE_INTMAX_T, 1, - [Define if you have the 'intmax_t' type in or .]) - fi -]) diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4 deleted file mode 100644 index 7c7f894..0000000 --- a/m4/inttypes-pri.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# inttypes-pri.m4 serial 4 (gettext-0.16) -dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_PREREQ(2.52) - -# Define PRI_MACROS_BROKEN if exists and defines the PRI* -# macros to non-string values. This is the case on AIX 4.3.3. - -AC_DEFUN([gt_INTTYPES_PRI], -[ - AC_CHECK_HEADERS([inttypes.h]) - if test $ac_cv_header_inttypes_h = yes; then - AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], - gt_cv_inttypes_pri_broken, - [ - AC_TRY_COMPILE([#include -#ifdef PRId32 -char *p = PRId32; -#endif -], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) - ]) - fi - if test "$gt_cv_inttypes_pri_broken" = yes; then - AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, - [Define if exists and defines unusable PRI* macros.]) - PRI_MACROS_BROKEN=1 - else - PRI_MACROS_BROKEN=0 - fi - AC_SUBST([PRI_MACROS_BROKEN]) -]) diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4 deleted file mode 100644 index edc8ecb..0000000 --- a/m4/inttypes_h.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# inttypes_h.m4 serial 7 -dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, -# doesn't clash with , and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, - [AC_TRY_COMPILE( - [#include -#include ], - [uintmax_t i = (uintmax_t) -1; return !i;], - gl_cv_header_inttypes_h=yes, - gl_cv_header_inttypes_h=no)]) - if test $gl_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, - [Define if exists, doesn't clash with , - and declares uintmax_t. ]) - fi -]) diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4 deleted file mode 100644 index 19aa77e..0000000 --- a/m4/lcmessage.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# lcmessage.m4 serial 4 (gettext-0.14.2) -dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995. - -# Check whether LC_MESSAGES is available in . - -AC_DEFUN([gt_LC_MESSAGES], -[ - AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include ], [return LC_MESSAGES], - gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) - if test $gt_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your file defines LC_MESSAGES.]) - fi -]) diff --git a/m4/lock.m4 b/m4/lock.m4 deleted file mode 100644 index 9111933..0000000 --- a/m4/lock.m4 +++ /dev/null @@ -1,316 +0,0 @@ -# lock.m4 serial 7 (gettext-0.17) -dnl Copyright (C) 2005-2007 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl Tests for a multithreading library to be used. -dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, -dnl USE_PTH_THREADS, USE_WIN32_THREADS -dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use -dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with -dnl libtool). -dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for -dnl programs that really need multithread functionality. The difference -dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak -dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". -dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for -dnl multithread-safe programs. - -AC_DEFUN([gl_LOCK_EARLY], -[ - AC_REQUIRE([gl_LOCK_EARLY_BODY]) -]) - -dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once. - -AC_DEFUN([gl_LOCK_EARLY_BODY], -[ - dnl Ordering constraints: This macro modifies CPPFLAGS in a way that - dnl influences the result of the autoconf tests that test for *_unlocked - dnl declarations, on AIX 5 at least. Therefore it must come early. - AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl - AC_BEFORE([$0], [gl_ARGP])dnl - - AC_REQUIRE([AC_CANONICAL_HOST]) - dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes - dnl AC_GNU_SOURCE. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], - [AC_REQUIRE([AC_GNU_SOURCE])]) - dnl Check for multithreading. - AC_ARG_ENABLE(threads, -AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) -AC_HELP_STRING([--disable-threads], [build without multithread safety]), - [gl_use_threads=$enableval], - [case "$host_os" in - dnl Disable multithreading by default on OSF/1, because it interferes - dnl with fork()/exec(): When msgexec is linked with -lpthread, its child - dnl process gets an endless segmentation fault inside execvp(). - osf*) gl_use_threads=no ;; - *) gl_use_threads=yes ;; - esac - ]) - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # For using : - case "$host_os" in - osf*) - # On OSF/1, the compiler needs the flag -D_REENTRANT so that it - # groks . cc also understands the flag -pthread, but - # we don't use it because 1. gcc-2.95 doesn't understand -pthread, - # 2. putting a flag into CPPFLAGS that has an effect on the linker - # causes the AC_TRY_LINK test below to succeed unexpectedly, - # leading to wrong values of LIBTHREAD and LTLIBTHREAD. - CPPFLAGS="$CPPFLAGS -D_REENTRANT" - ;; - esac - # Some systems optimize for single-threaded programs by default, and - # need special flags to disable these optimizations. For example, the - # definition of 'errno' in . - case "$host_os" in - aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; - solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; - esac - fi -]) - -dnl The guts of gl_LOCK. Needs to be expanded only once. - -AC_DEFUN([gl_LOCK_BODY], -[ - AC_REQUIRE([gl_LOCK_EARLY_BODY]) - gl_threads_api=none - LIBTHREAD= - LTLIBTHREAD= - LIBMULTITHREAD= - LTLIBMULTITHREAD= - if test "$gl_use_threads" != no; then - dnl Check whether the compiler and linker support weak declarations. - AC_MSG_CHECKING([whether imported symbols can be declared weak]) - gl_have_weak=no - AC_TRY_LINK([extern void xyzzy (); -#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes]) - AC_MSG_RESULT([$gl_have_weak]) - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks . It's added above, in gl_LOCK_EARLY_BODY. - AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no) - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - AC_TRY_LINK([#include ], - [pthread_mutex_lock((pthread_mutex_t*)0); - pthread_mutexattr_init((pthread_mutexattr_t*)0);], - [gl_have_pthread=yes]) - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - AC_CHECK_LIB(pthread, pthread_kill, - [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. - case "$host_os" in - solaris* | hpux*) - AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1, - [Define if the pthread_in_use() detection is hard.]) - esac - ]) - else - # Some library is needed. Try libpthread and libc_r. - AC_CHECK_LIB(pthread, pthread_kill, - [gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - AC_CHECK_LIB(c_r, pthread_kill, - [gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) - fi - fi - if test -n "$gl_have_pthread"; then - gl_threads_api=posix - AC_DEFINE([USE_POSIX_THREADS], 1, - [Define if the POSIX multithreading library can be used.]) - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if test $gl_have_weak = yes; then - AC_DEFINE([USE_POSIX_THREADS_WEAK], 1, - [Define if references to the POSIX multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the - # pthread_rwlock_* functions. - AC_CHECK_TYPE([pthread_rwlock_t], - [AC_DEFINE([HAVE_PTHREAD_RWLOCK], 1, - [Define if the POSIX multithreading library has read/write locks.])], - [], - [#include ]) - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - AC_TRY_COMPILE([#include ], - [#if __FreeBSD__ == 4 -error "No, in FreeBSD 4.0 recursive mutexes actually don't work." -#else -int x = (int)PTHREAD_MUTEX_RECURSIVE; -return !x; -#endif], - [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1, - [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) - fi - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then - gl_have_solaristhread= - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lthread" - AC_TRY_LINK([#include -#include ], - [thr_self();], - [gl_have_solaristhread=yes]) - LIBS="$gl_save_LIBS" - if test -n "$gl_have_solaristhread"; then - gl_threads_api=solaris - LIBTHREAD=-lthread - LTLIBTHREAD=-lthread - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - AC_DEFINE([USE_SOLARIS_THREADS], 1, - [Define if the old Solaris multithreading library can be used.]) - if test $gl_have_weak = yes; then - AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1, - [Define if references to the old Solaris multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - if test "$gl_use_threads" = pth; then - gl_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_LINKFLAGS(pth) - gl_have_pth= - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lpth" - AC_TRY_LINK([#include ], [pth_self();], gl_have_pth=yes) - LIBS="$gl_save_LIBS" - if test -n "$gl_have_pth"; then - gl_threads_api=pth - LIBTHREAD="$LIBPTH" - LTLIBTHREAD="$LTLIBPTH" - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - AC_DEFINE([USE_PTH_THREADS], 1, - [Define if the GNU Pth multithreading library can be used.]) - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if test $gl_have_weak = yes; then - AC_DEFINE([USE_PTH_THREADS_WEAK], 1, - [Define if references to the GNU Pth multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - else - CPPFLAGS="$gl_save_CPPFLAGS" - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=win32 - AC_DEFINE([USE_WIN32_THREADS], 1, - [Define if the Win32 multithreading API can be used.]) - fi - fi - fi - fi - AC_MSG_CHECKING([for multithread API to use]) - AC_MSG_RESULT([$gl_threads_api]) - AC_SUBST(LIBTHREAD) - AC_SUBST(LTLIBTHREAD) - AC_SUBST(LIBMULTITHREAD) - AC_SUBST(LTLIBMULTITHREAD) -]) - -AC_DEFUN([gl_LOCK], -[ - AC_REQUIRE([gl_LOCK_EARLY]) - AC_REQUIRE([gl_LOCK_BODY]) - gl_PREREQ_LOCK -]) - -# Prerequisites of lib/lock.c. -AC_DEFUN([gl_PREREQ_LOCK], [ - AC_REQUIRE([AC_C_INLINE]) -]) - -dnl Survey of platforms: -dnl -dnl Platform Available Compiler Supports test-lock -dnl flavours option weak result -dnl --------------- --------- --------- -------- --------- -dnl Linux 2.4/glibc posix -lpthread Y OK -dnl -dnl GNU Hurd/glibc posix -dnl -dnl FreeBSD 5.3 posix -lc_r Y -dnl posix -lkse ? Y -dnl posix -lpthread ? Y -dnl posix -lthr Y -dnl -dnl FreeBSD 5.2 posix -lc_r Y -dnl posix -lkse Y -dnl posix -lthr Y -dnl -dnl FreeBSD 4.0,4.10 posix -lc_r Y OK -dnl -dnl NetBSD 1.6 -- -dnl -dnl OpenBSD 3.4 posix -lpthread Y OK -dnl -dnl MacOS X 10.[123] posix -lpthread Y OK -dnl -dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK -dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK -dnl -dnl HP-UX 11 posix -lpthread N (cc) OK -dnl Y (gcc) -dnl -dnl IRIX 6.5 posix -lpthread Y 0.5 -dnl -dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK -dnl -dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK -dnl -lpthread (gcc) Y -dnl -dnl Cygwin posix -lpthread Y OK -dnl -dnl Any of the above pth -lpth 0.0 -dnl -dnl Mingw win32 N OK -dnl -dnl BeOS 5 -- -dnl -dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is -dnl turned off: -dnl OK if all three tests terminate OK, -dnl 0.5 if the first test terminates OK but the second one loops endlessly, -dnl 0.0 if the first test already loops endlessly. diff --git a/m4/longlong.m4 b/m4/longlong.m4 deleted file mode 100644 index a72e53b..0000000 --- a/m4/longlong.m4 +++ /dev/null @@ -1,109 +0,0 @@ -# longlong.m4 serial 13 -dnl Copyright (C) 1999-2007 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, but can be removed once we -# assume 2.62 everywhere. - -# Note: If the type 'long long int' exists but is only 32 bits large -# (as on some very old compilers), HAVE_LONG_LONG_INT will not be -# defined. In this case you can treat 'long long int' like 'long int'. - -AC_DEFUN([AC_TYPE_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug isn't important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [ac_cv_type_long_long_int=yes], - [ac_cv_type_long_long_int=no], - [ac_cv_type_long_long_int=yes])], - [ac_cv_type_long_long_int=no])]) - if test $ac_cv_type_long_long_int = yes; then - AC_DEFINE([HAVE_LONG_LONG_INT], 1, - [Define to 1 if the system has the type `long long int'.]) - fi -]) - -# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, but can be removed once we -# assume 2.62 everywhere. - -# Note: If the type 'unsigned long long int' exists but is only 32 bits -# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT -# will not be defined. In this case you can treat 'unsigned long long int' -# like 'unsigned long int'. - -AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for unsigned long long int], - [ac_cv_type_unsigned_long_long_int], - [AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [ac_cv_type_unsigned_long_long_int=yes], - [ac_cv_type_unsigned_long_long_int=no])]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1, - [Define to 1 if the system has the type `unsigned long long int'.]) - fi -]) - -# Expands to a C program that can be used to test for simultaneous support -# of 'long long' and 'unsigned long long'. We don't want to say that -# 'long long' is available if 'unsigned long long' is not, or vice versa, -# because too many programs rely on the symmetry between signed and unsigned -# integer types (excluding 'bool'). -AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], -[ - AC_LANG_PROGRAM( - [[/* Test preprocessor. */ - #if ! (-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - error in preprocessor; - #endif - #if ! (18446744073709551615ULL <= -1ull) - error in preprocessor; - #endif - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63;]], - [[/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull));]]) -]) diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4 deleted file mode 100644 index 14ba612..0000000 --- a/m4/printf-posix.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# printf-posix.m4 serial 3 (gettext-0.17) -dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether the printf() function supports POSIX/XSI format strings with -dnl positions. - -AC_DEFUN([gt_PRINTF_POSIX], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], - gt_cv_func_printf_posix, - [ - AC_TRY_RUN([ -#include -#include -/* The string "%2$d %1$d", with dollar characters protected from the shell's - dollar expansion (possibly an autoconf bug). */ -static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -static char buf[100]; -int main () -{ - sprintf (buf, format, 33, 55); - return (strcmp (buf, "55 33") != 0); -}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, - [ - AC_EGREP_CPP(notposix, [ -#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ - notposix -#endif - ], gt_cv_func_printf_posix="guessing no", - gt_cv_func_printf_posix="guessing yes") - ]) - ]) - case $gt_cv_func_printf_posix in - *yes) - AC_DEFINE(HAVE_POSIX_PRINTF, 1, - [Define if your printf() function supports format strings with positions.]) - ;; - esac -]) diff --git a/m4/size_max.m4 b/m4/size_max.m4 deleted file mode 100644 index 6cb4868..0000000 --- a/m4/size_max.m4 +++ /dev/null @@ -1,68 +0,0 @@ -# size_max.m4 serial 6 -dnl Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([gl_SIZE_MAX], -[ - AC_CHECK_HEADERS(stdint.h) - dnl First test whether the system already has SIZE_MAX. - AC_MSG_CHECKING([for SIZE_MAX]) - AC_CACHE_VAL([gl_cv_size_max], [ - gl_cv_size_max= - AC_EGREP_CPP([Found it], [ -#include -#if HAVE_STDINT_H -#include -#endif -#ifdef SIZE_MAX -Found it -#endif -], gl_cv_size_max=yes) - if test -z "$gl_cv_size_max"; then - dnl Define it ourselves. Here we assume that the type 'size_t' is not wider - dnl than the type 'unsigned long'. Try hard to find a definition that can - dnl be used in a preprocessor #if, i.e. doesn't contain a cast. - AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], - [#include -#include ], size_t_bits_minus_1=) - AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], - [#include ], fits_in_uint=) - if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then - if test $fits_in_uint = 1; then - dnl Even though SIZE_MAX fits in an unsigned int, it must be of type - dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. - AC_TRY_COMPILE([#include - extern size_t foo; - extern unsigned long foo; - ], [], fits_in_uint=0) - fi - dnl We cannot use 'expr' to simplify this expression, because 'expr' - dnl works only with 'long' integers in the host environment, while we - dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. - if test $fits_in_uint = 1; then - gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" - else - gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" - fi - else - dnl Shouldn't happen, but who knows... - gl_cv_size_max='((size_t)~(size_t)0)' - fi - fi - ]) - AC_MSG_RESULT([$gl_cv_size_max]) - if test "$gl_cv_size_max" != yes; then - AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], - [Define as the maximum value of type 'size_t', if the system doesn't define it.]) - fi -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4 deleted file mode 100644 index db9a8ac..0000000 --- a/m4/stdint_h.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# stdint_h.m4 serial 6 -dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_STDINT_H_WITH_UINTMAX if exists, -# doesn't clash with , and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_STDINT_H], -[ - AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, - [AC_TRY_COMPILE( - [#include -#include ], - [uintmax_t i = (uintmax_t) -1; return !i;], - gl_cv_header_stdint_h=yes, - gl_cv_header_stdint_h=no)]) - if test $gl_cv_header_stdint_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, - [Define if exists, doesn't clash with , - and declares uintmax_t. ]) - fi -]) diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 deleted file mode 100644 index 641c489..0000000 --- a/m4/uintmax_t.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# uintmax_t.m4 serial 10 -dnl Copyright (C) 1997-2004, 2007 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -AC_PREREQ(2.13) - -# Define uintmax_t to 'unsigned long' or 'unsigned long long' -# if it is not already defined in or . - -AC_DEFUN([gl_AC_TYPE_UINTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - test $ac_cv_type_unsigned_long_long_int = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' - AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, - [Define to unsigned long or unsigned long long - if and don't define.]) - else - AC_DEFINE(HAVE_UINTMAX_T, 1, - [Define if you have the 'uintmax_t' type in or .]) - fi -]) diff --git a/m4/visibility.m4 b/m4/visibility.m4 deleted file mode 100644 index 2ff6330..0000000 --- a/m4/visibility.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# visibility.m4 serial 1 (gettext-0.15) -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl Tests whether the compiler supports the command-line option -dnl -fvisibility=hidden and the function and variable attributes -dnl __attribute__((__visibility__("hidden"))) and -dnl __attribute__((__visibility__("default"))). -dnl Does *not* test for __visibility__("protected") - which has tricky -dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on -dnl MacOS X. -dnl Does *not* test for __visibility__("internal") - which has processor -dnl dependent semantics. -dnl Does *not* test for #pragma GCC visibility push(hidden) - which is -dnl "really only recommended for legacy code". -dnl Set the variable CFLAG_VISIBILITY. -dnl Defines and sets the variable HAVE_VISIBILITY. - -AC_DEFUN([gl_VISIBILITY], -[ - AC_REQUIRE([AC_PROG_CC]) - CFLAG_VISIBILITY= - HAVE_VISIBILITY=0 - if test -n "$GCC"; then - AC_MSG_CHECKING([for simple visibility declarations]) - AC_CACHE_VAL(gl_cv_cc_visibility, [ - gl_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fvisibility=hidden" - AC_TRY_COMPILE( - [extern __attribute__((__visibility__("hidden"))) int hiddenvar; - extern __attribute__((__visibility__("default"))) int exportedvar; - extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); - extern __attribute__((__visibility__("default"))) int exportedfunc (void);], - [], - gl_cv_cc_visibility=yes, - gl_cv_cc_visibility=no) - CFLAGS="$gl_save_CFLAGS"]) - AC_MSG_RESULT([$gl_cv_cc_visibility]) - if test $gl_cv_cc_visibility = yes; then - CFLAG_VISIBILITY="-fvisibility=hidden" - HAVE_VISIBILITY=1 - fi - fi - AC_SUBST([CFLAG_VISIBILITY]) - AC_SUBST([HAVE_VISIBILITY]) - AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], - [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) -]) diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4 deleted file mode 100644 index cde2129..0000000 --- a/m4/wchar_t.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# wchar_t.m4 serial 1 (gettext-0.12) -dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether has the 'wchar_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WCHAR_T], -[ - AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, - [AC_TRY_COMPILE([#include - wchar_t foo = (wchar_t)'\0';], , - gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) - if test $gt_cv_c_wchar_t = yes; then - AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) - fi -]) diff --git a/m4/wint_t.m4 b/m4/wint_t.m4 deleted file mode 100644 index af5ed93..0000000 --- a/m4/wint_t.m4 +++ /dev/null @@ -1,28 +0,0 @@ -# wint_t.m4 serial 2 (gettext-0.17) -dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether has the 'wint_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WINT_T], -[ - AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, - [AC_TRY_COMPILE([ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0';], , - gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) - if test $gt_cv_c_wint_t = yes; then - AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) - fi -]) diff --git a/m4/xsize.m4 b/m4/xsize.m4 deleted file mode 100644 index 85bb721..0000000 --- a/m4/xsize.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# xsize.m4 serial 3 -dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XSIZE], -[ - dnl Prerequisites of lib/xsize.h. - AC_REQUIRE([gl_SIZE_MAX]) - AC_REQUIRE([AC_C_INLINE]) - AC_CHECK_HEADERS(stdint.h) -]) diff --git a/po/rrdtool.pot b/po/rrdtool.pot index 180a4af..f74b113 100644 --- a/po/rrdtool.pot +++ b/po/rrdtool.pot @@ -6,92 +6,93 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: rrdtool 1.4.3\n" +"Project-Id-Version: rrdtool 1.4.7\n" "Report-Msgid-Bugs-To: http://oss.oetiker.ch/rrdtool-trac/newticket\n" -"POT-Creation-Date: 2010-03-22 18:30+0100\n" +"POT-Creation-Date: 2012-01-24 11:09+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/rrd_getopt.c:618 +#: src/rrd_getopt.c:624 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "" -#: src/rrd_getopt.c:640 +#: src/rrd_getopt.c:646 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "" -#: src/rrd_getopt.c:646 +#: src/rrd_getopt.c:652 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "" -#: src/rrd_getopt.c:661 src/rrd_getopt.c:814 +#: src/rrd_getopt.c:667 src/rrd_getopt.c:820 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "" -#: src/rrd_getopt.c:687 +#: src/rrd_getopt.c:693 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "" -#: src/rrd_getopt.c:691 +#: src/rrd_getopt.c:697 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "" -#: src/rrd_getopt.c:715 +#: src/rrd_getopt.c:721 #, c-format msgid "%s: illegal option -- %c\n" msgstr "" -#: src/rrd_getopt.c:718 +#: src/rrd_getopt.c:724 #, c-format msgid "%s: invalid option -- %c\n" msgstr "" -#: src/rrd_getopt.c:744 src/rrd_getopt.c:852 +#: src/rrd_getopt.c:750 src/rrd_getopt.c:858 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "" -#: src/rrd_getopt.c:786 +#: src/rrd_getopt.c:792 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "" -#: src/rrd_getopt.c:801 +#: src/rrd_getopt.c:807 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "" -#: src/rrd_tool.c:49 +#: src/rrd_tool.c:51 #, c-format msgid "" -"RRDtool %s Copyright 1997-2009 by Tobias Oetiker \n" +"RRDtool %s Copyright 1997-2012 by Tobias Oetiker \n" " Compiled %s %s\n" "\n" "Usage: rrdtool [options] command command_options\n" msgstr "" -#: src/rrd_tool.c:56 +#: src/rrd_tool.c:58 msgid "" "Valid commands: create, update, updatev, graph, graphv, dump, restore,\n" "\t\tlast, lastupdate, first, info, fetch, tune,\n" "\t\tresize, xport, flushcached\n" msgstr "" -#: src/rrd_tool.c:61 +#: src/rrd_tool.c:63 msgid "Valid remote commands: quit, ls, cd, mkdir, pwd\n" msgstr "" -#: src/rrd_tool.c:65 +#: src/rrd_tool.c:67 msgid "" "* create - create a new RRD\n" "\n" @@ -102,21 +103,21 @@ msgid "" "\t\t[RRA:CF:cf arguments]\n" msgstr "" -#: src/rrd_tool.c:73 +#: src/rrd_tool.c:75 msgid "" "* dump - dump an RRD to XML\n" "\n" "\trrdtool dump filename.rrd >filename.xml\n" msgstr "" -#: src/rrd_tool.c:77 +#: src/rrd_tool.c:79 msgid "" "* info - returns the configuration and status of the RRD\n" "\n" "\trrdtool info filename.rrd\n" msgstr "" -#: src/rrd_tool.c:81 +#: src/rrd_tool.c:83 msgid "" "* restore - restore an RRD file from its XML form\n" "\n" @@ -124,14 +125,14 @@ msgid "" "filename.rrd\n" msgstr "" -#: src/rrd_tool.c:85 +#: src/rrd_tool.c:87 msgid "" "* last - show last update time for RRD\n" "\n" "\trrdtool last filename.rrd\n" msgstr "" -#: src/rrd_tool.c:89 +#: src/rrd_tool.c:91 msgid "" "* lastupdate - returns the most recent datum stored for\n" " each DS in an RRD\n" @@ -139,14 +140,14 @@ msgid "" "\trrdtool lastupdate filename.rrd\n" msgstr "" -#: src/rrd_tool.c:93 +#: src/rrd_tool.c:95 msgid "" "* first - show first update time for RRA within an RRD\n" "\n" "\trrdtool first filename.rrd [--rraindex number]\n" msgstr "" -#: src/rrd_tool.c:97 +#: src/rrd_tool.c:99 msgid "" "* update - update an RRD\n" "\n" @@ -160,7 +161,7 @@ msgid "" "\t\t[ time:value[:value...] ..]\n" msgstr "" -#: src/rrd_tool.c:106 +#: src/rrd_tool.c:108 msgid "" "* updatev - a verbose version of update\n" "\treturns information about values, RRAs, and datasources updated\n" @@ -174,7 +175,7 @@ msgid "" "\t\t[ time:value[:value...] ..]\n" msgstr "" -#: src/rrd_tool.c:115 +#: src/rrd_tool.c:117 msgid "" "* fetch - fetch data out of an RRD\n" "\n" @@ -184,7 +185,7 @@ msgid "" "\t\t[--daemon
]\n" msgstr "" -#: src/rrd_tool.c:122 +#: src/rrd_tool.c:124 msgid "" "* flushcached - flush cached data out to an RRD file\n" "\n" @@ -192,14 +193,14 @@ msgid "" "\t\t[--daemon
]\n" msgstr "" -#: src/rrd_tool.c:129 +#: src/rrd_tool.c:131 msgid "" "* graph - generate a graph from one or several RRD\n" "\n" "\trrdtool graph filename [-s|--start seconds] [-e|--end seconds]\n" msgstr "" -#: src/rrd_tool.c:132 +#: src/rrd_tool.c:134 msgid "" "* graphv - generate a graph from one or several RRD\n" " with meta data printed before the graph\n" @@ -207,7 +208,7 @@ msgid "" "\trrdtool graphv filename [-s|--start seconds] [-e|--end seconds]\n" msgstr "" -#: src/rrd_tool.c:136 +#: src/rrd_tool.c:138 msgid "" "\t\t[-x|--x-grid x-axis grid and label]\n" "\t\t[-Y|--alt-y-grid] [--full-size-mode]\n" @@ -223,7 +224,7 @@ msgid "" "\t\t[-j|--only-graph]\n" msgstr "" -#: src/rrd_tool.c:148 +#: src/rrd_tool.c:150 msgid "" "\t\t[-n|--font FONTTAG:size:font]\n" "\t\t[-m|--zoom factor]\n" @@ -248,7 +249,7 @@ msgid "" "\t\t[DEF:vname=rrd:ds-name:CF]\n" msgstr "" -#: src/rrd_tool.c:170 +#: src/rrd_tool.c:172 msgid "" "\t\t[CDEF:vname=rpn-expression]\n" "\t\t[VDEF:vdefname=rpn-expression]\n" @@ -267,7 +268,7 @@ msgid "" "\t\t[STACK:vname[#rrggbb[aa][:legend]]] (deprecated)\n" msgstr "" -#: src/rrd_tool.c:185 +#: src/rrd_tool.c:187 msgid "" " * tune - Modify some basic properties of an RRD\n" "\n" @@ -282,7 +283,7 @@ msgid "" "\t\t[--alpha adaptation-parameter]\n" msgstr "" -#: src/rrd_tool.c:196 +#: src/rrd_tool.c:198 msgid "" "\t\t[--beta adaptation-parameter]\n" "\t\t[--gamma adaptation-parameter]\n" @@ -290,62 +291,62 @@ msgid "" "\t\t[--aberrant-reset ds-name]\n" msgstr "" -#: src/rrd_tool.c:202 +#: src/rrd_tool.c:204 msgid "" " * resize - alter the length of one of the RRAs in an RRD\n" "\n" "\trrdtool resize filename rranum GROW|SHRINK rows\n" msgstr "" -#: src/rrd_tool.c:205 +#: src/rrd_tool.c:207 msgid "" "* xport - generate XML dump from one or several RRD\n" "\n" "\trrdtool xport [-s|--start seconds] [-e|--end seconds]\n" "\t\t[-m|--maxrows rows]\n" "\t\t[--step seconds]\n" -"\t\t[--enumds]\n" +"\t\t[--enumds] [--json]\n" "\t\t[DEF:vname=rrd:ds-name:CF]\n" "\t\t[CDEF:vname=rpn-expression]\n" "\t\t[XPORT:vname:legend]\n" msgstr "" -#: src/rrd_tool.c:212 +#: src/rrd_tool.c:214 msgid "" " * quit - closing a session in remote mode\n" "\n" "\trrdtool quit\n" msgstr "" -#: src/rrd_tool.c:215 +#: src/rrd_tool.c:217 msgid "" " * ls - lists all *.rrd files in current directory\n" "\n" "\trrdtool ls\n" msgstr "" -#: src/rrd_tool.c:218 +#: src/rrd_tool.c:220 msgid "" " * cd - changes the current directory\n" "\n" "\trrdtool cd new directory\n" msgstr "" -#: src/rrd_tool.c:221 +#: src/rrd_tool.c:223 msgid "" " * mkdir - creates a new directory\n" "\n" "\trrdtool mkdir newdirectoryname\n" msgstr "" -#: src/rrd_tool.c:224 +#: src/rrd_tool.c:226 msgid "" " * pwd - returns the current working directory\n" "\n" "\trrdtool pwd\n" msgstr "" -#: src/rrd_tool.c:227 +#: src/rrd_tool.c:229 msgid "" "RRDtool is distributed under the Terms of the GNU General\n" "Public License Version 2. (www.gnu.org/copyleft/gpl.html)\n" diff --git a/rrd_config.h.in b/rrd_config.h.in index 8f8bd23..2b12940 100644 --- a/rrd_config.h.in +++ b/rrd_config.h.in @@ -25,46 +25,13 @@ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#undef CRAY_STACKSEG_END - -/* Define to 1 if using `alloca.c'. */ -#undef C_ALLOCA - /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS -/* Define to 1 if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define to 1 if you have the `argz_count' function. */ -#undef HAVE_ARGZ_COUNT - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARGZ_H - -/* Define to 1 if you have the `argz_next' function. */ -#undef HAVE_ARGZ_NEXT - -/* Define to 1 if you have the `argz_stringify' function. */ -#undef HAVE_ARGZ_STRINGIFY - -/* Define to 1 if you have the `asprintf' function. */ -#undef HAVE_ASPRINTF - /* set to 1 if msync with MS_ASYNC fails to update mtime */ #undef HAVE_BROKEN_MS_ASYNC -/* Define to 1 if the compiler understands __builtin_expect. */ -#undef HAVE_BUILTIN_EXPECT - /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT @@ -89,18 +56,6 @@ */ #undef HAVE_DCGETTEXT -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#undef HAVE_DECL_FEOF_UNLOCKED - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#undef HAVE_DECL_FGETS_UNLOCKED - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#undef HAVE_DECL_GETC_UNLOCKED - /* Define to 1 if you have the declaration of `madvise', and to 0 if you don't. */ #undef HAVE_DECL_MADVISE @@ -113,14 +68,6 @@ don't. */ #undef HAVE_DECL_STRERROR_R -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#undef HAVE_DECL__SNPRINTF - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#undef HAVE_DECL__SNWPRINTF - /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H @@ -164,24 +111,9 @@ /* Define to 1 if you have the `fsync' function. */ #undef HAVE_FSYNC -/* Define to 1 if you have the `fwprintf' function. */ -#undef HAVE_FWPRINTF - /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO -/* Define to 1 if you have the `getcwd' function. */ -#undef HAVE_GETCWD - -/* Define to 1 if you have the `getegid' function. */ -#undef HAVE_GETEGID - -/* Define to 1 if you have the `geteuid' function. */ -#undef HAVE_GETEUID - -/* Define to 1 if you have the `getgid' function. */ -#undef HAVE_GETGID - /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE @@ -197,22 +129,18 @@ /* Define to 1 if you have the `getuid' function. */ #undef HAVE_GETUID +/* Define to 1 if you have the `hosts_access' function. */ +#undef HAVE_HOSTS_ACCESS + /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_IEEEFP_H -/* Define if you have the 'intmax_t' type in or . */ -#undef HAVE_INTMAX_T - /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#undef HAVE_INTTYPES_H_WITH_UINTMAX - /* Define to 1 if you have the global variable 'int opterr'. */ #undef HAVE_INT_OPTERR @@ -225,15 +153,9 @@ /* Define to 1 if you have the `isnan' function. */ #undef HAVE_ISNAN -/* Define if you have and nl_langinfo(CODESET). */ -#undef HAVE_LANGINFO_CODESET - /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H -/* Define if your file defines LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES - /* have got libdbi installed */ #undef HAVE_LIBDBI @@ -243,11 +165,8 @@ /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if the system has the type `long long int'. */ -#undef HAVE_LONG_LONG_INT +/* have got libwrap installed */ +#undef HAVE_LIBWRAP /* Define to 1 if you have the header file. */ #undef HAVE_LUALIB_H @@ -273,9 +192,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the `mempcpy' function. */ -#undef HAVE_MEMPCPY - /* Define to 1 if you have the `mktime' function. */ #undef HAVE_MKTIME @@ -294,10 +210,6 @@ /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO -/* Define if you have and it defines the NL_LOCALE_NAME macro if - _GNU_SOURCE is defined. */ -#undef HAVE_NL_LOCALE_NAME - /* Define to 1 if you have the `opendir' function. */ #undef HAVE_OPENDIR @@ -307,29 +219,20 @@ /* Define to 1 if you have the `posix_madvise' function. */ #undef HAVE_POSIX_MADVISE -/* Define if your printf() function supports format strings with positions. */ -#undef HAVE_POSIX_PRINTF - /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -#undef HAVE_PTHREAD_MUTEX_RECURSIVE - -/* Define if the POSIX multithreading library has read/write locks. */ -#undef HAVE_PTHREAD_RWLOCK - -/* Define to 1 if you have the `putenv' function. */ -#undef HAVE_PUTENV - /* Define to 1 if you have the `readdir' function. */ #undef HAVE_READDIR -/* Define to 1 if you have the `setenv' function. */ -#undef HAVE_SETENV +/* Define to 1 if you have the `rint' function. */ +#undef HAVE_RINT + +/* Define to 1 if you have the `round' function. */ +#undef HAVE_ROUND -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE +/* is rrd_graph supported by this install */ +#undef HAVE_RRD_GRAPH /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H @@ -340,34 +243,18 @@ /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#undef HAVE_STDINT_H_WITH_UINTMAX - /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the `stpcpy' function. */ -#undef HAVE_STPCPY - -/* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR @@ -383,9 +270,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strtoul' function. */ -#undef HAVE_STRTOUL - /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H @@ -412,55 +296,30 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H -/* Define to 1 if you have the `tsearch' function. */ -#undef HAVE_TSEARCH +/* is there an external timezone variable instead ? */ +#undef HAVE_TIMEZONE + +/* does tm have a tm_gmtoff member */ +#undef HAVE_TM_GMTOFF /* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET -/* Define if you have the 'uintmax_t' type in or . */ -#undef HAVE_UINTMAX_T - /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if the system has the type `unsigned long long int'. */ -#undef HAVE_UNSIGNED_LONG_LONG_INT - /* Define to 1 if you have the `vasprintf' function. */ #undef HAVE_VASPRINTF -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#undef HAVE_VISIBILITY - /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF -/* Define if you have the 'wchar_t' type. */ -#undef HAVE_WCHAR_T - -/* Define to 1 if you have the `wcslen' function. */ -#undef HAVE_WCSLEN - -/* Define if you have the 'wint_t' type. */ -#undef HAVE_WINT_T - /* Define to 1 if you have the `_NL_TIME_WEEK_1STDAY' function. */ #undef HAVE__NL_TIME_WEEK_1STDAY -/* Define to 1 if you have the `__fsetlocking' function. */ -#undef HAVE___FSETLOCKING - -/* Define as const if the declaration of iconv() needs const. */ -#undef ICONV_CONST - -/* Define if integer division by zero raises signal SIGFPE. */ -#undef INTDIV0_RAISES_SIGFPE - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -486,30 +345,15 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define if exists and defines unusable PRI* macros. */ -#undef PRI_MACROS_BROKEN - /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE -/* Define if the pthread_in_use() detection is hard. */ -#undef PTHREAD_IN_USE_DETECTION_HARD - /* Vertical label angle: -90.0 (default) or 90.0 */ #undef RRDGRAPH_YLEGEND_ANGLE -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#undef SIZE_MAX - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#undef STACK_DIRECTION +/* The size of `time_t', as computed by sizeof. */ +#undef SIZEOF_TIME_T /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS @@ -526,30 +370,12 @@ /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME +/* the real name of tm_gmtoff */ +#undef TM_GMTOFF + /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME -/* Define if the POSIX multithreading library can be used. */ -#undef USE_POSIX_THREADS - -/* Define if references to the POSIX multithreading library should be made - weak. */ -#undef USE_POSIX_THREADS_WEAK - -/* Define if the GNU Pth multithreading library can be used. */ -#undef USE_PTH_THREADS - -/* Define if references to the GNU Pth multithreading library should be made - weak. */ -#undef USE_PTH_THREADS_WEAK - -/* Define if the old Solaris multithreading library can be used. */ -#undef USE_SOLARIS_THREADS - -/* Define if references to the old Solaris multithreading library should be - made weak. */ -#undef USE_SOLARIS_THREADS_WEAK - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE @@ -572,9 +398,6 @@ #endif -/* Define if the Win32 multithreading API can be used. */ -#undef USE_WIN32_THREADS - /* Version number of package */ #undef VERSION @@ -603,23 +426,6 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -#undef ptrdiff_t - -/* Define to `unsigned int' if does not define. */ -#undef size_t - -/* Define to unsigned long or unsigned long long if and - don't define. */ -#undef uintmax_t - #ifdef MUST_HAVE_MALLOC_MALLOC_H @@ -630,35 +436,3 @@ #endif - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init libintl_lock_init -#define glthread_lock_lock libintl_lock_lock -#define glthread_lock_unlock libintl_lock_unlock -#define glthread_lock_destroy libintl_lock_destroy -#define glthread_rwlock_init libintl_rwlock_init -#define glthread_rwlock_rdlock libintl_rwlock_rdlock -#define glthread_rwlock_wrlock libintl_rwlock_wrlock -#define glthread_rwlock_unlock libintl_rwlock_unlock -#define glthread_rwlock_destroy libintl_rwlock_destroy -#define glthread_recursive_lock_init libintl_recursive_lock_init -#define glthread_recursive_lock_lock libintl_recursive_lock_lock -#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock -#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy -#define glthread_once libintl_once -#define glthread_once_call libintl_once_call -#define glthread_once_singlethreaded libintl_once_singlethreaded - diff --git a/rrdtool.spec b/rrdtool.spec index 37fddbb..e447ae0 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -2,6 +2,7 @@ %define with_php %{?_without_php: 0} %{?!_without_php: 1} %define with_tcl %{?_without_tcl: 0} %{?!_without_tcl: 1} %define with_ruby %{?_without_ruby: 0} %{?!_without_ruby: 1} +%define with_lua %{?_without_lua: 0} %{?!_without_lua: 1} %define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4) %define svnrev r1190 #define pretag 1.2.99908020600 @@ -9,8 +10,8 @@ Summary: Round Robin Database Tool to store and display time-series data Name: rrdtool -Version: 1.4.3 -Release: 0.20%{?dist} +Version: 1.4.7 +Release: 1%{?dist} License: GPLv2+ with exceptions Group: Applications/Databases URL: http://oss.oetiker.ch/rrdtool/ @@ -59,6 +60,9 @@ RRD is the Acronym for Round Robin Database. RRD is a system to store and display time-series data (i.e. network bandwidth, machine-room temperature, server load average). This package contains documentation on using RRD. +%define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch) +%define perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib) + %package perl Summary: Perl RRDtool bindings Group: Development/Languages @@ -143,6 +147,20 @@ Requires: %{name} = %{version}-%{release} The %{name}-ruby package includes RRDtool bindings for Ruby. %endif +%if %{with_lua} +%{!?lua_version: %define lua_version %(lua -v 2>&1 | cut -f2 -d' ' | cut -f1,2 -d '.')} + +%package lua +Summary: Lua RRDtool bindings +Group: Development/Languages +BuildRequires: lua-devel +Requires: lua +Requires: %{name} = %{version}-%{release} + +%description lua +The %{name}-lua package includes RRDtool bindings for Lua. +%endif + %package cached Summary: Data caching daemon for RRDtool Group: Applications/Databases @@ -203,7 +221,15 @@ cp -p /usr/lib/rpm/config.{guess,sub} php4/ %endif %if %{with_ruby} --enable-ruby \ +%else + --disable-ruby \ %endif +%if %{with_lua} + --enable-lua \ +%else + --disable-lua \ +%endif + --enable-perl-site-install \ --disable-static \ --with-pic @@ -211,13 +237,6 @@ cp -p /usr/lib/rpm/config.{guess,sub} php4/ %{__perl} -pi.orig -e 's|-Wl,--rpath -Wl,\$rp||g' \ bindings/perl-shared/Makefile.PL -# Force RRDp bits where we want 'em, not sure yet why the -# --with-perl-options and --libdir don't take -pushd bindings/perl-piped/ -%{__perl} Makefile.PL INSTALLDIRS=vendor -%{__perl} -pi.orig -e 's|/lib/perl|/%{_lib}/perl|g' Makefile -popd - #{__make} %{?_smp_mflags} make @@ -259,9 +278,6 @@ extension=rrdtool.so __EOF__ %endif -# Pesky RRDp.pm... -%{__mv} $RPM_BUILD_ROOT%{perl_vendorarch}/../RRDp.pm $RPM_BUILD_ROOT%{perl_vendorarch}/ - # Dunno why this is getting installed here... %{__rm} -f $RPM_BUILD_ROOT%{perl_vendorarch}/../leaktest.pl @@ -344,6 +360,7 @@ test "$1" != 0 || /usr/sbin/userdel %rrdcached_user &>/dev/null || : %{_mandir}/man3/* %{perl_vendorarch}/*.pm %attr(0755,root,root) %{perl_vendorarch}/auto/RRDs/ +%{perl_vendorlib}/*.pm %if %{with_python} %files python @@ -375,6 +392,12 @@ test "$1" != 0 || /usr/sbin/userdel %rrdcached_user &>/dev/null || : %{ruby_sitearch}/RRD.so %endif +%if %{with_lua} +%files lua +%defattr(-,root,root,-) +%{_libdir}/lua/%{lua_version}/rrd.* +%endif + %files cached %{_bindir}/rrdcached %config %{_sysconfdir}/default/* @@ -383,6 +406,11 @@ test "$1" != 0 || /usr/sbin/userdel %rrdcached_user &>/dev/null || : %attr(0775 %rrdcached_user %rrdcached_user) %dir %{_localstatedir}/run/rrdcached %changelog +* Tue Jan 25 2011 Bernard Li +- Reset Release to 1 +- Add -lua subpackage +- Fix -perl subpackage so it includes the correct Perl package paths + * Wed Oct 08 2008 Bernard Li - Split rrdcached related files to -cached subpackage - Create rrdcached user and make rrdcached related files owned by it diff --git a/src/Makefile.am b/src/Makefile.am index 9998e4a..1c62157 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,24 +32,27 @@ UPD_C_FILES = \ rrd_update.c RRD_C_FILES = \ - hash_32.c \ - pngsize.c \ rrd_create.c \ - rrd_graph.c \ - rrd_graph_helper.c \ + hash_32.c \ rrd_version.c \ rrd_last.c \ rrd_lastupdate.c \ rrd_first.c \ rrd_restore.c \ - rrd_xport.c \ - rrd_gfx.c \ rrd_dump.c \ rrd_flushcached.c \ rrd_fetch.c \ rrd_resize.c \ rrd_tune.c +if BUILD_RRDGRAPH +RRD_C_FILES += rrd_graph.c \ + rrd_graph_helper.c \ + rrd_xport.c \ + rrd_gfx.c \ + pngsize.c +endif + noinst_HEADERS = \ unused.h \ gettext.h \ @@ -81,7 +84,7 @@ librrdupd_la_LIBADD = $(CORE_LIBS) librrd_la_SOURCES = $(RRD_C_FILES) librrd_la_DEPENDENCIES = librrdupd.la librrd.sym -librrd_la_LIBADD = librrdupd.la $(ALL_LIBS) +librrd_la_LIBADD = librrdupd.la $(ALL_LIBS) $(LIBINTL) librrd_la_LDFLAGS = -version-info @LIBVERS@ librrd_la_LDFLAGS += -export-symbols librrd.sym @@ -90,7 +93,7 @@ librrd_th_la_DEPENDENCIES = librrd.sym librrd_th_la_CFLAGS = $(AM_CFLAGS) $(MULTITHREAD_CFLAGS) librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info @LIBVERS@ librrd_th_la_LDFLAGS += -export-symbols librrd.sym -librrd_th_la_LIBADD = $(ALL_LIBS) +librrd_th_la_LIBADD = $(ALL_LIBS) $(LIBINTL) include_HEADERS = rrd.h rrd_format.h rrd_client.h diff --git a/src/Makefile.in b/src/Makefile.in index 5723185..1bab2cb 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -43,36 +43,33 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@BUILD_LIBDBI_TRUE@am__append_1 = rrd_fetch_libdbi.c -@BUILD_GETOPT_TRUE@am__append_2 = rrd_getopt.h -@BUILD_GETOPT_TRUE@am__append_3 = rrd_getopt.c rrd_getopt1.c -@BUILD_MULTITHREAD_TRUE@am__append_4 = librrd_th.la +@BUILD_RRDGRAPH_TRUE@am__append_1 = rrd_graph.c \ +@BUILD_RRDGRAPH_TRUE@ rrd_graph_helper.c \ +@BUILD_RRDGRAPH_TRUE@ rrd_xport.c \ +@BUILD_RRDGRAPH_TRUE@ rrd_gfx.c \ +@BUILD_RRDGRAPH_TRUE@ pngsize.c + +@BUILD_LIBDBI_TRUE@am__append_2 = rrd_fetch_libdbi.c +@BUILD_GETOPT_TRUE@am__append_3 = rrd_getopt.h +@BUILD_GETOPT_TRUE@am__append_4 = rrd_getopt.c rrd_getopt1.c +@BUILD_MULTITHREAD_TRUE@am__append_5 = librrd_th.la bin_PROGRAMS = rrdtool$(EXEEXT) rrdupdate$(EXEEXT) rrdcached$(EXEEXT) \ $(am__EXEEXT_1) -@BUILD_RRDCGI_TRUE@am__append_5 = rrdcgi +@BUILD_RRDCGI_TRUE@am__append_6 = rrdcgi subdir = src DIST_COMMON = $(am__noinst_HEADERS_DIST) $(include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/librrd.pc.in $(srcdir)/librrd.sym.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ - $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/glibc2.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \ - $(top_srcdir)/m4/intl.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \ - $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -104,18 +101,19 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -am__librrd_la_SOURCES_DIST = hash_32.c pngsize.c rrd_create.c \ - rrd_graph.c rrd_graph_helper.c rrd_version.c rrd_last.c \ - rrd_lastupdate.c rrd_first.c rrd_restore.c rrd_xport.c \ - rrd_gfx.c rrd_dump.c rrd_flushcached.c rrd_fetch.c \ - rrd_resize.c rrd_tune.c rrd_fetch_libdbi.c -@BUILD_LIBDBI_TRUE@am__objects_1 = rrd_fetch_libdbi.lo -am__objects_2 = hash_32.lo pngsize.lo rrd_create.lo rrd_graph.lo \ - rrd_graph_helper.lo rrd_version.lo rrd_last.lo \ - rrd_lastupdate.lo rrd_first.lo rrd_restore.lo rrd_xport.lo \ - rrd_gfx.lo rrd_dump.lo rrd_flushcached.lo rrd_fetch.lo \ - rrd_resize.lo rrd_tune.lo $(am__objects_1) -am_librrd_la_OBJECTS = $(am__objects_2) +am__librrd_la_SOURCES_DIST = rrd_create.c hash_32.c rrd_version.c \ + rrd_last.c rrd_lastupdate.c rrd_first.c rrd_restore.c \ + rrd_dump.c rrd_flushcached.c rrd_fetch.c rrd_resize.c \ + rrd_tune.c rrd_graph.c rrd_graph_helper.c rrd_xport.c \ + rrd_gfx.c pngsize.c rrd_fetch_libdbi.c +@BUILD_RRDGRAPH_TRUE@am__objects_1 = rrd_graph.lo rrd_graph_helper.lo \ +@BUILD_RRDGRAPH_TRUE@ rrd_xport.lo rrd_gfx.lo pngsize.lo +@BUILD_LIBDBI_TRUE@am__objects_2 = rrd_fetch_libdbi.lo +am__objects_3 = rrd_create.lo hash_32.lo rrd_version.lo rrd_last.lo \ + rrd_lastupdate.lo rrd_first.lo rrd_restore.lo rrd_dump.lo \ + rrd_flushcached.lo rrd_fetch.lo rrd_resize.lo rrd_tune.lo \ + $(am__objects_1) $(am__objects_2) +am_librrd_la_OBJECTS = $(am__objects_3) librrd_la_OBJECTS = $(am_librrd_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -126,33 +124,36 @@ librrd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ am__librrd_th_la_SOURCES_DIST = rrd_parsetime.c rrd_hw.c rrd_hw_math.c \ rrd_hw_update.c rrd_diff.c rrd_format.c rrd_info.c rrd_error.c \ rrd_open.c rrd_client.c rrd_nan_inf.c rrd_rpncalc.c \ - rrd_utils.c rrd_update.c rrd_getopt.c rrd_getopt1.c hash_32.c \ - pngsize.c rrd_create.c rrd_graph.c rrd_graph_helper.c \ - rrd_version.c rrd_last.c rrd_lastupdate.c rrd_first.c \ - rrd_restore.c rrd_xport.c rrd_gfx.c rrd_dump.c \ + rrd_utils.c rrd_update.c rrd_getopt.c rrd_getopt1.c \ + rrd_create.c hash_32.c rrd_version.c rrd_last.c \ + rrd_lastupdate.c rrd_first.c rrd_restore.c rrd_dump.c \ rrd_flushcached.c rrd_fetch.c rrd_resize.c rrd_tune.c \ + rrd_graph.c rrd_graph_helper.c rrd_xport.c rrd_gfx.c pngsize.c \ rrd_fetch_libdbi.c rrd_thread_safe.c -@BUILD_GETOPT_TRUE@am__objects_3 = librrd_th_la-rrd_getopt.lo \ +@BUILD_GETOPT_TRUE@am__objects_4 = librrd_th_la-rrd_getopt.lo \ @BUILD_GETOPT_TRUE@ librrd_th_la-rrd_getopt1.lo -am__objects_4 = librrd_th_la-rrd_parsetime.lo librrd_th_la-rrd_hw.lo \ +am__objects_5 = librrd_th_la-rrd_parsetime.lo librrd_th_la-rrd_hw.lo \ librrd_th_la-rrd_hw_math.lo librrd_th_la-rrd_hw_update.lo \ librrd_th_la-rrd_diff.lo librrd_th_la-rrd_format.lo \ librrd_th_la-rrd_info.lo librrd_th_la-rrd_error.lo \ librrd_th_la-rrd_open.lo librrd_th_la-rrd_client.lo \ librrd_th_la-rrd_nan_inf.lo librrd_th_la-rrd_rpncalc.lo \ librrd_th_la-rrd_utils.lo librrd_th_la-rrd_update.lo \ - $(am__objects_3) -@BUILD_LIBDBI_TRUE@am__objects_5 = librrd_th_la-rrd_fetch_libdbi.lo -am__objects_6 = librrd_th_la-hash_32.lo librrd_th_la-pngsize.lo \ - librrd_th_la-rrd_create.lo librrd_th_la-rrd_graph.lo \ - librrd_th_la-rrd_graph_helper.lo librrd_th_la-rrd_version.lo \ - librrd_th_la-rrd_last.lo librrd_th_la-rrd_lastupdate.lo \ - librrd_th_la-rrd_first.lo librrd_th_la-rrd_restore.lo \ - librrd_th_la-rrd_xport.lo librrd_th_la-rrd_gfx.lo \ - librrd_th_la-rrd_dump.lo librrd_th_la-rrd_flushcached.lo \ - librrd_th_la-rrd_fetch.lo librrd_th_la-rrd_resize.lo \ - librrd_th_la-rrd_tune.lo $(am__objects_5) -am_librrd_th_la_OBJECTS = $(am__objects_4) $(am__objects_6) \ + $(am__objects_4) +@BUILD_RRDGRAPH_TRUE@am__objects_6 = librrd_th_la-rrd_graph.lo \ +@BUILD_RRDGRAPH_TRUE@ librrd_th_la-rrd_graph_helper.lo \ +@BUILD_RRDGRAPH_TRUE@ librrd_th_la-rrd_xport.lo \ +@BUILD_RRDGRAPH_TRUE@ librrd_th_la-rrd_gfx.lo \ +@BUILD_RRDGRAPH_TRUE@ librrd_th_la-pngsize.lo +@BUILD_LIBDBI_TRUE@am__objects_7 = librrd_th_la-rrd_fetch_libdbi.lo +am__objects_8 = librrd_th_la-rrd_create.lo librrd_th_la-hash_32.lo \ + librrd_th_la-rrd_version.lo librrd_th_la-rrd_last.lo \ + librrd_th_la-rrd_lastupdate.lo librrd_th_la-rrd_first.lo \ + librrd_th_la-rrd_restore.lo librrd_th_la-rrd_dump.lo \ + librrd_th_la-rrd_flushcached.lo librrd_th_la-rrd_fetch.lo \ + librrd_th_la-rrd_resize.lo librrd_th_la-rrd_tune.lo \ + $(am__objects_6) $(am__objects_7) +am_librrd_th_la_OBJECTS = $(am__objects_5) $(am__objects_8) \ librrd_th_la-rrd_thread_safe.lo librrd_th_la_OBJECTS = $(am_librrd_th_la_OBJECTS) librrd_th_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -165,12 +166,12 @@ am__librrdupd_la_SOURCES_DIST = rrd_parsetime.c rrd_hw.c rrd_hw_math.c \ rrd_open.c rrd_client.c rrd_nan_inf.c rrd_rpncalc.c \ rrd_utils.c rrd_update.c rrd_getopt.c rrd_getopt1.c \ rrd_not_thread_safe.c -@BUILD_GETOPT_TRUE@am__objects_7 = rrd_getopt.lo rrd_getopt1.lo -am__objects_8 = rrd_parsetime.lo rrd_hw.lo rrd_hw_math.lo \ +@BUILD_GETOPT_TRUE@am__objects_9 = rrd_getopt.lo rrd_getopt1.lo +am__objects_10 = 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_client.lo rrd_nan_inf.lo \ - rrd_rpncalc.lo rrd_utils.lo rrd_update.lo $(am__objects_7) -am_librrdupd_la_OBJECTS = $(am__objects_8) rrd_not_thread_safe.lo + rrd_rpncalc.lo rrd_utils.lo rrd_update.lo $(am__objects_9) +am_librrdupd_la_OBJECTS = $(am__objects_10) rrd_not_thread_safe.lo librrdupd_la_OBJECTS = $(am_librrdupd_la_OBJECTS) @BUILD_RRDCGI_TRUE@am__EXEEXT_1 = rrdcgi$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) @@ -228,7 +229,6 @@ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ ALL_LIBS = @ALL_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -237,12 +237,9 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ COMP_LUA = @COMP_LUA@ COMP_PERL = @COMP_PERL@ COMP_PYTHON = @COMP_PYTHON@ @@ -251,7 +248,6 @@ CORE_LIBS = @CORE_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ @@ -262,50 +258,30 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GENCAT = @GENCAT@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC2 = @GLIBC2@ -GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ -HAVE_ASPRINTF = @HAVE_ASPRINTF@ -HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ -HAVE_SNPRINTF = @HAVE_SNPRINTF@ -HAVE_VISIBILITY = @HAVE_VISIBILITY@ -HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ -LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBVERS = @LIBVERS@ LIPO = @LIPO@ LN_S = @LN_S@ -LTLIBC = @LTLIBC@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ LUA = @LUA@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DEFINES = @LUA_DEFINES@ @@ -348,7 +324,6 @@ PKGCONFIG = @PKGCONFIG@ POD2HTML = @POD2HTML@ POD2MAN = @POD2MAN@ POSUB = @POSUB@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ @@ -380,13 +355,9 @@ TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@ TCL_VERSION = @TCL_VERSION@ TROFF = @TROFF@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WERROR = @WERROR@ -WINDRES = @WINDRES@ -WOE32 = @WOE32@ -WOE32DLL = @WOE32DLL@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ @@ -458,31 +429,30 @@ AM_CFLAGS = @CFLAGS@ UPD_C_FILES = rrd_parsetime.c rrd_hw.c rrd_hw_math.c rrd_hw_update.c \ rrd_diff.c rrd_format.c rrd_info.c rrd_error.c rrd_open.c \ rrd_client.c rrd_nan_inf.c rrd_rpncalc.c rrd_utils.c \ - rrd_update.c $(am__append_3) -RRD_C_FILES = hash_32.c pngsize.c rrd_create.c rrd_graph.c \ - rrd_graph_helper.c rrd_version.c rrd_last.c rrd_lastupdate.c \ - rrd_first.c rrd_restore.c rrd_xport.c rrd_gfx.c rrd_dump.c \ + rrd_update.c $(am__append_4) +RRD_C_FILES = rrd_create.c hash_32.c rrd_version.c rrd_last.c \ + rrd_lastupdate.c rrd_first.c rrd_restore.c rrd_dump.c \ rrd_flushcached.c rrd_fetch.c rrd_resize.c rrd_tune.c \ - $(am__append_1) + $(am__append_1) $(am__append_2) noinst_HEADERS = unused.h gettext.h rrd_getopt.h rrd_parsetime.h \ rrd_config_bottom.h rrd_i18n.h rrd_format.h rrd_tool.h \ rrd_xport.h rrd.h rrd_rpncalc.h rrd_hw.h rrd_hw_math.h \ rrd_hw_update.h fnv.h rrd_graph.h rrd_is_thread_safe.h \ - $(am__append_2) + $(am__append_3) noinst_LTLIBRARIES = librrdupd.la -lib_LTLIBRARIES = librrd.la $(am__append_4) +lib_LTLIBRARIES = librrd.la $(am__append_5) librrdupd_la_SOURCES = $(UPD_C_FILES) rrd_not_thread_safe.c librrdupd_la_LIBADD = $(CORE_LIBS) librrd_la_SOURCES = $(RRD_C_FILES) librrd_la_DEPENDENCIES = librrdupd.la librrd.sym -librrd_la_LIBADD = librrdupd.la $(ALL_LIBS) +librrd_la_LIBADD = librrdupd.la $(ALL_LIBS) $(LIBINTL) 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 = $(AM_CFLAGS) $(MULTITHREAD_CFLAGS) librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info @LIBVERS@ \ -export-symbols librrd.sym -librrd_th_la_LIBADD = $(ALL_LIBS) +librrd_th_la_LIBADD = $(ALL_LIBS) $(LIBINTL) include_HEADERS = rrd.h rrd_format.h rrd_client.h rrdcgi_SOURCES = rrd_cgi.c rrdcgi_LDADD = librrd.la @@ -876,22 +846,6 @@ librrd_th_la-rrd_getopt1.lo: rrd_getopt1.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_getopt1.lo `test -f 'rrd_getopt1.c' || echo '$(srcdir)/'`rrd_getopt1.c -librrd_th_la-hash_32.lo: hash_32.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-hash_32.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-hash_32.Tpo -c -o librrd_th_la-hash_32.lo `test -f 'hash_32.c' || echo '$(srcdir)/'`hash_32.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-hash_32.Tpo $(DEPDIR)/librrd_th_la-hash_32.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hash_32.c' object='librrd_th_la-hash_32.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-hash_32.lo `test -f 'hash_32.c' || echo '$(srcdir)/'`hash_32.c - -librrd_th_la-pngsize.lo: pngsize.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-pngsize.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-pngsize.Tpo -c -o librrd_th_la-pngsize.lo `test -f 'pngsize.c' || echo '$(srcdir)/'`pngsize.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-pngsize.Tpo $(DEPDIR)/librrd_th_la-pngsize.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngsize.c' object='librrd_th_la-pngsize.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-pngsize.lo `test -f 'pngsize.c' || echo '$(srcdir)/'`pngsize.c - librrd_th_la-rrd_create.lo: rrd_create.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_create.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_create.Tpo -c -o librrd_th_la-rrd_create.lo `test -f 'rrd_create.c' || echo '$(srcdir)/'`rrd_create.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_create.Tpo $(DEPDIR)/librrd_th_la-rrd_create.Plo @@ -900,21 +854,13 @@ librrd_th_la-rrd_create.lo: rrd_create.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_create.lo `test -f 'rrd_create.c' || echo '$(srcdir)/'`rrd_create.c -librrd_th_la-rrd_graph.lo: rrd_graph.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_graph.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_graph.Tpo -c -o librrd_th_la-rrd_graph.lo `test -f 'rrd_graph.c' || echo '$(srcdir)/'`rrd_graph.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_graph.Tpo $(DEPDIR)/librrd_th_la-rrd_graph.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rrd_graph.c' object='librrd_th_la-rrd_graph.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_graph.lo `test -f 'rrd_graph.c' || echo '$(srcdir)/'`rrd_graph.c - -librrd_th_la-rrd_graph_helper.lo: rrd_graph_helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_graph_helper.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_graph_helper.Tpo -c -o librrd_th_la-rrd_graph_helper.lo `test -f 'rrd_graph_helper.c' || echo '$(srcdir)/'`rrd_graph_helper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_graph_helper.Tpo $(DEPDIR)/librrd_th_la-rrd_graph_helper.Plo +librrd_th_la-hash_32.lo: hash_32.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-hash_32.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-hash_32.Tpo -c -o librrd_th_la-hash_32.lo `test -f 'hash_32.c' || echo '$(srcdir)/'`hash_32.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-hash_32.Tpo $(DEPDIR)/librrd_th_la-hash_32.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rrd_graph_helper.c' object='librrd_th_la-rrd_graph_helper.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hash_32.c' object='librrd_th_la-hash_32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_graph_helper.lo `test -f 'rrd_graph_helper.c' || echo '$(srcdir)/'`rrd_graph_helper.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-hash_32.lo `test -f 'hash_32.c' || echo '$(srcdir)/'`hash_32.c librrd_th_la-rrd_version.lo: rrd_version.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_version.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_version.Tpo -c -o librrd_th_la-rrd_version.lo `test -f 'rrd_version.c' || echo '$(srcdir)/'`rrd_version.c @@ -956,22 +902,6 @@ librrd_th_la-rrd_restore.lo: rrd_restore.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_restore.lo `test -f 'rrd_restore.c' || echo '$(srcdir)/'`rrd_restore.c -librrd_th_la-rrd_xport.lo: rrd_xport.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_xport.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_xport.Tpo -c -o librrd_th_la-rrd_xport.lo `test -f 'rrd_xport.c' || echo '$(srcdir)/'`rrd_xport.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_xport.Tpo $(DEPDIR)/librrd_th_la-rrd_xport.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rrd_xport.c' object='librrd_th_la-rrd_xport.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_xport.lo `test -f 'rrd_xport.c' || echo '$(srcdir)/'`rrd_xport.c - -librrd_th_la-rrd_gfx.lo: rrd_gfx.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_gfx.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_gfx.Tpo -c -o librrd_th_la-rrd_gfx.lo `test -f 'rrd_gfx.c' || echo '$(srcdir)/'`rrd_gfx.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_gfx.Tpo $(DEPDIR)/librrd_th_la-rrd_gfx.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rrd_gfx.c' object='librrd_th_la-rrd_gfx.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_gfx.lo `test -f 'rrd_gfx.c' || echo '$(srcdir)/'`rrd_gfx.c - librrd_th_la-rrd_dump.lo: rrd_dump.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_dump.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_dump.Tpo -c -o librrd_th_la-rrd_dump.lo `test -f 'rrd_dump.c' || echo '$(srcdir)/'`rrd_dump.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_dump.Tpo $(DEPDIR)/librrd_th_la-rrd_dump.Plo @@ -1012,6 +942,46 @@ librrd_th_la-rrd_tune.lo: rrd_tune.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_tune.lo `test -f 'rrd_tune.c' || echo '$(srcdir)/'`rrd_tune.c +librrd_th_la-rrd_graph.lo: rrd_graph.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_graph.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_graph.Tpo -c -o librrd_th_la-rrd_graph.lo `test -f 'rrd_graph.c' || echo '$(srcdir)/'`rrd_graph.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_graph.Tpo $(DEPDIR)/librrd_th_la-rrd_graph.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rrd_graph.c' object='librrd_th_la-rrd_graph.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_graph.lo `test -f 'rrd_graph.c' || echo '$(srcdir)/'`rrd_graph.c + +librrd_th_la-rrd_graph_helper.lo: rrd_graph_helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_graph_helper.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_graph_helper.Tpo -c -o librrd_th_la-rrd_graph_helper.lo `test -f 'rrd_graph_helper.c' || echo '$(srcdir)/'`rrd_graph_helper.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_graph_helper.Tpo $(DEPDIR)/librrd_th_la-rrd_graph_helper.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rrd_graph_helper.c' object='librrd_th_la-rrd_graph_helper.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_graph_helper.lo `test -f 'rrd_graph_helper.c' || echo '$(srcdir)/'`rrd_graph_helper.c + +librrd_th_la-rrd_xport.lo: rrd_xport.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_xport.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_xport.Tpo -c -o librrd_th_la-rrd_xport.lo `test -f 'rrd_xport.c' || echo '$(srcdir)/'`rrd_xport.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_xport.Tpo $(DEPDIR)/librrd_th_la-rrd_xport.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rrd_xport.c' object='librrd_th_la-rrd_xport.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_xport.lo `test -f 'rrd_xport.c' || echo '$(srcdir)/'`rrd_xport.c + +librrd_th_la-rrd_gfx.lo: rrd_gfx.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_gfx.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_gfx.Tpo -c -o librrd_th_la-rrd_gfx.lo `test -f 'rrd_gfx.c' || echo '$(srcdir)/'`rrd_gfx.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_gfx.Tpo $(DEPDIR)/librrd_th_la-rrd_gfx.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rrd_gfx.c' object='librrd_th_la-rrd_gfx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_gfx.lo `test -f 'rrd_gfx.c' || echo '$(srcdir)/'`rrd_gfx.c + +librrd_th_la-pngsize.lo: pngsize.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-pngsize.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-pngsize.Tpo -c -o librrd_th_la-pngsize.lo `test -f 'pngsize.c' || echo '$(srcdir)/'`pngsize.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-pngsize.Tpo $(DEPDIR)/librrd_th_la-pngsize.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pngsize.c' object='librrd_th_la-pngsize.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-pngsize.lo `test -f 'pngsize.c' || echo '$(srcdir)/'`pngsize.c + librrd_th_la-rrd_fetch_libdbi.lo: rrd_fetch_libdbi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_fetch_libdbi.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_fetch_libdbi.Tpo -c -o librrd_th_la-rrd_fetch_libdbi.lo `test -f 'rrd_fetch_libdbi.c' || echo '$(srcdir)/'`rrd_fetch_libdbi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_fetch_libdbi.Tpo $(DEPDIR)/librrd_th_la-rrd_fetch_libdbi.Plo diff --git a/src/pngsize.c b/src/pngsize.c index b937a24..2dd3ca6 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * pngsize.c determine the size of a PNG image *****************************************************************************/ diff --git a/src/rrd.h b/src/rrd.h index 0c3852a..e02ebb1 100644 --- a/src/rrd.h +++ b/src/rrd.h @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrdlib.h Public header file for librrd ***************************************************************************** - * $Id: rrd.h 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd.h 2267 2012-01-24 10:08:48Z oetiker $ * $Log$ * Revision 1.9 2005/02/13 16:13:33 oetiker * let rrd_graph return the actual value range it picked ... @@ -57,6 +57,12 @@ extern "C" { #ifndef WIN32 #include /* for off_t */ #else +#ifdef _MSC_VER +#ifndef PERLPATCHLEVEL + typedef int mode_t; +#endif + #define strtoll _strtoi64 +#endif typedef size_t ssize_t; typedef long off_t; #endif @@ -266,7 +272,8 @@ extern "C" { typedef enum { ABSOLUTE_TIME, RELATIVE_TO_START_TIME, - RELATIVE_TO_END_TIME + RELATIVE_TO_END_TIME, + RELATIVE_TO_EPOCH } rrd_timetype_t; #define TIME_OK NULL diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index 8ce7fba..9848715 100644 --- a/src/rrd_cgi.c +++ b/src/rrd_cgi.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_cgi.c RRD Web Page Generator *****************************************************************************/ @@ -9,6 +9,11 @@ #include #endif +#ifdef WIN32 + #define strcasecmp stricmp + #define strcasencmp strnicmp +#endif + #define MEMBLK 1024 /*#define DEBUG_PARSER #define DEBUG_VARS*/ @@ -1253,11 +1258,6 @@ int parse( val = func(argc, (const char **) args); free(args-1); } else { - /* unable to parse arguments, undo 0-termination by scanargs */ - for (; argc > 0; argc--) { - *((args[argc - 1]) - 1) = ' '; - } - /* next call, try parsing at current offset +1 */ end = (*buf) + i + 1; diff --git a/src/rrd_client.c b/src/rrd_client.c index 0b69000..e7c227b 100644 --- a/src/rrd_client.c +++ b/src/rrd_client.c @@ -2,18 +2,23 @@ * RRDTool - src/rrd_client.c * Copyright (C) 2008 Florian octo Forster * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; only version 2 of the License is applicable. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. * * Authors: * Florian octo Forster @@ -68,30 +73,31 @@ static const char *get_path (const char *path, char *resolved_path) /* {{{ */ const char *ret = path; int is_unix = 0; + if ((path == NULL) || (resolved_path == NULL) || (sd_path == NULL)) + return (NULL); + if ((*sd_path == '/') || (strncmp ("unix:", sd_path, strlen ("unix:")) == 0)) is_unix = 1; - if (*path == '/') /* absolute path */ + if (is_unix) { - if (! is_unix) - { - rrd_set_error ("absolute path names not allowed when talking " - "to a remote daemon"); - return (NULL); - } - /* else: nothing to do */ + ret = realpath(path, resolved_path); + if (ret == NULL) + rrd_set_error("realpath(%s): %s", path, rrd_strerror(errno)); + return ret; } - else /* relative path */ + else { - if (is_unix) + if (*path == '/') /* not absolute path */ { - realpath (path, resolved_path); - ret = resolved_path; + rrd_set_error ("absolute path names not allowed when talking " + "to a remote daemon"); + return NULL; } - /* else: nothing to do */ } - return (ret); + + return path; } /* }}} char *get_path */ /* One must hold `lock' when calling `close_connection'. */ @@ -222,34 +228,36 @@ static void response_free (rrdc_response_t *res) /* {{{ */ static int response_read (rrdc_response_t **ret_response) /* {{{ */ { - rrdc_response_t *ret; + rrdc_response_t *ret = NULL; + int status = 0; char buffer[4096]; char *buffer_ptr; size_t i; +#define DIE(code) do { status = code; goto err_out; } while(0) + if (sh == NULL) - return (-1); + DIE(-1); ret = (rrdc_response_t *) malloc (sizeof (rrdc_response_t)); if (ret == NULL) - return (-2); + DIE(-2); memset (ret, 0, sizeof (*ret)); ret->lines = NULL; ret->lines_num = 0; buffer_ptr = fgets (buffer, sizeof (buffer), sh); if (buffer_ptr == NULL) - return (-3); + DIE(-3); + chomp (buffer); ret->status = strtol (buffer, &ret->message, 0); if (buffer == ret->message) - { - response_free (ret); - return (-4); - } + DIE(-4); + /* Skip leading whitespace of the status message */ ret->message += strspn (ret->message, " \t"); @@ -257,16 +265,13 @@ static int response_read (rrdc_response_t **ret_response) /* {{{ */ { if (ret->status < 0) rrd_set_error("rrdcached: %s", ret->message); - *ret_response = ret; - return (0); + goto out; } ret->lines = (char **) malloc (sizeof (char *) * ret->status); if (ret->lines == NULL) - { - response_free (ret); - return (-5); - } + DIE(-5); + memset (ret->lines, 0, sizeof (char *) * ret->status); ret->lines_num = (size_t) ret->status; @@ -274,22 +279,27 @@ static int response_read (rrdc_response_t **ret_response) /* {{{ */ { buffer_ptr = fgets (buffer, sizeof (buffer), sh); if (buffer_ptr == NULL) - { - response_free (ret); - return (-6); - } + DIE(-6); + chomp (buffer); ret->lines[i] = strdup (buffer); if (ret->lines[i] == NULL) - { - response_free (ret); - return (-7); - } + DIE(-7); } +out: *ret_response = ret; - return (0); + fflush(sh); + return (status); + +err_out: + response_free(ret); + close_connection(); + return (status); + +#undef DIE + } /* }}} rrdc_response_t *response_read */ static int request (const char *buffer, size_t buffer_size, /* {{{ */ @@ -340,7 +350,8 @@ int rrdc_is_connected(const char *daemon_addr) /* {{{ */ * but it is not specified in the current command. * Daemon is only implied in this case if set in ENV */ - if (getenv(ENV_RRDCACHED_ADDRESS) != NULL) + char *addr = getenv(ENV_RRDCACHED_ADDRESS); + if (addr != NULL && strcmp(addr,"") != 0) return 1; else return 0; @@ -492,6 +503,8 @@ static int rrdc_connect_network (const char *addr_orig) /* {{{ */ break; } /* for (ai_ptr) */ + freeaddrinfo(ai_res); + return (status); } /* }}} int rrdc_connect_network */ @@ -499,11 +512,14 @@ int rrdc_connect (const char *addr) /* {{{ */ { int status = 0; - if (addr == NULL) + if (addr == NULL) { addr = getenv (ENV_RRDCACHED_ADDRESS); + } - if (addr == NULL) - return 0; + if (addr == NULL || strcmp(addr,"") == 0 ) { + addr = NULL; + return 0; + } pthread_mutex_lock(&lock); diff --git a/src/rrd_client.h b/src/rrd_client.h index 6c48dec..cdbb991 100644 --- a/src/rrd_client.h +++ b/src/rrd_client.h @@ -2,18 +2,23 @@ * RRDTool - src/rrd_client.h * Copyright (C) 2008 Florian octo Forster * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; only version 2 of the License is applicable. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. * * Authors: * Florian octo Forster diff --git a/src/rrd_config_bottom.h b/src/rrd_config_bottom.h index a569197..c48a06f 100644 --- a/src/rrd_config_bottom.h +++ b/src/rrd_config_bottom.h @@ -170,23 +170,27 @@ char *strchr (), *strrchr (); #endif /* for Solaris */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) -# define HAVE_ISINF 1 -# ifdef isinf +#if (! defined(HAVE_ISINF) && defined(HAVE_FPCLASS)) +# define HAVE_ISINF 1 +# ifdef isinf # undef isinf -# endif -# define isinf(a) (!!(fpclass(a) & (FP_SNAN|FP_QNAN))) +# endif +# define isinf(a) (fpclass(a) == FP_NINF || fpclass(a) == FP_PINF) +#endif +/* solaris 8/9 has rint but not round */ +#if (! defined(HAVE_ROUND) && defined(HAVE_RINT)) +# define round rint #endif /* solaris 10 it defines isnan such that only forte can compile it ... bad bad */ -#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS) && defined(FP_SNAN) && defined(FP_QNAN)) +#if (defined(HAVE_ISNAN) && defined(isnan) && defined(HAVE_FPCLASS)) # undef isnan # define isnan(a) (fpclass(a) == FP_SNAN || fpclass(a) == FP_QNAN) #endif /* for OSF1 Digital Unix */ -#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H) && defined(FP_NEG_INF) && defined( FP_POS_INF)) +#if (! defined(HAVE_ISINF) && defined(HAVE_FP_CLASS) && defined(HAVE_FP_CLASS_H)) # define HAVE_ISINF 1 # define isinf(a) (fp_class(a) == FP_NEG_INF || fp_class(a) == FP_POS_INF) #endif diff --git a/src/rrd_create.c b/src/rrd_create.c index 2a0a143..50e2665 100644 --- a/src/rrd_create.c +++ b/src/rrd_create.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_create.c creates new rrds *****************************************************************************/ @@ -238,9 +238,10 @@ int rrd_create_r( } else if (strncmp(argv[i], "RRA:", 4) == 0) { char *argvcopy; char *tokptr = ""; + int cf_id = -1; size_t old_size = sizeof(rra_def_t) * (rrd.stat_head->rra_cnt); int row_cnt; - + int token_min = 4; if ((rrd.rra_def = (rra_def_t*)rrd_realloc(rrd.rra_def, old_size + sizeof(rra_def_t))) == NULL) { @@ -254,6 +255,7 @@ int rrd_create_r( argvcopy = strdup(argv[i]); token = strtok_r(&argvcopy[4], ":", &tokptr); token_idx = error_flag = 0; + while (token != NULL) { switch (token_idx) { case 0: @@ -261,11 +263,12 @@ int rrd_create_r( rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam) != 1) rrd_set_error("Failed to parse CF name"); - switch (cf_conv - (rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) { + cf_id = cf_conv(rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam); + switch (cf_id) { case CF_MHWPREDICT: strcpy(rrd.stat_head->version, RRD_VERSION); /* MHWPREDICT causes Version 4 */ case CF_HWPREDICT: + token_min = 5; /* initialize some parameters */ rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_hw_alpha]. u_val = 0.1; @@ -276,7 +279,11 @@ int rrd_create_r( rrd.stat_head->rra_cnt; break; case CF_DEVSEASONAL: + token_min = 3; case CF_SEASONAL: + if (cf_id == CF_SEASONAL){ + token_min = 4; + } /* initialize some parameters */ rrd.rra_def[rrd.stat_head->rra_cnt]. par[RRA_seasonal_gamma].u_val = 0.1; @@ -284,10 +291,14 @@ int rrd_create_r( par[RRA_seasonal_smoothing_window].u_val = 0.05; /* fall through */ case CF_DEVPREDICT: + if (cf_id == CF_DEVPREDICT){ + token_min = 3; + } rrd.rra_def[rrd.stat_head->rra_cnt]. par[RRA_dependent_rra_idx].u_cnt = -1; break; case CF_FAILURES: + token_min = 5; rrd.rra_def[rrd.stat_head->rra_cnt]. par[RRA_delta_pos].u_val = 2.0; rrd.rra_def[rrd.stat_head->rra_cnt]. @@ -509,6 +520,11 @@ int rrd_create_r( token_idx++; } /* end while */ free(argvcopy); + if (token_idx < token_min){ + rrd_set_error("Expected at least %i arguments for RRA but got %i",token_min,token_idx); + rrd_free2(&rrd); + return(-1); + } #ifdef DEBUG fprintf(stderr, "Creating RRA CF: %s, dep idx %lu, current idx %lu\n", @@ -571,7 +587,8 @@ void parseGENERIC_DS( &(rrd -> ds_def[ds_idx].par[DS_mrhb_cnt].u_cnt), minstr,maxstr); */ - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if (sscanf(def, "%lu:%18[^:]:%18[^:]", &(rrd->ds_def[ds_idx].par[DS_mrhb_cnt].u_cnt), minstr, maxstr) == 3) { diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index 154f0de..17153ce 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -63,16 +63,9 @@ * Now for some includes.. */ /* {{{ */ -#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) -#include "../win32/config.h" -#else -#ifdef HAVE_CONFIG_H -#include "../rrd_config.h" -#endif -#endif - -#include "rrd.h" +#include "rrd_tool.h" #include "rrd_client.h" +#include "unused.h" #include @@ -108,20 +101,21 @@ #include #include +#ifdef HAVE_LIBWRAP +#include +#endif /* HAVE_LIBWRAP */ + #include /* }}} */ #define RRDD_LOG(severity, ...) \ do { \ - if (stay_foreground) \ + if (stay_foreground) { \ fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\n"); } \ syslog ((severity), __VA_ARGS__); \ } while (0) -#ifndef __GNUC__ -# define __attribute__(x) /**/ -#endif - /* * Types */ @@ -155,12 +149,12 @@ typedef struct listen_socket_s listen_socket_t; struct command_s; typedef struct command_s command_t; /* note: guard against "unused" warnings in the handlers */ -#define DISPATCH_PROTO listen_socket_t *sock __attribute__((unused)),\ - time_t now __attribute__((unused)),\ - char *buffer __attribute__((unused)),\ - size_t buffer_size __attribute__((unused)) +#define DISPATCH_PROTO listen_socket_t UNUSED(*sock),\ + time_t UNUSED(now),\ + char UNUSED(*buffer),\ + size_t UNUSED(buffer_size) -#define HANDLER_PROTO command_t *cmd __attribute__((unused)),\ +#define HANDLER_PROTO command_t UNUSED(*cmd),\ DISPATCH_PROTO struct command_s { @@ -185,7 +179,7 @@ struct cache_item_s char **values; size_t values_num; time_t last_flush_time; - time_t last_update_stamp; + double last_update_stamp; #define CI_FLAGS_IN_TREE (1<<0) #define CI_FLAGS_IN_QUEUE (1<<1) int flags; @@ -229,6 +223,8 @@ static uid_t daemon_uid; static listen_socket_t *listen_fds = NULL; static size_t listen_fds_num = 0; +static listen_socket_t default_socket; + enum { RUNNING, /* normal operation */ FLUSHING, /* flushing remaining values */ @@ -301,23 +297,23 @@ static void sig_common (const char *sig) /* {{{ */ pthread_cond_broadcast(&queue_cond); } /* }}} void sig_common */ -static void sig_int_handler (int s __attribute__((unused))) /* {{{ */ +static void sig_int_handler (int UNUSED(s)) /* {{{ */ { sig_common("INT"); } /* }}} void sig_int_handler */ -static void sig_term_handler (int s __attribute__((unused))) /* {{{ */ +static void sig_term_handler (int UNUSED(s)) /* {{{ */ { sig_common("TERM"); } /* }}} void sig_term_handler */ -static void sig_usr1_handler (int s __attribute__((unused))) /* {{{ */ +static void sig_usr1_handler (int UNUSED(s)) /* {{{ */ { config_flush_at_shutdown = 1; sig_common("USR1"); } /* }}} void sig_usr1_handler */ -static void sig_usr2_handler (int s __attribute__((unused))) /* {{{ */ +static void sig_usr2_handler (int UNUSED(s)) /* {{{ */ { config_flush_at_shutdown = 0; sig_common("USR2"); @@ -841,7 +837,7 @@ static int flush_old_values (int max_age) return (0); } /* int flush_old_values */ -static void *flush_thread_main (void *args __attribute__((unused))) /* {{{ */ +static void *flush_thread_main (void UNUSED(*args)) /* {{{ */ { struct timeval now; struct timespec next_flush; @@ -894,7 +890,7 @@ static void *flush_thread_main (void *args __attribute__((unused))) /* {{{ */ return NULL; } /* void *flush_thread_main */ -static void *queue_thread_main (void *args __attribute__((unused))) /* {{{ */ +static void *queue_thread_main (void UNUSED(*args)) /* {{{ */ { pthread_mutex_lock (&cache_lock); @@ -1324,7 +1320,7 @@ static int handle_request_update (HANDLER_PROTO) /* {{{ */ /* save it for the journal later */ if (!JOURNAL_REPLAY(sock)) - strncpy(orig_buf, buffer, buffer_size); + strncpy(orig_buf, buffer, min(CMD_MAX,buffer_size)); status = buffer_get_field (&buffer, &buffer_size, &file); if (status != 0) @@ -1415,7 +1411,7 @@ static int handle_request_update (HANDLER_PROTO) /* {{{ */ while (buffer_size > 0) { char *value; - time_t stamp; + double stamp; char *eostamp; status = buffer_get_field (&buffer, &buffer_size, &value); @@ -1425,8 +1421,9 @@ static int handle_request_update (HANDLER_PROTO) /* {{{ */ break; } - /* make sure update time is always moving forward */ - stamp = strtol(value, &eostamp, 10); + /* make sure update time is always moving forward. We use double here since + update does support subsecond precision for timestamps ... */ + stamp = strtod(value, &eostamp); if (eostamp == value || eostamp == NULL || *eostamp != ':') { pthread_mutex_unlock(&cache_lock); @@ -1437,8 +1434,8 @@ static int handle_request_update (HANDLER_PROTO) /* {{{ */ { pthread_mutex_unlock(&cache_lock); return send_response(sock, RESP_ERR, - "illegal attempt to update using time %ld when last" - " update time is %ld (minimum one second step)\n", + "illegal attempt to update using time %lf when last" + " update time is %lf (minimum one second step)\n", stamp, ci->last_update_stamp); } else @@ -1721,6 +1718,26 @@ static int socket_permission_add (listen_socket_t *sock, /* {{{ */ return (0); } /* }}} int socket_permission_add */ +static void socket_permission_clear (listen_socket_t *sock) /* {{{ */ +{ + sock->permissions = 0; +} /* }}} socket_permission_clear */ + +static void socket_permission_copy (listen_socket_t *dest, /* {{{ */ + listen_socket_t *src) +{ + dest->permissions = src->permissions; +} /* }}} socket_permission_copy */ + +static void socket_permission_set_all (listen_socket_t *sock) /* {{{ */ +{ + size_t i; + + sock->permissions = 0; + for (i = 0; i < list_of_commands_len; i++) + sock->permissions |= (1 << i); +} /* }}} void socket_permission_set_all */ + /* check whether commands are received in the expected context */ static int command_check_context(listen_socket_t *sock, command_t *cmd) { @@ -2114,6 +2131,10 @@ static void journal_init(void) /* {{{ */ } dir = opendir(journal_dir); + if (!dir) { + RRDD_LOG(LOG_CRIT, "journal_init: opendir(%s) failed\n", journal_dir); + return; + } while ((dent = readdir(dir)) != NULL) { /* looks like a journal file? */ @@ -2189,6 +2210,21 @@ static void *connection_thread_main (void *args) /* {{{ */ } pthread_mutex_lock (&connection_threads_lock); +#ifdef HAVE_LIBWRAP + /* LIBWRAP does not support multiple threads! By putting this code + inside pthread_mutex_lock we do not have to worry about request_info + getting overwritten by another thread. + */ + struct request_info req; + request_init(&req, RQ_DAEMON, "rrdcached\0", RQ_FILE, fd, NULL ); + fromhost(&req); + if(!hosts_access(&req)) { + RRDD_LOG(LOG_INFO, "refused connection from %s", eval_client(&req)); + pthread_mutex_unlock (&connection_threads_lock); + close_connection(sock); + return NULL; + } +#endif /* HAVE_LIBWRAP */ connection_threads_num++; pthread_mutex_unlock (&connection_threads_lock); @@ -2525,7 +2561,7 @@ static int close_listen_sockets (void) /* {{{ */ return (0); } /* }}} int close_listen_sockets */ -static void *listen_thread_main (void *args __attribute__((unused))) /* {{{ */ +static void *listen_thread_main (void UNUSED(*args)) /* {{{ */ { struct pollfd *pollfds; int pollfds_num; @@ -2662,10 +2698,14 @@ static int daemonize (void) /* {{{ */ } else { - listen_socket_t sock; - memset(&sock, 0, sizeof(sock)); - strncpy(sock.addr, RRDCACHED_DEFAULT_ADDRESS, sizeof(sock.addr)-1); - open_listen_socket (&sock); + strncpy(default_socket.addr, RRDCACHED_DEFAULT_ADDRESS, + sizeof(default_socket.addr) - 1); + default_socket.addr[sizeof(default_socket.addr) - 1] = '\0'; + + if (default_socket.permissions == 0) + socket_permission_set_all (&default_socket); + + open_listen_socket (&default_socket); } if (listen_fds_num < 1) @@ -2770,11 +2810,10 @@ static int read_options (int argc, char **argv) /* {{{ */ int option; int status = 0; - char **permissions = NULL; - size_t permissions_len = 0; + socket_permission_clear (&default_socket); - gid_t socket_group = (gid_t)-1; - mode_t socket_permissions = (mode_t)-1; + default_socket.socket_group = (gid_t)-1; + default_socket.socket_permissions = (mode_t)-1; while ((option = getopt(argc, argv, "gl:s:m:P:f:w:z:t:Bb:p:Fj:h?")) != -1) { @@ -2799,41 +2838,19 @@ static int read_options (int argc, char **argv) /* {{{ */ strncpy(new->addr, optarg, sizeof(new->addr)-1); /* Add permissions to the socket {{{ */ - if (permissions_len != 0) + if (default_socket.permissions != 0) { - size_t i; - for (i = 0; i < permissions_len; i++) - { - status = socket_permission_add (new, permissions[i]); - if (status != 0) - { - fprintf (stderr, "read_options: Adding permission \"%s\" to " - "socket failed. Most likely, this permission doesn't " - "exist. Check your command line.\n", permissions[i]); - status = 4; - } - } + socket_permission_copy (new, &default_socket); } - else /* if (permissions_len == 0) */ + else /* if (default_socket.permissions == 0) */ { /* Add permission for ALL commands to the socket. */ - size_t i; - for (i = 0; i < list_of_commands_len; i++) - { - status = socket_permission_add (new, list_of_commands[i].cmd); - if (status != 0) - { - fprintf (stderr, "read_options: Adding permission \"%s\" to " - "socket failed. This should never happen, ever! Sorry.\n", - permissions[i]); - status = 4; - } - } + socket_permission_set_all (new); } /* }}} Done adding permissions. */ - new->socket_group = socket_group; - new->socket_permissions = socket_permissions; + new->socket_group = default_socket.socket_group; + new->socket_permissions = default_socket.socket_permissions; if (!rrd_add_ptr((void ***)&config_listen_address_list, &config_listen_address_list_len, new)) @@ -2863,7 +2880,7 @@ static int read_options (int argc, char **argv) /* {{{ */ if (grp) { - socket_group = grp->gr_gid; + default_socket.socket_group = grp->gr_gid; } else { @@ -2888,7 +2905,7 @@ static int read_options (int argc, char **argv) /* {{{ */ return (5); } - socket_permissions = (mode_t)tmp; + default_socket.socket_permissions = (mode_t)tmp; } break; @@ -2899,7 +2916,7 @@ static int read_options (int argc, char **argv) /* {{{ */ char *dummy; char *ptr; - rrd_free_ptrs ((void *) &permissions, &permissions_len); + socket_permission_clear (&default_socket); optcopy = strdup (optarg); dummy = optcopy; @@ -2907,7 +2924,14 @@ static int read_options (int argc, char **argv) /* {{{ */ while ((ptr = strtok_r (dummy, ", ", &saveptr)) != NULL) { dummy = NULL; - rrd_add_strdup ((void *) &permissions, &permissions_len, ptr); + status = socket_permission_add (&default_socket, ptr); + if (status != 0) + { + fprintf (stderr, "read_options: Adding permission \"%s\" to " + "socket failed. Most likely, this permission doesn't " + "exist. Check your command line.\n", ptr); + status = 4; + } } free (optcopy); @@ -3065,7 +3089,9 @@ static int read_options (int argc, char **argv) /* {{{ */ case 'j': { - const char *dir = journal_dir = strdup(optarg); + char journal_dir_actual[PATH_MAX]; + const char *dir; + dir = journal_dir = strdup(realpath((const char *)optarg, journal_dir_actual)); status = rrd_mkdir_p(dir, 0777); if (status != 0) @@ -3093,6 +3119,7 @@ static int read_options (int argc, char **argv) /* {{{ */ "\n" "Valid options are:\n" " -l
Socket address to listen to.\n" + " Default: "RRDCACHED_DEFAULT_ADDRESS"\n" " -P Sets the permissions to assign to all following " "sockets\n" " -w Interval in which to write data.\n" @@ -3105,13 +3132,20 @@ static int read_options (int argc, char **argv) /* {{{ */ " -g Do not fork and run in the foreground.\n" " -j Directory in which to create the journal files.\n" " -F Always flush all updates at shutdown\n" - " -s Make socket g+rw to named group\n" + " -s Group owner of all following UNIX sockets\n" + " (the socket will also have read/write permissions " + "for that group)\n" + " -m File permissions (octal) of all following UNIX " + "sockets\n" "\n" "For more information and a detailed description of all options " "please refer\n" "to the rrdcached(1) manual page.\n", VERSION); - status = -1; + if (option == 'h') + status = -1; + else + status = 1; break; } /* switch (option) */ } /* while (getopt) */ @@ -3131,8 +3165,6 @@ static int read_options (int argc, char **argv) /* {{{ */ if (journal_dir == NULL) config_flush_at_shutdown = 1; - rrd_free_ptrs ((void *) &permissions, &permissions_len); - return (status); } /* }}} int read_options */ diff --git a/src/rrd_diff.c b/src/rrd_diff.c index 6831a85..d9939a9 100644 --- a/src/rrd_diff.c +++ b/src/rrd_diff.c @@ -1,11 +1,11 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 * 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 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_diff.c 2267 2012-01-24 10:08:48Z 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 9392d22..560d1a9 100644 --- a/src/rrd_dump.c +++ b/src/rrd_dump.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_dump Display a RRD ***************************************************************************** - * $Id: rrd_dump.c 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_dump.c 2267 2012-01-24 10:08:48Z oetiker $ * $Log$ * Revision 1.7 2004/05/25 20:53:21 oetiker * prevent small leak when resources are exhausted -- Mike Slifcak @@ -103,7 +103,8 @@ int rrd_dump_cb_r( return (-1); } - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if (opt_header == 1) { diff --git a/src/rrd_error.c b/src/rrd_error.c index 4b7c601..7e55d55 100644 --- a/src/rrd_error.c +++ b/src/rrd_error.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_error.c Common Header File ***************************************************************************** - * $Id: rrd_error.c 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_error.c 2267 2012-01-24 10:08:48Z 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 diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c index c0a64ef..cf5dc24 100644 --- a/src/rrd_fetch.c +++ b/src/rrd_fetch.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_fetch.c read date from an rrd to use for further processing ***************************************************************************** - * $Id: rrd_fetch.c 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_fetch.c 2267 2012-01-24 10:08:48Z oetiker $ * $Log$ * Revision 1.8 2004/05/18 18:53:03 oetiker * big spell checking patch -- slif@bellsouth.net @@ -237,10 +237,8 @@ int rrd_fetch_fn( #ifdef HAVE_LIBDBI /* handle libdbi datasources */ - if (strncmp("sql",filename,3)==0) { - if (filename[3]==filename[4]) { + if (strncmp("sql//",filename,5)==0) { return rrd_fetch_fn_libdbi(filename,cf_idx,start,end,step,ds_cnt,ds_namv,data); - } } #endif diff --git a/src/rrd_fetch_libdbi.c b/src/rrd_fetch_libdbi.c index 0e8bc93..c1ad26f 100644 --- a/src/rrd_fetch_libdbi.c +++ b/src/rrd_fetch_libdbi.c @@ -1,4 +1,5 @@ #include "rrd_tool.h" +#include "unused.h" #include #include @@ -365,7 +366,7 @@ static int _inline_unescape (char* string) { int rrd_fetch_fn_libdbi( const char *filename, /* name of the rrd */ - enum cf_en cf_idx __attribute__((unused)), /* consolidation function */ + enum cf_en UNUSED(cf_idx), /* consolidation function */ time_t *start, time_t *end, /* which time frame do you want ? * will be changed to represent reality */ @@ -388,6 +389,7 @@ rrd_fetch_fn_libdbi( unsigned long minstepsize=300; /* by default assume unixtimestamp */ int isunixtime=1; + long gmt_offset=0; /* the result-set */ long r_timestamp,l_timestamp,d_timestamp; double r_value,l_value,d_value; @@ -400,6 +402,7 @@ rrd_fetch_fn_libdbi( char where[10240]; table_help.conn=NULL; table_help.where=where; + table_help.filename=filename; /* some loop variables */ int i=0; @@ -457,7 +460,22 @@ rrd_fetch_fn_libdbi( return -1; } /* if we have leading '*', then we have a TIMEDATE Field*/ - if (table_help.timestamp[0]=='*') { isunixtime=0; table_help.timestamp++; } + if (table_help.timestamp[0]=='*') { + struct tm tm; +#ifdef HAVE_TIMEZONE + extern long timezone; +#endif + time_t t=time(NULL); + localtime_r(&t,&tm); +#ifdef HAVE_TM_GMTOFF + gmt_offset=tm.TM_GMTOFF; +#else +#ifdef HAVE_TIMEZONE + gmt_offset=timezone; +#endif +#endif + isunixtime=0; table_help.timestamp++; + } /* hex-unescape the value */ if(_inline_unescape(table_help.timestamp)) { return -1; } @@ -563,7 +581,7 @@ rrd_fetch_fn_libdbi( } /* allocate memory for resultset (with the following columns: min,avg,max,count,sigma) */ - i=rows * sizeof(rrd_value_t)*(*ds_cnt); + i=(rows+1) * sizeof(rrd_value_t)*(*ds_cnt); if (((*data) = malloc(i))==NULL){ /* and return error */ rrd_set_error("malloc failed for %i bytes",i); @@ -583,6 +601,7 @@ rrd_fetch_fn_libdbi( while((r_status=_sql_fetchrow(&table_help,&r_timestamp,&r_value,derive))>0) { /* processing of value */ /* calculate index for the timestamp */ + r_timestamp-=gmt_offset; idx=(r_timestamp-(*start))/(*step); /* some out of bounds checks on idx */ if (idx<0) { idx=0;} @@ -613,7 +632,7 @@ rrd_fetch_fn_libdbi( (*data)[idx*(*ds_cnt)+1]=r_value; /* AVG */ (*data)[idx*(*ds_cnt)+2]=r_value; /* MAX */ (*data)[idx*(*ds_cnt)+3]=1; /* COUNT */ - (*data)[idx*(*ds_cnt)+4]=r_value; /* SIGMA */ + (*data)[idx*(*ds_cnt)+4]=r_value*r_value; /* SIGMA */ } else { /* MIN */ if ((*data)[idx*(*ds_cnt)+0]>r_value) { (*data)[idx*(*ds_cnt)+0]=r_value; } diff --git a/src/rrd_first.c b/src/rrd_first.c index faae577..34b0737 100644 --- a/src/rrd_first.c +++ b/src/rrd_first.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_first Return ***************************************************************************** diff --git a/src/rrd_format.c b/src/rrd_format.c index 973241c..ac85fc5 100644 --- a/src/rrd_format.c +++ b/src/rrd_format.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_format.c RRD Database Format helper functions ***************************************************************************** - * $Id: rrd_format.c 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_format.c 2267 2012-01-24 10:08:48Z oetiker $ * $Log$ * Revision 1.5 2004/05/18 18:53:03 oetiker * big spell checking patch -- slif@bellsouth.net @@ -48,6 +48,9 @@ * *****************************************************************************/ #include "rrd_tool.h" +#ifdef WIN32 +#include "stdlib.h" +#endif #define converter(VV,VVV) \ if (strcmp(#VV, string) == 0) return VVV; @@ -105,8 +108,7 @@ off_t rrd_get_header_size( return sizeof(stat_head_t) + \ sizeof(ds_def_t) * rrd->stat_head->ds_cnt + \ sizeof(rra_def_t) * rrd->stat_head->rra_cnt + \ - sizeof(time_t) + \ - sizeof(live_head_t) + \ + ( atoi(rrd->stat_head->version) < 3 ? sizeof(time_t) : sizeof(live_head_t) ) + \ sizeof(pdp_prep_t) * rrd->stat_head->ds_cnt + \ sizeof(cdp_prep_t) * rrd->stat_head->ds_cnt * rrd->stat_head->rra_cnt + \ sizeof(rra_ptr_t) * rrd->stat_head->rra_cnt; diff --git a/src/rrd_format.h b/src/rrd_format.h index 75a3c52..48ab238 100644 --- a/src/rrd_format.h +++ b/src/rrd_format.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_format.h RRD Database Format header *****************************************************************************/ @@ -35,7 +35,7 @@ /* changed because microsecond precision requires another field */ #define RRD_VERSION "0004" #define RRD_VERSION3 "0003" -#define FLOAT_COOKIE 8.642135E130 +#define FLOAT_COOKIE ((double)8.642135E130) typedef union unival { unsigned long u_cnt; diff --git a/src/rrd_getopt.c b/src/rrd_getopt.c index f973471..46f7313 100644 --- a/src/rrd_getopt.c +++ b/src/rrd_getopt.c @@ -39,10 +39,11 @@ #endif #endif - +#ifndef WIN32 #ifdef HAVE_CONFIG_H #include "../rrd_config.h" #endif +#endif #include "rrd_i18n.h" @@ -274,7 +275,8 @@ static char *const *original_argv; to getopt is that one passed to the process. */ static void store_args( int argc, - char *const *argv) __attribute__ ((unused)); + char *const *argv); + static void store_args( int argc, char *const *argv) @@ -359,7 +361,7 @@ static const char *_getopt_initialize( const char *); #endif static const char* _getopt_initialize(int argc, - char** argv, + char* const* argv, const char* optstring) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 @@ -464,7 +466,11 @@ static const char* _getopt_initialize(int argc, long-named options. */ int _getopt_internal(int argc, +#ifdef WIN32 char** argv, +#else // WIN32 + char* const* argv, +#endif //WIN32 const char *optstring, const struct option *longopts, int* longind, @@ -868,15 +874,6 @@ int _getopt_internal(int argc, } } -int getopt( - int argc, - char** argv, - const char* optstring) -{ - return _getopt_internal(argc, argv, optstring, - (const struct option *) 0, (int *) 0, 0); -} - #endif /* Not ELIDE_CODE. */ #ifdef TEST diff --git a/src/rrd_getopt1.c b/src/rrd_getopt1.c index 1ace77e..ea9ed54 100644 --- a/src/rrd_getopt1.c +++ b/src/rrd_getopt1.c @@ -28,9 +28,11 @@ #endif #endif +#ifndef WIN32 #ifdef HAVE_CONFIG_H #include "../rrd_config.h" #endif +#endif #include "rrd_getopt.h" @@ -66,7 +68,11 @@ #endif int getopt_long(int argc, +#ifdef WIN32 char** argv, +#else // WIN32 + char* const* argv, +#endif //WIN32 const char* options, const struct option* long_options, int* opt_index) @@ -80,7 +86,11 @@ int getopt_long(int argc, instead. */ int getopt_long_only(int argc, +#ifdef WIN32 char** argv, +#else // WIN32 + char* const* argv, +#endif //WIN32 const char* options, const struct option* long_options, int* opt_index) diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index aff036c..79c7939 100644 --- a/src/rrd_gfx.c +++ b/src/rrd_gfx.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 **************************************************************************** * rrd_gfx.c graphics wrapper for rrdtool **************************************************************************/ @@ -293,10 +293,10 @@ void gfx_line_fit( line_width = cairo_get_line_width(cr); line_height = line_width; cairo_user_to_device_distance(cr, &line_width, &line_height); - line_width = line_width / 2.0 - (long) (line_width / 2.0); - line_height = line_height / 2.0 - (long) (line_height / 2.0); - *x = (double) ((long) (*x + 0.5)) - line_width; - *y = (double) ((long) (*y + 0.5)) + line_height; + line_width = line_width / 2.0 - ceil(line_width / 2.0); + line_height = line_height / 2.0 - ceil(line_height / 2.0); + *x = floor(*x - 0.5) - line_width; + *y = ceil(*y + 0.5) + line_height; cairo_device_to_user(cr, x, y); } @@ -312,7 +312,7 @@ void gfx_area_fit( if (!im->gridfit) return; cairo_user_to_device(cr, x, y); - *x = (double) ((long) (*x + 0.5)); - *y = (double) ((long) (*y + 0.5)); + *x = floor(*x); + *y = ceil(*y); cairo_device_to_user(cr, x, y); } diff --git a/src/rrd_graph.c b/src/rrd_graph.c index eeff31c..5f70a38 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 **************************************************************************** * rrd__graph.c produce graphs from data in rrdfiles ****************************************************************************/ @@ -89,8 +89,7 @@ xlab_t xlab[] = { , {3600, 0, TMT_DAY, 1, TMT_WEEK, 1, TMT_WEEK, 1, 7 * 24 * 3600, "Week %V"} , - {3 * 3600, 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_WEEK, 2, 7 * 24 * 3600, - "Week %V"} + {3 * 3600, 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_WEEK, 2, 7 * 24 * 3600, "Week %V"} , {6 * 3600, 0, TMT_MONTH, 1, TMT_MONTH, 1, TMT_MONTH, 1, 30 * 24 * 3600, "%b"} @@ -336,6 +335,12 @@ int im_free( free(im->gdes[i].rpnp); } free(im->gdes); + + for (i = 0; i < DIM(text_prop);i++){ + pango_font_description_free(im->text_prop[i].font_desc); + im->text_prop[i].font_desc = NULL; + } + if (im->font_options) cairo_font_options_destroy(im->font_options); @@ -343,6 +348,8 @@ int im_free( status = cairo_status(im->cr); cairo_destroy(im->cr); } + + if (im->rendered_image) { free(im->rendered_image); } @@ -402,8 +409,11 @@ void auto_scale( } } +/* power prefixes */ static char si_symbol[] = { + 'y', /* 10e-24 Yocto */ + 'z', /* 10e-21 Zepto */ 'a', /* 10e-18 Atto */ 'f', /* 10e-15 Femto */ 'p', /* 10e-12 Pico */ @@ -417,8 +427,10 @@ static char si_symbol[] = { 'T', /* 10e12 Tera */ 'P', /* 10e15 Peta */ 'E', /* 10e18 Exa */ + 'Z', /* 10e21 Zeta */ + 'Y' /* 10e24 Yotta */ }; -static const int si_symbcenter = 6; +static const int si_symbcenter = 8; /* find SI magnitude symbol for the numbers on the y-axis*/ void si_unit( @@ -888,6 +900,10 @@ int data_fetch( } im->gdes[i].data_first = 1; + /* must reduce to at least im->step + otherwhise we end up with more data than we can handle in the + chart and visibility of data will be random */ + im->gdes[i].step = max(im->gdes[i].step,im->step); if (ft_step < im->gdes[i].step) { reduce_data(im->gdes[i].cf_reduce, ft_step, @@ -1455,6 +1471,13 @@ time_t find_next_time( localtime_r(¤t, &tm); + int limit = 2; + switch (baseint) { + case TMT_SECOND: limit = 7200; break; + case TMT_MINUTE: limit = 120; break; + case TMT_HOUR: limit = 2; break; + default: limit = 2; break; + } do { switch (baseint) { case TMT_SECOND: @@ -1485,7 +1508,7 @@ time_t find_next_time( tm. tm_year += basestep; } madetime = mktime(&tm); - } while (madetime == -1); /* this is necessary to skip impssible times + } while (madetime == -1 && limit-- >= 0); /* this is necessary to skip impossible times like the daylight saving time skips */ return madetime; @@ -1567,7 +1590,7 @@ int print_calc( } } /* prepare printval */ - if ((percent_s = strstr(im->gdes[i].format, "%S")) != NULL) { + if (!im->gdes[i].strftm && (percent_s = strstr(im->gdes[i].format, "%S")) != NULL) { /* Magfact is set to -1 upon entry to print_calc. If it * is still less than 0, then we need to run auto_scale. * Otherwise, put the value into the correct units. If @@ -1581,7 +1604,7 @@ int print_calc( printval /= magfact; } *(++percent_s) = 's'; - } else if (strstr(im->gdes[i].format, "%s") != NULL) { + } else if (!im->gdes[i].strftm && strstr(im->gdes[i].format, "%s") != NULL) { auto_scale(im, &printval, &si_symb, &magfact); } @@ -1749,6 +1772,7 @@ int leg_place( prt_fctn != 'j' && prt_fctn != 'c' && prt_fctn != 'u' && + prt_fctn != '.' && prt_fctn != 's' && prt_fctn != '\0' && prt_fctn != 'g') { free(legspace); rrd_set_error @@ -1760,6 +1784,10 @@ int leg_place( if (prt_fctn == 'n') { prt_fctn = 'l'; } + /* \. is a null operation to allow strings ending in \x */ + if (prt_fctn == '.') { + prt_fctn = '\0'; + } /* remove exess space from the end of the legend for \g */ while (prt_fctn == 'g' && @@ -1835,7 +1863,7 @@ int leg_place( glue = 0; } if (prt_fctn == 'c') - leg_x = (double)(legendwidth - fill) / 2.0; + leg_x = border + (double)(legendwidth - fill) / 2.0; if (prt_fctn == 'r') leg_x = legendwidth - fill + border; for (ii = mark; ii <= i; ii++) { @@ -2277,7 +2305,7 @@ int horizontal_log_grid( } } else { - sprintf(graph_label_right,im->second_axis_format,sval); + sprintf(graph_label_right,im->second_axis_format,sval,""); } gfx_text ( im, @@ -2482,19 +2510,20 @@ void vertical_grid( mgridtm, im->xlab_user. mgridst); - ti < im->end; + ti < im->end && ti != -1; ti = find_next_time(ti, im->xlab_user.gridtm, im->xlab_user.gridst) ) { /* are we inside the graph ? */ if (ti < im->start || ti > im->end) continue; - while (timajor < ti) { + while (timajor < ti && timajor != -1) { timajor = find_next_time(timajor, im-> xlab_user. mgridtm, im->xlab_user.mgridst); } + if (timajor == -1) break; /* fail in case of problems with time increments */ if (ti == timajor) continue; /* skip as falls on major grid line */ X0 = xtr(im, ti); @@ -2518,7 +2547,7 @@ void vertical_grid( im-> xlab_user. mgridst); - ti < im->end; + ti < im->end && ti != -1; ti = find_next_time(ti, im->xlab_user.mgridtm, im->xlab_user.mgridst) ) { /* are we inside the graph ? */ @@ -2544,9 +2573,9 @@ void vertical_grid( labtm, im->xlab_user. labst); - ti <= + (ti <= im->end - - im->xlab_user.precis / 2; + im->xlab_user.precis / 2) && ti != -1; ti = find_next_time(ti, im->xlab_user.labtm, im->xlab_user.labst) ) { tilab = ti + im->xlab_user.precis / 2; /* correct time for the label */ @@ -2905,6 +2934,7 @@ int graph_size_location( im->ximg = im->xsize; im->yimg = im->ysize; im->yorigin = im->ysize; + xtr(im, 0); ytr(im, DNAN); return 0; } @@ -2936,7 +2966,7 @@ int graph_size_location( } else{ // we have no title; get a little clearing from the top - Ytitle = 1.5 * Yspacing; + Ytitle = Yspacing; } if (elements) { @@ -3030,7 +3060,7 @@ int graph_size_location( /* reserve space for padding below the graph */ if (im->extra_flags & NOLEGEND) { - Ymain -= Yspacing; + Ymain -= 0.5*Yspacing; } if (im->watermark[0] != '\0') { @@ -3090,7 +3120,7 @@ int graph_size_location( } /* reserve space for padding below the graph */ if (im->extra_flags & NOLEGEND) { - im->yimg += Yspacing; + im->yimg += 0.5*Yspacing; } if (im->watermark[0] != '\0') { @@ -3119,7 +3149,7 @@ int graph_size_location( */ switch(im->legendposition){ case NORTH: - im->xOriginTitle = Xvertical + Xylabel + (im->xsize / 2); + im->xOriginTitle = (im->ximg / 2); im->yOriginTitle = 0; im->xOriginLegend = 0; @@ -3140,7 +3170,7 @@ int graph_size_location( break; case WEST: - im->xOriginTitle = im->legendwidth + Xvertical + Xylabel + im->xsize / 2; + im->xOriginTitle = im->legendwidth + im->xsize / 2; im->yOriginTitle = 0; im->xOriginLegend = 0; @@ -3161,7 +3191,7 @@ int graph_size_location( break; case SOUTH: - im->xOriginTitle = Xvertical + Xylabel + im->xsize / 2; + im->xOriginTitle = im->ximg / 2; im->yOriginTitle = 0; im->xOriginLegend = 0; @@ -3182,7 +3212,7 @@ int graph_size_location( break; case EAST: - im->xOriginTitle = Xvertical + Xylabel + im->xsize / 2; + im->xOriginTitle = im->xsize / 2; im->yOriginTitle = 0; im->xOriginLegend = Xvertical + Xylabel + Xmain + Xvertical2; @@ -3423,16 +3453,26 @@ int graph_paint( } break; case GF_LINE: - case GF_AREA: - /* fix data points at oo and -oo */ + case GF_AREA: { + rrd_value_t diffval = im->maxval - im->minval; + rrd_value_t maxlimit = im->maxval + 9 * diffval; + rrd_value_t minlimit = im->minval - 9 * diffval; for (ii = 0; ii < im->xsize; ii++) { + /* fix data points at oo and -oo */ if (isinf(im->gdes[i].p_data[ii])) { if (im->gdes[i].p_data[ii] > 0) { im->gdes[i].p_data[ii] = im->maxval; } else { im->gdes[i].p_data[ii] = im->minval; } - + } + /* some versions of cairo go unstable when trying + to draw way out of the canvas ... lets not even try */ + if (im->gdes[i].p_data[ii] > maxlimit) { + im->gdes[i].p_data[ii] = maxlimit; + } + if (im->gdes[i].p_data[ii] < minlimit) { + im->gdes[i].p_data[ii] = minlimit; } } /* for */ @@ -3659,6 +3699,7 @@ int graph_paint( } lastgdes = &(im->gdes[i]); break; + } /* GF_AREA, GF_LINE, GF_GRAD */ case GF_STACK: rrd_set_error ("STACK should already be turned into LINE or AREA here"); @@ -3918,7 +3959,8 @@ rrd_info_t *rrd_graph_v( char *old_locale; rrd_graph_init(&im); /* a dummy surface so that we can measure text sizes for placements */ - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); rrd_graph_options(argc, argv, &im); if (rrd_test_error()) { rrd_info_free(im.grinfo); @@ -4003,6 +4045,8 @@ rrd_set_font_desc ( if (font){ strncpy(im->text_prop[prop].font, font, sizeof(text_prop[prop].font) - 1); im->text_prop[prop].font[sizeof(text_prop[prop].font) - 1] = '\0'; + /* if we already got one, drop it first */ + pango_font_description_free(im->text_prop[prop].font_desc); im->text_prop[prop].font_desc = pango_font_description_from_string( font ); }; if (size > 0){ @@ -4054,6 +4098,7 @@ void rrd_graph_init( im->maxval = DNAN; im->minval = 0; im->minval = DNAN; + im->magfact = 1; im->prt_c = 0; im->rigid = 0; im->rendered_image_size = 0; @@ -4096,6 +4141,7 @@ void rrd_graph_init( for (i = 0; i < DIM(text_prop); i++) { im->text_prop[i].size = -1; + im->text_prop[i].font_desc = NULL; rrd_set_font_desc(im,i, deffont ? deffont : text_prop[i].font,text_prop[i].size); } @@ -4110,6 +4156,7 @@ void rrd_graph_init( pango_cairo_update_context(im->cr,context); im->layout = pango_layout_new(context); + g_object_unref (context); // im->layout = pango_cairo_create_layout(im->cr); diff --git a/src/rrd_graph.h b/src/rrd_graph.h index 8e28f63..525e019 100644 --- a/src/rrd_graph.h +++ b/src/rrd_graph.h @@ -7,7 +7,13 @@ /* this may configure __EXTENSIONS__ without which pango will fail to compile so load this early */ +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) +#include "../win32/config.h" +#else +#ifdef HAVE_CONFIG_H #include "../rrd_config.h" +#endif +#endif #include #include diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index e2dd06c..00922a5 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 **************************************************************************** * rrd_graph_helper.c commandline parser functions * this code initially written by Alex van den Bogaerdt diff --git a/src/rrd_hw.c b/src/rrd_hw.c index 1eba57e..97ac2b8 100644 --- a/src/rrd_hw.c +++ b/src/rrd_hw.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_hw.c : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection ***************************************************************************** diff --git a/src/rrd_hw.h b/src/rrd_hw.h index a24834d..050455a 100644 --- a/src/rrd_hw.h +++ b/src/rrd_hw.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_hw.h : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection *****************************************************************************/ diff --git a/src/rrd_i18n.h b/src/rrd_i18n.h index 763c67a..541d997 100644 --- a/src/rrd_i18n.h +++ b/src/rrd_i18n.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Takao Fujiwara, 2008 + * RRDtool 1.4.7 Copyright by Takao Fujiwara, 2008 ***************************************************************************** * rrd_i18n.h Common Header File *****************************************************************************/ diff --git a/src/rrd_info.c b/src/rrd_info.c index 4f8b5dd..60e5104 100644 --- a/src/rrd_info.c +++ b/src/rrd_info.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_info Get Information about the configuration of an RRD *****************************************************************************/ diff --git a/src/rrd_is_thread_safe.h b/src/rrd_is_thread_safe.h index bc74b37..bdb1761 100644 --- a/src/rrd_is_thread_safe.h +++ b/src/rrd_is_thread_safe.h @@ -1,12 +1,12 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 * 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 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_is_thread_safe.h 2267 2012-01-24 10:08:48Z oetiker $ *************************************************************************** */ #ifndef _RRD_IS_THREAD_SAFE_H diff --git a/src/rrd_last.c b/src/rrd_last.c index 8555fbc..e6ad2dc 100644 --- a/src/rrd_last.c +++ b/src/rrd_last.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_last.c ***************************************************************************** diff --git a/src/rrd_lastupdate.c b/src/rrd_lastupdate.c index 42d9c95..acc1821 100644 --- a/src/rrd_lastupdate.c +++ b/src/rrd_lastupdate.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 * Copyright by Florian Forster, 2008 ***************************************************************************** * rrd_lastupdate Get the last datum entered for each DS diff --git a/src/rrd_not_thread_safe.c b/src/rrd_not_thread_safe.c index 92fd136..7587a65 100644 --- a/src/rrd_not_thread_safe.c +++ b/src/rrd_not_thread_safe.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 * This file: Copyright 2003 Peter Stamfest * & Tobias Oetiker * Distributed under the GPL @@ -7,7 +7,7 @@ * rrd_not_thread_safe.c Contains routines used when thread safety is not * an issue ***************************************************************************** - * $Id: rrd_not_thread_safe.c 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_not_thread_safe.c 2267 2012-01-24 10:08:48Z oetiker $ *************************************************************************** */ #include "rrd.h" #include "rrd_tool.h" diff --git a/src/rrd_open.c b/src/rrd_open.c index c40742c..2a454c5 100644 --- a/src/rrd_open.c +++ b/src/rrd_open.c @@ -1,11 +1,14 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_open.c Open an RRD File ***************************************************************************** - * $Id: rrd_open.c 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_open.c 2267 2012-01-24 10:08:48Z oetiker $ *****************************************************************************/ +#include "rrd_tool.h" +#include "unused.h" + #ifdef WIN32 #include #include @@ -17,8 +20,6 @@ #include #endif -#include "rrd_tool.h" -#include "unused.h" #define MEMBLK 8192 #ifdef WIN32 @@ -156,7 +157,9 @@ rrd_file_t *rrd_open( if (rdwr & RRD_READONLY) { flags |= O_RDONLY; #ifdef HAVE_MMAP +# if !defined(AIX) rrd_simple_file->mm_flags = MAP_PRIVATE; +# endif # ifdef MAP_NORESERVE rrd_simple_file->mm_flags |= MAP_NORESERVE; /* readonly, so no swap backing needed */ # endif @@ -244,6 +247,38 @@ rrd_file_t *rrd_open( */ #ifdef HAVE_MMAP + /* force allocating the file on the underlaying filesystem to prevent any + * future bus error when the filesystem is full and attempting to write + * trough the file mapping. Filling the file using memset on the file + * mapping can also lead some bus error, so we use the old fashioned + * write(). + */ + if (rdwr & RRD_CREAT) { + char buf[4096]; + unsigned i; + + memset(buf, DNAN, sizeof buf); + lseek(rrd_simple_file->fd, offset, SEEK_SET); + + for (i = 0; i < (newfile_size - 1) / sizeof buf; ++i) + { + if (write(rrd_simple_file->fd, buf, sizeof buf) == -1) + { + rrd_set_error("write '%s': %s", file_name, rrd_strerror(errno)); + goto out_close; + } + } + + if (write(rrd_simple_file->fd, buf, + (newfile_size - 1) % sizeof buf) == -1) + { + rrd_set_error("write '%s': %s", file_name, rrd_strerror(errno)); + goto out_close; + } + + lseek(rrd_simple_file->fd, 0, SEEK_SET); + } + data = mmap(0, rrd_file->file_len, rrd_simple_file->mm_prot, rrd_simple_file->mm_flags, rrd_simple_file->fd, offset); @@ -256,7 +291,6 @@ rrd_file_t *rrd_open( } rrd_simple_file->file_start = data; if (rdwr & RRD_CREAT) { - memset(data, DNAN, newfile_size - 1); goto out_done; } #endif @@ -686,7 +720,7 @@ ssize_t rrd_write( /* this is a leftover from the old days, it serves no purpose and is therefore turned into a no-op */ void rrd_flush( - rrd_file_t *rrd_file __attribute__((unused))) + rrd_file_t UNUSED(*rrd_file)) { } @@ -748,10 +782,10 @@ void rrd_freemem( * aligning RRAs within stripes, or other performance enhancements */ void rrd_notify_row( - rrd_file_t *rrd_file __attribute__((unused)), - int rra_idx __attribute__((unused)), - unsigned long rra_row __attribute__((unused)), - time_t rra_time __attribute__((unused))) + rrd_file_t UNUSED(*rrd_file), + int UNUSED(rra_idx), + unsigned long UNUSED(rra_row), + time_t UNUSED(rra_time)) { } @@ -763,8 +797,8 @@ void rrd_notify_row( * don't change to a new disk block at the same time */ unsigned long rrd_select_initial_row( - rrd_file_t *rrd_file __attribute__((unused)), - int rra_idx __attribute__((unused)), + rrd_file_t UNUSED(*rrd_file), + int UNUSED(rra_idx), rra_def_t *rra ) { diff --git a/src/rrd_parsetime.c b/src/rrd_parsetime.c index f3a8e2e..1b59f45 100644 --- a/src/rrd_parsetime.c +++ b/src/rrd_parsetime.c @@ -124,7 +124,7 @@ enum { /* symbols */ MIDNIGHT, NOON, TEATIME, - PM, AM, YESTERDAY, TODAY, TOMORROW, NOW, START, END, + PM, AM, YESTERDAY, TODAY, TOMORROW, NOW, START, END, EPOCH, SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS, MONTHS_MINUTES, NUMBER, PLUS, MINUS, DOT, COLON, SLASH, ID, JUNK, @@ -157,6 +157,7 @@ static const struct SpecialToken VariousWords[] = { {"s", START}, {"end", END}, {"e", END}, + {"epoch", EPOCH}, {"jan", JAN}, {"feb", FEB}, @@ -859,6 +860,9 @@ char *rrd_parsetime( case MINUS: break; /* jump to OFFSET-SPEC part */ + case EPOCH: + ptv->type = RELATIVE_TO_EPOCH; + goto KeepItRelative; case START: ptv->type = RELATIVE_TO_START_TIME; goto KeepItRelative; diff --git a/src/rrd_resize.c b/src/rrd_resize.c index 8d8f532..b1b1e18 100644 --- a/src/rrd_resize.c +++ b/src/rrd_resize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_resize.c Alters size of an RRA ***************************************************************************** @@ -118,7 +118,6 @@ int rrd_resize( rrd_free(&rrdnew); rrd_free(&rrdold); rrd_close(rrd_file); - rrd_close(rrd_out_file); return (-1); } if (rrd_lock(rrd_out_file) != 0) { @@ -162,6 +161,12 @@ int rrd_resize( default: rrd_set_error("Do not know how to handle RRD version %s", rrdold.stat_head->version); + + rrdnew.ds_def = NULL; + rrdnew.live_head = NULL; + rrdnew.pdp_prep = NULL; + rrdnew.cdp_prep = NULL; + rrd_free(&rrdnew); rrd_free(&rrdold); rrd_close(rrd_file); @@ -262,9 +267,14 @@ int rrd_resize( /* Move the rest of the CDPs */ while (1) { - if (rrd_read(rrd_file, &buffer, sizeof(rrd_value_t) * 1) <= 0) + ssize_t b_read; + if ((b_read=rrd_read(rrd_file, &buffer, sizeof(rrd_value_t) * 1)) <= 0) break; - rrd_write(rrd_out_file, &buffer, sizeof(rrd_value_t) * 1); + if(rrd_out_file->pos+b_read > rrd_out_file->file_len) { + fprintf(stderr,"WARNING: ignoring last %zu bytes\nWARNING: if you see this message multiple times for a single file you're in trouble\n", b_read); + continue; + } + rrd_write(rrd_out_file, &buffer, b_read); } rrdnew.rra_def[target_rra].row_cnt += modify; rrd_seek(rrd_out_file, @@ -283,6 +293,12 @@ int rrd_resize( rrd_close(rrd_file); rrd_close(rrd_out_file); rrd_free(&rrdold); + + rrdnew.ds_def = NULL; + rrdnew.live_head = NULL; + rrdnew.pdp_prep = NULL; + rrdnew.cdp_prep = NULL; + rrd_free(&rrdnew); return (0); } diff --git a/src/rrd_restore.c b/src/rrd_restore.c index b91bc1b..b368417 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -1,12 +1,12 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_restore.c Contains logic to parse XML input and create an RRD file * This file: * Copyright (C) 2008 Florian octo Forster (original libxml2 code) * Copyright (C) 2008,2009 Tobias Oetiker ***************************************************************************** - * $Id: rrd_restore.c 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_restore.c 2267 2012-01-24 10:08:48Z oetiker $ *************************************************************************** */ #include "rrd_tool.h" @@ -788,7 +788,7 @@ static int parse_tag_rra( /* All space successfully allocated, increment number of RRAs. */ rrd->stat_head->rra_cnt++; - + status = 0; while ((element = get_xml_element(reader)) != NULL){ if (xmlStrcasecmp(element, (const xmlChar *) "cf") == 0) @@ -827,7 +827,7 @@ static int parse_tag_rra( return status; } else if (xmlStrcasecmp(element,(const xmlChar *) "/rra") == 0){ - xmlFree(element); + xmlFree(element); return status; } /* }}} */ else { @@ -1180,15 +1180,16 @@ static int write_file( unsigned long num_rows = rrd->rra_def[i].row_cnt; unsigned long cur_row = rrd->rra_ptr[i].cur_row; unsigned long ds_cnt = rrd->stat_head->ds_cnt; + if (num_rows > 0){ + fwrite(rrd->rrd_value + + (rra_offset + num_rows - 1 - cur_row) * ds_cnt, + sizeof(rrd_value_t), (cur_row + 1) * ds_cnt, fh); - fwrite(rrd->rrd_value + - (rra_offset + num_rows - 1 - cur_row) * ds_cnt, - sizeof(rrd_value_t), (cur_row + 1) * ds_cnt, fh); - - fwrite(rrd->rrd_value + rra_offset * ds_cnt, - sizeof(rrd_value_t), (num_rows - 1 - cur_row) * ds_cnt, fh); + fwrite(rrd->rrd_value + rra_offset * ds_cnt, + sizeof(rrd_value_t), (num_rows - 1 - cur_row) * ds_cnt, fh); - rra_offset += num_rows; + rra_offset += num_rows; + } } /* lets see if we had an error */ diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c index e392a65..b3d7760 100644 --- a/src/rrd_rpncalc.c +++ b/src/rrd_rpncalc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 **************************************************************************** * rrd_rpncalc.c RPN calculator functions ****************************************************************************/ @@ -33,8 +33,8 @@ short rpn_compact( while (rpnp[*count].op != OP_END) (*count)++; if (++(*count) > DS_CDEF_MAX_RPN_NODES) { - rrd_set_error("Maximum %d RPN nodes permitted", - DS_CDEF_MAX_RPN_NODES); + rrd_set_error("Maximum %d RPN nodes permitted. Got %d RPN nodes at present.", + DS_CDEF_MAX_RPN_NODES-1,(*count)-1); return -1; } @@ -72,10 +72,12 @@ rpnp_t *rpn_expand( /* DS_CDEF_MAX_RPN_NODES is small, so at the expense of some wasted * memory we avoid any reallocs */ rpnp = (rpnp_t *) calloc(DS_CDEF_MAX_RPN_NODES, sizeof(rpnp_t)); - if (rpnp == NULL) + if (rpnp == NULL) { + rrd_set_error("failed allocating rpnp array"); return NULL; + } for (i = 0; rpnc[i].op != OP_END; ++i) { - rpnp[i].op = rpnc[i].op; + rpnp[i].op = (enum op_en)rpnc[i].op; if (rpnp[i].op == OP_NUMBER) { rpnp[i].val = (double) rpnc[i].val; } else if (rpnp[i].op == OP_VARIABLE || rpnp[i].op == OP_PREV_OTHER) { @@ -234,9 +236,11 @@ void parseCDEF_DS( * occur too often. */ for (i = 0; rpnp[i].op != OP_END; i++) { if (rpnp[i].op == OP_TIME || rpnp[i].op == OP_LTIME || - rpnp[i].op == OP_PREV || rpnp[i].op == OP_COUNT) { + rpnp[i].op == OP_PREV || rpnp[i].op == OP_COUNT || + rpnp[i].op == OP_TREND || rpnp[i].op == OP_TRENDNAN || + rpnp[i].op == OP_PREDICT || rpnp[i].op == OP_PREDICTSIGMA ) { rrd_set_error - ("operators time, ltime, prev and count not supported with DS COMPUTE"); + ("operators TIME, LTIME, PREV COUNT TREND TRENDNAN PREDICT PREDICTSIGMA are not supported with DS COMPUTE"); free(rpnp); return; } @@ -295,7 +299,8 @@ rpnp_t *rpn_parse( char vname[MAX_VNAME_LEN + 10]; char *old_locale; - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); rpnp = NULL; expr = (char *) expr_const; @@ -878,7 +883,7 @@ short rpn_calc( time_t dur = (time_t) rpnstack->s[stptr]; time_t step = (time_t) rpnp[rpi - 2].step; - if (output_idx > (int) ceil((float) dur / (float) step)) { + if (output_idx + 1 >= (int) ceil((float) dur / (float) step)) { int ignorenan = (rpnp[rpi].op == OP_TREND); double accum = 0.0; int i = 0; diff --git a/src/rrd_rpncalc.h b/src/rrd_rpncalc.h index 61b8940..a15e075 100644 --- a/src/rrd_rpncalc.h +++ b/src/rrd_rpncalc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 **************************************************************************** * rrd_rpncalc.h RPN calculator functions ****************************************************************************/ @@ -41,7 +41,7 @@ typedef struct rpn_cdefds_t { #define DEF_NAM_FMT "%255[-_A-Za-z0-9]" /* limit imposed by sizeof(rpn_cdefs_t) and rrd.ds_def.par */ -#define DS_CDEF_MAX_RPN_NODES 26 +#define DS_CDEF_MAX_RPN_NODES (int)(sizeof(unival)*10 / sizeof(rpn_cdefds_t)) typedef struct rpnstack_t { double *s; diff --git a/src/rrd_thread_safe.c b/src/rrd_thread_safe.c index 7503d17..133a7ea 100644 --- a/src/rrd_thread_safe.c +++ b/src/rrd_thread_safe.c @@ -1,12 +1,12 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 * 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 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_thread_safe.c 2267 2012-01-24 10:08:48Z oetiker $ *************************************************************************** */ #include diff --git a/src/rrd_thread_safe_nt.c b/src/rrd_thread_safe_nt.c index be717d8..8313794 100644 --- a/src/rrd_thread_safe_nt.c +++ b/src/rrd_thread_safe_nt.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 * 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 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_thread_safe_nt.c 2267 2012-01-24 10:08:48Z oetiker $ *************************************************************************** */ #include diff --git a/src/rrd_tool.c b/src/rrd_tool.c index ea94ea1..187b3e3 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -1,13 +1,15 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_tool.c Startup wrapper *****************************************************************************/ -#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) +#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) #include "../win32/config.h" #include #include +#include +#include #else #ifdef HAVE_CONFIG_H #include "../rrd_config.h" @@ -47,7 +49,7 @@ void PrintUsage( const char *help_main = N_("RRDtool %s" - " Copyright 1997-2009 by Tobias Oetiker \n" + " Copyright 1997-2012 by Tobias Oetiker \n" " Compiled %s %s\n\n" "Usage: rrdtool [options] command command_options\n"); @@ -205,7 +207,7 @@ void PrintUsage( N_("* xport - generate XML dump from one or several RRD\n\n" "\trrdtool xport [-s|--start seconds] [-e|--end seconds]\n" "\t\t[-m|--maxrows rows]\n" "\t\t[--step seconds]\n" - "\t\t[--enumds]\n" "\t\t[DEF:vname=rrd:ds-name:CF]\n" + "\t\t[--enumds] [--json]\n" "\t\t[DEF:vname=rrd:ds-name:CF]\n" "\t\t[CDEF:vname=rpn-expression]\n" "\t\t[XPORT:vname:legend]\n"); const char *help_quit = @@ -414,6 +416,12 @@ int main( according to localeconv(3) */ setlocale(LC_ALL, ""); +#if defined(WIN32) && !defined(__CYGWIN__) + setmode(fileno(stdout), O_BINARY); + setmode(fileno(stdin), O_BINARY); +#endif + + #if defined(HAVE_LIBINTL_H) && defined(BUILD_LIBINTL) bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); textdomain(GETTEXT_PACKAGE); @@ -534,7 +542,7 @@ int HandleInputLine( */ if (RemoteMode) { if (argc > 1 && strcmp("quit", argv[1]) == 0) { - if (argc > 2) { + if (argc != 2) { printf("ERROR: invalid parameter count for quit\n"); return (1); } @@ -542,7 +550,7 @@ int HandleInputLine( } #if defined(HAVE_OPENDIR) && defined(HAVE_READDIR) && defined(HAVE_CHDIR) if (argc > 1 && strcmp("cd", argv[1]) == 0) { - if (argc > 3) { + if (argc != 3) { printf("ERROR: invalid parameter count for cd\n"); return (1); } @@ -562,7 +570,7 @@ int HandleInputLine( } if (argc > 1 && strcmp("pwd", argv[1]) == 0) { char *cwd; /* To hold current working dir on call to pwd */ - if (argc > 2) { + if (argc != 2) { printf("ERROR: invalid parameter count for pwd\n"); return (1); } @@ -576,7 +584,7 @@ int HandleInputLine( return (0); } if (argc > 1 && strcmp("mkdir", argv[1]) == 0) { - if (argc > 3) { + if (argc != 3) { printf("ERROR: invalid parameter count for mkdir\n"); return (1); } @@ -595,7 +603,7 @@ int HandleInputLine( return (0); } if (argc > 1 && strcmp("ls", argv[1]) == 0) { - if (argc > 2) { + if (argc != 2) { printf("ERROR: invalid parameter count for ls\n"); return (1); } @@ -677,7 +685,7 @@ int HandleInputLine( if (rrd_fetch (argc - 1, &argv[1], &start, &end, &step, &ds_cnt, &ds_namv, - &data) != -1) { + &data) == 0) { datai = data; printf(" "); for (i = 0; i < ds_cnt; i++) @@ -695,6 +703,7 @@ int HandleInputLine( free(data); } } else if (strcmp("xport", argv[1]) == 0) { +#ifdef HAVE_RRD_GRAPH int xxsize; unsigned long int j = 0; time_t start, end, ti; @@ -702,6 +711,7 @@ int HandleInputLine( rrd_value_t *data, *ptr; char **legend_v; int enumds = 0; + int json = 0; int i; size_t vtag_s = strlen(COL_DATA_TAG) + 10; char *vtag = malloc(vtag_s); @@ -709,68 +719,136 @@ int HandleInputLine( for (i = 2; i < argc; i++) { if (strcmp("--enumds", argv[i]) == 0) enumds = 1; + if (strcmp("--json", argv[i]) == 0) + json = 1; } if (rrd_xport (argc - 1, &argv[1], &xxsize, &start, &end, &step, &col_cnt, - &legend_v, &data) != -1) { - char *old_locale = setlocale(LC_NUMERIC, "C"); + &legend_v, &data) == 0) { + char *old_locale = setlocale(LC_NUMERIC,NULL); + setlocale(LC_NUMERIC, "C"); row_cnt = (end - start) / step; ptr = data; - printf("\n\n", - XML_ENCODING); - printf("<%s>\n", ROOT_TAG); - printf(" <%s>\n", META_TAG); - printf(" <%s>%lu\n", META_START_TAG, - (unsigned long) start + step, META_START_TAG); - printf(" <%s>%lu\n", META_STEP_TAG, step, META_STEP_TAG); - printf(" <%s>%lu\n", META_END_TAG, (unsigned long) end, - META_END_TAG); - printf(" <%s>%lu\n", META_ROWS_TAG, row_cnt, - META_ROWS_TAG); - printf(" <%s>%lu\n", META_COLS_TAG, col_cnt, - META_COLS_TAG); - printf(" <%s>\n", LEGEND_TAG); + if (json == 0){ + printf("\n\n", + XML_ENCODING); + printf("<%s>\n", ROOT_TAG); + printf(" <%s>\n", META_TAG); + } + else { + printf("{ about: 'RRDtool xport JSON output',\n meta: {\n"); + } + + +#define pXJV(indent,fmt,tag,value) \ + if (json) { \ + printf(indent "%s: " fmt ",\n",tag,value); \ + } else { \ + printf(indent "<%s>" fmt "\n",tag,value,tag); \ + } + + pXJV(" ","%lld",META_START_TAG,(long long int) start + step); + pXJV(" ","%lu", META_STEP_TAG, step); + pXJV(" ","%lld",META_END_TAG,(long long int) start + step); + if (! json){ + pXJV(" ","%lu", META_ROWS_TAG, row_cnt); + pXJV(" ","%lu", META_COLS_TAG, col_cnt); + } + + if (json){ + printf(" %s: [\n", LEGEND_TAG); + } + else { + printf(" <%s>\n", LEGEND_TAG); + } for (j = 0; j < col_cnt; j++) { char *entry = NULL; - entry = legend_v[j]; - printf(" <%s>%s\n", LEGEND_ENTRY_TAG, entry, + if (json){ + printf(" '%s'", entry); + if (j < col_cnt -1){ + printf(","); + } + printf("\n"); + } + else { + printf(" <%s>%s\n", LEGEND_ENTRY_TAG, entry, LEGEND_ENTRY_TAG); + } free(entry); } free(legend_v); - printf(" \n", LEGEND_TAG); - printf(" \n", META_TAG); - printf(" <%s>\n", DATA_TAG); + if (json){ + printf(" ]\n },\n"); + } + else { + printf(" \n", LEGEND_TAG); + printf(" \n", META_TAG); + } + + if (json){ + printf(" %s: [\n",DATA_TAG); + } else { + printf(" <%s>\n", DATA_TAG); + } for (ti = start + step; ti <= end; ti += step) { - printf(" <%s>", DATA_ROW_TAG); - printf("<%s>%lu", COL_TIME_TAG, ti, COL_TIME_TAG); + if (json){ + printf(" [ "); + } + else { + printf(" <%s>", DATA_ROW_TAG); + printf("<%s>%lld", COL_TIME_TAG, (long long int)ti, COL_TIME_TAG); + } for (j = 0; j < col_cnt; j++) { rrd_value_t newval = DNAN; - - if (enumds == 1) - - snprintf(vtag, vtag_s, "%s%lu", COL_DATA_TAG, j); - else - snprintf(vtag, vtag_s, "%s", COL_DATA_TAG); newval = *ptr; - if (isnan(newval)) { - printf("<%s>NaN", vtag, vtag); - } else { - printf("<%s>%0.10e", vtag, newval, vtag); - }; + if (json){ + if (isnan(newval)){ + printf("null"); + } else { + printf("%0.10e",newval); + } + if (j < col_cnt -1){ + printf(", "); + } + } + else { + if (enumds == 1) + snprintf(vtag, vtag_s, "%s%lu", COL_DATA_TAG, j); + else + snprintf(vtag, vtag_s, "%s", COL_DATA_TAG); + if (isnan(newval)) { + printf("<%s>NaN", vtag, vtag); + } else { + printf("<%s>%0.10e", vtag, newval, vtag); + }; + } ptr++; + } + if (json){ + printf(ti < end ? " ],\n" : " ]\n"); + } + else { + printf("\n", DATA_ROW_TAG); } - printf("\n", DATA_ROW_TAG); } free(data); - printf(" \n", DATA_TAG); - printf("\n", ROOT_TAG); + if (json){ + printf(" ]\n}\n"); + } + else { + printf(" \n", DATA_TAG); + printf("\n", ROOT_TAG); + } setlocale(LC_NUMERIC, old_locale); } free(vtag); +#else + rrd_set_error("the instance of rrdtool has been compiled without graphics"); +#endif } else if (strcmp("graph", argv[1]) == 0) { +#ifdef HAVE_RRD_GRAPH char **calcpr; #ifdef notused /*XXX*/ @@ -791,7 +869,7 @@ int HandleInputLine( } if (rrd_graph (argc - 1, &argv[1], &calcpr, &xsize, &ysize, NULL, &ymin, - &ymax) != -1) { + &ymax) == 0) { if (!tostdout && !imginfo) printf("%dx%d\n", xsize, ysize); if (calcpr) { @@ -804,7 +882,11 @@ int HandleInputLine( } } +#else + rrd_set_error("the instance of rrdtool has been compiled without graphics"); +#endif } else if (strcmp("graphv", argv[1]) == 0) { +#ifdef HAVE_RRD_GRAPH 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]); @@ -812,11 +894,15 @@ int HandleInputLine( rrd_info_print(grinfo); rrd_info_free(grinfo); } - +#else + rrd_set_error("the instance of rrdtool has been compiled without graphics"); +#endif } else if (strcmp("tune", argv[1]) == 0) rrd_tune(argc - 1, &argv[1]); +#ifndef WIN32 else if (strcmp("flushcached", argv[1]) == 0) rrd_flushcached(argc - 1, &argv[1]); +#endif else { rrd_set_error("unknown function '%s'", argv[1]); } diff --git a/src/rrd_tool.h b/src/rrd_tool.h index b58e04c..f9e0016 100644 --- a/src/rrd_tool.h +++ b/src/rrd_tool.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_tool.h Common Header File *****************************************************************************/ @@ -10,10 +10,12 @@ extern "C" { #ifndef _RRD_TOOL_H #define _RRD_TOOL_H +#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) +#include "../win32/config.h" +#else #ifdef HAVE_CONFIG_H #include "../rrd_config.h" -#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) -#include "../win32/config.h" +#endif #endif #include "rrd.h" @@ -42,7 +44,7 @@ extern "C" { #else /* unix-only includes */ -#if !defined isnan && !defined HAVE_ISNAN +#if !defined(isnan) && !defined(HAVE_ISNAN) int isnan( double value); #endif diff --git a/src/rrd_tune.c b/src/rrd_tune.c index 926e11a..acb791b 100644 --- a/src/rrd_tune.c +++ b/src/rrd_tune.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * change header parameters of an rrd ***************************************************************************** - * $Id: rrd_tune.c 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_tune.c 2267 2012-01-24 10:08:48Z oetiker $ * $Log$ * Revision 1.6 2004/05/26 22:11:12 oetiker * reduce compiler warnings. Many small fixes. -- Mike Slifcak @@ -126,7 +126,8 @@ int rrd_tune( optcnt++; switch (opt) { case 'h': - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if ((matches = sscanf(optarg, DS_NAM_FMT ":%ld", ds_nam, &heartbeat)) != 2) { @@ -146,7 +147,8 @@ int rrd_tune( break; case 'i': - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if ((matches = sscanf(optarg, DS_NAM_FMT ":%lf", ds_nam, &min)) < 1) { rrd_set_error("invalid arguments for minimum ds value"); @@ -168,7 +170,8 @@ int rrd_tune( break; case 'a': - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); if ((matches = sscanf(optarg, DS_NAM_FMT ":%lf", ds_nam, &max)) < 1) { rrd_set_error("invalid arguments for maximum ds value"); diff --git a/src/rrd_update.c b/src/rrd_update.c index 45014eb..d0fb1d9 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -1,10 +1,10 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 * Copyright by Florian Forster, 2008 ***************************************************************************** * rrd_update.c RRD Update Function ***************************************************************************** - * $Id: rrd_update.c 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrd_update.c 2267 2012-01-24 10:08:48Z oetiker $ *****************************************************************************/ #include "rrd_tool.h" @@ -429,7 +429,10 @@ int rrd_update( { /* try to connect to rrdcached */ int status = rrdc_connect(opt_daemon); - if (status != 0) return status; + if (status != 0) { + rc = status; + goto out; + } } if ((tmplt != NULL) && rrdc_is_connected(opt_daemon)) @@ -967,7 +970,8 @@ static int get_time_from_reading( *current_time = tmp_time.tv_sec; *current_time_usec = tmp_time.tv_usec; } else { - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); errno = 0; tmp = strtod(updvals[0], 0); if (errno > 0) { @@ -1079,7 +1083,8 @@ static int update_pdp_prep( } break; case DST_ABSOLUTE: - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); errno = 0; pdp_new[ds_idx] = strtod(updvals[ds_idx + 1], &endptr); if (errno > 0) { @@ -1097,7 +1102,8 @@ static int update_pdp_prep( rate = pdp_new[ds_idx] / interval; break; case DST_GAUGE: - old_locale = setlocale(LC_NUMERIC, "C"); + old_locale = setlocale(LC_NUMERIC, NULL); + setlocale(LC_NUMERIC, "C"); errno = 0; pdp_new[ds_idx] = strtod(updvals[ds_idx + 1], &endptr) * interval; @@ -1354,6 +1360,10 @@ static int process_pdp_st( rpnp = rpn_expand((rpn_cdefds_t *) &(rrd->ds_def[ds_idx].par[DS_cdef])); + if(rpnp == NULL) { + rpnstack_free(&rpnstack); + return -1; + } /* substitute data values for OP_VARIABLE nodes */ for (i = 0; rpnp[i].op != OP_END; i++) { if (rpnp[i].op == OP_VARIABLE) { @@ -1367,6 +1377,7 @@ static int process_pdp_st( rpnstack_free(&rpnstack); return -1; } + free(rpnp); } /* make pdp_prep ready for the next run */ @@ -1543,7 +1554,7 @@ static int update_cdp_prep( if (elapsed_pdp_st > 2) { reset_cdp(rrd, elapsed_pdp_st, pdp_temp, last_seasonal_coef, seasonal_coef, rra_idx, ds_idx, cdp_idx, - current_cf); + (enum cf_en)current_cf); } } diff --git a/src/rrd_utils.c b/src/rrd_utils.c index 3936cff..94c8655 100644 --- a/src/rrd_utils.c +++ b/src/rrd_utils.c @@ -25,19 +25,24 @@ #include #include -#include #include #include #include #include +#ifndef _MSC_VER +#include #include - +#endif #ifdef WIN32 # define random() rand() # define srandom(x) srand(x) # define getpid() 0 #endif /* WIN32 */ +#ifndef S_ISDIR +#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR) +#endif + /* make sure that the random number generator seeded EXACTLY ONCE */ long rrd_random(void) { @@ -140,20 +145,39 @@ int rrd_mkdir_p(const char *pathname, mode_t mode) if (NULL == (pathname_copy = strdup(pathname))) return -1; - base_dir = dirname(pathname_copy); +#ifndef _MSC_VER + /* the data pointedd too by dirname might change too (bsd) */ + if (NULL == (base_dir = strdup(dirname(pathname_copy)))) { + free(pathname_copy); + return -1; + } +#else + _splitpath(pathname_copy, NULL, base_dir, NULL, NULL); +#endif if (0 != rrd_mkdir_p(base_dir, mode)) { int orig_errno = errno; free(pathname_copy); +#ifndef _MSC_VER + free(base_dir); +#endif errno = orig_errno; return -1; } free(pathname_copy); +#ifndef _MSC_VER + free(base_dir); +#endif /* keep errno as set by mkdir() */ +#ifdef _MSC_VER + if (0 != mkdir(pathname)) + return -1; +#else if (0 != mkdir(pathname, mode)) return -1; +#endif return 0; } /* rrd_mkdir_p */ diff --git a/src/rrd_version.c b/src/rrd_version.c index 13f8c0d..b884562 100644 --- a/src/rrd_version.c +++ b/src/rrd_version.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrd_version Return ***************************************************************************** diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 063982e..7c2fe61 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 **************************************************************************** * rrd_xport.c export RRD data ****************************************************************************/ @@ -58,7 +58,6 @@ int rrd_xport( time_t start_tmp = 0, end_tmp = 0; rrd_time_value_t start_tv, end_tv; char *parsetime_error = NULL; - char *opt_daemon = NULL; struct option long_options[] = { {"start", required_argument, 0, 's'}, @@ -66,6 +65,7 @@ int rrd_xport( {"maxrows", required_argument, 0, 'm'}, {"step", required_argument, 0, 261}, {"enumds", no_argument, 0, 262}, /* these are handled in the frontend ... */ + {"json", no_argument, 0, 263}, /* these are handled in the frontend ... */ {"daemon", required_argument, 0, 'd'}, {0, 0, 0, 0} }; @@ -114,15 +114,15 @@ int rrd_xport( break; case 'd': { - if (opt_daemon != NULL) + if (im.daemon_addr != NULL) { rrd_set_error ("You cannot specify --daemon " "more than once."); return (-1); } - opt_daemon = strdup(optarg); - if (opt_daemon == NULL) + im.daemon_addr = strdup(optarg); + if (im.daemon_addr == NULL) { rrd_set_error("strdup error"); return -1; @@ -169,8 +169,7 @@ int rrd_xport( } { /* try to connect to rrdcached */ - int status = rrdc_connect(opt_daemon); - if (opt_daemon) free(opt_daemon); + int status = rrdc_connect(im.daemon_addr); if (status != 0) return status; } @@ -265,6 +264,7 @@ int rrd_xport_fn( while (--j > -1) free(legend_list[j]); free(legend_list); + free(step_list); rrd_set_error("malloc xport legend entry"); return (-1); } diff --git a/src/rrd_xport.h b/src/rrd_xport.h index f7d5fdc..5735495 100644 --- a/src/rrd_xport.h +++ b/src/rrd_xport.h @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 **************************************************************************** * rrd_xport.h contains XML related constants ****************************************************************************/ diff --git a/src/rrdupdate.c b/src/rrdupdate.c index 3e6b959..8d13247 100644 --- a/src/rrdupdate.c +++ b/src/rrdupdate.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 + * RRDtool 1.4.7 Copyright by Tobi Oetiker, 1997-2012 ***************************************************************************** * rrdupdate.c Main program for the (standalone) rrdupdate utility ***************************************************************************** - * $Id: rrdupdate.c 2042 2010-03-22 16:05:55Z oetiker $ + * $Id: rrdupdate.c 2267 2012-01-24 10:08:48Z oetiker $ *****************************************************************************/ #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) @@ -23,7 +23,7 @@ int main( rrd_update(argc, argv); if (rrd_test_error()) { printf("RRDtool " PACKAGE_VERSION - " Copyright by Tobi Oetiker, 1997-2008\n\n" + " Copyright by Tobi Oetiker, 1997-2010\n\n" "Usage: rrdupdate filename\n" "\t\t\t[--template|-t ds-name:ds-name:...]\n" "\t\t\ttime|N:value[:value...]\n\n" diff --git a/win32/README b/win32/README new file mode 100755 index 0000000..612c078 --- /dev/null +++ b/win32/README @@ -0,0 +1,11 @@ +Win32 Build Instructions: + +1) Make sure that the contrib file has all the required files for RRDtool +2) Open rrd.sln from Visual Studio +3) Select the 'Release' Build Type +4) Build the Solution +5) rrdtool.exe, and rrdupdate.exe will be located in the Release directory +6) To install, copy the two binaries, along with the host of DLL files to + their permanent location +7) To build the ActiveState perl module. Follow the instructions under + the README file under 'binding/perl-shared' diff --git a/win32/config.h b/win32/config.h index 6199234..587d02e 100644 --- a/win32/config.h +++ b/win32/config.h @@ -5,6 +5,8 @@ #include #include #include +#include +#include /* realloc does not support NULL as argument */ @@ -24,13 +26,14 @@ #define HAVE_VSNPRINTF 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 +#define HAVE_RRD_GRAPH 1 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 -#define NUMVERS 1.3020 +#define NUMVERS 1.4050 #define PACKAGE_NAME "rrdtool" -#define PACKAGE_VERSION "1.3.2" +#define PACKAGE_VERSION "1.4.5" #define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION #define isinf(a) (_fpclass(a) == _FPCLASS_NINF || _fpclass(a) == _FPCLASS_PINF) @@ -54,4 +57,6 @@ /* #define DEBUG 1 */ +__inline int round(double a){int x = (a + 0.5); return x;} + #endif /* CONFIG_H */ diff --git a/win32/rrd.dsp b/win32/rrd.dsp deleted file mode 100644 index a5cd6c3..0000000 --- a/win32/rrd.dsp +++ /dev/null @@ -1,247 +0,0 @@ -# Microsoft Developer Studio Project File - Name="rrd" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=rrd - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "rrd.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "rrd.mak" CFG="rrd - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "rrd - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "rrd - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "rrd - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "rrd___Wi" -# PROP BASE Intermediate_Dir "rrd___Wi" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "release" -# PROP Intermediate_Dir "release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /I "../src" /I "../../zlib-1.2.3" /I "../../libpng-1.2.16" /I "../../libart_lgpl-2.3.17" /I "../../freetype-2.3.1/include" /D "HAVE_CONFIG_H" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FD /c -# SUBTRACT CPP /X /YX -# ADD BASE RSC /l 0x100c -# ADD RSC /l 0x409 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "rrd - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "rrd___W0" -# PROP BASE Intermediate_Dir "rrd___W0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "debug" -# PROP Intermediate_Dir "debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "../src" /I "../../zlib-1.2.3" /I "../../libpng-1.2.16" /I "../../libart_lgpl-2.3.17" /I "../../freetype-2.3.1/include" /D "HAVE_CONFIG_H" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FR /FD /c -# SUBTRACT CPP /X /YX -# ADD BASE RSC /l 0x100c -# ADD RSC /l 0x409 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo /o"rrd.bsc" -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "rrd - Win32 Release" -# Name "rrd - Win32 Debug" -# Begin Source File - -SOURCE="..\src\get_ver.awk" - -!IF "$(CFG)" == "rrd - Win32 Release" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Creating ..\rrd_config.h -InputPath="..\src\get_ver.awk" - -"..\rrd_config.h" : $(SOURCE) "..\configure.ac" "..\win32\rrd_config.h.msvc" - awk -f ..\src\get_ver.awk ..\configure.ac ..\win32\rrd_config.h.msvc > ..\rrd_config.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "rrd - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Creating ..\rrd_config.h -InputPath="..\src\get_ver.awk" - -"..\rrd_config.h" : $(SOURCE) "..\configure.ac" "..\win32\rrd_config.h.msvc" - awk -f ..\src\get_ver.awk ..\configure.ac ..\win32\rrd_config.h.msvc > ..\rrd_config.h - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_afm.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_afm_data.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_create.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_diff.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_dump.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_error.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_fetch.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_first.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_format.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_gfx.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_graph.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_graph_helper.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_hw.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_info.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_last.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_lastupdate.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_nan_inf.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_open.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_resize.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_restore.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_rpncalc.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_thread_safe_nt.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_tune.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_update.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_version.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_xport.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_getopt.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_getopt1.c -# End Source File -# Begin Source File - -SOURCE=..\src\art_rgba_svp.c -# End Source File -# Begin Source File - -SOURCE=..\src\hash_32.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_parsetime.c -# End Source File -# Begin Source File - -SOURCE=..\src\pngsize.c -# End Source File -# Begin Source File - -SOURCE=..\src\strftime.c -# End Source File -# End Target -# End Project diff --git a/win32/rrd.sln b/win32/rrd.sln index 7f07ad3..59660f7 100644 --- a/win32/rrd.sln +++ b/win32/rrd.sln @@ -1,27 +1,50 @@  Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 +# Visual C++ Express 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdlib", "rrdlib.vcproj", "{CC158E1D-1364-43CA-9B2D-4AF54225C7CA}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdtool", "rrdtool.vcproj", "{11CD05F8-E5E1-476E-A75F-A112655D4E94}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdupdate", "rrdupdate.vcproj", "{3AAE1E07-78D7-420D-968B-D2087D732D3B}" ProjectSection(ProjectDependencies) = postProject - {CC158E1D-1364-43CA-9B2D-4AF54225C7CA} = {CC158E1D-1364-43CA-9B2D-4AF54225C7CA} + {11CD05F8-E5E1-476E-A75F-A112655D4E94} = {11CD05F8-E5E1-476E-A75F-A112655D4E94} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + DebugDLL|Win32 = DebugDLL|Win32 Release|Win32 = Release|Win32 + ReleaseDLL|Win32 = ReleaseDLL|Win32 + Static Debug|Win32 = Static Debug|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Debug|Win32.ActiveCfg = Debug|Win32 {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Debug|Win32.Build.0 = Debug|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Release|Win32.ActiveCfg = Release|Win32 {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Release|Win32.Build.0 = Release|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Static Debug|Win32.Build.0 = Static Debug|Win32 {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.ActiveCfg = Debug|Win32 {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.Build.0 = Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.DebugDLL|Win32.ActiveCfg = Debug|Win32 {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.ActiveCfg = Release|Win32 {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.Build.0 = Release|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.ReleaseDLL|Win32.ActiveCfg = Release|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Static Debug|Win32.Build.0 = Static Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Debug|Win32.Build.0 = Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.DebugDLL|Win32.ActiveCfg = Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Release|Win32.ActiveCfg = Release|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Release|Win32.Build.0 = Release|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.ReleaseDLL|Win32.ActiveCfg = Release|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Static Debug|Win32.Build.0 = Static Debug|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/win32/rrd.vcproj b/win32/rrd.vcproj deleted file mode 100644 index b9822a9..0000000 --- a/win32/rrd.vcproj +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/rrd_config.h.msvc b/win32/rrd_config.h.msvc deleted file mode 100644 index 7c55d5a..0000000 --- a/win32/rrd_config.h.msvc +++ /dev/null @@ -1,66 +0,0 @@ -/* rrd_config.h.msvc. Hand-tweaked rrd_config.h for MSVC compiler. */ -#ifndef WIN32 -#error This rrd_config.h is created for Win32 platform! -#endif -#ifndef RRD_CONFIG_H -#define RRD_CONFIG_H - -#include -#include -#include - -/* the placeholders will be filled in by get_ver.awk */ -/* http://cm.bell-labs.com/cm/cs/awkbook/index.html */ -#define NUMVERS @@NUMVERS@@ -#define PACKAGE_VERSION "@@PACKAGE_VERSION@@" - -#define PACKAGE_NAME "rrdtool" -#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION - -#define HAVE_STRFTIME 1 -#define HAVE_TIME_H 1 -#define HAVE_LOCALE_H 1 -#define HAVE_TZSET 1 -#define HAVE_SETLOCALE 1 -#define HAVE_MATH_H 1 -#define HAVE_FLOAT_H 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MALLOC_H 1 -#define HAVE_MKTIME 1 -#define HAVE_STRFTIME 1 -#define HAVE_STRING_H 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -#define isinf(a) (_fpclass(a) == _FPCLASS_NINF || _fpclass(a) == _FPCLASS_PINF) -#define isnan _isnan -#define finite _finite -#define snprintf _snprintf -#define vsnprintf _vsnprintf -#define strftime strftime_ -#define strtoll(p, e, b) _strtoi64(p, e, b) - -/* realloc does not support NULL as argument */ -#define NO_NULL_REALLOC 1 -#if NO_NULL_REALLOC -# define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) )) -#else -# define rrd_realloc(a,b) realloc((a), (b)) -#endif - -/* Vertical label angle: 90.0 (default) or 270.0 */ -#define RRDGRAPH_YLEGEND_ANGLE 90.0 - -#define RRD_DEFAULT_FONT "arial.ttf" -/* #define RRD_DEFAULT_FONT "DejaVuSansMono-Roman.ttf" */ - -/* #define WITH_PIECHART 1 */ - -/* #define DEBUG 1 */ - -#endif /* RRD_CONFIG_H */ - diff --git a/win32/rrdlib.vcproj b/win32/rrdlib.vcproj index dd5947e..bf53b39 100644 --- a/win32/rrdlib.vcproj +++ b/win32/rrdlib.vcproj @@ -1,7 +1,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -280,6 +502,10 @@ RelativePath="..\src\rrd_update.c" > + + @@ -288,6 +514,10 @@ RelativePath="..\src\rrd_xport.c" > + + + + @@ -368,6 +602,10 @@ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" > + + diff --git a/win32/rrdtool.dsp b/win32/rrdtool.dsp deleted file mode 100644 index 1a192fe..0000000 --- a/win32/rrdtool.dsp +++ /dev/null @@ -1,92 +0,0 @@ -# Microsoft Developer Studio Project File - Name="rrdtool" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=rrdtool - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "rrdtool.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "rrdtool.mak" CFG="rrdtool - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "rrdtool - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "rrdtool - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "rrdtool - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "rrdtool_" -# PROP BASE Intermediate_Dir "rrdtool_" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "toolrelease" -# PROP Intermediate_Dir "toolrelease" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /I "../src" /I "../../zlib-1.2.3" /I "../../libpng-1.2.16" /I "../../libart_lgpl-2.3.17" /I "../../freetype-2.3.1/include" /D "HAVE_CONFIG_H" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x100c /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libpng.lib zlib.lib libart.lib freetype231MT.lib kernel32.lib user32.lib /nologo /subsystem:console /incremental:yes /debug /machine:I386 /libpath:"../../libpng-1.2.16/projects/visualc6/Win32_LIB_Release" /libpath:"../../zlib-1.2.3" /libpath:"../../libart_lgpl-2.3.17/win32/release" /libpath:"../../freetype-2.3.1/objs" - -!ELSEIF "$(CFG)" == "rrdtool - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "rrdtool0" -# PROP BASE Intermediate_Dir "rrdtool0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "tooldebug" -# PROP Intermediate_Dir "tooldebug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "../src" /I "../../zlib-1.2.3" /I "../../libpng-1.2.16" /I "../../libart_lgpl-2.3.17" /I "../../freetype-2.3.1/include" /D "HAVE_CONFIG_H" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FR /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x100c /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo /o"rrdtool.bsc" -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libpng.lib zlib.lib libart.lib freetype231MT.lib kernel32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../libpng-1.2.16/projects/visualc6/Win32_LIB_Release" /libpath:"../../zlib-1.2.3" /libpath:"../../libart_lgpl-2.3.17/win32/release" /libpath:"../../freetype-2.3.1/objs" - -!ENDIF - -# Begin Target - -# Name "rrdtool - Win32 Release" -# Name "rrdtool - Win32 Debug" -# Begin Source File - -SOURCE=..\src\rrd_tool.c -# End Source File -# End Target -# End Project diff --git a/win32/rrdtool.dsw b/win32/rrdtool.dsw deleted file mode 100644 index 07103ba..0000000 --- a/win32/rrdtool.dsw +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "rrd"=".\rrd.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "rrdtool"=".\rrdtool.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name rrd - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/win32/rrdtool.sln b/win32/rrdtool.sln new file mode 100755 index 0000000..3212f22 --- /dev/null +++ b/win32/rrdtool.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdtool", "rrdtool.vcproj", "{11CD05F8-E5E1-476E-A75F-A112655D4E94}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.ActiveCfg = Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.Build.0 = Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.ActiveCfg = Release|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/rrdtool.vcproj b/win32/rrdtool.vcproj index e98dd8b..e434a4a 100644 --- a/win32/rrdtool.vcproj +++ b/win32/rrdtool.vcproj @@ -1,7 +1,7 @@ @@ -134,8 +141,8 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.30.2