git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1204
7f574dfc-610e-0410-a909-
a81674777703
fi
dnl
+dnl Math
+dnl
+
+AC_ARG_ENABLE([math],
+ AC_HELP_STRING([--disable-math], [disable if you do not want math support @<:@default=yes@:>@]),
+ [want_math="$enableval"], [want_math=yes])
+
+AM_CONDITIONAL(BUILD_MATH, test x$want_math = xyes)
+if test x$want_math = xyes; then
+ LIBS="$LIBS -lm"
+ AC_DEFINE(MATH, 1, [Define if you want math support])
+fi
+
+dnl
dnl MPD
dnl
XMMS2: $want_xmms2
* General:
+ math: $want_math
hddtemp: $want_hddtemp
portmon: $want_portmon
RSS: $want_rss
" * xmms2\n"
#endif /* XMMS2 */
"\n General features:\n"
+#ifdef MATH
+ " * math\n"
+#endif /* Math */
#ifdef HDDTEMP
" * hddtemp\n"
#endif /* HDDTEMP */
int i;
if (showaslog) {
+#ifdef MATH
f = log10(f + 1);
+#endif
}
if (!graph->scaled && f > graph->graph_scale) {
s->graph_width = s->width - 2; // subtract 2 for rectangle around
} */
if (showaslog) {
+#ifdef MATH
s->graph_scale = log10(s->graph_scale + 1);
+#endif
}
if (append) {
graph_append(s, i, showaslog);
cur_x = tmp_x;
cur_y = tmp_y;
}
+#ifdef MATH
if (show_graph_scale && (specials[special_index].show_scale == 1)) {
int tmp_x = cur_x;
int tmp_y = cur_y;
cur_x = tmp_x;
cur_y = tmp_y;
}
+#endif
set_foreground_color(last_colour);
break;
}