AC_ARG_ENABLE(rrd_graph,AS_HELP_STRING([--disable-rrd_graph],[disable all rrd_graph functions]),
[enable_rrdcgi=no],[enable_rrd_graph=yes])
+AC_ARG_ENABLE(rrd_restore,AS_HELP_STRING([--disable-rrd_restore],[disable rrd_restore XML import functions]),
+[],[enable_rrd_restore=yes])
+
AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no])
AC_DEFINE([HAVE_RRD_GRAPH], [], [is rrd_graph supported by this install])
fi
+if test $enable_rrd_restore != no; then
+ AC_DEFINE([HAVE_RRD_RESTORE], [], [is rrd_restore supported by this install])
+fi
+
dnl Check if we run on a system that has fonts
AC_ARG_WITH(rrd-default-font,
[ --with-rrd-default-font=[OPTIONS] set the full path to your default font.],
AM_CONDITIONAL(BUILD_RRDGRAPH,[test $enable_rrd_graph != no])
+AM_CONDITIONAL(BUILD_RRDRESTORE,[test $enable_rrd_restore != no])
+
EX_CHECK_ALL(glib-2.0, glib_check_version, glib.h, glib-2.0, 2.28.7, ftp://ftp.gtk.org/pub/glib/2.28/, "")
CORE_LIBS="$LIBS"
EX_CHECK_ALL(pangocairo-1.0, pango_font_map_create_context, pango/pango.h, pangocairo, 1.28.4, http://ftp.gnome.org/pub/GNOME/sources/pango/1.28, "")
fi
+
+if test $enable_rrd_restore != no; then
EX_CHECK_ALL(xml2, xmlParseFile, libxml/parser.h, libxml-2.0, 2.7.8, http://xmlsoft.org/downloads.html, "")
+fi
if test "$EX_CHECK_ALL_ERR" = "YES"; then
AC_MSG_ERROR([Please fix the library issues listed above and try again.])
echo " With Locking: $enable_flock"
echo " Build rrd_getopt: $build_getopt"
echo " Build rrd_graph: $enable_rrd_graph"
+echo " Build rrd_restore: $enable_rrd_restore"
echo " Static programs: $staticprogs"
echo " Perl Modules: $COMP_PERL"
echo " Perl Binary: $PERL"
" Copyright by Tobi Oetiker, 1997-2008 (%f)\n",
rrd_version());
else if (strcmp("restore", argv[1]) == 0)
+#ifdef HAVE_RRD_RESTORE
rrd_restore(argc - 1, &argv[1]);
+#else
+ rrd_set_error("the instance of rrdtool has been compiled without XML import functions");
+#endif
else if (strcmp("resize", argv[1]) == 0)
rrd_resize(argc - 1, &argv[1]);
else if (strcmp("last", argv[1]) == 0)