mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 04:17:33 +00:00
configure option for mathfunctions
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1204 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
5ce58e014e
commit
72f416212f
@ -183,6 +183,20 @@ if test x$want_hddtemp = xyes; then
|
|||||||
fi
|
fi
|
||||||
fi
|
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
|
||||||
dnl MPD
|
dnl MPD
|
||||||
dnl
|
dnl
|
||||||
@ -662,6 +676,7 @@ $PACKAGE $VERSION configured successfully:
|
|||||||
XMMS2: $want_xmms2
|
XMMS2: $want_xmms2
|
||||||
|
|
||||||
* General:
|
* General:
|
||||||
|
math: $want_math
|
||||||
hddtemp: $want_hddtemp
|
hddtemp: $want_hddtemp
|
||||||
portmon: $want_portmon
|
portmon: $want_portmon
|
||||||
RSS: $want_rss
|
RSS: $want_rss
|
||||||
|
@ -108,6 +108,9 @@ static void print_version(void)
|
|||||||
" * xmms2\n"
|
" * xmms2\n"
|
||||||
#endif /* XMMS2 */
|
#endif /* XMMS2 */
|
||||||
"\n General features:\n"
|
"\n General features:\n"
|
||||||
|
#ifdef MATH
|
||||||
|
" * math\n"
|
||||||
|
#endif /* Math */
|
||||||
#ifdef HDDTEMP
|
#ifdef HDDTEMP
|
||||||
" * hddtemp\n"
|
" * hddtemp\n"
|
||||||
#endif /* HDDTEMP */
|
#endif /* HDDTEMP */
|
||||||
@ -715,7 +718,9 @@ void graph_append(struct special_t *graph, double f, char showaslog)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (showaslog) {
|
if (showaslog) {
|
||||||
|
#ifdef MATH
|
||||||
f = log10(f + 1);
|
f = log10(f + 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!graph->scaled && f > graph->graph_scale) {
|
if (!graph->scaled && f > graph->graph_scale) {
|
||||||
@ -797,7 +802,9 @@ static void new_graph(char *buf, int w, int h, unsigned int first_colour,
|
|||||||
s->graph_width = s->width - 2; // subtract 2 for rectangle around
|
s->graph_width = s->width - 2; // subtract 2 for rectangle around
|
||||||
} */
|
} */
|
||||||
if (showaslog) {
|
if (showaslog) {
|
||||||
|
#ifdef MATH
|
||||||
s->graph_scale = log10(s->graph_scale + 1);
|
s->graph_scale = log10(s->graph_scale + 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (append) {
|
if (append) {
|
||||||
graph_append(s, i, showaslog);
|
graph_append(s, i, showaslog);
|
||||||
@ -7072,6 +7079,7 @@ static void draw_line(char *s)
|
|||||||
cur_x = tmp_x;
|
cur_x = tmp_x;
|
||||||
cur_y = tmp_y;
|
cur_y = tmp_y;
|
||||||
}
|
}
|
||||||
|
#ifdef MATH
|
||||||
if (show_graph_scale && (specials[special_index].show_scale == 1)) {
|
if (show_graph_scale && (specials[special_index].show_scale == 1)) {
|
||||||
int tmp_x = cur_x;
|
int tmp_x = cur_x;
|
||||||
int tmp_y = cur_y;
|
int tmp_y = cur_y;
|
||||||
@ -7086,6 +7094,7 @@ static void draw_line(char *s)
|
|||||||
cur_x = tmp_x;
|
cur_x = tmp_x;
|
||||||
cur_y = tmp_y;
|
cur_y = tmp_y;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
set_foreground_color(last_colour);
|
set_foreground_color(last_colour);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user