From: Sebastian Harl Date: Wed, 23 Jul 2008 17:57:15 +0000 (+0200) Subject: Imported upstream version 1.2.28. X-Git-Tag: debian/1.2.28-1~8^2 X-Git-Url: https://git.tokkee.org/?p=pkg-rrdtool.git;a=commitdiff_plain;h=3741f89bbcc7e8c9dbab7d76bbd2fe28249cfded Imported upstream version 1.2.28. --- diff --git a/CHANGES b/CHANGES index cf537f8..b06b734 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,143 @@ +2008-07-23 13:45 oetiker + + * bindings/perl-piped/RRDp.pm, bindings/perl-shared/RRDs.pm, + configure.ac, doc/rrdbuild.pod, rrdtool.spec, src/gdpng.c, + src/pngsize.c, src/rrd.h, src/rrd_afm.c, src/rrd_afm.h, + src/rrd_afm_data.c, src/rrd_afm_data.h, src/rrd_cgi.c, + src/rrd_create.c, src/rrd_datalang.c, src/rrd_diff.c, + src/rrd_dump.c, src/rrd_error.c, src/rrd_fetch.c, src/rrd_first.c, + src/rrd_format.c, src/rrd_format.h, src/rrd_gfx.c, src/rrd_gfx.h, + src/rrd_graph.c, src/rrd_graph_helper.c, src/rrd_hw.c, + src/rrd_hw.h, src/rrd_info.c, src/rrd_is_thread_safe.h, + src/rrd_last.c, src/rrd_lastupdate.c, src/rrd_not_thread_safe.c, + src/rrd_open.c, src/rrd_resize.c, src/rrd_restore.c, + src/rrd_rpncalc.c, src/rrd_rpncalc.h, src/rrd_stat.c, + src/rrd_thread_safe.c, src/rrd_thread_safe_nt.c, src/rrd_tool.c, + src/rrd_tool.h, src/rrd_tune.c, src/rrd_update.c, + src/rrd_version.c, src/rrd_xport.c, src/rrd_xport.h, + src/rrdupdate.c: prepare for the release of rrdtool-1.2.28 + +2008-07-23 13:45 oetiker + + * netware/Makefile, src/rrd_tool.h, win32/Makefile: build fixes by + Guenter Knauf + +2008-07-22 15:15 oetiker + + * src/rrd_create.c, trunk/program/src/rrd_create.c: Fix for #167 - + rrdcreate is arguably missing a check for 'step>=1' for RRAs with + AVERAGE as a CF. I ran into this when specifying 0.6 as a step + value, assuming floats were also accepted. Patch attached here. -- + Bogdan + +2008-06-29 16:24 oetiker + + * src/rrd_update.c: add filename to illegal update message -- he at + uninett.no + +2008-06-19 13:18 oetiker + + * bindings/python/rrdtoolmodule.c, + trunk/program/bindings/python/rrdtoolmodule.c: rrdtool.fetch is + returning an extra, bogus, data point. Attached is a patch to + correct this. - Gilad Raphaelli. Fix for #161 + +2008-06-08 16:25 oetiker + + * bindings/python/rrdtoolmodule.c: The python bindings do not + currently support retrieval of the rpn expression in COMPUTE data + sources. Attached is a patch that duplicates functionality from + rrd_info.c to expose the correct data source attributes via the + python binding. It: * exposes the rpn expression in the 'cdef' + element for DST_CDEF data source types * exposes the heartbeat, + min, and max only to the other data source types + +2008-06-08 16:23 oetiker + + * src/pngsize.c, trunk/program/src/pngsize.c: fix for ticket #121 + jmpbuf on aix is a problem it seems, maybe this makes it better. + +2008-06-06 16:38 oetiker + + * src/rrd_graph.c, trunk/program/src/rrd_graph.c: fix for --font bug + (font names wer not being picked up at all). Bug reported by + Dmitry B. Bigunayk + +2008-06-01 20:31 oetiker + + * src/rrd_not_thread_safe.c: fliped order of rrd_context entries to + match up with what was defined in rrd.h (based on debuan bug + 450578 + +2008-05-31 12:28 oetiker + + * src/rrd_graph.c, trunk/program/src/rrd_graph.c: make sure vdef + calcs only calc as far as originally requested. + +2008-05-12 15:33 oetiker + + * doc/rrdcreate.pod, src/rrd_update.c, + trunk/program/doc/rrdcreate.pod, trunk/program/src/rrd_update.c: + Fixed handling of unknown data at PDP build time. There was a long + standing (even documented) missfeature in rrdtool which caused + uknown-data to be accepted as long as it was less than the mrhb. + This was never the intended behaviour and had interesting side + effects (http://oss.oetiker.ch/rrdtool-trac/ticket/125): If you + have a 60 Second step with 59s unknown data and 1 second of known + data the whole become known data as long as the mrhb was > step. + The intended behaviour was that a step should become unknown as + soon as it contains more than 50% of unknown data. The patch fixes + both the documentation and the code. + +2008-05-04 18:54 oetiker + + * src/rrd_getopt.c, src/rrd_getopt1.c: make studio 11 happy ... + http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=38555 + +2008-04-16 15:50 oetiker + + * doc/rrdgraph.pod, trunk/program/doc/rrdgraph.pod: fixed 2. x-grid + example ... since the lable is valid for the whole day, it must be + 86400 wide. --tobi + +2008-04-12 09:21 oetiker + + * src/parsetime.c, trunk/program/src/parsetime.c: do not mess with + dst status after running localtime, the system gets confused + otherwhise when it comes to times during the switch over periode + as DST changes to non DST. -- tobi + +2008-03-25 22:37 oetiker + + * examples/Makefile.am: make out-of-tree builds possible for the + examples directory too. + +2008-02-25 07:11 oetiker + + * src/rrd_fetch.c, trunk/program/src/rrd_fetch.c: Ignore RRA-end + when comparing. coverage. + +2008-02-24 14:30 oetiker + + * src/rrd_restore.c: added for for invalid number of ds entries + +2008-02-21 07:21 oetiker + + * configure.ac: make ruby obej destdir + +2008-02-19 12:56 oetiker + + * src/rrd_create.c, src/rrd_info.c, src/rrd_restore.c, + trunk/program/src/rrd_create.c, trunk/program/src/rrd_info.c, + trunk/program/src/rrd_restore.c: Generate a random cur_row for + each RRA during create/restore operations. This effectively + randomizes the block crossings among RRDs created around the same + time. Previously, RRDs that were created/restored en masse would + cross block boundaries simultaneously, which is sub-optimal. Also, + this patch enables the user to see the RRA's cur_row pointer via + rrdinfo. This was useful during debugging. -- kevin brintnall + kbrint qwest.net + 2008-02-17 10:09 oetiker * rrdtool-1.2-release: prepare for the release of rrdtool-1.2.27 diff --git a/Makefile.in b/Makefile.in index 0fd1890..3de3307 100644 --- a/Makefile.in +++ b/Makefile.in @@ -106,6 +106,7 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -128,6 +129,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -163,6 +165,7 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/aclocal.m4 b/aclocal.m4 index 8401174..9a98a39 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -13,7 +13,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL +# serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -101,7 +101,6 @@ AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl - AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR @@ -176,7 +175,7 @@ test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= @@ -203,6 +202,8 @@ file_magic*) ;; esac +_LT_REQUIRED_DARWIN_CHECKS + AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) @@ -263,8 +264,9 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* @@ -276,13 +278,85 @@ $rm conftest* # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` -$rm conftest* +$rm -r conftest* ])# _LT_LINKER_BOILERPLATE +# _LT_REQUIRED_DARWIN_CHECKS +# -------------------------- +# Check for some things on darwin +AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + echo "int foo(void){return 1;}" > conftest.c + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib ${wl}-single_module conftest.c + if test -f libconftest.dylib; then + lt_cv_apple_cc_single_mod=yes + rm -rf libconftest.dylib* + fi + rm conftest.c + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[0123]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil="~$DSYMUTIL \$lib || :" + else + _lt_dsymutil= + fi + ;; + esac +]) # _LT_AC_SYS_LIBPATH_AIX # ---------------------- @@ -293,12 +367,20 @@ $rm conftest* # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi],[]) +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX @@ -529,13 +611,17 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; @@ -552,6 +638,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ;; *64-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; @@ -592,7 +681,11 @@ sparc*-*solaris*) *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; esac ;; esac @@ -623,7 +716,7 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -664,11 +757,12 @@ fi # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -684,7 +778,7 @@ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], $2=yes fi fi - $rm conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) @@ -782,24 +876,27 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl fi ;; *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi ;; esac ]) @@ -952,7 +1049,7 @@ else AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], @@ -960,7 +1057,7 @@ else [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) @@ -1026,7 +1123,8 @@ fi # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no @@ -1034,7 +1132,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -1174,6 +1272,7 @@ else darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" + old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -1191,7 +1290,8 @@ fi # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker characteristics]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= @@ -1205,20 +1305,58 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" +m4_if($1,[],[ if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi +fi]) need_lib_prefix=unknown hardcode_into_libs=no @@ -1236,7 +1374,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -1375,12 +1513,8 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -1434,7 +1568,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -1497,7 +1631,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -1568,7 +1702,7 @@ linux* | k*bsd*-gnu) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -1674,6 +1808,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -1769,6 +1907,13 @@ esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no +AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], +[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], +[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" @@ -1779,7 +1924,8 @@ fi # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_ARG_WITH([tags], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) @@ -2040,7 +2186,7 @@ m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], # AC_PATH_TOOL_PREFIX # ------------------- -# find a file program which can recognise shared library +# find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) @@ -2103,7 +2249,7 @@ fi # AC_PATH_MAGIC # ------------- -# find a file program which can recognise a shared library +# find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -2250,7 +2396,7 @@ esac # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -[AC_CACHE_CHECK([how to recognise dependent libraries], +[AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= @@ -2267,7 +2413,7 @@ lt_cv_deplibs_check_method='unknown' # whether `pass_all' will *always* work, you probably want this one. case $host_os in -aix4* | aix5*) +aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; @@ -2289,9 +2435,15 @@ cygwin*) mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi ;; darwin* | rhapsody*) @@ -2336,7 +2488,7 @@ hpux10.20* | hpux11*) esac ;; -interix3*) +interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; @@ -2386,6 +2538,10 @@ osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + solaris*) lt_cv_deplibs_check_method=pass_all ;; @@ -2438,7 +2594,7 @@ AC_DEFUN([AC_PROG_NM], lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do @@ -2654,10 +2810,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' +lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER @@ -2693,7 +2849,7 @@ aix3*) fi ;; -aix4* | aix5*) +aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi @@ -2750,6 +2906,7 @@ _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= +_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp @@ -2759,10 +2916,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -2859,7 +3016,7 @@ case $host_os in # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; - aix4* | aix5*) + aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. @@ -2872,7 +3029,7 @@ case $host_os in # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) @@ -2908,7 +3065,7 @@ case $host_os in strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -3018,59 +3175,31 @@ case $host_os in fi ;; darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no + _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + if test "$GXX" = yes ; then output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -3153,9 +3282,7 @@ case $host_os in _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - ;; + hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; @@ -3223,7 +3350,7 @@ case $host_os in ;; esac ;; - interix3*) + interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -3315,7 +3442,7 @@ case $host_os in _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - pgCC*) + pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' @@ -3343,6 +3470,29 @@ case $host_os in # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; esac ;; lynxos*) @@ -3381,16 +3531,20 @@ case $host_os in _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi - output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in @@ -3552,15 +3706,10 @@ case $host_os in case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes @@ -3607,6 +3756,12 @@ case $host_os in fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac fi ;; esac @@ -3722,7 +3877,8 @@ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], +[AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each @@ -3847,10 +4003,15 @@ fi $rm -f confest.$objext +_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + # PORTME: override above test on systems where it is broken ifelse([$1],[CXX], [case $host_os in -interix3*) +interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_AC_TAGVAR(predep_objects,$1)= @@ -3858,19 +4019,51 @@ interix3*) _LT_AC_TAGVAR(postdeps,$1)= ;; +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + solaris*) case $cc_basename in CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. - _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi ;; esac ;; esac ]) - case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac @@ -3913,10 +4106,17 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" +lt_simple_compile_test_code="\ + subroutine t + return + end +" # Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" +lt_simple_link_test_code="\ + program t + end +" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -3948,7 +4148,7 @@ aix3*) postinstall_cmds='$RANLIB $lib' fi ;; -aix4* | aix5*) +aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi @@ -3995,10 +4195,10 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" +lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4051,7 +4251,7 @@ objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" @@ -4125,6 +4325,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ @@ -4140,6 +4341,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do @@ -4186,7 +4388,7 @@ ifelse([$1], [], # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: @@ -4423,6 +4625,10 @@ predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) @@ -4511,7 +4717,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) @@ -4594,6 +4800,7 @@ fi # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. @@ -4771,7 +4978,7 @@ EOF echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi - rm -f conftest* conftst* + rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then @@ -4820,13 +5027,16 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -4837,7 +5047,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; - interix3*) + interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -4863,7 +5073,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) esac else case $host_os in - aix4* | aix5*) + aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor @@ -4959,7 +5169,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - pgCC*) + pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' @@ -4973,6 +5183,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac ;; esac ;; @@ -5093,14 +5311,17 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) @@ -5109,7 +5330,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; - interix3*) + interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -5167,10 +5388,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + m4_if([$1], [GCJ], [], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) @@ -5219,6 +5441,22 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; esac ;; @@ -5228,6 +5466,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC]) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -5287,7 +5529,7 @@ AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; @@ -5311,7 +5553,7 @@ esac # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) @@ -5322,11 +5564,12 @@ AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in - aix4* | aix5*) + aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then @@ -5339,7 +5582,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_AC_TAGVAR(link_all_deplibs, $1)=no @@ -5348,6 +5591,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac + _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= @@ -5378,12 +5622,14 @@ ifelse([$1],[CXX],[ # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. - _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) @@ -5433,7 +5679,7 @@ ifelse([$1],[CXX],[ # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -5481,7 +5727,7 @@ EOF _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -5499,7 +5745,7 @@ EOF fi ;; - interix3*) + interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -5514,7 +5760,7 @@ EOF _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux* | k*bsd*-gnu) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -5532,13 +5778,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi _LT_AC_TAGVAR(link_all_deplibs, $1)=no else @@ -5579,7 +5834,7 @@ EOF sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -5644,7 +5899,7 @@ _LT_EOF fi ;; - aix4* | aix5*) + aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. @@ -5664,7 +5919,7 @@ _LT_EOF # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes @@ -5698,7 +5953,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -5791,7 +6046,7 @@ _LT_EOF # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; @@ -5824,19 +6079,18 @@ _LT_EOF _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -5998,24 +6252,28 @@ _LT_EOF ;; openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; @@ -6074,17 +6332,16 @@ _LT_EOF case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -6141,7 +6398,7 @@ _LT_EOF fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6216,7 +6473,7 @@ x|xyes) # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest @@ -6319,6 +6576,30 @@ AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) + +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. + +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE + +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P + # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # @@ -6339,12 +6620,13 @@ do test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -6377,6 +6659,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do done ]) SED=$lt_cv_path_SED +AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) diff --git a/bindings/Makefile.in b/bindings/Makefile.in index ce62cd1..2f6b1e1 100644 --- a/bindings/Makefile.in +++ b/bindings/Makefile.in @@ -92,6 +92,7 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -114,6 +115,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -149,6 +151,7 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/bindings/perl-piped/RRDp.pm b/bindings/perl-piped/RRDp.pm index bc95a12..e39cbfa 100644 --- a/bindings/perl-piped/RRDp.pm +++ b/bindings/perl-piped/RRDp.pm @@ -120,7 +120,7 @@ sub cmd (@); sub end (); sub read (); -$VERSION=1.2027; +$VERSION=1.2028; sub start ($){ croak "rrdtool is already running" diff --git a/bindings/perl-shared/RRDs.pm b/bindings/perl-shared/RRDs.pm index 44b4d8c..f543c5b 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.2027; +$VERSION=1.2028; bootstrap RRDs $VERSION; diff --git a/bindings/python/rrdtoolmodule.c b/bindings/python/rrdtoolmodule.c index 6f5b36c..1fe4c0c 100644 --- a/bindings/python/rrdtoolmodule.c +++ b/bindings/python/rrdtoolmodule.c @@ -42,6 +42,7 @@ static const char *__version__ = "$Revision: 1.14 $"; #include "Python.h" #include "rrd.h" #include "rrd_extra.h" +#include "rrd_rpncalc.h" static PyObject *ErrorObject; extern int optind; @@ -174,7 +175,7 @@ PyRRD_fetch(PyObject UNUSED(*self), PyObject *args) unsigned long i, j, row; rrd_value_t dv; - row = ((end - start) / step + 1); + row = (end - start) / step; r = PyTuple_New(3); range_tup = PyTuple_New(3); @@ -445,9 +446,22 @@ PyRRD_info(PyObject UNUSED(*self), PyObject *args) DICTSET_STR(d, "ds_name", rrd.ds_def[i].ds_nam); DICTSET_STR(d, "type", rrd.ds_def[i].dst); - DICTSET_CNT(d, "minimal_heartbeat", rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt); - DICTSET_VAL(d, "min", rrd.ds_def[i].par[DS_min_val].u_val); - DICTSET_VAL(d, "max", rrd.ds_def[i].par[DS_max_val].u_val); + + switch(dst_conv(rrd.ds_def[i].dst)) { + case DST_CDEF: + { + char *buffer = NULL; + rpn_compact2str((rpn_cdefds_t *) &(rrd.ds_def[i].par[DS_cdef]), + rrd.ds_def, &buffer); + DICTSET_STR(d, "cdef", buffer); + } + break; + default: + DICTSET_CNT(d, "minimal_heartbeat", rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt); + DICTSET_VAL(d, "min", rrd.ds_def[i].par[DS_min_val].u_val); + DICTSET_VAL(d, "max", rrd.ds_def[i].par[DS_max_val].u_val); + break; + } DICTSET_STR(d, "last_ds", rrd.pdp_prep[i].last_ds); DICTSET_VAL(d, "value", rrd.pdp_prep[i].scratch[PDP_val].u_val); DICTSET_CNT(d, "unknown_sec", rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt); diff --git a/bindings/tcl/Makefile.in b/bindings/tcl/Makefile.in index 08fc714..51f101e 100644 --- a/bindings/tcl/Makefile.in +++ b/bindings/tcl/Makefile.in @@ -104,6 +104,7 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -126,6 +127,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -161,6 +163,7 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/config.guess b/config.guess index 396482d..278f9e9 100755 --- a/config.guess +++ b/config.guess @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2006-07-02' +timestamp='2007-07-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -329,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -780,7 +781,7 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -790,12 +791,15 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -950,6 +954,9 @@ EOF x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-gnu + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -1208,6 +1215,15 @@ EOF SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; diff --git a/config.sub b/config.sub index fab0aa3..1761d8b 100755 --- a/config.sub +++ b/config.sub @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2006-09-20' +timestamp='2007-06-28' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -245,12 +245,12 @@ case $basic_machine in | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ + | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -324,7 +324,7 @@ case $basic_machine in | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ @@ -475,8 +475,8 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -683,6 +683,10 @@ case $basic_machine in basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -925,6 +929,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -1219,7 +1226,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1414,6 +1421,9 @@ case $basic_machine in m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; diff --git a/configure b/configure index 105dfce..da7fd1f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for rrdtool 1.2.27. +# Generated by GNU Autoconf 2.61 for rrdtool 1.2.28. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -726,8 +726,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='rrdtool' PACKAGE_TARNAME='rrdtool' -PACKAGE_VERSION='1.2.27' -PACKAGE_STRING='rrdtool 1.2.27' +PACKAGE_VERSION='1.2.28' +PACKAGE_STRING='rrdtool 1.2.28' PACKAGE_BUGREPORT='' ac_default_prefix=/usr/local/rrdtool-$PACKAGE_VERSION @@ -857,12 +857,15 @@ CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP +SED GREP EGREP LN_S ECHO AR RANLIB +DSYMUTIL +NMEDIT CXX CXXFLAGS ac_ct_CXX @@ -1453,7 +1456,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.2.27 to adapt to many kinds of systems. +\`configure' configures rrdtool 1.2.28 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1524,7 +1527,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rrdtool 1.2.27:";; + short | recursive ) echo "Configuration of rrdtool 1.2.28:";; esac cat <<\_ACEOF @@ -1660,7 +1663,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rrdtool configure 1.2.27 +rrdtool configure 1.2.28 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1674,7 +1677,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.2.27, which was +It was created by rrdtool $as_me 1.2.28, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2027,7 +2030,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -NUMVERS=1.2027 +NUMVERS=1.2028 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2472,7 +2475,7 @@ fi # Define the identity of the package. PACKAGE='rrdtool' - VERSION='1.2.27' + VERSION='1.2.28' cat >>confdefs.h <<_ACEOF @@ -4119,12 +4122,13 @@ do test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -4159,6 +4163,7 @@ done fi SED=$lt_cv_path_SED + { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } @@ -4520,8 +4525,8 @@ else echo "${ECHO_T}no, using $LN_S" >&6; } fi -{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4540,7 +4545,7 @@ lt_cv_deplibs_check_method='unknown' # whether `pass_all' will *always* work, you probably want this one. case $host_os in -aix4* | aix5*) +aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; @@ -4562,9 +4567,15 @@ cygwin*) mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi ;; darwin* | rhapsody*) @@ -4609,7 +4620,7 @@ hpux10.20* | hpux11*) esac ;; -interix3*) +interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; @@ -4659,6 +4670,10 @@ osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + solaris*) lt_cv_deplibs_check_method=pass_all ;; @@ -4746,7 +4761,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4749 "configure"' > conftest.$ac_ext + echo '#line 4764 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4781,7 +4796,8 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -4792,6 +4808,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) case `/usr/bin/file conftest.o` in *32-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; @@ -4808,6 +4827,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) ;; *64-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; @@ -4911,7 +4933,11 @@ sparc*-*solaris*) *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; esac ;; esac @@ -6279,7 +6305,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! - # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } @@ -6366,24 +6391,27 @@ else fi ;; *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi ;; esac @@ -6400,6 +6428,7 @@ fi + # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } @@ -6590,7 +6619,7 @@ EOF echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f conftest* conftst* + rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then @@ -6988,7 +7017,7 @@ test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= @@ -7150,6 +7179,318 @@ fi ;; esac + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +echo "${ECHO_T}$DSYMUTIL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { echo "$as_me:$LINENO: result: $NMEDIT" >&5 +echo "${ECHO_T}$NMEDIT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + + { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + echo "int foo(void){return 1;}" > conftest.c + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib ${wl}-single_module conftest.c + if test -f libconftest.dylib; then + lt_cv_apple_cc_single_mod=yes + rm -rf libconftest.dylib* + fi + rm conftest.c + fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } + { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_ld_exported_symbols_list=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[0123]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil="~$DSYMUTIL \$lib || :" + else + _lt_dsymutil= + fi + ;; + esac + + enable_dlopen=no enable_win32_dll=no @@ -7188,10 +7529,10 @@ objext=o objext=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' +lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. @@ -7206,16 +7547,16 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` -$rm conftest* +$rm -r conftest* @@ -7232,7 +7573,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -7243,11 +7584,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:7246: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7587: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7250: \$? = $ac_status" >&5 + echo "$as_me:7591: \$? = $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. @@ -7298,13 +7639,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; @@ -7314,7 +7657,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic='-fno-common' ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -7372,7 +7715,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' @@ -7424,6 +7767,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; esac ;; @@ -7433,6 +7792,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static='-non_shared' ;; + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' @@ -7495,12 +7858,12 @@ if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_pic_works=no + lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -7511,27 +7874,27 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7514: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7877: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7518: \$? = $ac_status" >&5 + echo "$as_me:7881: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works=yes + lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } -if test x"$lt_prog_compiler_pic_works" = xyes; then +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; @@ -7558,13 +7921,13 @@ esac wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works+set}" = set; then +if test "${lt_cv_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_static_works=no + lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -7574,20 +7937,20 @@ else $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works=yes + lt_cv_prog_compiler_static_works=yes fi else - lt_prog_compiler_static_works=yes + lt_cv_prog_compiler_static_works=yes fi fi - $rm conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } -if test x"$lt_prog_compiler_static_works" = xyes; then +if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= @@ -7604,7 +7967,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -7615,11 +7978,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:7618: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7981: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7622: \$? = $ac_status" >&5 + echo "$as_me:7985: \$? = $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 @@ -7699,12 +8062,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. - exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do @@ -7763,7 +8127,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no @@ -7811,7 +8175,7 @@ EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -7829,7 +8193,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' @@ -7844,7 +8208,7 @@ EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux* | k*bsd*-gnu) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -7862,13 +8226,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs=no else @@ -7974,7 +8347,7 @@ _LT_EOF fi ;; - aix4* | aix5*) + aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. @@ -7994,7 +8367,7 @@ _LT_EOF # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes @@ -8028,7 +8401,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct=yes + : else # We have old collect2 hardcode_direct=unsupported @@ -8102,11 +8475,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -8161,11 +8541,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -8219,7 +8606,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; @@ -8252,19 +8639,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' - archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -8426,24 +8812,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; openbsd*) - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + ld_shlibs=no fi ;; @@ -8502,17 +8892,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; esac link_all_deplibs=yes ;; @@ -8569,7 +8958,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no @@ -8646,7 +9035,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -8704,17 +9093,55 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" + if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi @@ -8735,7 +9162,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -8874,12 +9301,8 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -8933,7 +9356,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -8996,7 +9419,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -9067,7 +9490,7 @@ linux* | k*bsd*-gnu) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -9173,6 +9596,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -9269,6 +9696,21 @@ esac echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi + +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi + +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" @@ -9326,6 +9768,7 @@ else darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" + old_striplib="$STRIP -S" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else @@ -9587,7 +10030,7 @@ fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } @@ -9863,7 +10306,7 @@ fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -9912,7 +10355,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&6;} # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: @@ -10490,6 +10935,10 @@ predeps=$lt_predeps # shared library. postdeps=$lt_postdeps +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path @@ -10578,7 +11027,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols @@ -10738,6 +11187,7 @@ postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= +compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp @@ -10747,10 +11197,10 @@ objext=o objext_CXX=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -10766,16 +11216,16 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` -$rm conftest* +$rm -r conftest* # Allow CC to be a program name with arguments. @@ -10982,7 +11432,7 @@ case $host_os in # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; - aix4* | aix5*) + aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. @@ -10995,7 +11445,7 @@ case $host_os in # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) @@ -11031,7 +11481,7 @@ case $host_os in strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct_CXX=yes + : else # We have old collect2 hardcode_direct_CXX=unsupported @@ -11105,11 +11555,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -11165,11 +11622,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -11239,59 +11703,31 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + if test "$GXX" = yes ; then output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -11374,9 +11810,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_separator_CXX=: case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - ;; + hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; @@ -11444,7 +11878,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac ;; - interix3*) + interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' @@ -11536,7 +11970,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; - pgCC*) + pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' @@ -11564,6 +11998,29 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; esac ;; lynxos*) @@ -11602,16 +12059,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_CXX=no ;; openbsd*) - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + ld_shlibs_CXX=no fi - output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in @@ -11773,15 +12234,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes @@ -11828,6 +12284,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac fi ;; esac @@ -11915,7 +12377,6 @@ test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" - cat > conftest.$ac_ext <&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + solaris*) case $cc_basename in CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. - postdeps_CXX='-lCstd -lCrun' + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi ;; esac ;; esac - case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac @@ -12070,12 +12568,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) @@ -12087,7 +12587,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -12113,7 +12613,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac else case $host_os in - aix4* | aix5*) + aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor @@ -12209,7 +12709,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; - pgCC*) + pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' @@ -12223,6 +12723,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_CXX='-non_shared' ;; *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac ;; esac ;; @@ -12332,12 +12840,12 @@ if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_pic_works_CXX=no + lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -12348,27 +12856,27 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12351: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12859: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12355: \$? = $ac_status" >&5 + echo "$as_me:12863: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_CXX=yes + lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } -if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; @@ -12395,13 +12903,13 @@ esac wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then +if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_static_works_CXX=no + lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -12411,20 +12919,20 @@ else $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_CXX=yes + lt_cv_prog_compiler_static_works_CXX=yes fi else - lt_prog_compiler_static_works_CXX=yes + lt_cv_prog_compiler_static_works_CXX=yes fi fi - $rm conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= @@ -12441,7 +12949,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -12452,11 +12960,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:12455: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12963: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12459: \$? = $ac_status" >&5 + echo "$as_me:12967: \$? = $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 @@ -12509,7 +13017,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in - aix4* | aix5*) + aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then @@ -12522,7 +13030,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no @@ -12531,6 +13039,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } @@ -12556,7 +13065,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -12614,20 +13123,7 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi + need_lib_prefix=unknown hardcode_into_libs=no @@ -12645,7 +13141,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -12784,12 +13280,7 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -12843,7 +13334,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -12906,7 +13397,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -12977,7 +13468,7 @@ linux* | k*bsd*-gnu) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -13083,6 +13574,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -13179,6 +13674,21 @@ esac echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi + +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi + +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" @@ -13262,6 +13772,7 @@ if test -f "$ltmain"; then predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ + compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ @@ -13277,6 +13788,7 @@ if test -f "$ltmain"; then module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ + fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do @@ -13509,6 +14021,10 @@ predeps=$lt_predeps_CXX # shared library. postdeps=$lt_postdeps_CXX +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX @@ -13597,7 +14113,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_CXX" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX @@ -13688,10 +14204,17 @@ objext=o objext_F77=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" +lt_simple_compile_test_code="\ + subroutine t + return + end +" # Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" +lt_simple_link_test_code="\ + program t + end +" # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -13707,16 +14230,16 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` -$rm conftest* +$rm -r conftest* # Allow CC to be a program name with arguments. @@ -13754,7 +14277,7 @@ aix3*) postinstall_cmds='$RANLIB $lib' fi ;; -aix4* | aix5*) +aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi @@ -13800,13 +14323,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; @@ -13816,7 +14341,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_F77='-fno-common' ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -13874,7 +14399,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' @@ -13926,6 +14451,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; esac ;; @@ -13935,6 +14476,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_F77='-non_shared' ;; + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' @@ -13997,12 +14542,12 @@ if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_pic_works_F77=no + lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -14013,27 +14558,27 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14016: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14561: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14020: \$? = $ac_status" >&5 + echo "$as_me:14565: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_F77=yes + lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; } -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then +if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; @@ -14060,13 +14605,13 @@ esac wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_F77+set}" = set; then +if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_static_works_F77=no + lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -14076,20 +14621,20 @@ else $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_F77=yes + lt_cv_prog_compiler_static_works_F77=yes fi else - lt_prog_compiler_static_works_F77=yes + lt_cv_prog_compiler_static_works_F77=yes fi fi - $rm conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; } -if test x"$lt_prog_compiler_static_works_F77" = xyes; then +if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= @@ -14106,7 +14651,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -14117,11 +14662,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:14120: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14665: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14124: \$? = $ac_status" >&5 + echo "$as_me:14669: \$? = $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 @@ -14201,12 +14746,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. - exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do @@ -14265,7 +14811,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no @@ -14313,7 +14859,7 @@ EOF allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -14331,7 +14877,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' @@ -14346,7 +14892,7 @@ EOF archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux* | k*bsd*-gnu) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -14364,13 +14910,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_F77=no else @@ -14476,7 +15031,7 @@ _LT_EOF fi ;; - aix4* | aix5*) + aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. @@ -14496,7 +15051,7 @@ _LT_EOF # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes @@ -14530,7 +15085,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct_F77=yes + : else # We have old collect2 hardcode_direct_F77=unsupported @@ -14594,11 +15149,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -14643,11 +15205,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -14701,7 +15270,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; @@ -14734,19 +15303,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -14908,24 +15476,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; openbsd*) - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' + if test -f /usr/libexec/ld.so; then + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac + ld_shlibs_F77=no fi ;; @@ -14984,17 +15556,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; esac link_all_deplibs_F77=yes ;; @@ -15051,7 +15622,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no @@ -15128,7 +15699,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -15186,20 +15757,7 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi + need_lib_prefix=unknown hardcode_into_libs=no @@ -15217,7 +15775,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -15356,12 +15914,7 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -15415,7 +15968,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -15478,7 +16031,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -15549,7 +16102,7 @@ linux* | k*bsd*-gnu) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -15655,6 +16208,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -15751,6 +16308,21 @@ esac echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi + +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi + +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" @@ -15834,6 +16406,7 @@ if test -f "$ltmain"; then predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ + compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ @@ -15849,6 +16422,7 @@ if test -f "$ltmain"; then module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ + fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do @@ -16081,6 +16655,10 @@ predeps=$lt_predeps_F77 # shared library. postdeps=$lt_postdeps_F77 +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 @@ -16169,7 +16747,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_F77" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 @@ -16227,10 +16805,10 @@ objext=o objext_GCJ=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" +lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@ -16246,16 +16824,16 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` -$rm conftest* +$rm -r conftest* # Allow CC to be a program name with arguments. @@ -16293,7 +16871,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -16304,11 +16882,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:16307: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16885: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16311: \$? = $ac_status" >&5 + echo "$as_me:16889: \$? = $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. @@ -16359,14 +16937,16 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + ;; darwin* | rhapsody*) @@ -16375,7 +16955,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_pic_GCJ='-fno-common' ;; - interix3*) + interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -16433,10 +17013,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; hpux9* | hpux10* | hpux11*) @@ -16485,6 +17065,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; esac ;; @@ -16494,6 +17090,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } lt_prog_compiler_static_GCJ='-non_shared' ;; + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' @@ -16556,12 +17156,12 @@ if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_pic_works_GCJ=no + lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -16572,27 +17172,27 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16575: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17175: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16579: \$? = $ac_status" >&5 + echo "$as_me:17179: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_GCJ=yes + lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; } -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then +if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; @@ -16619,13 +17219,13 @@ esac wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then +if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_static_works_GCJ=no + lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -16635,20 +17235,20 @@ else $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_GCJ=yes + lt_cv_prog_compiler_static_works_GCJ=yes fi else - lt_prog_compiler_static_works_GCJ=yes + lt_cv_prog_compiler_static_works_GCJ=yes fi fi - $rm conftest* + $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; } -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then +if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= @@ -16665,7 +17265,7 @@ else mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -16676,11 +17276,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:16679: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17279: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16683: \$? = $ac_status" >&5 + echo "$as_me:17283: \$? = $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 @@ -16760,12 +17360,13 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. - exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do @@ -16824,7 +17425,7 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) + aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no @@ -16872,7 +17473,7 @@ EOF allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -16890,7 +17491,7 @@ EOF fi ;; - interix3*) + interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' @@ -16905,7 +17506,7 @@ EOF archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux* | k*bsd*-gnu) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -16923,13 +17524,22 @@ EOF ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_GCJ=no else @@ -17035,7 +17645,7 @@ _LT_EOF fi ;; - aix4* | aix5*) + aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. @@ -17055,7 +17665,7 @@ _LT_EOF # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes @@ -17089,7 +17699,7 @@ _LT_EOF strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - hardcode_direct_GCJ=yes + : else # We have old collect2 hardcode_direct_GCJ=unsupported @@ -17163,11 +17773,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -17222,11 +17839,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -17280,7 +17904,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; @@ -17313,19 +17937,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -17487,24 +18110,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; openbsd*) - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' + if test -f /usr/libexec/ld.so; then + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac + ld_shlibs_GCJ=no fi ;; @@ -17563,17 +18190,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; esac link_all_deplibs_GCJ=yes ;; @@ -17630,7 +18256,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no @@ -17707,7 +18333,7 @@ x|xyes) { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 @@ -17765,20 +18391,7 @@ shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi + need_lib_prefix=unknown hardcode_into_libs=no @@ -17796,7 +18409,7 @@ aix3*) soname_spec='${libname}${release}${shared_ext}$major' ;; -aix4* | aix5*) +aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -17935,12 +18548,7 @@ darwin* | rhapsody*) shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -17994,7 +18602,7 @@ freebsd* | dragonfly*) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -18057,7 +18665,7 @@ hpux9* | hpux10* | hpux11*) postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no @@ -18128,7 +18736,7 @@ linux* | k*bsd*-gnu) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -18234,6 +18842,10 @@ osf3* | osf4* | osf5*) sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -18330,6 +18942,21 @@ esac echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" +fi + +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" +fi + +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" @@ -18413,6 +19040,7 @@ if test -f "$ltmain"; then predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ + compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ @@ -18428,6 +19056,7 @@ if test -f "$ltmain"; then module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ + fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do @@ -18660,6 +19289,10 @@ predeps=$lt_predeps_GCJ # shared library. postdeps=$lt_postdeps_GCJ +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ @@ -18748,7 +19381,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_GCJ" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ @@ -18805,7 +19438,7 @@ objext=o objext_RC=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" @@ -18824,16 +19457,16 @@ compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` -$rm conftest* +$rm -r conftest* # Allow CC to be a program name with arguments. @@ -18893,6 +19526,7 @@ if test -f "$ltmain"; then predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ + compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ @@ -18908,6 +19542,7 @@ if test -f "$ltmain"; then module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ + fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do @@ -19140,6 +19775,10 @@ predeps=$lt_predeps_RC # shared library. postdeps=$lt_postdeps_RC +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC + # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC @@ -19228,7 +19867,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_RC" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC @@ -28088,7 +28727,7 @@ fi if test "${enable_ruby_site_install+set}" = set; then enableval=$enable_ruby_site_install; RUBY_MAKE_OPTIONS= else - RUBY_MAKE_OPTIONS="sitedir=$prefix/lib/ruby" + RUBY_MAKE_OPTIONS="sitedir="'$(DESTDIR)'"$prefix/lib/ruby" fi @@ -29036,7 +29675,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.2.27, which was +This file was extended by rrdtool $as_me 1.2.28, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -29089,7 +29728,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -rrdtool config.status 1.2.27 +rrdtool config.status 1.2.28 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -29372,13 +30011,13 @@ CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim +SED!$SED$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim -CXX!$CXX$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -29420,6 +30059,9 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +DSYMUTIL!$DSYMUTIL$ac_delim +NMEDIT!$NMEDIT$ac_delim +CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim @@ -29487,7 +30129,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 68; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.ac b/configure.ac index f238427..434b5ee 100644 --- a/configure.ac +++ b/configure.ac @@ -8,13 +8,13 @@ dnl Inspiration from http://autoconf-archive.cryp.to dnl tell automake the this script is for rrdtool dnl the official version number is dnl a.b.c -AC_INIT([rrdtool],[1.2.27]) +AC_INIT([rrdtool],[1.2.28]) dnl for testing a numberical version number comes handy dnl the released version are dnl a.bccc dnl the devl versions will be something like dnl a.b999yymmddhh -NUMVERS=1.2027 +NUMVERS=1.2028 AC_SUBST(NUMVERS) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE @@ -657,7 +657,7 @@ AC_ARG_ENABLE(ruby-site-install, together with rrdtool in $prefix/lib/ruby. You have to add $prefix/lib/ruby/$ruby_version/$sitearch to you $: variable for ruby to find the RRD.so file.], -[RUBY_MAKE_OPTIONS=],[RUBY_MAKE_OPTIONS="sitedir=$prefix/lib/ruby"]) +[RUBY_MAKE_OPTIONS=],[RUBY_MAKE_OPTIONS="sitedir="'$(DESTDIR)'"$prefix/lib/ruby"]) AC_ARG_WITH(ruby-options, diff --git a/doc/Makefile.in b/doc/Makefile.in index 180d4bc..b600eb5 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -96,6 +96,7 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -118,6 +119,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -153,6 +155,7 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/doc/RRDp.html b/doc/RRDp.html index a9185aa..56cd79e 100644 --- a/doc/RRDp.html +++ b/doc/RRDp.html @@ -51,26 +51,23 @@ data, RRDp::read will return an undefined variable.

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

