build: move warning to autoconf
all customization/warning/interaction should be at autoconf level compile time is too late. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Alon Bar-Lev committed
Nov 16, 2015 at 01:15 UTC
ce71bf6919b6c1822736d814dd25354a7117f258
3 files changed
+3
-4
configure.ac
+3
@@ -155,3 +155,6 @@ AC_CONFIG_FILES([
155
web/Makefile
156
])
157
AC_OUTPUT
158
+
159
+test "${with_math}" != "yes" && AC_MSG_WARN([You are building without math. math allows accurate calculations. It should be enabled.])
160
+test "${with_zlib}" != "yes" && AC_MSG_WARN([You are building without zlib. zlib allows netdata to trasnfer a lot less data with web clients. It should be enabled.])
src/storage_number.c
-2
@@ -3,8 +3,6 @@
3
#endif
4
#ifdef STORAGE_WITH_MATH
5
#include <math.h>
6
-#else
7
-#warning "You are building without math. math allows accurate calculations. It should be enabled."
6
#endif
7
8
#include "common.h"
src/web_client.c
-2
@@ -229,8 +229,6 @@ void web_client_reset(struct web_client *w)
229
230
#ifdef NETDATA_WITH_ZLIB
231
if(likely(w->zoutput)) sent = (long)w->zstream.total_out;
232
-#else
233
-#warning "You are building without zlib. zlib allows netdata to trasnfer a lot less data with web clients. It should be enabled."
232
#endif
233
234
long size = (w->mode == WEB_CLIENT_MODE_FILECOPY)?w->data->rbytes:w->data->bytes;