summaryrefslogtreecommitdiff
blob: be8095c438b40aaa2e794ca51e64f1e7233737ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--- a/bindings/lua/rrdlua.c
+++ b/bindings/lua/rrdlua.c
@@ -267,6 +267,7 @@
   return 1;
 }
 
+#ifdef HAVE_RRD_GRAPH
 static int
 lua_rrd_graph (lua_State * L)
 {
@@ -291,6 +292,7 @@
   rrd_freemem(calcpr);
   return 3;
 }
+#endif /* HAVE_RRD_GRAPH */
 
 static int
 lua_rrd_flushcached(lua_State *L)
@@ -305,11 +307,13 @@
   return lua_rrd_infocall(L, "info", rrd_info);
 }
 
+#ifdef HAVE_RRD_GRAPH
 static int
 lua_rrd_graphv (lua_State * L)
 {
   return lua_rrd_infocall(L, "graphv", rrd_graph_v);
 }
+#endif /* HAVE_RRD_GRAPH */
 
 static int
 lua_rrd_updatev (lua_State * L)
@@ -347,7 +351,9 @@
   {"dump", lua_rrd_dump},
   {"fetch", lua_rrd_fetch},
   {"first", lua_rrd_first},
+#ifdef HAVE_RRD_GRAPH
   {"graph", lua_rrd_graph},
+#endif /* HAVE_RRD_GRAPH */
   {"last", lua_rrd_last},
   {"resize", lua_rrd_resize},
   {"restore", lua_rrd_restore},
@@ -357,7 +363,9 @@
 #if defined(DINF)
   {"info", lua_rrd_info},
   {"updatev", lua_rrd_updatev},
+#ifdef HAVE_RRD_GRAPH
   {"graphv", lua_rrd_graphv},
+#endif /* HAVE_RRD_GRAPH */
 #endif
   {NULL, NULL}
 };