-
use RRDp +
use RRDp

Load the RRDp::pipe module.

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

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

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

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

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

read RRDtool's response to your command. Note that the $answer variable will @@ -80,41 +77,33 @@ and we don't want to copy this around in memory. So when you want to access the contents of $answer you have to use $$answer which dereferences the variable.

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

terminates RRDtool and returns RRDtool's status ...

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

these variables will contain totals of the user time, system time and real time as seen by RRDtool. User time is the time RRDtool is running, System time is the time spend in system calls and real time is the total time RRDtool has been running.

-
-

The difference between user + system and real is the time spent waiting for things like the hard disk and new input from the perl script.

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

If you set the variable $RRDp::error_mode to the value 'catch' before you run RRDp::read a potential ERROR message will not cause the program to abort but will be returned in this variable. If no error occurs the variable will be empty.

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

diff --git a/doc/bin_dec_hex.1 b/doc/bin_dec_hex.1 index f09d6e2..512e758 100644 --- a/doc/bin_dec_hex.1 +++ b/doc/bin_dec_hex.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "BIN_DEC_HEX 1" -.TH BIN_DEC_HEX 1 "2008-02-17" "1.2.27" "rrdtool" +.TH BIN_DEC_HEX 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" bin_dec_hex \- How to use binary, decimal, and hexadecimal notation. .SH "DESCRIPTION" @@ -412,8 +412,8 @@ The other method builds ub the number from the right. Let's try 41'029 again. Divide by 16 and do not use fractions (only whole numbers). .PP .Vb 4 -\& 41'029 / 16 is 2'564 with a remainder of 5. Write down 5. -\& 2'564 / 16 is 160 with a remainder of 4. Write the 4 before the 5. +\& 41\(aq029 / 16 is 2\(aq564 with a remainder of 5. Write down 5. +\& 2\(aq564 / 16 is 160 with a remainder of 4. Write the 4 before the 5. \& 160 / 16 is 10 with no remainder. Prepend 45 with 0. \& 10 / 16 is below one. End here and prepend 0xA. End up with 0xA045. .Ve diff --git a/doc/bin_dec_hex.txt b/doc/bin_dec_hex.txt index 8b86f19..c78f911 100644 --- a/doc/bin_dec_hex.txt +++ b/doc/bin_dec_hex.txt @@ -371,4 +371,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 BIN_DEC_HEX(1) +1.2.28 2008-07-23 BIN_DEC_HEX(1) diff --git a/doc/cdeftutorial.1 b/doc/cdeftutorial.1 index 26cd3e9..0f35070 100644 --- a/doc/cdeftutorial.1 +++ b/doc/cdeftutorial.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "CDEFTUTORIAL 1" -.TH CDEFTUTORIAL 1 "2008-02-17" "1.2.27" "rrdtool" +.TH CDEFTUTORIAL 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" cdeftutorial \- Alex van den Bogaerdt's CDEF tutorial .SH "DESCRIPTION" @@ -404,12 +404,12 @@ every minute: .PP .Vb 7 \& counter value resulting rate -\& 10'000 -\& 10'060 1; (10'060\-10'000)/60 == 1 -\& 10'120 1; (10'120\-10'060)/60 == 1 -\& unknown unknown; you don't know the last value -\& 10'240 unknown; you don't know the previous value -\& 10'300 1; (10'300\-10'240)/60 == 1 +\& 10\(aq000 +\& 10\(aq060 1; (10\(aq060\-10\(aq000)/60 == 1 +\& 10\(aq120 1; (10\(aq120\-10\(aq060)/60 == 1 +\& unknown unknown; you don\(aqt know the last value +\& 10\(aq240 unknown; you don\(aqt know the previous value +\& 10\(aq300 1; (10\(aq300\-10\(aq240)/60 == 1 .Ve .PP If the \s-1CDP\s0 was to be calculated from the last five updates, it would get @@ -956,7 +956,7 @@ You may do some complex data filtering: \& CDEF:prev3=PREV(prev2) \& CDEF:median=prev1,prev2,prev3,+,+,3,/ \& LINE3:median#000077:filtered -\& LINE1:prev2#007700:'raw data' +\& LINE1:prev2#007700:\(aqraw data\(aq .Ve .PP .Vb 1 @@ -970,7 +970,7 @@ You may do some complex data filtering: \& CDEF:prevtime=PREV(time) \& CDEF:derivate=var,prev1,\-,time,prevtime,\-,/ \& LINE3:derivate#000077:derivate -\& LINE1:var#007700:'raw data' +\& LINE1:var#007700:\(aqraw data\(aq .Ve .SH "Out of ideas for now" .IX Header "Out of ideas for now" diff --git a/doc/cdeftutorial.txt b/doc/cdeftutorial.txt index 647b758..997a451 100644 --- a/doc/cdeftutorial.txt +++ b/doc/cdeftutorial.txt @@ -799,4 +799,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 CDEFTUTORIAL(1) +1.2.28 2008-07-23 CDEFTUTORIAL(1) diff --git a/doc/rpntutorial.1 b/doc/rpntutorial.1 index 83734a8..22ad7ae 100644 --- a/doc/rpntutorial.1 +++ b/doc/rpntutorial.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RPNTUTORIAL 1" -.TH RPNTUTORIAL 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RPNTUTORIAL 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rpntutorial \- Reading RRDtool RPN Expressions by Steve Rader .SH "DESCRIPTION" diff --git a/doc/rpntutorial.txt b/doc/rpntutorial.txt index f936d2d..5165b6f 100644 --- a/doc/rpntutorial.txt +++ b/doc/rpntutorial.txt @@ -187,4 +187,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RPNTUTORIAL(1) +1.2.28 2008-07-23 RPNTUTORIAL(1) diff --git a/doc/rrd-beginners.1 b/doc/rrd-beginners.1 index 5c67f83..93f891c 100644 --- a/doc/rrd-beginners.1 +++ b/doc/rrd-beginners.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRD-BEGINNERS 1" -.TH RRD-BEGINNERS 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRD-BEGINNERS 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrd\-beginners \- RRDtool Beginners' Guide .SH "SYNOPSIS" @@ -360,15 +360,15 @@ generation is done using Perl scripts. These scripts are shown below: \& a=0 \& while [ "$a" == 0 ]; do \& snmpwalk \-c public 192.168.1.250 hrSWRunPerfMem > snmp_reply -\& total_mem=`awk 'BEGIN {tot_mem=0} +\& total_mem=`awk \(aqBEGIN {tot_mem=0} \& { if ($NF == "KBytes") \& {tot_mem=tot_mem+$(NF\-1)} \& } -\& END {print tot_mem}' snmp_reply` +\& END {print tot_mem}\(aq snmp_reply` \& # I can use N as a replacement for the current time \& rrdtool update target.rrd N:$total_mem \& # sleep until the next 300 seconds are full -\& perl \-e 'sleep 300 \- time % 300' +\& perl \-e \(aqsleep 300 \- time % 300\(aq \& done # end of while loop .Ve .PP diff --git a/doc/rrd-beginners.txt b/doc/rrd-beginners.txt index 8c60eeb..d7172eb 100644 --- a/doc/rrd-beginners.txt +++ b/doc/rrd-beginners.txt @@ -318,4 +318,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRD-BEGINNERS(1) +1.2.28 2008-07-23 RRD-BEGINNERS(1) diff --git a/doc/rrdbuild.1 b/doc/rrdbuild.1 index 52b88b9..9aa549b 100644 --- a/doc/rrdbuild.1 +++ b/doc/rrdbuild.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDBUILD 1" -.TH RRDBUILD 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDBUILD 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdbuild \- Instructions for building RRDtool .SH "DESCRIPTION" @@ -157,14 +157,14 @@ Depending on the shell you are using, you can do either (bash,zsh): .PP .Vb 2 \& BUILD_DIR=/tmp/rrdbuild -\& INSTALL_DIR=/usr/local/rrdtool\-1.2.27 +\& INSTALL_DIR=/usr/local/rrdtool\-1.2.28 .Ve .PP Or if you run tcsh: .PP .Vb 2 \& set BUILD_DIR=/tmp/rrdbuild -\& set INSTALL_DIR=/usr/local/rrdtool\-1.2.27 +\& set INSTALL_DIR=/usr/local/rrdtool\-1.2.28 .Ve .PP If your \fI/tmp\fR is mounted with the option noexec (\s-1RHEL\s0 seems todo that) you have to choose @@ -183,9 +183,9 @@ pre\-installed. Note that these instructions assume that your copies of could be that they are installed as \fBgtar\fR and \fBgmake\fR on your system. .PP .Vb 4 -\& wget http://oss.oetiker.ch/rrdtool/pub/rrdtool\-1.2.27.tar.gz -\& tar zxf rrdtool\-1.2.27.tar.gz -\& cd rrdtool\-1.2.27 +\& wget http://oss.oetiker.ch/rrdtool/pub/rrdtool\-1.2.28.tar.gz +\& tar zxf rrdtool\-1.2.28.tar.gz +\& cd rrdtool\-1.2.28 \& ./configure \-\-prefix=$INSTALL_DIR && make && make install .Ve .PP @@ -322,7 +322,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.2.27 +\& cd $BUILD_DIR/rrdtool\-1.2.28 \& ./configure \-\-prefix=$INSTALL_DIR \-\-disable\-python \-\-disable\-tcl \& make clean \& make diff --git a/doc/rrdbuild.html b/doc/rrdbuild.html index 455b85d..f020a78 100644 --- a/doc/rrdbuild.html +++ b/doc/rrdbuild.html @@ -67,11 +67,11 @@ ones before you can build RRDtool.

Depending on the shell you are using, you can do either (bash,zsh):

  BUILD_DIR=/tmp/rrdbuild
- INSTALL_DIR=/usr/local/rrdtool-1.2.27
+ INSTALL_DIR=/usr/local/rrdtool-1.2.28

Or if you run tcsh:

  set BUILD_DIR=/tmp/rrdbuild
- set INSTALL_DIR=/usr/local/rrdtool-1.2.27
+ set INSTALL_DIR=/usr/local/rrdtool-1.2.28

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:

@@ -83,9 +83,9 @@ pre-installed. Note that these instructions assume that your copies of tar and make are actually GNU tar and GNU make respectively. It could be that they are installed as gtar and gmake on your system.

- wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.27.tar.gz
- tar zxf rrdtool-1.2.27.tar.gz
- cd rrdtool-1.2.27
+ wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.28.tar.gz
+ tar zxf rrdtool-1.2.28.tar.gz
+ cd rrdtool-1.2.28
  ./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. If you are on a @@ -115,7 +115,7 @@ Unfortunately compilers are not all alike. This has an effect on the CFLAGS you want to set. The examples below are for the popular GCC compiler suite. If you have an other compile you have to use the following settings:

-
Sun Forte +
Sun Forte
@@ -123,7 +123,7 @@ If you have an other compile you have to use the following settings:

-
Building zlib +
Building zlib
@@ -135,15 +135,13 @@ If you have an other compile you have to use the following settings:

make make install
-
Building libpng +
Building libpng

Libpng itself requires zlib to build, so we need to help a bit. If you already have a copy of zlib on your system (which is very likley) you can drop the settings of LDFLAGS and CPPFLAGS. Note that the backslash (\) at the end of line 4 means that line 4 and line 5 are on one line.

-
-
  cd $BUILD_DIR
  wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.10.tar.gz
@@ -154,8 +152,7 @@ the end of line 4 means that line 4 and line 5 are on one line.

make make install
- -
Building freetype +
Building freetype
@@ -167,16 +164,12 @@ the end of line 4 means that line 4 and line 5 are on one line.

./configure --disable-shared --prefix=$BUILD_DIR/lb make make install
-
-

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

-
-
  GNUMAKE=gmake EGREP=egrep
-
Building libart_lgpl +
Building libart_lgpl
@@ -216,7 +209,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.2.27
+ cd $BUILD_DIR/rrdtool-1.2.28
  ./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl
  make clean
  make
diff --git a/doc/rrdbuild.pod b/doc/rrdbuild.pod
index dd3e71e..43429ac 100644
--- a/doc/rrdbuild.pod
+++ b/doc/rrdbuild.pod
@@ -35,12 +35,12 @@ Once you have decided. Save the two locations into environment variables.
 Depending on the shell you are using, you can do either (bash,zsh):
 
  BUILD_DIR=/tmp/rrdbuild
- INSTALL_DIR=/usr/local/rrdtool-1.2.27
+ INSTALL_DIR=/usr/local/rrdtool-1.2.28
 
 Or if you run tcsh:
 
  set BUILD_DIR=/tmp/rrdbuild
- set INSTALL_DIR=/usr/local/rrdtool-1.2.27
+ set INSTALL_DIR=/usr/local/rrdtool-1.2.28
 
 If your F is mounted with the option noexec (RHEL seems todo that) you have to choose
 a different directory!
@@ -55,9 +55,9 @@ pre-installed. Note that these instructions assume that your copies of
 B and B are actually B and B respectively. It
 could be that they are installed as B and B on your system.
 
- wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.27.tar.gz
- tar zxf rrdtool-1.2.27.tar.gz
- cd rrdtool-1.2.27
+ wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.28.tar.gz
+ tar zxf rrdtool-1.2.28.tar.gz
+ cd rrdtool-1.2.28
  ./configure --prefix=$INSTALL_DIR && make && make install
 
 Ok, this was very optimistic. This try will probably have ended with
@@ -185,7 +185,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.2.27
+ cd $BUILD_DIR/rrdtool-1.2.28
  ./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl
  make clean
  make
diff --git a/doc/rrdbuild.txt b/doc/rrdbuild.txt
index d63f139..690e849 100644
--- a/doc/rrdbuild.txt
+++ b/doc/rrdbuild.txt
@@ -30,12 +30,12 @@ DDEESSCCRRIIPPTTIIOONN
        (bash,zsh):
 
         BUILD_DIR=/tmp/rrdbuild
-        INSTALL_DIR=/usr/local/rrdtool-1.2.27
+        INSTALL_DIR=/usr/local/rrdtool-1.2.28
 
        Or if you run tcsh:
 
         set BUILD_DIR=/tmp/rrdbuild
-        set INSTALL_DIR=/usr/local/rrdtool-1.2.27
+        set INSTALL_DIR=/usr/local/rrdtool-1.2.28
 
        If your _/_t_m_p is mounted with the option noexec (RHEL seems todo that)
        you have to choose a different directory!
@@ -50,9 +50,9 @@ DDEESSCCRRIIPPTTIIOONN
        ttaarr and mmaakkee are actually GGNNUU ttaarr and GGNNUU mmaakkee respectively. It could
        be that they are installed as ggttaarr and ggmmaakkee on your system.
 
-        wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.27.tar.gz
-        tar zxf rrdtool-1.2.27.tar.gz
-        cd rrdtool-1.2.27
+        wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.28.tar.gz
+        tar zxf rrdtool-1.2.28.tar.gz
+        cd rrdtool-1.2.28
         ./configure --prefix=$INSTALL_DIR && make && make install
 
        Ok, this was very optimistic. This try will probably have ended with
@@ -171,7 +171,7 @@ DDEESSCCRRIIPPTTIIOONN
        python and tcl setups that would prevent rrdtool from building if they
        are included in their current state.
 
-        cd $BUILD_DIR/rrdtool-1.2.27
+        cd $BUILD_DIR/rrdtool-1.2.28
         ./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl
         make clean
         make
@@ -190,4 +190,4 @@ AAUUTTHHOORR
 
 
 
-1.2.27                            2008-02-17                       RRDBUILD(1)
+1.2.28                            2008-07-23                       RRDBUILD(1)
diff --git a/doc/rrdcgi.1 b/doc/rrdcgi.1
index f4e67fb..aacfaea 100644
--- a/doc/rrdcgi.1
+++ b/doc/rrdcgi.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RRDCGI 1"
-.TH RRDCGI 1 "2008-02-17" "1.2.27" "rrdtool"
+.TH RRDCGI 1 "2008-07-23" "1.2.28" "rrdtool"
 .SH "NAME"
 rrdcgi \- Create web pages containing RRD graphs based on templates
 .SH "SYNOPSIS"
@@ -318,7 +318,7 @@ cgi-bins are seperate directories
 \& 

RRDCGI test Page

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

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

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

-
--filter +
--filter

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

-

Keywords

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

Inserts the CGI variable of the given name.

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

Inserts the CGI variable of the given name but quotes it, ready for use as an argument in another RRD:: tag. So even when there are spaces in the value of the CGI variable it will still be considered to be one argument.

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

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

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

Get the value of an environment variable.

-
-
  <RRD::GETENV REMOTE_USER>
-
-

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

- -
RRD::GOODFOR seconds +
RRD::GOODFOR seconds

Specify the number of seconds this page should remain valid. This will prompt the rrdcgi to output a Last-Modified, an Expire and if the number of seconds is negative a Refresh header.

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

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

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

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

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

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

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

Analog to SETENV but for local variables.

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

Analog to GETENV but for local variables.

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

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

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

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

-
-

Note that if you return : (colons) from your strftime format you may have to escape them using \ if the time is to be used as an argument to a GRAPH command.

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

This gets replaced by a strftime-formatted time using the format @@ -169,14 +147,11 @@ whether START or END is specified. Both start-spec a must be supplied as either could be relative to the other. This is intended to allow pretty titles on graphs with times that are easier for non RRDtool folks to figure out than ``-2weeks''.

-
-

Note that again, if you return : (colon) from your strftime format, you may have to escape them using \ if the time is to be used as an argument to a GRAPH command.

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

This tag creates the RRD graph defined by its argument and then is @@ -184,41 +159,30 @@ replaced by an appropriate <IMG ... > tag referring to the graph. The --lazy option in RRD graph can be used to make sure that graphs are only regenerated when they are out of date. The arguments to the RRD::GRAPH tag work as described in the rrdgraph manual page.

-
-

Use the --lazy option in your RRD::GRAPH tags, to reduce the load on your server. This option makes sure that graphs are only regenerated when the old ones are out of date.

-
-

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

-
-
  <IMG SRC="%s" WIDTH="%lu" HEIGHT="%lu">
-
-

Note that %s stands for the filename part of the graph generated, all directories given in the PNG file argument will get dropped.

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

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

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

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

-

diff --git a/doc/rrdcgi.txt b/doc/rrdcgi.txt index 604bbcc..13b2ff3 100644 --- a/doc/rrdcgi.txt +++ b/doc/rrdcgi.txt @@ -204,4 +204,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDCGI(1) +1.2.28 2008-07-23 RRDCGI(1) diff --git a/doc/rrdcreate.1 b/doc/rrdcreate.1 index f32da36..2b1941c 100644 --- a/doc/rrdcreate.1 +++ b/doc/rrdcreate.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDCREATE 1" -.TH RRDCREATE 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDCREATE 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdcreate \- Set up a new Round Robin Database .SH "SYNOPSIS" @@ -426,28 +426,24 @@ Here is an explanation by Don Baarda on the inner workings of RRDtool. It may help you to sort out why all this *UNKNOWN* data is popping up in your databases: .PP -RRDtool gets fed samples at arbitrary times. From these it builds Primary -Data Points (PDPs) at exact times on every \*(L"step\*(R" interval. The PDPs are -then accumulated into RRAs. +RRDtool gets fed samples/updates at arbitrary times. From these it builds Primary +Data Points (PDPs) on every \*(L"step\*(R" interval. The PDPs are +then accumulated into the RRAs. .PP The \*(L"heartbeat\*(R" defines the maximum acceptable interval between -samples. If the interval between samples is less than \*(L"heartbeat\*(R", +samples/updates. If the interval between samples is less than \*(L"heartbeat\*(R", then an average rate is calculated and applied for that interval. If the interval between samples is longer than \*(L"heartbeat\*(R", then that entire interval is considered \*(L"unknown\*(R". Note that there are other things that can make a sample interval \*(L"unknown\*(R", such as the rate -exceeding limits, or even an \*(L"unknown\*(R" input sample. +exceeding limits, or a sample that was explicitly marked as unknown. .PP The known rates during a \s-1PDP\s0's \*(L"step\*(R" interval are used to calculate -an average rate for that \s-1PDP\s0. Also, if the total \*(L"unknown\*(R" time during -the \*(L"step\*(R" interval exceeds the \*(L"heartbeat\*(R", the entire \s-1PDP\s0 is marked +an average rate for that \s-1PDP\s0. If the total \*(L"unknown\*(R" time accounts for +more than \fBhalf\fR the \*(L"step\*(R", the entire \s-1PDP\s0 is marked as \*(L"unknown\*(R". This means that a mixture of known and \*(L"unknown\*(R" sample -times in a single \s-1PDP\s0 \*(L"step\*(R" may or may not add up to enough \*(L"unknown\*(R" -time to exceed \*(L"heartbeat\*(R" and hence mark the whole \s-1PDP\s0 \*(L"unknown\*(R". So -\&\*(L"heartbeat\*(R" is not only the maximum acceptable interval between -samples, but also the maximum acceptable amount of \*(L"unknown\*(R" time per -\&\s-1PDP\s0 (obviously this is only significant if you have \*(L"heartbeat\*(R" less -than \*(L"step\*(R"). +times in a single \s-1PDP\s0 \*(L"step\*(R" may or may not add up to enough \*(L"known\*(R" +time to warrent for a known \s-1PDP\s0. .PP The \*(L"heartbeat\*(R" can be short (unusual) or long (typical) relative to the \*(L"step\*(R" interval between PDPs. A short \*(L"heartbeat\*(R" means you @@ -480,7 +476,7 @@ same average rate. \fI\-\- Don Baarda \fR \& u|15|/ "swt" expired \& u|16| \& |17|\-\-\-\-* sample4, restart "hb", create "pdp" for step1 = -\& |18| / = unknown due to 10 "u" labled secs > "hb" +\& |18| / = unknown due to 10 "u" labled secs > 0.5 * step \& |19| / \& |20| / \& |21|\-\-\-\-* sample5, restart "hb" diff --git a/doc/rrdcreate.html b/doc/rrdcreate.html index a331537..2d44c49 100644 --- a/doc/rrdcreate.html +++ b/doc/rrdcreate.html @@ -50,74 +50,55 @@ Database (RRD) files. The file is created at its final, full size and filled with *UNKNOWN* data.

-
filename +
filename

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

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

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

-
-

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

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

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

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

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

-
-

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

-
-

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

-
-

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

-
-

For COMPUTE data sources, the format is:

-
-

DS:ds-name:COMPUTE:rpn-expression

-
-

In order to decide which data source type to use, review the definitions that follow. Also consult the section on ``HOW TO MEASURE'' for further insight.

-
-
GAUGE +
GAUGE

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

- -
COUNTER +
COUNTER

is for continuous incrementing counters like the ifInOctets counter in @@ -128,8 +109,7 @@ rate. When the counter overflows, RRDtool checks if the overflow happened at the 32bit or 64bit border and acts accordingly by adding an appropriate value to the result.

- -
DERIVE +
DERIVE

will store the derivative of the line going from the last to the @@ -138,22 +118,14 @@ example, to measure the rate of people entering or leaving a room. Internally, derive works exactly like COUNTER but without overflow checks. So if your counter does not reset at 32 or 64 bit you might want to use DERIVE and combine it with a MIN value of 0.

-
-

NOTE on COUNTER vs DERIVE

-
-

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

-
-

If you cannot tolerate ever mistaking the occasional counter reset for a legitimate counter wrap, and would prefer ``Unknowns'' for all legitimate counter wraps and resets, always use DERIVE with min=0. Otherwise, using COUNTER with a suitable max will return correct values for all legitimate counter wraps, mark some counter resets as ``Unknown'', but can mistake some counter resets for a legitimate counter wrap.

-
-

For a 5 minute step and 32-bit counter, the probability of mistaking a counter reset for a legitimate wrap is arguably about 0.8% per 1Mbps of maximum bandwidth. Note that this equates to 80% for 100Mbps interfaces, so @@ -162,8 +134,7 @@ probably preferable. If you are using a 64bit counter, just about any max setting will eliminate the possibility of mistaking a reset for a counter wrap.

- -
ABSOLUTE +
ABSOLUTE

is for counters which get reset upon reading. This is used for fast counters @@ -172,8 +143,7 @@ after every read to make sure you have a maximum time available before the next overflow. Another usage is for things you count like number of messages since the last update.

- -
COMPUTE +
COMPUTE

is for storing the result of a formula applied to other data sources @@ -185,7 +155,6 @@ of the COMPUTE data source (that is the rpn-expression is only applied to generate PDPs). In database software, such data sets are referred to as ``virtual'' or ``computed'' columns.

-

heartbeat defines the maximum number of seconds that may pass between two updates of this data source before the value of the @@ -209,42 +178,30 @@ the RPN expression, the COMPUTE data source may only refer to the names of data source listed previously in the create command. This is similar to the restriction that CDEFs must refer only to DEFs and CDEFs previously defined in the same graph command.

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

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

-
-

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

-
-

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

-
-

RRA:AVERAGE | MIN | MAX | LAST:xff:steps:rows

-
-

xff The xfiles factor defines what part of a consolidation interval may be made up from *UNKNOWN* data while the consolidated value is still regarded as known. It is given as the ratio of allowed *UNKNOWN* PDPs to the number of PDPs in the interval. Thus, it ranges from 0 to 1 (exclusive).

-
-

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

-
-

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

-

@@ -377,26 +334,22 @@ default value is 9.

Here is an explanation by Don Baarda on the inner workings of RRDtool. It may help you to sort out why all this *UNKNOWN* data is popping up in your databases:

-

RRDtool gets fed samples at arbitrary times. From these it builds Primary -Data Points (PDPs) at exact times on every ``step'' interval. The PDPs are -then accumulated into RRAs.

+

RRDtool gets fed samples/updates at arbitrary times. From these it builds Primary +Data Points (PDPs) on every ``step'' interval. The PDPs are +then accumulated into the RRAs.

The ``heartbeat'' defines the maximum acceptable interval between -samples. If the interval between samples is less than ``heartbeat'', +samples/updates. If the interval between samples is less than ``heartbeat'', then an average rate is calculated and applied for that interval. If the interval between samples is longer than ``heartbeat'', then that entire interval is considered ``unknown''. Note that there are other things that can make a sample interval ``unknown'', such as the rate -exceeding limits, or even an ``unknown'' input sample.

+exceeding limits, or a sample that was explicitly marked as unknown.

The known rates during a PDP's ``step'' interval are used to calculate -an average rate for that PDP. Also, if the total ``unknown'' time during -the ``step'' interval exceeds the ``heartbeat'', the entire PDP is marked +an average rate for that PDP. If the total ``unknown'' time accounts for +more than half the ``step'', the entire PDP is marked as ``unknown''. This means that a mixture of known and ``unknown'' sample -times in a single PDP ``step'' may or may not add up to enough ``unknown'' -time to exceed ``heartbeat'' and hence mark the whole PDP ``unknown''. So -``heartbeat'' is not only the maximum acceptable interval between -samples, but also the maximum acceptable amount of ``unknown'' time per -PDP (obviously this is only significant if you have ``heartbeat'' less -than ``step'').

+times in a single PDP ``step'' may or may not add up to enough ``known'' +time to warrent for a known PDP.

The ``heartbeat'' can be short (unusual) or long (typical) relative to the ``step'' interval between PDPs. A short ``heartbeat'' means you require multiple samples per PDP, and if you don't get them mark the @@ -427,7 +380,7 @@ same average rate. -- Don Baarda <HOW TO MEASURE

Here are a few hints on how to measure:

-
Temperature +
Temperature

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

- -
Mail Messages +
Mail Messages

Assume you have a method to count the number of messages transported by @@ -473,8 +425,7 @@ from RRDtool for the day in question and multiply this number with the number of seconds in a day. Because all math is run with Doubles, the precision should be acceptable.

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

RRDtool stores rates in amount/second for COUNTER, DERIVE and ABSOLUTE @@ -489,7 +440,6 @@ that draws bar-plots, where the delta-time is clear on the plot for each point (such that when you read the graph you see for example GB on the y axis, days on the x axis and one bar for each day).

-

diff --git a/doc/rrdcreate.pod b/doc/rrdcreate.pod index a47acbb..b5f4556 100644 --- a/doc/rrdcreate.pod +++ b/doc/rrdcreate.pod @@ -343,28 +343,24 @@ Here is an explanation by Don Baarda on the inner workings of RRDtool. It may help you to sort out why all this *UNKNOWN* data is popping up in your databases: -RRDtool gets fed samples at arbitrary times. From these it builds Primary -Data Points (PDPs) at exact times on every "step" interval. The PDPs are -then accumulated into RRAs. +RRDtool gets fed samples/updates at arbitrary times. From these it builds Primary +Data Points (PDPs) on every "step" interval. The PDPs are +then accumulated into the RRAs. The "heartbeat" defines the maximum acceptable interval between -samples. If the interval between samples is less than "heartbeat", +samples/updates. If the interval between samples is less than "heartbeat", then an average rate is calculated and applied for that interval. If the interval between samples is longer than "heartbeat", then that entire interval is considered "unknown". Note that there are other things that can make a sample interval "unknown", such as the rate -exceeding limits, or even an "unknown" input sample. +exceeding limits, or a sample that was explicitly marked as unknown. The known rates during a PDP's "step" interval are used to calculate -an average rate for that PDP. Also, if the total "unknown" time during -the "step" interval exceeds the "heartbeat", the entire PDP is marked +an average rate for that PDP. If the total "unknown" time accounts for +more than B the "step", the entire PDP is marked as "unknown". This means that a mixture of known and "unknown" sample -times in a single PDP "step" may or may not add up to enough "unknown" -time to exceed "heartbeat" and hence mark the whole PDP "unknown". So -"heartbeat" is not only the maximum acceptable interval between -samples, but also the maximum acceptable amount of "unknown" time per -PDP (obviously this is only significant if you have "heartbeat" less -than "step"). +times in a single PDP "step" may or may not add up to enough "known" +time to warrent for a known PDP. The "heartbeat" can be short (unusual) or long (typical) relative to the "step" interval between PDPs. A short "heartbeat" means you @@ -396,7 +392,7 @@ same average rate. I<-- Don Baarda Edon.baarda@baesystems.comE> u|15|/ "swt" expired u|16| |17|----* sample4, restart "hb", create "pdp" for step1 = - |18| / = unknown due to 10 "u" labled secs > "hb" + |18| / = unknown due to 10 "u" labled secs > 0.5 * step |19| / |20| / |21|----* sample5, restart "hb" diff --git a/doc/rrdcreate.txt b/doc/rrdcreate.txt index eaa70c1..9704826 100644 --- a/doc/rrdcreate.txt +++ b/doc/rrdcreate.txt @@ -303,38 +303,34 @@ TThhee HHEEAARRTTBBEEAATT aanndd tthhee SSTTEEPP It may help you to sort out why all this *UNKNOWN* data is popping up in your databases: - RRDtool gets fed samples at arbitrary times. From these it builds Pri- - mary Data Points (PDPs) at exact times on every "step" interval. The - PDPs are then accumulated into RRAs. + RRDtool gets fed samples/updates at arbitrary times. From these it + builds Primary Data Points (PDPs) on every "step" interval. The PDPs + are then accumulated into the RRAs. The "heartbeat" defines the maximum acceptable interval between sam- - ples. If the interval between samples is less than "heartbeat", then an - average rate is calculated and applied for that interval. If the inter- - val between samples is longer than "heartbeat", then that entire inter- - val is considered "unknown". Note that there are other things that can - make a sample interval "unknown", such as the rate exceeding limits, or - even an "unknown" input sample. + ples/updates. If the interval between samples is less than "heartbeat", + then an average rate is calculated and applied for that interval. If + the interval between samples is longer than "heartbeat", then that + entire interval is considered "unknown". Note that there are other + things that can make a sample interval "unknown", such as the rate + exceeding limits, or a sample that was explicitly marked as unknown. The known rates during a PDP's "step" interval are used to calculate an - average rate for that PDP. Also, if the total "unknown" time during the - "step" interval exceeds the "heartbeat", the entire PDP is marked as - "unknown". This means that a mixture of known and "unknown" sample - times in a single PDP "step" may or may not add up to enough "unknown" - time to exceed "heartbeat" and hence mark the whole PDP "unknown". So - "heartbeat" is not only the maximum acceptable interval between sam- - ples, but also the maximum acceptable amount of "unknown" time per PDP - (obviously this is only significant if you have "heartbeat" less than - "step"). + average rate for that PDP. If the total "unknown" time accounts for + more than hhaallff the "step", the entire PDP is marked as "unknown". This + means that a mixture of known and "unknown" sample times in a single + PDP "step" may or may not add up to enough "known" time to warrent for + a known PDP. The "heartbeat" can be short (unusual) or long (typical) relative to the "step" interval between PDPs. A short "heartbeat" means you require multiple samples per PDP, and if you don't get them mark the PDP unknown. A long heartbeat can span multiple "steps", which means it is acceptable to have multiple PDPs calculated from a single sample. An - extreme example of this might be a "step" of 5 minutes and a "heart- - beat" of one day, in which case a single sample every day will result - in all the PDPs for that entire day period being set to the same aver- - age rate. _-_- _D_o_n _B_a_a_r_d_a _<_d_o_n_._b_a_a_r_d_a_@_b_a_e_s_y_s_t_e_m_s_._c_o_m_> + extreme example of this might be a "step" of 5 minutes and a + "heartbeat" of one day, in which case a single sample every day will + result in all the PDPs for that entire day period being set to the same + average rate. _-_- _D_o_n _B_a_a_r_d_a _<_d_o_n_._b_a_a_r_d_a_@_b_a_e_s_y_s_t_e_m_s_._c_o_m_> time| axis| @@ -356,7 +352,7 @@ TThhee HHEEAARRTTBBEEAATT aanndd tthhee SSTTEEPP u|15|/ "swt" expired u|16| |17|----* sample4, restart "hb", create "pdp" for step1 = - |18| / = unknown due to 10 "u" labled secs > "hb" + |18| / = unknown due to 10 "u" labled secs > 0.5 * step |19| / |20| / |21|----* sample5, restart "hb" @@ -498,4 +494,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDCREATE(1) +1.2.28 2008-07-23 RRDCREATE(1) diff --git a/doc/rrddump.1 b/doc/rrddump.1 index 3df1a45..14df7e9 100644 --- a/doc/rrddump.1 +++ b/doc/rrddump.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDDUMP 1" -.TH RRDDUMP 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDDUMP 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrddump \- dump the contents of an RRD to XML format .SH "SYNOPSIS" diff --git a/doc/rrddump.html b/doc/rrddump.html index 2283122..89749f4 100644 --- a/doc/rrddump.html +++ b/doc/rrddump.html @@ -46,19 +46,17 @@ files from one computer architecture to another as well to manipulate the contents of an RRD file in a somewhat more convenient manner.

-
filename.rrd +
filename.rrd

The name of the RRD you want to dump.

- -
filename.xml +
filename.xml

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

-

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

-
filename +
filename

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

- -
CF +
CF

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

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

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

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

start of the time series. A time in seconds since epoch (1970-01-01) @@ -84,15 +81,13 @@ is required. Negative numbers are relative to the current time. By default, one day worth of data will be fetched. See also AT-STYLE TIME SPECIFICATION section for a detailed explanation on ways to specify the start time.

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

the end of the time series in seconds since epoch. See also AT-STYLE TIME SPECIFICATION section for a detailed explanation of how to specify the end time.

-

diff --git a/doc/rrdfetch.txt b/doc/rrdfetch.txt index e2af859..49e0b2a 100644 --- a/doc/rrdfetch.txt +++ b/doc/rrdfetch.txt @@ -228,4 +228,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDFETCH(1) +1.2.28 2008-07-23 RRDFETCH(1) diff --git a/doc/rrdfirst.1 b/doc/rrdfirst.1 index 57e7c1a..88b777e 100644 --- a/doc/rrdfirst.1 +++ b/doc/rrdfirst.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDFIRST 1" -.TH RRDFIRST 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDFIRST 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdfirst \- Return the date of the first data sample in an RRA within an RRD .SH "SYNOPSIS" diff --git a/doc/rrdfirst.html b/doc/rrdfirst.html index 819171a..78f2f83 100644 --- a/doc/rrdfirst.html +++ b/doc/rrdfirst.html @@ -39,20 +39,18 @@

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

-
filename +
filename

The name of the RRD that contains the data.

- -
--rraindex number +
--rraindex number

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

-

diff --git a/doc/rrdfirst.txt b/doc/rrdfirst.txt index 684e8bc..346e04e 100644 --- a/doc/rrdfirst.txt +++ b/doc/rrdfirst.txt @@ -26,4 +26,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDFIRST(1) +1.2.28 2008-07-23 RRDFIRST(1) diff --git a/doc/rrdgraph.1 b/doc/rrdgraph.1 index 674a370..a03358c 100644 --- a/doc/rrdgraph.1 +++ b/doc/rrdgraph.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH 1" -.TH RRDGRAPH 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDGRAPH 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdgraph \- Round Robin Database tool grapher functions .SH "SYNOPSIS" @@ -300,7 +300,7 @@ and labels every 4 hours. The labels are placed under the major grid lines as they specify exactly that time. .Sp .Vb 1 -\& \-\-x\-grid HOUR:8:DAY:1:DAY:1:0:%A +\& \-\-x\-grid HOUR:8:DAY:1:DAY:1:86400:%A .Ve .Sp This places grid lines every 8 hours, major grid lines and labels @@ -379,7 +379,7 @@ suitable for including the graph into a web page, the command line would look like this: .Sp .Vb 1 -\& \-\-imginfo 'Demo' +\& \-\-imginfo \(aqDemo\(aq .Ve .Sp [\fB\-c\fR|\fB\-\-color\fR \fI\s-1COLORTAG\s0\fR#\fIrrggbb\fR[\fIaa\fR]] diff --git a/doc/rrdgraph.html b/doc/rrdgraph.html index e7a9505..7553944 100644 --- a/doc/rrdgraph.html +++ b/doc/rrdgraph.html @@ -79,25 +79,20 @@ graph it (or print it). This ends the rrdtool graph sequence.<

OPTIONS

-
filename +
filename

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

-
-

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

- -
Time range +
Time range

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

-
-

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

- -
Labels +
Labels

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

-
-

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

- -
Size +
Size

[-w|--width pixels] [-h|--height pixels] [-j|--only-graph]

-
-

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

-
-

If you specify the --only-graph option and set the height < 32 pixels you will get a tiny graph image (thumbnail) to use as an icon for use in an overview, for example. All labeling will be stripped off the graph.

- -
Limits +
Limits

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

-
-

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

-
-

[-A|--alt-autoscale]

-
-

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

-
-

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

-
-

Where --alt-autoscale will modify both the absolute maximum AND minimum values, this option will only affect the minimum value. The maximum value, if not defined on the command line, will be 0. This option can be useful when graphing router traffic when the WAN line uses compression, and thus the throughput may be higher than the WAN line speed.

-
-

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

-
-

Where --alt-autoscale will modify both the absolute maximum AND minimum values, this option will only affect the maximum value. The minimum value, if not defined on the command line, will be 0. This option can be useful when graphing router traffic when the WAN line uses compression, and thus the throughput may be higher than the WAN line speed.

-
-

[-N|--no-gridfit]

-
-

In order to avoid anti-aliasing effects gridlines are placed on integer pixel values. This is by default done by extending the scale so that gridlines happens to be spaced using an @@ -199,22 +167,15 @@ This might extend the scale too much for some logarithmic scales and for linear scales where --alt-autoscale is needed. Using --no-gridfit disables modification of the scale.

- -
X-Grid +
X-Grid

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

-
-

[-x|--x-grid none]

-
-

The x-axis label is quite complex to configure. If you don't have very special needs it is probably best to rely on the autoconfiguration to get this right. You can specify the string none to suppress the grid and labels altogether.

-
-

The grid is defined by specifying a certain amount of time in the ?TM positions. You can choose from SECOND, MINUTE, HOUR, DAY, WEEK, MONTH or YEAR. Then you define how many of these should @@ -226,66 +187,39 @@ where each label will be placed. If it is zero, the label will be placed right under the corresponding line (useful for hours, dates etcetera). If you specify a number of seconds here the label is centered on this interval (useful for Monday, January etcetera).

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

This places grid lines every 10 minutes, major grid lines every hour, and labels every 4 hours. The labels are placed under the major grid lines as they specify exactly that time.

-
-
- --x-grid HOUR:8:DAY:1:DAY:1:0:%A
-
-
+ --x-grid HOUR:8:DAY:1:DAY:1:86400:%A

This places grid lines every 8 hours, major grid lines and labels each day. The labels are placed exactly between two major grid lines as they specify the complete day and not just midnight.

- -
Y-Grid +
Y-Grid

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

-
-

[-y|--y-grid none]

-
-

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

-
-

If you have set --y-grid to 'none' not only the labels get supressed, also the space reserved for the labels is removed. You can still add space manually if you use the --units-length command to explicitly reserve space.

-
-

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

-
-

Place the Y grid dynamically based on the graph's Y range. The algorithm ensures that you always have a grid, that there are enough but not too many grid lines, and that the grid is metric. That is the grid lines are placed every 1, 2, 5 or 10 units. This parameter will also ensure that you get enough decimals displayed even if your graph goes from 69.998 to 70.001. (contributed by Sasha Mikheev).

-
-

[-o|--logarithmic]

-
-

Logarithmic y-axis scaling.

-
-

[-X|--units-exponent value]

-
-

This sets the 10**exponent scaling of the y-axis values. Normally, values will be scaled to the appropriate units (k, M, etc.). However, you may wish to display units always in k (Kilo, 10e3) even if the data @@ -295,58 +229,35 @@ the exponent on the units you wish to use. For example, use 3 to display the y-axis values in k (Kilo, 10e3, thousands), use -6 to display the y-axis values in u (Micro, 10e-6, millionths). Use a value of 0 to prevent any scaling of the y-axis values.

-
-

This option is very effective at confusing the heck out of the default rrdtool autoscaler and grid painter. If rrdtool detects that it is not successful in labeling the graph under the given circumstances, it will switch to the more robust --alt-y-grid mode.

-
-

[-L|--units-length value]

-
-

How many digits should rrdtool assume the y-axis labels to be? You may have to use this option to make enough space once you start fideling with the y-axis labeling.

-
-

[--units=si]

-
-

With this option y-axis values on logarithmic graphs will be scaled to the appropriate units (k, M, etc.) instead of using exponential notation. Note that for linear graphs, SI notation is used by default.

- -
Miscellaneous +
Miscellaneous

[-z|--lazy]

-
-

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

-
-

[-f|--imginfo printfstr]

-
-

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

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

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

-
-

Override the default colors for the standard elements of the graph. The COLORTAG is one of BACK background, CANVAS for the background of the actual graph, SHADEA for the left and top border, SHADEB for the @@ -358,145 +269,76 @@ specifying its rgb color component (00 is off, FF is maximum) of red, green and blue. Optionally you may add another hexadecimal number specifying the transparency (FF is solid). You may set this option several times to alter multiple defaults.

-
-

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

-
-

[--zoom factor]

-
-

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

-
-

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

-
-

This lets you customize which font to use for the various text elements on the RRD graphs. DEFAULT sets the default value for all elements, TITLE for the title, AXIS for the axis labels, UNIT for the vertical unit label, LEGEND for the graph legend.

-
-

Use Times for the title: --font TITLE:13:/usr/lib/fonts/times.ttf

-
-

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

-
-

If you specify the size 0 then you can modify just the font without touching the size. This is especially usefull for altering the default font without resetting the default fontsizes: --font DEFAULT:0:/usr/lib/fonts/times.ttf.

-
-

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

-
-

Truetype fonts are only supported for PNG output. See below.

-
-

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

-
-

This lets you customize the strength of the font smoothing, or disable it entirely using mono. By default, normal font smoothing is used.

-
-

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

-
-

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

-
-

[-E|--slope-mode]

-
-

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

-
-

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

-
-

Image format for the generated graph. For the vector formats you can choose among the standard Postscript fonts Courier-Bold, Courier-BoldOblique, Courier-Oblique, Courier, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, Helvetica, Symbol, Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.

-
-

[-i|--interlaced]

-
-

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

-
-

[-g|--no-legend]

-
-

Suppress generation of the legend; only render the graph.

-
-

[-F|--force-rules-legend]

-
-

Force the generation of HRULE and VRULE legends even if those HRULE or VRULE will not be drawn because out of graph boundaries (mimics behaviour of pre 1.0.42 versions).

-
-

[-T|--tabwidth value]

-
-

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

-
-

[-b|--base value]

-
-

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

-
-

[-W|--watermark string]

-
-

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

- -
Data and variables +
Data and variables

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

-
-

CDEF:vname=RPN expression

-
-

VDEF:vname=RPN expression

-
-

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

- -
Graph and print elements +
Graph and print elements

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

-

diff --git a/doc/rrdgraph.pod b/doc/rrdgraph.pod index 11b447e..c98ce9c 100644 --- a/doc/rrdgraph.pod +++ b/doc/rrdgraph.pod @@ -178,7 +178,7 @@ This places grid lines every 10 minutes, major grid lines every hour, and labels every 4 hours. The labels are placed under the major grid lines as they specify exactly that time. - --x-grid HOUR:8:DAY:1:DAY:1:0:%A + --x-grid HOUR:8:DAY:1:DAY:1:86400:%A This places grid lines every 8 hours, major grid lines and labels each day. The labels are placed exactly between two major grid lines diff --git a/doc/rrdgraph.txt b/doc/rrdgraph.txt index d1a493a..895dfc4 100644 --- a/doc/rrdgraph.txt +++ b/doc/rrdgraph.txt @@ -157,7 +157,7 @@ OOPPTTIIOONNSS hour, and labels every 4 hours. The labels are placed under the major grid lines as they specify exactly that time. - --x-grid HOUR:8:DAY:1:DAY:1:0:%A + --x-grid HOUR:8:DAY:1:DAY:1:86400:%A This places grid lines every 8 hours, major grid lines and labels each day. The labels are placed exactly between two major grid @@ -373,4 +373,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDGRAPH(1) +1.2.28 2008-07-23 RRDGRAPH(1) diff --git a/doc/rrdgraph_data.1 b/doc/rrdgraph_data.1 index 5c427f6..258c24e 100644 --- a/doc/rrdgraph_data.1 +++ b/doc/rrdgraph_data.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_DATA 1" -.TH RRDGRAPH_DATA 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDGRAPH_DATA 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdgraph_data \- preparing data for graphing in rrdtool graph .SH "SYNOPSIS" diff --git a/doc/rrdgraph_data.txt b/doc/rrdgraph_data.txt index e6f6923..60130be 100644 --- a/doc/rrdgraph_data.txt +++ b/doc/rrdgraph_data.txt @@ -104,4 +104,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDGRAPH_DATA(1) +1.2.28 2008-07-23 RRDGRAPH_DATA(1) diff --git a/doc/rrdgraph_examples.1 b/doc/rrdgraph_examples.1 index 80fd842..191d9e2 100644 --- a/doc/rrdgraph_examples.1 +++ b/doc/rrdgraph_examples.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_EXAMPLES 1" -.TH RRDGRAPH_EXAMPLES 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDGRAPH_EXAMPLES 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdgraph_examples \- Examples for rrdtool graph .SH "SYNOPSIS" diff --git a/doc/rrdgraph_examples.txt b/doc/rrdgraph_examples.txt index ca58ce7..afcb52f 100644 --- a/doc/rrdgraph_examples.txt +++ b/doc/rrdgraph_examples.txt @@ -128,4 +128,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDGRAPH_EXAMPLES(1) +1.2.28 2008-07-23 RRDGRAPH_EXAMPLES(1) diff --git a/doc/rrdgraph_graph.1 b/doc/rrdgraph_graph.1 index f7429f9..4a17480 100644 --- a/doc/rrdgraph_graph.1 +++ b/doc/rrdgraph_graph.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_GRAPH 1" -.TH RRDGRAPH_GRAPH 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDGRAPH_GRAPH 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdgraph_graph \- rrdtool graph command reference .SH "SYNOPSIS" diff --git a/doc/rrdgraph_graph.html b/doc/rrdgraph_graph.html index 78aae24..122a5b4 100644 --- a/doc/rrdgraph_graph.html +++ b/doc/rrdgraph_graph.html @@ -69,161 +69,94 @@ Similarly, no report is generated if you don't use print options.

PRINT

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

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

-
-

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

-
-

For printing values:

-
-

%% - just prints a literal '%' character

-
-

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

-
-

%#.#lf - prints numbers like 12345.6789, with optional field width and precision.

-
-

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

-
-

%S - is similar to %s. It does, however, use a previously defined magnitude unit. If there is no such unit yet, it tries to define one (just like %s) unless the value is zero, in which case the magnitude unit stays undefined. Thus, formatter strings using %S and no %s will all use the same magnitude unit except for zero values.

-
-

If you PRINT a VDEF value, you can also print the time associated with it by appending the string :strftime to the format. Note that rrdtool uses the strftime function of your OSs clibrary. This means that the conversion specifier may vary. Check the manual page if you are uncertain. The following is a list of conversion specifiers usually supported across the board.

-
-

%a - The abbreviated weekday name according to the current locale.

-
-

%A - The full weekday name according to the current locale.

-
-

%b - The abbreviated month name according to the current locale.

-
-

%B - The full month name according to the current locale.

-
-

%c - The preferred date and time representation for the current locale.

-
-

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

-
-

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

-
-

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

-
-

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

-
-

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

-
-

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

-
-

%p - Either `AM' or `PM' according to the given time value, or the corresponding strings for the current locale. Noon is treated as `pm' and midnight as `am'. Note that in many locales and `pm' notation is unsupported and in such cases %p will return an empty string.

-
-

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

-
-

%U - The week number of the current year as a decimal number, range 00 to 53, starting with the first Sunday as the first day of week 01. See also %V and %W.

-
-

%V - The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. See also %U and %W.

-
-

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

-
-

%W - The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01.

-
-

%x - The preferred date representation for the current locale without the time.

-
-

%X - The preferred time representation for the current locale without the date.

-
-

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

-
-

%Y - The year as a decimal number including the century.

-
-

%Z - The time zone or name or abbreviation.

-
-

%% - A literal `%' character.

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

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

-

GRAPH

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

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

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

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

- -
COMMENT:text +
COMMENT:text

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

- -
VRULE:time#color [:legend ] +
VRULE:time#color [:legend ]

Draw a vertical line at time. Its color is composed from three @@ -232,16 +165,14 @@ maximum) red, green and blue followed by an optional alpha. Optionally, a legend printed in the legend section. time may be a number or a variable from a VDEF. It is an error to use vnames from DEF or CDEF here.

- -
HRULE:value#color [ :legend ] +
HRULE:value#color [ :legend ]

Draw a horizontal line at value. HRULE acts much like LINE except that will have no effect on the scale of the graph. If a HRULE is outside the graphing area it will just not be visible.

- -
LINE[width]:value[#color][:[legend][:STACK]] +
LINE[width]:value[#color][:[legend][:STACK]]

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

-
-

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

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

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

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

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

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

Using this command RRDtool will graph the following elements @@ -286,13 +212,11 @@ week. Make sure to tell the viewer of your graph you did this ... As with the other graphing elements, you can specify a number or a variable here.

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

Deprecated. Use the STACK modifiers on the other commands.

-

Some notes on stacking

When stacking, an element is not placed above the X-axis but rather diff --git a/doc/rrdgraph_graph.txt b/doc/rrdgraph_graph.txt index 800dcca..268ec54 100644 --- a/doc/rrdgraph_graph.txt +++ b/doc/rrdgraph_graph.txt @@ -278,4 +278,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDGRAPH_GRAPH(1) +1.2.28 2008-07-23 RRDGRAPH_GRAPH(1) diff --git a/doc/rrdgraph_rpn.1 b/doc/rrdgraph_rpn.1 index a51f542..82ff6d0 100644 --- a/doc/rrdgraph_rpn.1 +++ b/doc/rrdgraph_rpn.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDGRAPH_RPN 1" -.TH RRDGRAPH_RPN 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDGRAPH_RPN 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdgraph_rpn \- About RPN Math in rrdtool graph .SH "SYNOPSIS" diff --git a/doc/rrdgraph_rpn.html b/doc/rrdgraph_rpn.html index a972313..959dcfd 100644 --- a/doc/rrdgraph_rpn.html +++ b/doc/rrdgraph_rpn.html @@ -70,160 +70,87 @@ would do a = b, 3, +, 5, * without the need for parentheses.


OPERATORS

-
Boolean operators +
Boolean operators

LT, LE, GT, GE, EQ, NE

-
-

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

-
-

UN, ISINF

-
-

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

-
-

IF

-
-

Pops three elements from the stack. If the element popped last is 0 (false), the value popped first is pushed back onto the stack, otherwise the value popped second is pushed back. This does, indeed, mean that any value other than 0 is considered to be true.

-
-

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

- -
Comparing values +
Comparing values

MIN, MAX

-
-

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

-
-

LIMIT

-
-

Pops two elements from the stack and uses them to define a range. Then it pops another element and if it falls inside the range, it is pushed back. If not, an unknown is pushed.

-
-

The range defined includes the two boundaries (so: a number equal to one of the boundaries will be pushed back). If any of the three numbers involved is either unknown or infinite this function will always return an unknown

-
-

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

- -
Arithmetics +
Arithmetics

+, -, *, /, %

-
-

Add, subtract, multiply, divide, modulo

-
-

SIN, COS, LOG, EXP, SQRT

-
-

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

-
-

ATAN

-
-

Arctangent (output in radians).

-
-

ATAN2

-
-

Arctangent of y,x components (output in radians). This pops one element from the stack, the x (cosine) component, and then a second, which is the y (sine) component. It then pushes the arctangent of their ratio, resolving the ambiguity between quadrants.

-
-

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

-
-

FLOOR, CEIL

-
-

Round down or up to the nearest integer.

-
-

DEG2RAD, RAD2DEG

-
-

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

-
-

ABS

-
-

Take the absolute value.

- -
Set Operations +
Set Operations

SORT, REV

-
-

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

-
-

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

-
-

AVG

-
-

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

-
-

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

-
-

TREND

-
-

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

-
-

Usage: CDEF:smoothed=x,1800,TREND

-
-

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

-
-
                  +---!---!---!---!---!---!---!---!--->
                                                      now
@@ -233,96 +160,58 @@ average is essentially computed as shown here:

<---------------> delay t2 <--------------->
-
-
      Value at sample (t0) will be the average between (t0-delay) and (t0)
      Value at sample (t1) will be the average between (t1-delay) and (t1)
      Value at sample (t2) will be the average between (t2-delay) and (t2)
- -
Special values +
Special values

UNKN

-
-

Pushes an unknown value on the stack

-
-

INF, NEGINF

-
-

Pushes a positive or negative infinite value on the stack. When such a value is graphed, it appears at the top or bottom of the graph, no matter what the actual value on the y-axis is.

-
-

PREV

-
-

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

-
-

PREV(vname)

-
-

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

-
-

COUNT

-
-

Pushes the number 1 if this is the first value of the data set, the number 2 if it is the second, and so on. This special value allows you to make calculations based on the position of the value within the data set. This function cannot be used in VDEF instructions.

- -
Time +
Time

Time inside RRDtool is measured in seconds since the epoch. The epoch is defined to be Thu Jan  1 00:00:00 UTC 1970.

-
-

NOW

-
-

Pushes the current time on the stack.

-
-

TIME

-
-

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

-
-

LTIME

-
-

Takes the time as defined by TIME, applies the time zone offset valid at that time including daylight saving time if your OS supports it, and pushes the result on the stack. There is an elaborate example in the examples section below on how to use this.

- -
Processing the stack directly +
Processing the stack directly

DUP, POP, EXC

-
-

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

-

@@ -330,40 +219,31 @@ top elements.

VARIABLES

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

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

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

-
-

Example: VDEF:avg=mydata,AVERAGE

- -
LAST, FIRST +
LAST, FIRST

Return the last/first value including its time. The time for FIRST is actually the start of the corresponding interval, whereas LAST returns the end of the corresponding interval.

-
-

Example: VDEF:first=mydata,FIRST

- -
TOTAL +
TOTAL

Returns the rate from each defined time slot multiplied with the step size. This can, for instance, return total bytes transfered when you have logged bytes per second. The time component returns the number of seconds.

-
-

Example: VDEF:total=mydata,TOTAL

- -
PERCENT +
PERCENT

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

-
-

Example: VDEF:perc95=mydata,95,PERCENT

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

Return the parameters for a Least Squares Line (y = mx +b) @@ -390,11 +267,8 @@ y-intercept (b), which happens also to be the first data point on the graph. LSLCORREL is the Correlation Coefficient (also know as Pearson's Product Moment Correlation Coefficient). It will range from 0 to +/-1 and represents the quality of fit for the approximation.

-
-

Example: VDEF:slope=mydata,LSLSLOPE

-

diff --git a/doc/rrdgraph_rpn.txt b/doc/rrdgraph_rpn.txt index 5f022a4..27879f4 100644 --- a/doc/rrdgraph_rpn.txt +++ b/doc/rrdgraph_rpn.txt @@ -284,4 +284,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDGRAPH_RPN(1) +1.2.28 2008-07-23 RRDGRAPH_RPN(1) diff --git a/doc/rrdinfo.1 b/doc/rrdinfo.1 index bab666f..590fd99 100644 --- a/doc/rrdinfo.1 +++ b/doc/rrdinfo.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDINFO 1" -.TH RRDINFO 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDINFO 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdinfo \- extract header information from an RRD .SH "SYNOPSIS" diff --git a/doc/rrdinfo.html b/doc/rrdinfo.html index 8490112..a333f33 100644 --- a/doc/rrdinfo.html +++ b/doc/rrdinfo.html @@ -77,12 +77,11 @@ data sources.

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

The name of the RRD you want to examine.

-

diff --git a/doc/rrdinfo.txt b/doc/rrdinfo.txt index e6a1731..ee7cf93 100644 --- a/doc/rrdinfo.txt +++ b/doc/rrdinfo.txt @@ -55,4 +55,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDINFO(1) +1.2.28 2008-07-23 RRDINFO(1) diff --git a/doc/rrdlast.1 b/doc/rrdlast.1 index 4119139..34e00d5 100644 --- a/doc/rrdlast.1 +++ b/doc/rrdlast.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDLAST 1" -.TH RRDLAST 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDLAST 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdlast \- Return the date of the last data sample in an RRD .SH "SYNOPSIS" diff --git a/doc/rrdlast.html b/doc/rrdlast.html index 0406125..d1feb13 100644 --- a/doc/rrdlast.html +++ b/doc/rrdlast.html @@ -39,12 +39,11 @@

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

-
filename +
filename

The name of the RRD that contains the data.

-

diff --git a/doc/rrdlast.txt b/doc/rrdlast.txt index 14e28a3..3692d18 100644 --- a/doc/rrdlast.txt +++ b/doc/rrdlast.txt @@ -20,4 +20,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDLAST(1) +1.2.28 2008-07-23 RRDLAST(1) diff --git a/doc/rrdlastupdate.1 b/doc/rrdlastupdate.1 index 4d1a19d..d205b47 100644 --- a/doc/rrdlastupdate.1 +++ b/doc/rrdlastupdate.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDLASTUPDATE 1" -.TH RRDLASTUPDATE 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDLASTUPDATE 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdlastupdate \- Return the most recent update to an RRD .SH "SYNOPSIS" diff --git a/doc/rrdlastupdate.html b/doc/rrdlastupdate.html index 05ff422..05fccf2 100644 --- a/doc/rrdlastupdate.html +++ b/doc/rrdlastupdate.html @@ -39,12 +39,11 @@

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

-
filename +
filename

The name of the RRD that contains the data.

-

diff --git a/doc/rrdlastupdate.txt b/doc/rrdlastupdate.txt index 70b5e86..648aeb5 100644 --- a/doc/rrdlastupdate.txt +++ b/doc/rrdlastupdate.txt @@ -20,4 +20,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDLASTUPDATE(1) +1.2.28 2008-07-23 RRDLASTUPDATE(1) diff --git a/doc/rrdresize.1 b/doc/rrdresize.1 index 2ad3df2..56c563b 100644 --- a/doc/rrdresize.1 +++ b/doc/rrdresize.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDRESIZE 1" -.TH RRDRESIZE 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDRESIZE 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdresize \- alters the size of an RRA and creates a new .rrd file .SH "SYNOPSIS" diff --git a/doc/rrdresize.html b/doc/rrdresize.html index 497044e..9303df2 100644 --- a/doc/rrdresize.html +++ b/doc/rrdresize.html @@ -40,38 +40,33 @@

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

-
filename +
filename

the name of the RRD you want to alter.

- -
rra-num +
rra-num

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

- -
GROW +
GROW

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

- -
SHRINK +
SHRINK

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

- -
rows +
rows

the number of rows you want to add or remove.

-

diff --git a/doc/rrdresize.txt b/doc/rrdresize.txt index 817090e..498fd4d 100644 --- a/doc/rrdresize.txt +++ b/doc/rrdresize.txt @@ -41,4 +41,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDRESIZE(1) +1.2.28 2008-07-23 RRDRESIZE(1) diff --git a/doc/rrdrestore.1 b/doc/rrdrestore.1 index fcd8455..a56c89e 100644 --- a/doc/rrdrestore.1 +++ b/doc/rrdrestore.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDRESTORE 1" -.TH RRDRESTORE 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDRESTORE 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdrestore \- Restore the contents of an RRD from its XML dump format .SH "SYNOPSIS" diff --git a/doc/rrdrestore.html b/doc/rrdrestore.html index 4f49fa5..142c29f 100644 --- a/doc/rrdrestore.html +++ b/doc/rrdrestore.html @@ -40,31 +40,27 @@

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

-
filename.xml +
filename.xml

The name of the XML file you want to restore.

- -
filename.rrd +
filename.rrd

The name of the RRD to restore.

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

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

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

Allows RRDtool to overwrite the destination RRD.

-

diff --git a/doc/rrdrestore.txt b/doc/rrdrestore.txt index 49abd76..800b819 100644 --- a/doc/rrdrestore.txt +++ b/doc/rrdrestore.txt @@ -30,4 +30,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDRESTORE(1) +1.2.28 2008-07-23 RRDRESTORE(1) diff --git a/doc/rrdthreads.1 b/doc/rrdthreads.1 index d3b496e..695a735 100644 --- a/doc/rrdthreads.1 +++ b/doc/rrdthreads.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDTHREADS 1" -.TH RRDTHREADS 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDTHREADS 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdthreads \- Provisions for linking the RRD library to use in multi\-threaded programs .SH "SYNOPSIS" diff --git a/doc/rrdthreads.html b/doc/rrdthreads.html index a20a111..c6211f9 100644 --- a/doc/rrdthreads.html +++ b/doc/rrdthreads.html @@ -110,6 +110,7 @@ instead, it provides a per-thread error message.

Many others (lookup documentation)

+
  • A header file named rrd_is_thread_safe.h is provided that works with the GNU C-preprocessor to ``poison'' some of the most diff --git a/doc/rrdthreads.txt b/doc/rrdthreads.txt index 86adb3a..21734ab 100644 --- a/doc/rrdthreads.txt +++ b/doc/rrdthreads.txt @@ -100,4 +100,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDTHREADS(1) +1.2.28 2008-07-23 RRDTHREADS(1) diff --git a/doc/rrdtool.1 b/doc/rrdtool.1 index 4d20cc8..cf0efe8 100644 --- a/doc/rrdtool.1 +++ b/doc/rrdtool.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDTOOL 1" -.TH RRDTOOL 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDTOOL 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdtool \- Round Robin Database Tool .SH "SYNOPSIS" diff --git a/doc/rrdtool.html b/doc/rrdtool.html index 2673b6b..a3cc6ac 100644 --- a/doc/rrdtool.html +++ b/doc/rrdtool.html @@ -76,95 +76,82 @@ saves a considerable amount of startup time when you plan to make for RRDtool which allow you to use it directly from perl, python, tcl, php, etc.

    -
    create +
    create

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

    -
  • -
    update +
    update

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

    - -
    updatev +
    updatev

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

    - -
    graph +
    graph

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

    - -
    dump +
    dump

    Dump the contents of an RRD in plain ASCII. In connection with restore you can use this to move an RRD from one computer architecture to another. Check the rrddump manpage.

    - -
    restore +
    restore

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

    - -
    fetch +
    fetch

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

    - -
    tune +
    tune

    Alter setup of an RRD. Check the rrdtune manpage.

    - -
    last +
    last

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

    - -
    info +
    info

    Get information about an RRD. Check the rrdinfo manpage.

    - -
    rrdresize +
    rrdresize

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

    - -
    xport +
    xport

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

    - -
    rrdcgi +
    rrdcgi

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

    -

    HOW DOES RRDTOOL WORK?

    -
    Data Acquisition +
    Data Acquisition

    When monitoring the state of a system, it is convenient to have the @@ -177,8 +164,7 @@ interpolated value to the log. The original value you have supplied is stored as well and is also taken into account when interpolating the next log entry.

    - -
    Consolidation +
    Consolidation

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

    - -
    Round Robin Archives +
    Round Robin Archives

    Data values of the same consolidation setup are stored into Round Robin Archives (RRA). This is a very efficient manner to store data for a certain amount of time, while using a known and constant amount of storage space.

    -
    -

    It works like this: If you want to store 1'000 values in 5 minute interval, RRDtool will allocate space for 1'000 data values and a header area. In the header it will store a pointer telling which slots @@ -215,22 +198,17 @@ manner. This automatically limits the history to the last 1'000 values single RRD, you can setup another one, for storing 750 data values at a 2 hour interval, for example, and thus keep a log for the last two months at a lower resolution.

    -
    -

    The use of RRAs guarantees that the RRD does not grow over time and that old data is automatically eliminated. By using the consolidation feature, you can still keep data for a very long time, while gradually reducing the resolution of the data along the time axis.

    -
    -

    Using different consolidation functions (CF) allows you to store exactly the type of information that actually interests you: the maximum one minute traffic on the LAN, the minimum temperature of your wine cellar, the total minutes of down time, etc.

    - -
    Unknown Data +
    Unknown Data

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

    - -
    Graphing +
    Graphing

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

    - -
    Aberrant Behavior Detection +
    Aberrant Behavior Detection

    by Jake Brutlag

    -
    -

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

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

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

      +

    diff --git a/doc/rrdtool.txt b/doc/rrdtool.txt index 3e986ac..b5cfeeb 100644 --- a/doc/rrdtool.txt +++ b/doc/rrdtool.txt @@ -273,4 +273,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDTOOL(1) +1.2.28 2008-07-23 RRDTOOL(1) diff --git a/doc/rrdtune.1 b/doc/rrdtune.1 index a961ee8..787d70c 100644 --- a/doc/rrdtune.1 +++ b/doc/rrdtune.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDTUNE 1" -.TH RRDTUNE 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDTUNE 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdtune \- Modify some basic properties of a Round Robin Database .SH "SYNOPSIS" diff --git a/doc/rrdtune.html b/doc/rrdtune.html index 59925ff..6c289df 100644 --- a/doc/rrdtune.html +++ b/doc/rrdtune.html @@ -64,46 +64,40 @@ the data source header in the RRD.

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

    -
    filename +
    filename

    The name of the RRD you want to tune.

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

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

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

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

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

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

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

    alter the type DST of a data source.

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

    rename a data source.

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

    Alter the deviation scaling factor for the upper bound of the @@ -114,8 +108,7 @@ CDEF argument to generate a graph with confidence bounds. The graph scale factor need not to agree with the value used internally by the FAILURES RRA.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    -
    -

    Due to the implementation of this option, there is an indirect impact on other data sources in the RRD. A smoothing algorithm is applied to SEASONAL and DEVSEASONAL values on a periodic basis. During bootstrap @@ -196,12 +180,9 @@ for all data sources in the file. This is unlikely to have serious consequences, unless the data being collected for the non-reset data sources is unusually volatile during the reinitialization period of the reset data source.

    -
    -

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

    -

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

    -
    updatev +
    updatev

    This alternate version of update takes the same arguments and @@ -57,14 +57,12 @@ RRA (consolidation function and PDPs per CDP), and data source (name). Note that depending on the arguments of the current and previous call to update, the list may have no entries or a large number of entries.

    - -
    filename +
    filename

    The name of the RRD you want to update.

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

    By default, the update function expects its data input in the order @@ -73,26 +71,19 @@ sources (i.e. if the third data source DST is COMPUTE, the thir input value will be mapped to the fourth data source in the RRD and so on). This is not very error resistant, as you might be sending the wrong data into an RRD.

    -
    -

    The template switch allows you to specify which data sources you are going to update and in which order. If the data sources specified in the template are not available in the RRD file, the update process will abort with an error message.

    -
    -

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

    -
    -

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

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

    The data used for updating the RRD was acquired at a certain @@ -105,21 +96,16 @@ specification with the '@' character instead of a ':'. Getting the timing right to the second is especially important when you are working with data-sources of type COUNTER, DERIVE or ABSOLUTE.

    -
    -

    The remaining elements of the argument are DS updates. The order of this list is the same as the order the data sources were defined in the RRA. If there is no data for a certain data-source, the letter U (e.g., N:0.1:U:1) can be specified.

    -
    -

    The format of the value acquired from the data source is dependent on the data source type chosen. Normally it will be numeric, but the data acquisition modules may impose their very own parsing of this parameter as long as the colon (:) remains the data source value separator.

    -

    diff --git a/doc/rrdupdate.txt b/doc/rrdupdate.txt index 582da4e..86fe5e4 100644 --- a/doc/rrdupdate.txt +++ b/doc/rrdupdate.txt @@ -91,4 +91,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDUPDATE(1) +1.2.28 2008-07-23 RRDUPDATE(1) diff --git a/doc/rrdxport.1 b/doc/rrdxport.1 index 276852a..fcb5e2d 100644 --- a/doc/rrdxport.1 +++ b/doc/rrdxport.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RRDXPORT 1" -.TH RRDXPORT 1 "2008-02-17" "1.2.27" "rrdtool" +.TH RRDXPORT 1 "2008-07-23" "1.2.28" "rrdtool" .SH "NAME" rrdxport \- Export data in XML format based on data from one or several RRD .SH "SYNOPSIS" diff --git a/doc/rrdxport.html b/doc/rrdxport.html index 105baff..02316c3 100644 --- a/doc/rrdxport.html +++ b/doc/rrdxport.html @@ -51,7 +51,7 @@ representation of the data stored in one or several RRDs. It can also extract numerical reports.

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

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

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

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

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

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

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

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

    See the rrdgraph manpage documentation.

    - -
    --enumds +
    --enumds

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

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

    See rrdgraph documentation.

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

    See rrdgraph documentation.

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

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

    -

    diff --git a/doc/rrdxport.txt b/doc/rrdxport.txt index b9f8d30..283201c 100644 --- a/doc/rrdxport.txt +++ b/doc/rrdxport.txt @@ -125,4 +125,4 @@ AAUUTTHHOORR -1.2.27 2008-02-17 RRDXPORT(1) +1.2.28 2008-07-23 RRDXPORT(1) diff --git a/examples/Makefile.am b/examples/Makefile.am index 9e7dc84..62516fd 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -11,6 +11,6 @@ examples_SCRIPTS = cgi-demo.cgi piped-demo.pl shared-demo.pl \ stripes.pl bigtops.pl minmax.pl 4charts.pl perftest.pl cgi-demo.cgi: cgi-demo.cgi.in $(top_builddir)/config.status - sed 's,@''exec_prefix@,$(exec_prefix),' cgi-demo.cgi.in > $@ + sed 's,@''exec_prefix@,$(exec_prefix),' @srcdir@/cgi-demo.cgi.in > $@ chmod a+x $@ diff --git a/examples/Makefile.in b/examples/Makefile.in index 40a8525..8052dc7 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -96,6 +96,7 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -118,6 +119,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -153,6 +155,7 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -427,7 +430,7 @@ uninstall-am: uninstall-examplesSCRIPTS uninstall-info-am cgi-demo.cgi: cgi-demo.cgi.in $(top_builddir)/config.status - sed 's,@''exec_prefix@,$(exec_prefix),' cgi-demo.cgi.in > $@ + sed 's,@''exec_prefix@,$(exec_prefix),' @srcdir@/cgi-demo.cgi.in > $@ chmod a+x $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/netware/Makefile b/netware/Makefile index e8d6a47..104e532 100644 --- a/netware/Makefile +++ b/netware/Makefile @@ -6,7 +6,7 @@ # DESCR = Round Robin Database Tool $(RRD_VERSION_STR) -COPYR = Copyright (c) 1997-2007 by Tobias Oetiker +COPYR = Copyright (c) 1997-2008 by Tobias Oetiker WWWURL = http://www.rrdtool.org/ MTSAFE = YES #SCREEN = $(DESCR) @@ -42,11 +42,11 @@ endif # All library code is statically linked to avoid problems with other lib NLMs. # Edit the path below to point to your libpng sources or set environment var. ifndef LIBPNG -LIBPNG = $(LIBBASE)/libpng-1.2.23 +LIBPNG = $(LIBBASE)/libpng-1.2.29 endif # Edit the path below to point to your freetype sources or set environment var. ifndef LIBFT2 -LIBFT2 = $(LIBBASE)/freetype-2.3.5 +LIBFT2 = $(LIBBASE)/freetype-2.3.7 endif # Edit the path below to point to your libart sources or set environment var. ifndef LIBART @@ -103,14 +103,14 @@ FIXNLMN = fixnlmname #-q # http://www.gknw.net/development/prgtools/awk.zip AWK = awk MV = mv -fv -ifndef ARCBIN + +ifeq ($(ARCEXT),7z) +ARCBIN = 7za a +else ARCBIN = zip -qzr9 ARCEXT = zip -#ARCBIN = 7za a -#ARCEXT = 7z endif - # must be equal to DEBUG or NDEBUG DB = NDEBUG # DB = DEBUG diff --git a/rrdtool.spec b/rrdtool.spec index 4db9ea9..4063935 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -7,7 +7,7 @@ Summary: Round Robin Database Tool to store and display time-series data Name: rrdtool -Version: 1.2.27 +Version: 1.2.28 Release: 5%{?dist} License: GPL Group: Applications/Databases diff --git a/src/Makefile.in b/src/Makefile.in index f3489df..5125979 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -169,6 +169,7 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -191,6 +192,7 @@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@ MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@ +NMEDIT = @NMEDIT@ NROFF = @NROFF@ NUMVERS = @NUMVERS@ OBJEXT = @OBJEXT@ @@ -229,6 +231,7 @@ RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@ RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@ RUBY = @RUBY@ RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ diff --git a/src/parsetime.c b/src/parsetime.c index 919dd50..74063b2 100644 --- a/src/parsetime.c +++ b/src/parsetime.c @@ -721,7 +721,7 @@ day(struct rrd_time_value *ptv) break; } - if (mon > 19700101 && mon < 24000101){ /*works between 1900 and 2400 */ + if (mon > 19700101 && mon < 24000101){ /*works between 1970 and 2400 */ char cmon[3],cmday[3],cyear[5]; strncpy(cyear,sc_token,4);cyear[4]='\0'; year = atol(cyear); @@ -798,7 +798,8 @@ parsetime(const char *tspec, struct rrd_time_value *ptv) ptv->type = ABSOLUTE_TIME; ptv->offset = 0; ptv->tm = *localtime(&now); - ptv->tm.tm_isdst = -1; /* mk time can figure this out for us ... */ + ptv->tm.tm_isdst = -1; /* by default lets mk time guess dst status ... */ + token(); switch (sc_tokid) { @@ -915,7 +916,6 @@ parsetime(const char *tspec, struct rrd_time_value *ptv) panic(e("unparsable trailing text: '...%s%s'", sc_token, sct)); } - ptv->tm.tm_isdst = -1; /* for mktime to guess DST status */ if( ptv->type == ABSOLUTE_TIME ) if( mktime( &ptv->tm ) == -1 ) { /* normalize & check */ /* can happen for "nonexistent" times, e.g. around 3am */ diff --git a/src/pngsize.c b/src/pngsize.c index c9254d4..ec95f98 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * pngsize.c determine the size of a PNG image *****************************************************************************/ @@ -25,12 +25,16 @@ PngSize(FILE *fd, long *width, long *height) /* this is to make compile on aix work since they seem to define jmpbuf to be _jmpbuf which breaks compilation */ + +#ifndef png_jmpbuf +#ifdef PNG_SETJMP_SUPPORTED +# define png_jmpbuf(png_ptr) ((png_ptr)->PNG_jmpbuf) +#else #ifdef jmpbuf #undef jmpbuf #endif - -#ifndef png_jmpbuf # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#endif #endif if (setjmp(png_jmpbuf(png_read_ptr))){ diff --git a/src/rrd.h b/src/rrd.h index d58662f..5495e9c 100644 --- a/src/rrd.h +++ b/src/rrd.h @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrdlib.h Public header file for librrd ***************************************************************************** - * $Id: rrd.h 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd.h 1450 2008-07-23 13:45:41Z oetiker $ * $Log$ * Revision 1.9 2005/02/13 16:13:33 oetiker * let rrd_graph return the actual value range it picked ... diff --git a/src/rrd_afm.c b/src/rrd_afm.c index 59ead88..f3f0742 100644 --- a/src/rrd_afm.c +++ b/src/rrd_afm.c @@ -1,9 +1,9 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_afm.h Parsing afm tables to find width of strings. **************************************************************************** - * $Id: rrd_afm.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_afm.c 1450 2008-07-23 13:45:41Z oetiker $ */ #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) diff --git a/src/rrd_afm.h b/src/rrd_afm.h index 94d93eb..71191c2 100644 --- a/src/rrd_afm.h +++ b/src/rrd_afm.h @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_afm.h Parsing afm tables to find width of strings. ****************************************************************************/ diff --git a/src/rrd_afm_data.c b/src/rrd_afm_data.c index 2c7ab44..191c779 100644 --- a/src/rrd_afm_data.c +++ b/src/rrd_afm_data.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_afm_data.c Encoded afm (Adobe Font Metrics) for selected fonts. **************************************************************************** diff --git a/src/rrd_afm_data.h b/src/rrd_afm_data.h index 076e959..b666f14 100644 --- a/src/rrd_afm_data.h +++ b/src/rrd_afm_data.h @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_afm_data.h Encoded afm (Adobe Font Metrics) for selected fonts. ****************************************************************************/ diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index e87c70c..fd333dd 100644 --- a/src/rrd_cgi.c +++ b/src/rrd_cgi.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_cgi.c RRD Web Page Generator *****************************************************************************/ diff --git a/src/rrd_create.c b/src/rrd_create.c index 9e5b055..3333a41 100644 --- a/src/rrd_create.c +++ b/src/rrd_create.c @@ -1,9 +1,12 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_create.c creates new rrds *****************************************************************************/ +#include +#include + #include "rrd_tool.h" #include "rrd_rpncalc.h" #include "rrd_hw.h" @@ -13,6 +16,7 @@ unsigned long FnvHash(const char *str); int create_hw_contingent_rras(rrd_t *rrd, unsigned short period, unsigned long hashed_name); void parseGENERIC_DS(const char *def,rrd_t *rrd, int ds_idx); +long int rra_random_row(rra_def_t *); int rrd_create(int argc, char **argv) @@ -308,6 +312,8 @@ rrd_create_r(const char *filename, break; default: rrd.rra_def[rrd.stat_head->rra_cnt].pdp_cnt = atoi(token); + if (atoi(token) < 1) + rrd_set_error("Invalid step: must be >= 1"); break; } break; @@ -650,7 +656,7 @@ rrd_create_fn(const char *file_name, rrd_t *rrd) * the pointer a priori. */ for (i=0; i < rrd->stat_head->rra_cnt; i++) { - rrd->rra_ptr->cur_row = rrd->rra_def[i].row_cnt - 1; + rrd->rra_ptr->cur_row = rra_random_row(&rrd->rra_def[i]); fwrite( rrd->rra_ptr, sizeof(rra_ptr_t),1,rrd_file); } @@ -686,3 +692,17 @@ rrd_create_fn(const char *file_name, rrd_t *rrd) rrd_free(rrd); return (0); } + +static int rand_init = 0; + +long int +rra_random_row(rra_def_t *rra) +{ + if (!rand_init) + { + srandom((unsigned int)time(NULL) + (unsigned int)getpid()); + rand_init++; + } + + return random() % rra->row_cnt; +} diff --git a/src/rrd_diff.c b/src/rrd_diff.c index d8ca838..bf2d991 100644 --- a/src/rrd_diff.c +++ b/src/rrd_diff.c @@ -1,11 +1,11 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 * This code is stolen from rateup (mrtg-2.x) by Dave Rand ***************************************************************************** * diff calculate the difference between two very long integers available as * strings ***************************************************************************** - * $Id: rrd_diff.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_diff.c 1450 2008-07-23 13:45:41Z 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 bb68593..96522ce 100644 --- a/src/rrd_dump.c +++ b/src/rrd_dump.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_dump Display a RRD ***************************************************************************** - * $Id: rrd_dump.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_dump.c 1450 2008-07-23 13:45:41Z oetiker $ * $Log$ * Revision 1.7 2004/05/25 20:53:21 oetiker * prevent small leak when resources are exhausted -- Mike Slifcak diff --git a/src/rrd_error.c b/src/rrd_error.c index 6aaf7f2..fa600d0 100644 --- a/src/rrd_error.c +++ b/src/rrd_error.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_error.c Common Header File ***************************************************************************** - * $Id: rrd_error.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_error.c 1450 2008-07-23 13:45:41Z 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 82d35f3..033629e 100644 --- a/src/rrd_fetch.c +++ b/src/rrd_fetch.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_fetch.c read date from an rrd to use for further processing ***************************************************************************** - * $Id: rrd_fetch.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_fetch.c 1450 2008-07-23 13:45:41Z oetiker $ * $Log$ * Revision 1.8 2004/05/18 18:53:03 oetiker * big spell checking patch -- slif@bellsouth.net @@ -259,8 +259,7 @@ fprintf(stderr,"Considering: start %10lu end %10lu step %5lu ", tmp_step_diff = labs(*step - (rrd.stat_head->pdp_step * rrd.rra_def[i].pdp_cnt)); /* best full match */ - if(cal_end >= *end - && cal_start <= *start){ + if(cal_start <= *start){ if (first_full || (tmp_step_diff < best_full_step_diff)){ first_full=0; best_full_step_diff = tmp_step_diff; @@ -279,8 +278,6 @@ fprintf(stderr,"full match, not best\n"); tmp_match = full_match; if (cal_start>*start) tmp_match -= (cal_start-*start); - if (cal_end<*end) - tmp_match -= (*end-cal_end); if (first_part || (best_match < tmp_match) || (best_match == tmp_match && diff --git a/src/rrd_first.c b/src/rrd_first.c index eba83be..aa6204e 100644 --- a/src/rrd_first.c +++ b/src/rrd_first.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_first Return ***************************************************************************** diff --git a/src/rrd_format.c b/src/rrd_format.c index b7ca3a1..253b078 100644 --- a/src/rrd_format.c +++ b/src/rrd_format.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_format.c RRD Database Format helper functions ***************************************************************************** - * $Id: rrd_format.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_format.c 1450 2008-07-23 13:45:41Z oetiker $ * $Log$ * Revision 1.5 2004/05/18 18:53:03 oetiker * big spell checking patch -- slif@bellsouth.net diff --git a/src/rrd_format.h b/src/rrd_format.h index b8c8a81..71a7138 100644 --- a/src/rrd_format.h +++ b/src/rrd_format.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_format.h RRD Database Format header *****************************************************************************/ diff --git a/src/rrd_getopt.c b/src/rrd_getopt.c index b715ab0..281baf4 100644 --- a/src/rrd_getopt.c +++ b/src/rrd_getopt.c @@ -30,10 +30,6 @@ #define _NO_PROTO #endif -#ifdef HAVE_CONFIG_H -#include "../rrd_config.h" -#endif - #if !defined (__STDC__) || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ @@ -42,6 +38,10 @@ #endif #endif +#ifdef HAVE_CONFIG_H +#include "../rrd_config.h" +#endif + #include /* Comment out all this code if we are using the GNU C Library, and are not diff --git a/src/rrd_getopt1.c b/src/rrd_getopt1.c index 14e1e88..ddf8149 100644 --- a/src/rrd_getopt1.c +++ b/src/rrd_getopt1.c @@ -19,12 +19,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef HAVE_CONFIG_H -#include "../rrd_config.h" -#endif - -#include "rrd_getopt.h" - #if !defined (__STDC__) || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ @@ -33,6 +27,12 @@ #endif #endif +#ifdef HAVE_CONFIG_H +#include "../rrd_config.h" +#endif + +#include "rrd_getopt.h" + #include /* Comment out all this code if we are using the GNU C Library, and are not diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index a94afbf..e6df538 100644 --- a/src/rrd_gfx.c +++ b/src/rrd_gfx.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_gfx.c graphics wrapper for rrdtool **************************************************************************/ diff --git a/src/rrd_gfx.h b/src/rrd_gfx.h index 15680a1..735d85b 100644 --- a/src/rrd_gfx.h +++ b/src/rrd_gfx.h @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_gfx.h generic graphics adapter library ****************************************************************************/ diff --git a/src/rrd_graph.c b/src/rrd_graph.c index deb23cf..350a8da 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd__graph.c produce graphs from data in rrdfiles ****************************************************************************/ @@ -3508,15 +3508,17 @@ rrd_graph_options(int argc, char *argv[],image_desc_t *im) if (size > 0){ im->text_prop[propidx].size=size; } - if (strlen(prop) > end){ - if (prop[end] == ':'){ - strncpy(im->text_prop[propidx].font,prop+end+1,255); + if (strlen(optarg) > end){ + if (optarg[end] == ':'){ + strncpy(im->text_prop[propidx].font,optarg+end+1,255); im->text_prop[propidx].font[255] = '\0'; } else { - rrd_set_error("expected after font size in '%s'",prop); + rrd_set_error("expected : after font size in '%s'",optarg); return; } } + /* only run the for loop for DEFAULT (0) for + all others, we break here. woodo programming */ if (propidx==sindex && sindex != 0) break; } } else { @@ -3789,17 +3791,17 @@ int gdi; { graph_desc_t *src,*dst; rrd_value_t *data; - long step,steps; + long step,steps,end; dst = &im->gdes[gdi]; src = &im->gdes[dst->vidx]; data = src->data + src->ds; - steps = (src->end - src->start) / src->step; - + end = (src->end_orig % src->step) == 0 ? src->end_orig : (src->end_orig + src->step - src->end_orig % src->step); + steps = (end - src->start) / src->step; #if 0 printf("DEBUG: start == %lu, end == %lu, %lu steps\n" ,src->start - ,src->end + ,src->end_orig ,steps ); #endif diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index 86a2467..0a12c05 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * 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 43158fd..7928a02 100644 --- a/src/rrd_hw.c +++ b/src/rrd_hw.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_hw.c : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection ***************************************************************************** diff --git a/src/rrd_hw.h b/src/rrd_hw.h index 54f150f..e3b83cb 100644 --- a/src/rrd_hw.h +++ b/src/rrd_hw.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_hw.h : Support for Holt-Winters Smoothing/ Aberrant Behavior Detection *****************************************************************************/ diff --git a/src/rrd_info.c b/src/rrd_info.c index b2a55d9..a615c0a 100644 --- a/src/rrd_info.c +++ b/src/rrd_info.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_info Get Information about the configuration of an RRD *****************************************************************************/ @@ -155,6 +155,9 @@ rrd_info_r(char *filename) { info.u_cnt=rrd.rra_def[i].row_cnt; cd=info_push(cd,sprintf_alloc("rra[%d].rows",i), RD_I_CNT, info); + info.u_cnt=rrd.rra_ptr[i].cur_row; + cd=info_push(cd,sprintf_alloc("rra[%d].cur_row",i), RD_I_CNT, info); + info.u_cnt=rrd.rra_def[i].pdp_cnt; cd=info_push(cd,sprintf_alloc("rra[%d].pdp_per_row",i), RD_I_CNT, info); diff --git a/src/rrd_is_thread_safe.h b/src/rrd_is_thread_safe.h index 15d876d..0c05c70 100644 --- a/src/rrd_is_thread_safe.h +++ b/src/rrd_is_thread_safe.h @@ -1,12 +1,12 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 * This file: Copyright 2003 Peter Stamfest * & Tobias Oetiker * Distributed under the GPL ***************************************************************************** * rrd_is_thread_safe.c Poisons some nasty function calls using GNU cpp ***************************************************************************** - * $Id: rrd_is_thread_safe.h 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_is_thread_safe.h 1450 2008-07-23 13:45:41Z oetiker $ *************************************************************************** */ #ifndef _RRD_IS_THREAD_SAFE_H diff --git a/src/rrd_last.c b/src/rrd_last.c index a0a7cbb..72e7478 100644 --- a/src/rrd_last.c +++ b/src/rrd_last.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_last.c ***************************************************************************** diff --git a/src/rrd_lastupdate.c b/src/rrd_lastupdate.c index 159aafa..29587cd 100644 --- a/src/rrd_lastupdate.c +++ b/src/rrd_lastupdate.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-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 ccc40ff..32fc100 100644 --- a/src/rrd_not_thread_safe.c +++ b/src/rrd_not_thread_safe.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 * 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 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_not_thread_safe.c 1450 2008-07-23 13:45:41Z oetiker $ *************************************************************************** */ #include "rrd.h" #include "rrd_tool.h" @@ -23,8 +23,8 @@ static int rrd_context_init = 0; static struct rrd_context global_ctx = { MAXLEN, ERRBUFLEN, + rrd_liberror, rrd_error, - rrd_liberror }; /* #include */ diff --git a/src/rrd_open.c b/src/rrd_open.c index 72999ee..1aa5227 100644 --- a/src/rrd_open.c +++ b/src/rrd_open.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_open.c Open an RRD File ***************************************************************************** - * $Id: rrd_open.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_open.c 1450 2008-07-23 13:45:41Z oetiker $ * $Log$ * Revision 1.10 2004/05/26 22:11:12 oetiker * reduce compiler warnings. Many small fixes. -- Mike Slifcak diff --git a/src/rrd_resize.c b/src/rrd_resize.c index 9779c97..45ae8a5 100644 --- a/src/rrd_resize.c +++ b/src/rrd_resize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_resize.c Alters size of an RRA ***************************************************************************** diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 4fb1dab..6385f54 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_restore.c creates new rrd from data dumped by rrd_dump.c *****************************************************************************/ @@ -26,6 +26,7 @@ int rrd_write(char *, rrd_t *, char); void parse_patch1028_RRA_params(char **buf, rrd_t *rrd, int rra_index); void parse_patch1028_CDP_params(char **buf, rrd_t *rrd, int rra_index, int ds_index); void parse_FAILURES_history(char **buf, rrd_t *rrd, int rra_index, int ds_index); +long int rra_random_row(rra_def_t *); /* convert all occurrences of to */ @@ -313,7 +314,10 @@ int xml2rrd(char* buf, rrd_t* rrd, char rc){ eat_tag(&ptr2,"cdp_prep"); for(i=0;i< (int)rrd->stat_head->ds_cnt;i++) { - eat_tag(&ptr2,"ds"); + if (eat_tag(&ptr2, "ds") != 1){ + rrd_set_error("expected to find %lu entries in ",rrd->stat_head->ds_cnt); + return -1; + } /* support to read CDP parameters */ rra_index = rrd->stat_head->rra_cnt-1; skip(&ptr2); @@ -443,12 +447,6 @@ int xml2rrd(char* buf, rrd_t* rrd, char rc){ return(-1); } - for(i=0; i < (int)rrd->stat_head->rra_cnt; i++) { - /* last row in the xml file is the most recent; as - * rrd_update increments the current row pointer, set cur_row - * here to the last row. */ - rrd->rra_ptr[i].cur_row = rrd->rra_def[i].row_cnt-1; - } if (ptr==NULL) return -1; return 1; @@ -463,7 +461,7 @@ int xml2rrd(char* buf, rrd_t* rrd, char rc){ int rrd_write(char *file_name, rrd_t *rrd, char force_overwrite) { - unsigned long i,ii,val_cnt; + unsigned long i,ii,rra_offset; FILE *rrd_file=NULL; int fdflags; int fd; @@ -502,16 +500,30 @@ rrd_write(char *file_name, rrd_t *rrd, char force_overwrite) fwrite( rrd->cdp_prep, sizeof(cdp_prep_t),rrd->stat_head->rra_cnt* rrd->stat_head->ds_cnt,rrd_file); + + for(i=0; i < rrd->stat_head->rra_cnt; i++) + rrd->rra_ptr[i].cur_row = rra_random_row(&rrd->rra_def[i]); + fwrite( rrd->rra_ptr, sizeof(rra_ptr_t), rrd->stat_head->rra_cnt,rrd_file); - /* calculate the number of rrd_values to dump */ - val_cnt=0; + /* Dump RRD values */ + rra_offset=0; for(i=0; i < rrd->stat_head->rra_cnt; i++) - for(ii=0; ii < rrd->rra_def[i].row_cnt * rrd->stat_head->ds_cnt;ii++) - val_cnt++; - fwrite( rrd->rrd_value, sizeof(rrd_value_t),val_cnt,rrd_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; + + fwrite(rrd->rrd_value + (rra_offset + num_rows-1 - cur_row) * ds_cnt, + sizeof(rrd_value_t), (cur_row+1)*ds_cnt, rrd_file); + + fwrite(rrd->rrd_value + rra_offset * ds_cnt, + sizeof(rrd_value_t), (num_rows-1 - cur_row)*ds_cnt, rrd_file); + + rra_offset += num_rows; + } /* lets see if we had an error */ if(ferror(rrd_file)){ diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c index db1c883..a3faff2 100644 --- a/src/rrd_rpncalc.c +++ b/src/rrd_rpncalc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_rpncalc.c RPN calculator functions ****************************************************************************/ diff --git a/src/rrd_rpncalc.h b/src/rrd_rpncalc.h index b00cca9..bba4dde 100644 --- a/src/rrd_rpncalc.h +++ b/src/rrd_rpncalc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_rpncalc.h RPN calculator functions ****************************************************************************/ diff --git a/src/rrd_thread_safe.c b/src/rrd_thread_safe.c index f4e6a54..85d37ba 100644 --- a/src/rrd_thread_safe.c +++ b/src/rrd_thread_safe.c @@ -1,12 +1,12 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 * This file: Copyright 2003 Peter Stamfest * & Tobias Oetiker * Distributed under the GPL ***************************************************************************** * rrd_thread_safe.c Contains routines used when thread safety is required ***************************************************************************** - * $Id: rrd_thread_safe.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_thread_safe.c 1450 2008-07-23 13:45:41Z oetiker $ *************************************************************************** */ #include diff --git a/src/rrd_thread_safe_nt.c b/src/rrd_thread_safe_nt.c index 13780ab..5068214 100644 --- a/src/rrd_thread_safe_nt.c +++ b/src/rrd_thread_safe_nt.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 * This file: Copyright 2003 Peter Stamfest * & Tobias Oetiker * Distributed under the GPL @@ -7,7 +7,7 @@ * rrd_thread_safe.c Contains routines used when thread safety is required * for win32 ***************************************************************************** - * $Id: rrd_thread_safe_nt.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_thread_safe_nt.c 1450 2008-07-23 13:45:41Z oetiker $ *************************************************************************** */ #include diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 894b4df..85269f0 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_tool.c Startup wrapper *****************************************************************************/ diff --git a/src/rrd_tool.h b/src/rrd_tool.h index 22c404f..3461e16 100644 --- a/src/rrd_tool.h +++ b/src/rrd_tool.h @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_tool.h Common Header File *****************************************************************************/ @@ -83,6 +83,10 @@ extern "C" { #include /* for _isnan */ #include /* for chdir */ +#include /* for getpid */ + +#define random rand +#define srandom srand struct tm* localtime_r(const time_t *timep, struct tm* result); char* ctime_r(const time_t *timep, char* result); diff --git a/src/rrd_tune.c b/src/rrd_tune.c index d7f08fd..bb39f87 100644 --- a/src/rrd_tune.c +++ b/src/rrd_tune.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * change header parameters of an rrd ***************************************************************************** - * $Id: rrd_tune.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_tune.c 1450 2008-07-23 13:45:41Z oetiker $ * $Log$ * Revision 1.6 2004/05/26 22:11:12 oetiker * reduce compiler warnings. Many small fixes. -- Mike Slifcak diff --git a/src/rrd_update.c b/src/rrd_update.c index 57e0fbb..26d9e78 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_update.c RRD Update Function ***************************************************************************** - * $Id: rrd_update.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrd_update.c 1450 2008-07-23 13:45:41Z oetiker $ *****************************************************************************/ #include "rrd_tool.h" @@ -533,9 +533,9 @@ _rrd_update(const char *filename, const char *tmplt, int argc, const char **argv if(current_time < rrd.live_head->last_up || (current_time == rrd.live_head->last_up && (long)current_time_usec <= (long)rrd.live_head->last_up_usec)) { - rrd_set_error("illegal attempt to update using time %ld when " + rrd_set_error("%s: illegal attempt to update using time %ld when " "last update time is %ld (minimum one second step)", - current_time, rrd.live_head->last_up); + filename, current_time, rrd.live_head->last_up); free(step_start); break; } @@ -779,7 +779,7 @@ _rrd_update(const char *filename, const char *tmplt, int argc, const char **argv > rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt) || */ /* if the interval is larger thatn mrhb we get NAN */ (interval > rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt) || - (occu_pdp_st-proc_pdp_st <= + (rrd.stat_head -> pdp_step / 2.0 < rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt)) { pdp_temp[i] = DNAN; } else { diff --git a/src/rrd_version.c b/src/rrd_version.c index a2de839..61db0e4 100644 --- a/src/rrd_version.c +++ b/src/rrd_version.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrd_version Return ***************************************************************************** diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 0d4660e..45f272a 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_xport.c export RRD data ****************************************************************************/ diff --git a/src/rrd_xport.h b/src/rrd_xport.h index 09fdeef..29aa14e 100644 --- a/src/rrd_xport.h +++ b/src/rrd_xport.h @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 **************************************************************************** * rrd_xport.h contains XML related constants ****************************************************************************/ diff --git a/src/rrdupdate.c b/src/rrdupdate.c index f610614..b8986b2 100644 --- a/src/rrdupdate.c +++ b/src/rrdupdate.c @@ -1,9 +1,9 @@ /***************************************************************************** - * RRDtool 1.2.27 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.2.28 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * rrdupdate.c Main program for the (standalone) rrdupdate utility ***************************************************************************** - * $Id: rrdupdate.c 1286 2008-02-17 10:08:10Z oetiker $ + * $Id: rrdupdate.c 1450 2008-07-23 13:45:41Z oetiker $ *****************************************************************************/ #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) diff --git a/win32/Makefile b/win32/Makefile index 6e3dc2c..528caf5 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -6,7 +6,7 @@ # DESCR = Round Robin Database Tool -COPYR = Copyright (c) 1997-2007 by Tobias Oetiker +COPYR = Copyright (c) 1997-2008 by Tobias Oetiker WWWURL = http://www.rrdtool.org/ ICON = $(PROOT)/favicon.ico @@ -33,12 +33,12 @@ endif # All library code is statically linked to avoid problems with other lib DLLs. # Edit the path below to point to your libpng sources or set environment var. ifndef LIBPNG -LIBPNG = $(LIBBASE)/libpng-1.2.23 +LIBPNG = $(LIBBASE)/libpng-1.2.29 endif # Edit the path below to point to your freetype sources or set environment var. ifndef LIBFT2 -#LIBFT2 = $(LIBBASE)/freetype-2.3.5 -LIBFT2 = $(LIBBASE)/../mingw32/freetype-2.3.5 +#LIBFT2 = $(LIBBASE)/freetype-2.3.7 +LIBFT2 = $(LIBBASE)/../mingw32/freetype-2.3.7 endif # Edit the path below to point to your libart sources or set environment var. ifndef LIBART @@ -79,11 +79,12 @@ CP = cp -afv # Here you can find a native Win32 binary of the original awk: # http://www.gknw.net/development/prgtools/awk.zip AWK = awk -ifndef ARCBIN + +ifeq ($(ARCEXT),7z) +ARCBIN = 7za a +else ARCBIN = zip -qzr9 ARCEXT = zip -#ARCBIN = 7za a -#ARCEXT = 7z endif # must be equal to DEBUG or NDEBUG