configure.ac 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515
  1. #
  2. # Copyright (C) 2015 Alon Bar-Lev <alon.barlev@gmail.com>
  3. # SPDX-License-Identifier: GPL-3.0-or-later
  4. #
  5. AC_PREREQ(2.60)
  6. # We do not use m4_esyscmd_s to support older autoconf.
  7. define([VERSION_STRING], m4_esyscmd([git describe 2>/dev/null | tr -d '\n']))
  8. define([VERSION_FROM_FILE], m4_esyscmd([cat packaging/version | tr -d '\n']))
  9. m4_ifval(VERSION_STRING, [], [define([VERSION_STRING], VERSION_FROM_FILE)])
  10. AC_INIT([netdata], VERSION_STRING[])
  11. AM_MAINTAINER_MODE([disable])
  12. if test x"$USE_MAINTAINER_MODE" = xyes; then
  13. AC_MSG_NOTICE(***************** MAINTAINER MODE *****************)
  14. fi
  15. PACKAGE_RPM_VERSION="VERSION_STRING"
  16. AC_SUBST([PACKAGE_RPM_VERSION])
  17. # -----------------------------------------------------------------------------
  18. # autoconf initialization
  19. AC_CONFIG_AUX_DIR([.])
  20. AC_CONFIG_HEADERS([config.h])
  21. AC_CONFIG_MACRO_DIR([build/m4])
  22. AC_CONFIG_SRCDIR([daemon/main.c])
  23. define([AUTOMATE_INIT_OPTIONS], [tar-pax subdir-objects])
  24. m4_ifdef([AM_SILENT_RULES], [
  25. define([AUTOMATE_INIT_OPTIONS], [tar-pax silent-rules subdir-objects])
  26. ])
  27. AM_INIT_AUTOMAKE(AUTOMATE_INIT_OPTIONS)
  28. m4_ifdef([AM_SILENT_RULES], [
  29. AM_SILENT_RULES([yes])
  30. ])
  31. AC_CANONICAL_HOST
  32. AC_PROG_CC
  33. AC_PROG_CC_C99
  34. AM_PROG_CC_C_O
  35. AC_PROG_CXX
  36. AC_PROG_INSTALL
  37. PKG_PROG_PKG_CONFIG
  38. AC_USE_SYSTEM_EXTENSIONS
  39. # -----------------------------------------------------------------------------
  40. # configurable options
  41. AC_ARG_ENABLE(
  42. [plugin-nfacct],
  43. [AS_HELP_STRING([--enable-plugin-nfacct], [enable nfacct plugin @<:@default autodetect@:>@])],
  44. ,
  45. [enable_plugin_nfacct="detect"]
  46. )
  47. AC_ARG_ENABLE(
  48. [plugin-freeipmi],
  49. [AS_HELP_STRING([--enable-plugin-freeipmi], [enable freeipmi plugin @<:@default autodetect@:>@])],
  50. ,
  51. [enable_plugin_freeipmi="detect"]
  52. )
  53. AC_ARG_ENABLE(
  54. [plugin-cups],
  55. [AS_HELP_STRING([--enable-plugin-cups], [enable cups plugin @<:@default autodetect@:>@])],
  56. ,
  57. [enable_plugin_cups="detect"]
  58. )
  59. AC_ARG_ENABLE(
  60. [plugin-xenstat],
  61. [AS_HELP_STRING([--enable-plugin-xenstat], [enable xenstat plugin @<:@default autodetect@:>@])],
  62. ,
  63. [enable_plugin_xenstat="detect"]
  64. )
  65. AC_ARG_ENABLE(
  66. [backend-kinesis],
  67. [AS_HELP_STRING([--enable-backend-kinesis], [enable kinesis backend @<:@default autodetect@:>@])],
  68. ,
  69. [enable_backend_kinesis="detect"]
  70. )
  71. AC_ARG_ENABLE(
  72. [exporting-pubsub],
  73. [AS_HELP_STRING([--enable-exporting-pubsub], [enable pubsub exporting connector @<:@default autodetect@:>@])],
  74. ,
  75. [enable_exporting_pubsub="detect"]
  76. )
  77. AC_ARG_ENABLE(
  78. [backend-prometheus-remote-write],
  79. [AS_HELP_STRING([--enable-backend-prometheus-remote-write], [enable prometheus remote write backend @<:@default autodetect@:>@])],
  80. ,
  81. [enable_backend_prometheus_remote_write="detect"]
  82. )
  83. AC_ARG_ENABLE(
  84. [backend-mongodb],
  85. [AS_HELP_STRING([--enable-backend-mongodb], [enable mongodb backend @<:@default autodetect@:>@])],
  86. ,
  87. [enable_backend_mongodb="detect"]
  88. )
  89. AC_ARG_ENABLE(
  90. [pedantic],
  91. [AS_HELP_STRING([--enable-pedantic], [enable pedantic compiler warnings @<:@default disabled@:>@])],
  92. ,
  93. [enable_pedantic="no"]
  94. )
  95. AC_ARG_ENABLE(
  96. [accept4],
  97. [AS_HELP_STRING([--disable-accept4], [System does not have accept4 @<:@default autodetect@:>@])],
  98. ,
  99. [enable_accept4="detect"]
  100. )
  101. AC_ARG_WITH(
  102. [webdir],
  103. [AS_HELP_STRING([--with-webdir], [location of webdir @<:@PKGDATADIR/web@:>@])],
  104. [webdir="${withval}"],
  105. [webdir="\$(pkgdatadir)/web"]
  106. )
  107. AC_ARG_WITH(
  108. [libcap],
  109. [AS_HELP_STRING([--with-libcap], [build with libcap @<:@default autodetect@:>@])],
  110. ,
  111. [with_libcap="detect"]
  112. )
  113. AC_ARG_WITH(
  114. [zlib],
  115. [AS_HELP_STRING([--without-zlib], [build without zlib @<:@default enabled@:>@])],
  116. ,
  117. [with_zlib="yes"]
  118. )
  119. AC_ARG_WITH(
  120. [math],
  121. [AS_HELP_STRING([--without-math], [build without math @<:@default enabled@:>@])],
  122. ,
  123. [with_math="yes"]
  124. )
  125. AC_ARG_WITH(
  126. [user],
  127. [AS_HELP_STRING([--with-user], [use this user to drop privilege @<:@default nobody@:>@])],
  128. ,
  129. [with_user="nobody"]
  130. )
  131. AC_ARG_ENABLE(
  132. [x86-sse],
  133. [AS_HELP_STRING([--disable-x86-sse], [SSE/SS2 optimizations on x86 @<:@default enabled@:>@])],
  134. ,
  135. [enable_x86_sse="yes"]
  136. )
  137. AC_ARG_ENABLE(
  138. [lto],
  139. [AS_HELP_STRING([--disable-lto], [Link Time Optimizations @<:@default autodetect@:>@])],
  140. ,
  141. [enable_lto="detect"]
  142. )
  143. AC_ARG_ENABLE(
  144. [https],
  145. [AS_HELP_STRING([--enable-https], [Enable SSL support @<:@default autodetect@:>@])],
  146. ,
  147. [enable_https="detect"]
  148. )
  149. AC_ARG_ENABLE(
  150. [dbengine],
  151. [AS_HELP_STRING([--disable-dbengine], [disable netdata dbengine @<:@default autodetect@:>@])],
  152. ,
  153. [enable_dbengine="detect"]
  154. )
  155. AC_ARG_ENABLE(
  156. [jsonc],
  157. [AS_HELP_STRING([--enable-jsonc], [Enable JSON-C support @<:@default autodetect@:>@])],
  158. ,
  159. [enable_jsonc="detect"]
  160. )
  161. # -----------------------------------------------------------------------------
  162. # Check if cloud is enabled and if the functionality is available
  163. AC_ARG_ENABLE(
  164. [cloud],
  165. [AS_HELP_STRING([--disable-cloud],
  166. [Disables all cloud functionality])],
  167. [ enable_cloud="$enableval" ],
  168. [ enable_cloud="detect" ]
  169. )
  170. if test "${enable_cloud}" = "no"; then
  171. AC_DEFINE([DISABLE_CLOUD], [1], [disable netdata cloud functionality])
  172. fi
  173. # -----------------------------------------------------------------------------
  174. # netdata required checks
  175. # fails on centos6
  176. #AX_CHECK_ENABLE_DEBUG()
  177. AX_GCC_FUNC_ATTRIBUTE([returns_nonnull])
  178. AX_GCC_FUNC_ATTRIBUTE([malloc])
  179. AX_GCC_FUNC_ATTRIBUTE([noreturn])
  180. AX_GCC_FUNC_ATTRIBUTE([noinline])
  181. AX_GCC_FUNC_ATTRIBUTE([format])
  182. AX_GCC_FUNC_ATTRIBUTE([warn_unused_result])
  183. AC_CHECK_TYPES([struct timespec, clockid_t], [], [], [[#include <time.h>]])
  184. AC_SEARCH_LIBS([clock_gettime], [rt posix4])
  185. AC_CHECK_FUNCS([clock_gettime])
  186. AC_CHECK_FUNCS([sched_setscheduler sched_getscheduler sched_getparam sched_get_priority_min sched_get_priority_max getpriority setpriority nice])
  187. AC_CHECK_FUNCS([recvmmsg])
  188. AC_TYPE_INT8_T
  189. AC_TYPE_INT16_T
  190. AC_TYPE_INT32_T
  191. AC_TYPE_INT64_T
  192. AC_TYPE_UINT8_T
  193. AC_TYPE_UINT16_T
  194. AC_TYPE_UINT32_T
  195. AC_TYPE_UINT64_T
  196. AC_C_INLINE
  197. AC_FUNC_STRERROR_R
  198. AC_C__GENERIC
  199. AC_C___ATOMIC
  200. # AC_C_STMT_EXPR
  201. AC_CHECK_SIZEOF([void *])
  202. AC_CANONICAL_HOST
  203. AC_HEADER_MAJOR
  204. AC_HEADER_RESOLV
  205. AC_CHECK_HEADERS_ONCE([sys/prctl.h])
  206. AC_CHECK_HEADERS_ONCE([sys/vfs.h])
  207. AC_CHECK_HEADERS_ONCE([sys/statfs.h])
  208. AC_CHECK_HEADERS_ONCE([sys/statvfs.h])
  209. AC_CHECK_HEADERS_ONCE([sys/mount.h])
  210. if test "${enable_accept4}" != "no"; then
  211. AC_CHECK_FUNCS_ONCE(accept4)
  212. fi
  213. # -----------------------------------------------------------------------------
  214. # operating system detection
  215. AC_MSG_CHECKING([operating system])
  216. case "$host_os" in
  217. freebsd*)
  218. build_target=freebsd
  219. build_target_id=2
  220. CFLAGS="${CFLAGS} -I/usr/local/include -L/usr/local/lib"
  221. ;;
  222. darwin*)
  223. build_target=macos
  224. build_target_id=3
  225. LDFLAGS="${LDFLAGS} -framework CoreFoundation -framework IOKit"
  226. ;;
  227. *)
  228. build_target=linux
  229. build_target_id=1
  230. ;;
  231. esac
  232. AM_CONDITIONAL([FREEBSD], [test "${build_target}" = "freebsd"])
  233. AM_CONDITIONAL([MACOS], [test "${build_target}" = "macos"])
  234. AM_CONDITIONAL([LINUX], [test "${build_target}" = "linux"])
  235. AC_MSG_RESULT([${build_target} with id ${build_target_id}])
  236. # -----------------------------------------------------------------------------
  237. # pthreads
  238. ACX_PTHREAD(, [AC_MSG_ERROR([Cannot initialize pthread environment])])
  239. LIBS="${PTHREAD_LIBS} ${LIBS}"
  240. CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
  241. CC="${PTHREAD_CC}"
  242. # -----------------------------------------------------------------------------
  243. # libm
  244. AC_ARG_VAR([MATH_CFLAGS], [C compiler flags for math])
  245. AC_ARG_VAR([MATH_LIBS], [linker flags for math])
  246. if test -z "${MATH_LIBS}"; then
  247. AC_CHECK_LIB(
  248. [m],
  249. [sin],
  250. [MATH_LIBS="-lm"]
  251. )
  252. fi
  253. test "${with_math}" = "yes" -a -z "${MATH_LIBS}" && AC_MSG_ERROR([math required but not found])
  254. AC_MSG_CHECKING([if libm should be used])
  255. if test "${with_math}" != "no" -a ! -z "${MATH_LIBS}"; then
  256. with_math="yes"
  257. AC_DEFINE([STORAGE_WITH_MATH], [1], [math usability])
  258. OPTIONAL_MATH_CFLAGS="${MATH_CFLAGS}"
  259. OPTIONAL_MATH_LIBS="${MATH_LIBS}"
  260. else
  261. with_math="no"
  262. fi
  263. AC_MSG_RESULT([${with_math}])
  264. # -----------------------------------------------------------------------------
  265. # libuv multi-platform support library with a focus on asynchronous I/O
  266. # TODO: check version, uv_fs_scandir_next only available in version >= 1.0
  267. AC_CHECK_LIB(
  268. [uv],
  269. [uv_fs_scandir_next],
  270. [UV_LIBS="-luv"]
  271. )
  272. test -z "${UV_LIBS}" && \
  273. AC_MSG_ERROR([libuv required but not found. Try installing 'libuv1-dev' or 'libuv-devel'.])
  274. OPTIONAL_UV_CFLAGS="${UV_CFLAGS}"
  275. OPTIONAL_UV_LIBS="${UV_LIBS}"
  276. # -----------------------------------------------------------------------------
  277. # lz4 Extremely Fast Compression algorithm
  278. AC_CHECK_LIB(
  279. [lz4],
  280. [LZ4_compress_default],
  281. [LZ4_LIBS="-llz4"]
  282. )
  283. # -----------------------------------------------------------------------------
  284. # Judy General purpose dynamic array
  285. AC_CHECK_LIB(
  286. [Judy],
  287. [JudyLIns],
  288. [JUDY_LIBS="-lJudy"]
  289. )
  290. # -----------------------------------------------------------------------------
  291. # zlib
  292. PKG_CHECK_MODULES(
  293. [ZLIB],
  294. [zlib],
  295. [have_zlib=yes],
  296. [have_zlib=no]
  297. )
  298. test "${with_zlib}" = "yes" -a "${have_zlib}" != "yes" && AC_MSG_ERROR([zlib required but not found. Try installing 'zlib1g-dev' or 'zlib-devel'.])
  299. AC_MSG_CHECKING([if zlib should be used])
  300. if test "${with_zlib}" != "no" -a "${have_zlib}" = "yes"; then
  301. with_zlib="yes"
  302. AC_DEFINE([NETDATA_WITH_ZLIB], [1], [zlib usability])
  303. OPTIONAL_ZLIB_CFLAGS="${ZLIB_CFLAGS}"
  304. OPTIONAL_ZLIB_LIBS="${ZLIB_LIBS}"
  305. else
  306. with_zlib="no"
  307. fi
  308. AC_MSG_RESULT([${with_zlib}])
  309. # -----------------------------------------------------------------------------
  310. # libuuid
  311. PKG_CHECK_MODULES(
  312. [UUID],
  313. [uuid],
  314. [have_uuid=yes],
  315. [AC_MSG_ERROR([libuuid required but not found. Try installing 'uuid-dev' or 'libuuid-devel'.])]
  316. )
  317. AC_DEFINE([NETDATA_WITH_UUID], [1], [uuid usability])
  318. OPTIONAL_UUID_CFLAGS="${UUID_CFLAGS}"
  319. OPTIONAL_UUID_LIBS="${UUID_LIBS}"
  320. # -----------------------------------------------------------------------------
  321. # OpenSSL Cryptography and SSL/TLS Toolkit
  322. AC_CHECK_LIB(
  323. [crypto],
  324. [SHA256_Init],
  325. [SSL_LIBS="-lcrypto -lssl"]
  326. )
  327. AC_CHECK_LIB(
  328. [crypto],
  329. [X509_VERIFY_PARAM_set1_host],
  330. [ssl_host_validation="yes"],
  331. [ssl_host_validation="no"]
  332. )
  333. if test "${ssl_host_validation}" = "no"; then
  334. AC_DEFINE([HAVE_X509_VERIFY_PARAM_set1_host], [0], [ssl host validation])
  335. AC_MSG_WARN([DISABLING SSL HOSTNAME VALIDATION BECAUSE IT IS NOT AVAILABLE ON THIS SYSTEM.])
  336. else
  337. AC_DEFINE([HAVE_X509_VERIFY_PARAM_set1_host], [1], [ssl host validation])
  338. fi
  339. # -----------------------------------------------------------------------------
  340. # JSON-C library
  341. PKG_CHECK_MODULES([JSON],[json-c],AC_CHECK_LIB(
  342. [json-c],
  343. [json_object_get_type],
  344. [JSONC_LIBS="-ljson-c"]),AC_CHECK_LIB(
  345. [json],
  346. [json_object_get_type],
  347. [JSONC_LIBS="-ljson"])
  348. )
  349. OPTIONAL_JSONC_LIBS="${JSONC_LIBS}"
  350. # -----------------------------------------------------------------------------
  351. # VFS plugin libs
  352. AC_CHECK_LIB(
  353. [dl],
  354. [dlopen],
  355. [EBPF_LIBS="-ldl"]
  356. )
  357. OPTIONAL_EBPF_LIBS="${EBPF_LIBS}"
  358. # -----------------------------------------------------------------------------
  359. # DB engine and HTTPS
  360. test "${enable_dbengine}" = "yes" -a -z "${LZ4_LIBS}" && \
  361. AC_MSG_ERROR([liblz4 required but not found. Try installing 'liblz4-dev' or 'lz4-devel'.])
  362. test "${enable_dbengine}" = "yes" -a -z "${JUDY_LIBS}" && \
  363. AC_MSG_ERROR([libJudy required but not found. Try installing 'libjudy-dev' or 'Judy-devel'.])
  364. test "${enable_https}" = "yes" -a -z "${SSL_LIBS}" && \
  365. AC_MSG_ERROR([OpenSSL required for HTTPS but not found. Try installing 'libssl-dev' or 'openssl-devel'.])
  366. test "${enable_dbengine}" = "yes" -a -z "${SSL_LIBS}" && \
  367. AC_MSG_ERROR([OpenSSL required for DBENGINE but not found. Try installing 'libssl-dev' or 'openssl-devel'.])
  368. AC_MSG_CHECKING([if netdata dbengine should be used])
  369. if test "${enable_dbengine}" != "no" -a "${UV_LIBS}" -a "${LZ4_LIBS}" -a "${JUDY_LIBS}" -a "${SSL_LIBS}"; then
  370. enable_dbengine="yes"
  371. AC_DEFINE([ENABLE_DBENGINE], [1], [netdata dbengine usability])
  372. OPTIONAL_LZ4_CFLAGS="${LZ4_CFLAGS}"
  373. OPTIONAL_LZ4_LIBS="${LZ4_LIBS}"
  374. OPTIONAL_JUDY_CFLAGS="${JUDY_CFLAGS}"
  375. OPTIONAL_JUDY_LIBS="${JUDY_LIBS}"
  376. OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}"
  377. OPTIONAL_SSL_LIBS="${SSL_LIBS}"
  378. else
  379. enable_dbengine="no"
  380. fi
  381. AC_MSG_RESULT([${enable_dbengine}])
  382. AM_CONDITIONAL([ENABLE_DBENGINE], [test "${enable_dbengine}" = "yes"])
  383. AC_MSG_CHECKING([if netdata https should be used])
  384. if test "${enable_https}" != "no" -a "${SSL_LIBS}"; then
  385. enable_https="yes"
  386. AC_DEFINE([ENABLE_HTTPS], [1], [netdata HTTPS usability])
  387. OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}"
  388. OPTIONAL_SSL_LIBS="${SSL_LIBS}"
  389. else
  390. enable_https="no"
  391. fi
  392. AC_MSG_RESULT([${enable_https}])
  393. AM_CONDITIONAL([ENABLE_HTTPS], [test "${enable_https}" = "yes"])
  394. # -----------------------------------------------------------------------------
  395. # JSON-C
  396. if test "${enable_jsonc}" != "no" -a -z "${JSONC_LIBS}"; then
  397. # Try and detect manual static build presence (from netdata-installer.sh)
  398. AC_MSG_CHECKING([if statically built json-c is present])
  399. HAVE_libjson_c_a="no"
  400. if test -f "externaldeps/jsonc/libjson-c.a"; then
  401. LIBS_BKP="${LIBS}"
  402. LIBS="externaldeps/jsonc/libjson-c.a"
  403. AC_LINK_IFELSE([AC_LANG_SOURCE([[#include "externaldeps/jsonc/json-c/json.h"
  404. int main (int argc, char **argv) {
  405. struct json_object *jobj;
  406. char *str = "{ \"msg-type\": \"random\" }";
  407. jobj = json_tokener_parse(str);
  408. json_object_get_type(jobj);
  409. }]])],
  410. [HAVE_libjson_c_a="yes"],
  411. [HAVE_libjson_c_a="no"])
  412. LIBS="${LIBS_BKP}"
  413. fi
  414. if test "${HAVE_libjson_c_a}" = "yes"; then
  415. AC_DEFINE([LINK_STATIC_JSONC], [1], [static json-c should be used])
  416. JSONC_LIBS="static"
  417. OPTIONAL_JSONC_STATIC_CFLAGS="-I externaldeps/jsonc"
  418. fi
  419. AC_MSG_RESULT([${HAVE_libjson_c_a}])
  420. fi
  421. AM_CONDITIONAL([LINK_STATIC_JSONC], [test "${JSONC_LIBS}" = "static"])
  422. test "${enable_jsonc}" = "yes" -a -z "${JSONC_LIBS}" && \
  423. AC_MSG_ERROR([JSON-C required but not found. Try installing 'libjson-c-dev' or 'json-c'.])
  424. AC_MSG_CHECKING([if json-c should be used])
  425. if test "${enable_jsonc}" != "no" -a "${JSONC_LIBS}"; then
  426. enable_jsonc="yes"
  427. AC_DEFINE([ENABLE_JSONC], [1], [netdata json-c usability])
  428. else
  429. enable_jsonc="no"
  430. fi
  431. AC_MSG_RESULT([${enable_jsonc}])
  432. AM_CONDITIONAL([ENABLE_JSONC], [test "${enable_jsonc}" = "yes"])
  433. # -----------------------------------------------------------------------------
  434. # compiler options
  435. AC_ARG_VAR([SSE_CANDIDATE], [C compiler flags for SSE])
  436. AS_CASE([$host_cpu],
  437. [i?86], [SSE_CANDIDATE="yes"]
  438. )
  439. AC_SUBST([SSE_CANDIDATE])
  440. if test "${SSE_CANDIDATE}" = "yes" -a "${enable_x86_sse}" = "yes"; then
  441. opt="-msse2 -mfpmath=sse"
  442. AX_CHECK_COMPILE_FLAG(${opt}, [CFLAGS="${CFLAGS} ${opt}"], [])
  443. fi
  444. if test "${GCC}" = "yes"; then
  445. AC_DEFINE_UNQUOTED([likely(x)], [__builtin_expect(!!(x), 1)], [gcc branch optimization])
  446. AC_DEFINE_UNQUOTED([unlikely(x)], [__builtin_expect(!!(x), 0)], [gcc branch optimization])
  447. else
  448. AC_DEFINE_UNQUOTED([likely(x)], [(x)], [gcc branch optimization])
  449. AC_DEFINE_UNQUOTED([unlikely(x)], [(x)], [gcc branch optimization])
  450. fi
  451. if test "${GCC}" = "yes"; then
  452. AC_DEFINE([__always_unused], [__attribute__((unused))], [gcc unused attribute])
  453. AC_DEFINE([__maybe_unused], [__attribute__((unused))], [gcc unused attribute])
  454. else
  455. AC_DEFINE([__always_unused], [], [dummy unused attribute])
  456. AC_DEFINE([__maybe_unused], [], [dummy unused attribute])
  457. fi
  458. if test "${enable_pedantic}" = "yes"; then
  459. enable_strict="yes"
  460. CFLAGS="${CFLAGS} -pedantic -Wall -Wextra -Wno-long-long"
  461. fi
  462. # -----------------------------------------------------------------------------
  463. # memory allocation library
  464. AC_MSG_CHECKING([for memory allocator])
  465. TS_CHECK_JEMALLOC
  466. if test "$has_jemalloc" = "1"; then
  467. AC_DEFINE([ENABLE_JEMALLOC], [1], [compile and link with jemalloc])
  468. AC_MSG_RESULT([jemalloc])
  469. else
  470. TS_CHECK_TCMALLOC
  471. if test "$has_tcmalloc" = "1"; then
  472. AC_DEFINE([ENABLE_TCMALLOC], [1], [compile and link with tcmalloc])
  473. AC_MSG_RESULT([tcmalloc])
  474. else
  475. AC_MSG_RESULT([system])
  476. AC_C_MALLOPT
  477. AC_C_MALLINFO
  478. fi
  479. fi
  480. # -----------------------------------------------------------------------------
  481. # libcap
  482. PKG_CHECK_MODULES(
  483. [LIBCAP],
  484. [libcap],
  485. [AC_CHECK_LIB([cap], [cap_get_proc, cap_set_proc],
  486. [AC_CHECK_HEADER(
  487. [sys/capability.h],
  488. [have_libcap=yes],
  489. [have_libcap=no]
  490. )],
  491. [have_libcap=no]
  492. )],
  493. [have_libcap=no]
  494. )
  495. test "${with_libcap}" = "yes" -a "${have_libcap}" != "yes" && AC_MSG_ERROR([libcap required but not found.])
  496. AC_MSG_CHECKING([if libcap should be used])
  497. if test "${with_libcap}" != "no" -a "${have_libcap}" = "yes"; then
  498. with_libcap="yes"
  499. AC_DEFINE([HAVE_CAPABILITY], [1], [libcap usability])
  500. OPTIONAL_LIBCAP_CFLAGS="${LIBCAP_CFLAGS}"
  501. OPTIONAL_LIBCAP_LIBS="${LIBCAP_LIBS}"
  502. else
  503. with_libcap="no"
  504. fi
  505. AC_MSG_RESULT([${with_libcap}])
  506. AM_CONDITIONAL([ENABLE_CAPABILITY], [test "${with_libcap}" = "yes"])
  507. # -----------------------------------------------------------------------------
  508. # ACLK
  509. AC_MSG_CHECKING([if cloud functionality should be enabled])
  510. AC_MSG_RESULT([${enable_cloud}])
  511. if test "$enable_cloud" != "no"; then
  512. # just to have all messages that can fail ACLK build in one place
  513. # so it is easier to see why it can't be built
  514. if test -n "${SSL_LIBS}"; then
  515. OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}"
  516. OPTIONAL_SSL_LIBS="${SSL_LIBS}"
  517. else
  518. AC_MSG_WARN([OpenSSL required for agent-cloud-link but not found. Try installing 'libssl-dev' or 'openssl-devel'.])
  519. fi
  520. AC_MSG_CHECKING([if libmosquitto static lib is present (and builds)])
  521. if test -f "externaldeps/mosquitto/libmosquitto.a"; then
  522. LIBS_BKP="${LIBS}"
  523. LIBS="externaldeps/mosquitto/libmosquitto.a ${OPTIONAL_SSL_LIBS} ${LIBS_BKP}"
  524. AC_LINK_IFELSE([AC_LANG_SOURCE([[#include "externaldeps/mosquitto/mosquitto.h"
  525. int main (int argc, char **argv) {
  526. int m,mm,r;
  527. mosquitto_lib_version(&m, &mm, &r);
  528. }]])],
  529. [HAVE_libmosquitto_a="yes"],
  530. [HAVE_libmosquitto_a="no"])
  531. LIBS="${LIBS_BKP}"
  532. else
  533. HAVE_libmosquitto_a="no"
  534. AC_DEFINE([ACLK_NO_LIBMOSQ], [1], [Libmosquitto.a was not found during build.])
  535. fi
  536. AC_MSG_RESULT([${HAVE_libmosquitto_a}])
  537. AC_MSG_CHECKING([if libwebsockets static lib is present])
  538. if test -f "externaldeps/libwebsockets/libwebsockets.a"; then
  539. LWS_CFLAGS="-I externaldeps/libwebsockets/include"
  540. HAVE_libwebsockets_a="yes"
  541. else
  542. HAVE_libwebsockets_a="no"
  543. AC_DEFINE([ACLK_NO_LWS], [1], [libwebsockets.a was not found during build.])
  544. fi
  545. AC_MSG_RESULT([${HAVE_libwebsockets_a}])
  546. if test "${build_target}" = "linux" -a "${enable_cloud}" != "no"; then
  547. if test "${have_libcap}" = "yes" -a "${with_libcap}" = "no"; then
  548. AC_MSG_ERROR([agent-cloud-link can't be built without libcap. Disable it by --disable-cloud or enable libcap])
  549. fi
  550. if test "${with_libcap}" = "yes"; then
  551. LWS_CFLAGS+=" ${LIBCAP_CFLAGS}"
  552. fi
  553. fi
  554. # next 2 lines are just to have info for ACLK dependencies in common place
  555. AC_MSG_CHECKING([if json-c available for ACLK])
  556. AC_MSG_RESULT([${enable_jsonc}])
  557. test "${enable_cloud}" = "yes" -a "${enable_jsonc}" = "no" && \
  558. AC_MSG_ERROR([You have asked for ACLK to be built but no json-c available. ACLK requires json-c])
  559. AC_MSG_CHECKING([if netdata agent-cloud-link can be enabled])
  560. if test "${HAVE_libmosquitto_a}" = "yes" -a "${HAVE_libwebsockets_a}" = "yes" -a -n "${SSL_LIBS}" -a "${enable_jsonc}" = "yes"; then
  561. can_enable_aclk="yes"
  562. else
  563. can_enable_aclk="no"
  564. fi
  565. AC_MSG_RESULT([${can_enable_aclk}])
  566. test "${enable_cloud}" = "yes" -a "${can_enable_aclk}" = "no" && \
  567. AC_MSG_ERROR([User required agent-cloud-link but it can't be built!])
  568. AC_MSG_CHECKING([if netdata agent-cloud-link should/will be enabled])
  569. if test "${enable_cloud}" = "detect"; then
  570. enable_aclk=$can_enable_aclk
  571. else
  572. enable_aclk=$enable_cloud
  573. fi
  574. AC_SUBST([can_enable_aclk])
  575. if test "${enable_aclk}" = "yes"; then
  576. AC_DEFINE([ENABLE_ACLK], [1], [netdata ACLK])
  577. fi
  578. AC_MSG_RESULT([${enable_aclk}])
  579. fi
  580. AC_SUBST([enable_cloud])
  581. AM_CONDITIONAL([ENABLE_ACLK], [test "${enable_aclk}" = "yes"])
  582. # -----------------------------------------------------------------------------
  583. # apps.plugin
  584. AC_MSG_CHECKING([if apps.plugin should be enabled])
  585. if test "${build_target}" != "macos"; then
  586. enable_plugin_apps="yes"
  587. else
  588. enable_plugin_apps="no"
  589. fi
  590. AC_MSG_RESULT([${enable_plugin_apps}])
  591. AM_CONDITIONAL([ENABLE_PLUGIN_APPS], [test "${enable_plugin_apps}" = "yes"])
  592. # -----------------------------------------------------------------------------
  593. # freeipmi.plugin - libipmimonitoring
  594. PKG_CHECK_MODULES(
  595. [IPMIMONITORING],
  596. [libipmimonitoring],
  597. [AC_CHECK_LIB([ipmimonitoring], [
  598. ipmi_monitoring_sensor_readings_by_record_id,
  599. ipmi_monitoring_sensor_readings_by_sensor_type,
  600. ipmi_monitoring_sensor_read_sensor_number,
  601. ipmi_monitoring_sensor_read_sensor_name,
  602. ipmi_monitoring_sensor_read_sensor_state,
  603. ipmi_monitoring_sensor_read_sensor_units,
  604. ipmi_monitoring_sensor_iterator_next,
  605. ipmi_monitoring_ctx_sensor_config_file,
  606. ipmi_monitoring_ctx_sdr_cache_directory,
  607. ipmi_monitoring_ctx_errormsg,
  608. ipmi_monitoring_ctx_create
  609. ],
  610. [AC_CHECK_HEADER(
  611. [ipmi_monitoring.h],
  612. [AC_CHECK_HEADER(
  613. [ipmi_monitoring_bitmasks.h],
  614. [have_ipmimonitoring=yes],
  615. [have_ipmimonitoring=no]
  616. )],
  617. [have_ipmimonitoring=no]
  618. )],
  619. [have_ipmimonitoring=no]
  620. )],
  621. [have_ipmimonitoring=no]
  622. )
  623. test "${enable_plugin_freeipmi}" = "yes" -a "${have_ipmimonitoring}" != "yes" && \
  624. AC_MSG_ERROR([ipmimonitoring required but not found. Try installing 'libipmimonitoring-dev' or 'libipmimonitoring-devel'])
  625. AC_MSG_CHECKING([if freeipmi.plugin should be enabled])
  626. if test "${enable_plugin_freeipmi}" != "no" -a "${have_ipmimonitoring}" = "yes"; then
  627. enable_plugin_freeipmi="yes"
  628. AC_DEFINE([HAVE_FREEIPMI], [1], [ipmimonitoring usability])
  629. OPTIONAL_IPMIMONITORING_CFLAGS="${IPMIMONITORING_CFLAGS}"
  630. OPTIONAL_IPMIMONITORING_LIBS="${IPMIMONITORING_LIBS}"
  631. else
  632. enable_plugin_freeipmi="no"
  633. fi
  634. AC_MSG_RESULT([${enable_plugin_freeipmi}])
  635. AM_CONDITIONAL([ENABLE_PLUGIN_FREEIPMI], [test "${enable_plugin_freeipmi}" = "yes"])
  636. # -----------------------------------------------------------------------------
  637. # cups.plugin - libcups
  638. # Only check most recently added method of cups
  639. AC_CHECK_LIB([cups], [httpConnect2],
  640. [AC_CHECK_HEADER(
  641. [cups/cups.h],
  642. [have_cups=yes],
  643. [have_cups=no]
  644. )],
  645. [have_cups=no]
  646. )
  647. test "${enable_plugin_cups}" = "yes" -a "${have_cups}" != "yes" && \
  648. AC_MSG_ERROR([cups required but not found. Try installing 'cups'])
  649. AC_ARG_WITH([cups-config],
  650. [AS_HELP_STRING([--with-cups-config=path], [Specify path to cups-config executable.])],
  651. [with_cups_config="$withval"],
  652. [with_cups_config=system]
  653. )
  654. AS_IF([test "x$with_cups_config" != "xsystem"], [
  655. CUPSCONFIG=$with_cups_config
  656. ], [
  657. AC_PATH_TOOL(CUPSCONFIG, [cups-config])
  658. AS_IF([test -z "$CUPSCONFIG"], [
  659. have_cups=no
  660. ])
  661. ])
  662. AC_MSG_CHECKING([if cups.plugin should be enabled])
  663. if test "${enable_plugin_cups}" != "no" -a "${have_cups}" = "yes"; then
  664. enable_plugin_cups="yes"
  665. AC_DEFINE([HAVE_CUPS], [1], [cups usability])
  666. CUPS_CFLAGS="${CUPS_CFLAGS} `$CUPSCONFIG --cflags`"
  667. CUPS_LIBS="${CUPS_LIBS} `$CUPSCONFIG --libs`"
  668. OPTIONAL_CUPS_CFLAGS="${CUPS_CFLAGS}"
  669. OPTIONAL_CUPS_LIBS="${CUPS_LIBS}"
  670. else
  671. enable_plugin_cups="no"
  672. fi
  673. AC_MSG_RESULT([${enable_plugin_cups}])
  674. AM_CONDITIONAL([ENABLE_PLUGIN_CUPS], [test "${enable_plugin_cups}" = "yes"])
  675. # -----------------------------------------------------------------------------
  676. # nfacct.plugin - libmnl, libnetfilter_acct
  677. AC_CHECK_HEADER(
  678. [linux/netfilter/nfnetlink_conntrack.h],
  679. [AC_CHECK_DECL(
  680. [CTA_STATS_MAX],
  681. [have_nfnetlink_conntrack=yes],
  682. [have_nfnetlink_conntrack=no],
  683. [#include <linux/netfilter/nfnetlink_conntrack.h>]
  684. )],
  685. [have_nfnetlink_conntrack=no]
  686. )
  687. PKG_CHECK_MODULES(
  688. [NFACCT],
  689. [libnetfilter_acct],
  690. [AC_CHECK_LIB(
  691. [netfilter_acct],
  692. [nfacct_alloc],
  693. [have_libnetfilter_acct=yes],
  694. [have_libnetfilter_acct=no]
  695. )],
  696. [have_libnetfilter_acct=no]
  697. )
  698. PKG_CHECK_MODULES(
  699. [LIBMNL],
  700. [libmnl],
  701. [AC_CHECK_LIB(
  702. [mnl],
  703. [mnl_socket_open],
  704. [have_libmnl=yes],
  705. [have_libmnl=no]
  706. )],
  707. [have_libmnl=no]
  708. )
  709. test "${enable_plugin_nfacct}" = "yes" -a "${have_nfnetlink_conntrack}" != "yes" && \
  710. AC_MSG_ERROR([nfnetlink_conntrack.h required but not found or too old])
  711. test "${enable_plugin_nfacct}" = "yes" -a "${have_libnetfilter_acct}" != "yes" && \
  712. AC_MSG_ERROR([netfilter_acct required but not found])
  713. test "${enable_plugin_nfacct}" = "yes" -a "${have_libmnl}" != "yes" && \
  714. AC_MSG_ERROR([libmnl required but not found. Try installing 'libmnl-dev' or 'libmnl-devel'])
  715. AC_MSG_CHECKING([if nfacct.plugin should be enabled])
  716. if test "${enable_plugin_nfacct}" != "no" -a "${have_libnetfilter_acct}" = "yes" \
  717. -a "${have_libmnl}" = "yes" \
  718. -a "${have_nfnetlink_conntrack}" = "yes"; then
  719. enable_plugin_nfacct="yes"
  720. AC_DEFINE([HAVE_LIBMNL], [1], [libmnl usability])
  721. AC_DEFINE([HAVE_LIBNETFILTER_ACCT], [1], [libnetfilter_acct usability])
  722. AC_DEFINE([HAVE_LINUX_NETFILTER_NFNETLINK_CONNTRACK_H], [1], [libnetfilter_nfnetlink_conntrack header usability])
  723. OPTIONAL_NFACCT_CFLAGS="${NFACCT_CFLAGS} ${LIBMNL_CFLAGS}"
  724. OPTIONAL_NFACCT_LIBS="${NFACCT_LIBS} ${LIBMNL_LIBS}"
  725. else
  726. enable_plugin_nfacct="no"
  727. fi
  728. AC_MSG_RESULT([${enable_plugin_nfacct}])
  729. AM_CONDITIONAL([ENABLE_PLUGIN_NFACCT], [test "${enable_plugin_nfacct}" = "yes"])
  730. # -----------------------------------------------------------------------------
  731. # xenstat.plugin - libxenstat
  732. PKG_CHECK_MODULES(
  733. [YAJL],
  734. [yajl],
  735. [AC_CHECK_LIB(
  736. [yajl],
  737. [yajl_tree_get],
  738. [have_libyajl=yes],
  739. [have_libyajl=no]
  740. )],
  741. [have_libyajl=no]
  742. )
  743. AC_CHECK_LIB(
  744. [xenstat],
  745. [xenstat_init],
  746. [AC_CHECK_HEADER(
  747. [xenstat.h],
  748. [have_libxenstat=yes],
  749. [have_libxenstat=no]
  750. )],
  751. [have_libxenstat=no],
  752. [-lyajl]
  753. )
  754. PKG_CHECK_MODULES(
  755. [XENLIGHT],
  756. [xenlight],
  757. [AC_CHECK_LIB(
  758. [xenlight],
  759. [libxl_domain_info],
  760. [AC_CHECK_HEADER(
  761. [libxl.h],
  762. [have_libxenlight=yes],
  763. [have_libxenlight=no]
  764. )],
  765. [have_libxenlight=no]
  766. )],
  767. [have_libxenlight=no]
  768. )
  769. test "${enable_plugin_xenstat}" = "yes" -a "${have_libxenstat}" != "yes" && \
  770. AC_MSG_ERROR([libxenstat required but not found. try installing 'xen-dom0-libs-devel'])
  771. test "${enable_plugin_xenstat}" = "yes" -a "${have_libxenlight}" != "yes" && \
  772. AC_MSG_ERROR([libxenlight required but not found. try installing 'xen-dom0-libs-devel'])
  773. test "${enable_plugin_xenstat}" = "yes" -a "${have_libyajl}" != "yes" && \
  774. AC_MSG_ERROR([libyajl required but not found. Try installing 'yajl-devel'])
  775. AC_MSG_CHECKING([if xenstat.plugin should be enabled])
  776. if test "${enable_plugin_xenstat}" != "no" -a "${have_libxenstat}" = "yes" -a "${have_libxenlight}" = "yes" -a "${have_libyajl}" = "yes"; then
  777. enable_plugin_xenstat="yes"
  778. AC_DEFINE([HAVE_LIBXENSTAT], [1], [libxenstat usability])
  779. AC_DEFINE([HAVE_LIBXENLIGHT], [1], [libxenlight usability])
  780. AC_DEFINE([HAVE_LIBYAJL], [1], [libyajl usability])
  781. OPTIONAL_XENSTAT_CFLAGS="${XENLIGHT_CFLAGS} ${YAJL_CFLAGS}"
  782. OPTIONAL_XENSTAT_LIBS="-lxenstat ${XENLIGHT_LIBS} ${YAJL_LIBS}"
  783. else
  784. enable_plugin_xenstat="no"
  785. fi
  786. AC_MSG_RESULT([${enable_plugin_xenstat}])
  787. AM_CONDITIONAL([ENABLE_PLUGIN_XENSTAT], [test "${enable_plugin_xenstat}" = "yes"])
  788. if test "${enable_plugin_xenstat}" == "yes"; then
  789. AC_MSG_CHECKING([for xenstat_vbd_error in -lxenstat])
  790. AC_TRY_LINK(
  791. [ #include <xenstat.h> ],
  792. [
  793. xenstat_vbd * vbd;
  794. int out = xenstat_vbd_error(vbd);
  795. ],
  796. [
  797. have_xenstat_vbd_error=yes
  798. AC_DEFINE([HAVE_XENSTAT_VBD_ERROR], [1], [xenstat_vbd_error usability])
  799. ],
  800. [ have_xenstat_vbd_error=no ]
  801. )
  802. AC_MSG_RESULT([${have_xenstat_vbd_error}])
  803. fi
  804. # -----------------------------------------------------------------------------
  805. # perf.plugin
  806. AC_CHECK_HEADER(
  807. [linux/perf_event.h],
  808. [AC_CHECK_DECL(
  809. [PERF_COUNT_HW_REF_CPU_CYCLES],
  810. [have_perf_event=yes],
  811. [have_perf_event=no],
  812. [#include <linux/perf_event.h>]
  813. )],
  814. [have_perf_event=no]
  815. )
  816. AC_MSG_CHECKING([if perf.plugin should be enabled])
  817. if test "${build_target}" == "linux" -a "${have_perf_event}" = "yes"; then
  818. enable_plugin_perf="yes"
  819. else
  820. enable_plugin_perf="no"
  821. fi
  822. AC_MSG_RESULT([${enable_plugin_perf}])
  823. AM_CONDITIONAL([ENABLE_PLUGIN_PERF], [test "${enable_plugin_perf}" = "yes"])
  824. # -----------------------------------------------------------------------------
  825. # ebpf.plugin
  826. AC_MSG_CHECKING([if ebpf.plugin should be enabled])
  827. if test "${build_target}" == "linux" -a "${EBPF_LIBS}"; then
  828. enable_ebpf="yes"
  829. else
  830. enable_ebpf="no"
  831. fi
  832. AC_MSG_RESULT([${enable_ebpf}])
  833. AM_CONDITIONAL([ENABLE_PLUGIN_EBPF], [test "${enable_ebpf}" = "yes"])
  834. # -----------------------------------------------------------------------------
  835. # slabinfo.plugin
  836. AC_MSG_CHECKING([if slabinfo.plugin should be enabled])
  837. if test "${build_target}" == "linux"; then
  838. enable_plugin_slabinfo="yes"
  839. else
  840. enable_plugin_slabinfo="no"
  841. fi
  842. AC_MSG_RESULT([${enable_plugin_slabinfo}])
  843. AM_CONDITIONAL([ENABLE_PLUGIN_SLABINFO], [test "${enable_plugin_slabinfo}" = "yes"])
  844. # -----------------------------------------------------------------------------
  845. # AWS Kinesis backend - libaws-cpp-sdk-kinesis, libaws-cpp-sdk-core, libssl, libcrypto, libcurl
  846. PKG_CHECK_MODULES(
  847. [LIBCRYPTO],
  848. [libcrypto],
  849. [AC_CHECK_LIB(
  850. [crypto],
  851. [CRYPTO_new_ex_data],
  852. [have_libcrypto=yes],
  853. [have_libcrypto=no]
  854. )],
  855. [have_libcrypto=no]
  856. )
  857. PKG_CHECK_MODULES(
  858. [LIBSSL],
  859. [libssl],
  860. [AC_CHECK_LIB(
  861. [ssl],
  862. [SSL_connect],
  863. [have_libssl=yes],
  864. [have_libssl=no]
  865. )],
  866. [have_libssl=no]
  867. )
  868. PKG_CHECK_MODULES(
  869. [LIBCURL],
  870. [libcurl],
  871. [AC_CHECK_LIB(
  872. [curl],
  873. [curl_easy_init],
  874. [have_libcurl=yes],
  875. [have_libcurl=no]
  876. )],
  877. [have_libcurl=no]
  878. )
  879. AC_CHECK_LIB(
  880. [aws-cpp-sdk-core],
  881. [cJSON_free],
  882. [have_libaws_cpp_sdk_core=yes],
  883. [have_libaws_cpp_sdk_core=no],
  884. [${LIBCRYPTO_LIBS} ${LIBSSL_LIBS} ${LIBCURL_LIBS}]
  885. )
  886. AC_MSG_CHECKING([for Aws::Kinesis::Model::PutRecordRequest in -laws-cpp-sdk-kinesis])
  887. if test "${have_libaws_cpp_sdk_core}" = "yes" -a "${have_libcrypto}" = "yes" -a "${have_libssl}" = "yes" -a "${have_libcurl}" = "yes"; then
  888. AC_LANG_SAVE
  889. AC_LANG_CPLUSPLUS
  890. save_LIBS="${LIBS}"
  891. LIBS="-laws-cpp-sdk-kinesis -laws-cpp-sdk-core ${LIBCRYPTO_LIBS} ${LIBSSL_LIBS} ${LIBCURL_LIBS}"
  892. save_CXXFLAGS="${CXXFLAGS}"
  893. CXXFLAGS="${CXXFLAGS} -std=c++11"
  894. AC_TRY_LINK(
  895. [
  896. #include <aws/core/Aws.h>
  897. #include <aws/core/client/ClientConfiguration.h>
  898. #include <aws/core/auth/AWSCredentials.h>
  899. #include <aws/core/utils/Outcome.h>
  900. #include <aws/kinesis/KinesisClient.h>
  901. #include <aws/kinesis/model/PutRecordRequest.h>
  902. ],
  903. [Aws::Kinesis::Model::PutRecordRequest request;],
  904. [have_libaws_cpp_sdk_kinesis=yes],
  905. [have_libaws_cpp_sdk_kinesis=no]
  906. )
  907. LIBS="${save_LIBS}"
  908. CXXFLAGS="${save_CXXFLAGS}"
  909. AC_LANG_RESTORE
  910. else
  911. have_libaws_cpp_sdk_kinesis=no
  912. fi
  913. AC_MSG_RESULT([${have_libaws_cpp_sdk_kinesis}])
  914. test "${enable_backend_kinesis}" = "yes" -a "${have_libaws_cpp_sdk_kinesis}" != "yes" && \
  915. AC_MSG_ERROR([libaws-cpp-sdk-kinesis required but not found. try installing AWS C++ SDK])
  916. test "${enable_backend_kinesis}" = "yes" -a "${have_libaws_cpp_sdk_core}" != "yes" && \
  917. AC_MSG_ERROR([libaws-cpp-sdk-core required but not found. try installing AWS C++ SDK])
  918. test "${enable_backend_kinesis}" = "yes" -a "${have_libcurl}" != "yes" && \
  919. AC_MSG_ERROR([libcurl required but not found])
  920. test "${enable_backend_kinesis}" = "yes" -a "${have_libssl}" != "yes" && \
  921. AC_MSG_ERROR([libssl required but not found])
  922. test "${enable_backend_kinesis}" = "yes" -a "${have_libcrypto}" != "yes" && \
  923. AC_MSG_ERROR([libcrypto required but not found])
  924. AC_MSG_CHECKING([if kinesis backend should be enabled])
  925. if test "${enable_backend_kinesis}" != "no" -a "${have_libaws_cpp_sdk_kinesis}" = "yes" -a "${have_libaws_cpp_sdk_core}" = "yes" \
  926. -a "${have_libcurl}" = "yes" -a "${have_libssl}" = "yes" -a "${have_libcrypto}" = "yes"; then
  927. enable_backend_kinesis="yes"
  928. AC_DEFINE([HAVE_KINESIS], [1], [libaws-cpp-sdk-kinesis usability])
  929. OPTIONAL_KINESIS_CFLAGS="${LIBCRYPTO_CFLAGS} ${LIBSSL_CFLAGS} ${LIBCURL_CFLAGS}"
  930. CXX11FLAG="-std=c++11"
  931. OPTIONAL_KINESIS_LIBS="-laws-cpp-sdk-kinesis -laws-cpp-sdk-core ${LIBCRYPTO_LIBS} ${LIBSSL_LIBS} ${LIBCURL_LIBS}"
  932. else
  933. enable_backend_kinesis="no"
  934. fi
  935. AC_MSG_RESULT([${enable_backend_kinesis}])
  936. AM_CONDITIONAL([ENABLE_BACKEND_KINESIS], [test "${enable_backend_kinesis}" = "yes"])
  937. # -----------------------------------------------------------------------------
  938. # Pub/Sub exporting connector - googleapis
  939. PKG_CHECK_MODULES(
  940. [GRPC],
  941. [grpc],
  942. [have_libgrpc=yes],
  943. [have_libgrpc=no]
  944. )
  945. PKG_CHECK_MODULES(
  946. [PUBSUB],
  947. [googleapis_cpp_pubsub_protos],
  948. [have_pubsub_protos=yes],
  949. [have_pubsub_protos=no]
  950. )
  951. AC_PATH_PROG([CXX_BINARY], [${CXX}], [no])
  952. AS_IF(
  953. [test x"${CXX_BINARY}" == x"no"],
  954. [have_CXX_compiler=no],
  955. [have_CXX_compiler=yes]
  956. )
  957. test "${enable_pubsub}" = "yes" -a "${have_grpc}" != "yes" && \
  958. AC_MSG_ERROR([libgrpc required but not found. try installing grpc])
  959. test "${enable_pubsub}" = "yes" -a "${have_pubsub_protos}" != "yes" && \
  960. AC_MSG_ERROR([libgoogleapis_cpp_pubsub_protos required but not found. try installing googleapis])
  961. test "${enable_backend_prometheus_remote_write}" = "yes" -a "${have_CXX_compiler}" != "yes" && \
  962. AC_MSG_ERROR([C++ compiler required but not found. try installing g++])
  963. AC_MSG_CHECKING([if pubsub exporting connector should be enabled])
  964. if test "${enable_exporting_pubsub}" != "no" -a "${have_pubsub_protos}" = "yes" -a "${have_CXX_compiler}" = "yes"; then
  965. enable_exporting_pubsub="yes"
  966. AC_DEFINE([ENABLE_EXPORTING_PUBSUB], [1], [Pub/Sub API usability])
  967. OPTIONAL_PUBSUB_CFLAGS="${GRPC_CFLAGS} ${PUBSUB_CFLAGS}"
  968. CXX11FLAG="-std=c++11"
  969. OPTIONAL_PUBSUB_LIBS="${GRPC_LIBS} ${PUBSUB_LIBS}"
  970. else
  971. enable_pubsub="no"
  972. fi
  973. AC_MSG_RESULT([${enable_exporting_pubsub}])
  974. AM_CONDITIONAL([ENABLE_EXPORTING_PUBSUB], [test "${enable_exporting_pubsub}" = "yes"])
  975. # -----------------------------------------------------------------------------
  976. # Prometheus remote write backend - libprotobuf, libsnappy, protoc
  977. PKG_CHECK_MODULES(
  978. [PROTOBUF],
  979. [protobuf >= 3],
  980. [have_libprotobuf=yes],
  981. [have_libprotobuf=no]
  982. )
  983. AC_MSG_CHECKING([for snappy::RawCompress in -lsnappy])
  984. AC_LANG_SAVE
  985. AC_LANG_CPLUSPLUS
  986. save_LIBS="${LIBS}"
  987. LIBS="-lsnappy"
  988. save_CXXFLAGS="${CXXFLAGS}"
  989. CXXFLAGS="${CXXFLAGS} -std=c++11"
  990. AC_TRY_LINK(
  991. [
  992. #include <stdlib.h>
  993. #include <snappy.h>
  994. ],
  995. [
  996. const char *input = "test";
  997. size_t compressed_length;
  998. char *buffer = (char *)malloc(5 * sizeof(char));
  999. snappy::RawCompress(input, 4, buffer, &compressed_length);
  1000. free(buffer);
  1001. ],
  1002. [
  1003. have_libsnappy=yes
  1004. SNAPPY_CFLAGS=""
  1005. SNAPPY_LIBS="-lsnappy"
  1006. ],
  1007. [have_libsnappy=no]
  1008. )
  1009. LIBS="${save_LIBS}"
  1010. CXXFLAGS="${save_CXXFLAGS}"
  1011. AC_LANG_RESTORE
  1012. AC_MSG_RESULT([${have_libsnappy}])
  1013. AC_PATH_PROG([PROTOC], [protoc], [no])
  1014. AS_IF(
  1015. [test x"${PROTOC}" == x"no"],
  1016. [have_protoc=no],
  1017. [have_protoc=yes]
  1018. )
  1019. AC_PATH_PROG([CXX_BINARY], [${CXX}], [no])
  1020. AS_IF(
  1021. [test x"${CXX_BINARY}" == x"no"],
  1022. [have_CXX_compiler=no],
  1023. [have_CXX_compiler=yes]
  1024. )
  1025. test "${enable_backend_prometheus_remote_write}" = "yes" -a "${have_libprotobuf}" != "yes" && \
  1026. AC_MSG_ERROR([libprotobuf required but not found. try installing protobuf])
  1027. test "${enable_backend_prometheus_remote_write}" = "yes" -a "${have_libsnappy}" != "yes" && \
  1028. AC_MSG_ERROR([libsnappy required but not found. try installing snappy])
  1029. test "${enable_backend_prometheus_remote_write}" = "yes" -a "${have_protoc}" != "yes" && \
  1030. AC_MSG_ERROR([protoc compiler required but not found. try installing protobuf])
  1031. test "${enable_backend_prometheus_remote_write}" = "yes" -a "${have_CXX_compiler}" != "yes" && \
  1032. AC_MSG_ERROR([C++ compiler required but not found. try installing g++])
  1033. AC_MSG_CHECKING([if prometheus remote write backend should be enabled])
  1034. if test "${enable_backend_prometheus_remote_write}" != "no" -a "${have_libprotobuf}" = "yes" -a "${have_libsnappy}" = "yes" \
  1035. -a "${have_protoc}" = "yes" -a "${have_CXX_compiler}" = "yes"; then
  1036. enable_backend_prometheus_remote_write="yes"
  1037. AC_DEFINE([ENABLE_PROMETHEUS_REMOTE_WRITE], [1], [Prometheus remote write API usability])
  1038. OPTIONAL_PROMETHEUS_REMOTE_WRITE_CFLAGS="${PROTOBUF_CFLAGS} ${SNAPPY_CFLAGS} -Iexporting/prometheus/remote_write"
  1039. CXX11FLAG="-std=c++11"
  1040. OPTIONAL_PROMETHEUS_REMOTE_WRITE_LIBS="${PROTOBUF_LIBS} ${SNAPPY_LIBS}"
  1041. else
  1042. enable_backend_prometheus_remote_write="no"
  1043. fi
  1044. AC_MSG_RESULT([${enable_backend_prometheus_remote_write}])
  1045. AM_CONDITIONAL([ENABLE_BACKEND_PROMETHEUS_REMOTE_WRITE], [test "${enable_backend_prometheus_remote_write}" = "yes"])
  1046. # -----------------------------------------------------------------------------
  1047. # MongoDB backend - libmongoc
  1048. PKG_CHECK_MODULES(
  1049. [LIBMONGOC],
  1050. [libmongoc-1.0 >= 1.7],
  1051. [have_libmongoc=yes],
  1052. [have_libmongoc=no]
  1053. )
  1054. test "${enable_backend_mongodb}" = "yes" -a "${have_libmongoc}" != "yes" && \
  1055. AC_MSG_ERROR([libmongoc required but not found. Try installing `mongoc`.])
  1056. AC_MSG_CHECKING([if mongodb backend should be enabled])
  1057. if test "${enable_backend_mongodb}" != "no" -a "${have_libmongoc}" = "yes"; then
  1058. enable_backend_mongodb="yes"
  1059. AC_DEFINE([HAVE_MONGOC], [1], [libmongoc usability])
  1060. OPTIONAL_MONGOC_CFLAGS="${LIBMONGOC_CFLAGS}"
  1061. OPTIONAL_MONGOC_LIBS="${LIBMONGOC_LIBS}"
  1062. else
  1063. enable_backend_mongodb="no"
  1064. fi
  1065. AC_MSG_RESULT([${enable_backend_mongodb}])
  1066. AM_CONDITIONAL([ENABLE_BACKEND_MONGODB], [test "${enable_backend_mongodb}" = "yes"])
  1067. # -----------------------------------------------------------------------------
  1068. # check for setns() - cgroup-network
  1069. AC_CHECK_FUNC([setns])
  1070. AC_MSG_CHECKING([if cgroup-network can be enabled])
  1071. if test "$ac_cv_func_setns" = "yes" ; then
  1072. have_setns="yes"
  1073. AC_DEFINE([HAVE_SETNS], [1], [Define 1 if you have setns() function])
  1074. else
  1075. have_setns="no"
  1076. fi
  1077. AC_MSG_RESULT([${have_setns}])
  1078. AM_CONDITIONAL([ENABLE_PLUGIN_CGROUP_NETWORK], [test "${have_setns}" = "yes"])
  1079. # -----------------------------------------------------------------------------
  1080. # Link-Time-Optimization
  1081. if test "${enable_lto}" != "no"; then
  1082. opt="-flto"
  1083. AX_CHECK_COMPILE_FLAG(${opt}, [have_lto=yes], [have_lto=no])
  1084. fi
  1085. if test "${have_lto}" = "yes"; then
  1086. oCFLAGS="${CFLAGS}"
  1087. CFLAGS="${CFLAGS} -flto"
  1088. ac_cv_c_lto_cross_compile="${enable_lto}"
  1089. test "${ac_cv_c_lto_cross_compile}" != "yes" && ac_cv_c_lto_cross_compile="no"
  1090. AC_C_LTO
  1091. CFLAGS="${oCFLAGS}"
  1092. test "${ac_cv_c_lto}" != "yes" && have_lto="no"
  1093. fi
  1094. test "${enable_lto}" = "yes" -a "${have_lto}" != "yes" && \
  1095. AC_MSG_ERROR([LTO is required but is not available.])
  1096. AC_MSG_CHECKING([if LTO should be enabled])
  1097. if test "${enable_lto}" != "no" -a "${have_lto}" = "yes"; then
  1098. enable_lto="yes"
  1099. CFLAGS="${CFLAGS} -flto"
  1100. else
  1101. enable_lto="no"
  1102. fi
  1103. AC_MSG_RESULT([${enable_lto}])
  1104. # -----------------------------------------------------------------------------
  1105. AM_CONDITIONAL([ENABLE_CXX_LINKER], [test "${enable_backend_kinesis}" = "yes" \
  1106. -o "${enable_exporting_pubsub}" = "yes" \
  1107. -o "${enable_backend_prometheus_remote_write}" = "yes"])
  1108. AC_DEFINE_UNQUOTED([NETDATA_USER], ["${with_user}"], [use this user to drop privileged])
  1109. varlibdir="${localstatedir}/lib/netdata"
  1110. registrydir="${localstatedir}/lib/netdata/registry"
  1111. cachedir="${localstatedir}/cache/netdata"
  1112. chartsdir="${libexecdir}/netdata/charts.d"
  1113. nodedir="${libexecdir}/netdata/node.d"
  1114. pythondir="${libexecdir}/netdata/python.d"
  1115. configdir="${sysconfdir}/netdata"
  1116. libconfigdir="${libdir}/netdata/conf.d"
  1117. logdir="${localstatedir}/log/netdata"
  1118. pluginsdir="${libexecdir}/netdata/plugins.d"
  1119. AC_SUBST([build_target])
  1120. AC_SUBST([varlibdir])
  1121. AC_SUBST([registrydir])
  1122. AC_SUBST([cachedir])
  1123. AC_SUBST([chartsdir])
  1124. AC_SUBST([nodedir])
  1125. AC_SUBST([pythondir])
  1126. AC_SUBST([configdir])
  1127. AC_SUBST([libconfigdir])
  1128. AC_SUBST([logdir])
  1129. AC_SUBST([pluginsdir])
  1130. AC_SUBST([webdir])
  1131. CFLAGS="${CFLAGS} ${OPTIONAL_MATH_CFLAGS} ${OPTIONAL_NFACCT_CFLAGS} ${OPTIONAL_ZLIB_CFLAGS} ${OPTIONAL_UUID_CFLAGS} \
  1132. ${OPTIONAL_LIBCAP_CFLAGS} ${OPTIONAL_IPMIMONITORING_CFLAGS} ${OPTIONAL_CUPS_CFLAGS} ${OPTIONAL_XENSTAT_FLAGS} \
  1133. ${OPTIONAL_KINESIS_CFLAGS} ${OPTIONAL_PUBSUB_CFLAGS} ${OPTIONAL_PROMETHEUS_REMOTE_WRITE_CFLAGS} \
  1134. ${OPTIONAL_MONGOC_CFLAGS} ${LWS_CFLAGS} ${OPTIONAL_JSONC_STATIC_CFLAGS}"
  1135. CXXFLAGS="${CFLAGS} ${CXX11FLAG}"
  1136. CPPFLAGS="\
  1137. -DTARGET_OS=${build_target_id} \
  1138. -DVARLIB_DIR=\"\\\"${varlibdir}\\\"\" \
  1139. -DCACHE_DIR=\"\\\"${cachedir}\\\"\" \
  1140. -DCONFIG_DIR=\"\\\"${configdir}\\\"\" \
  1141. -DLIBCONFIG_DIR=\"\\\"${libconfigdir}\\\"\" \
  1142. -DLOG_DIR=\"\\\"${logdir}\\\"\" \
  1143. -DPLUGINS_DIR=\"\\\"${pluginsdir}\\\"\" \
  1144. -DRUN_DIR=\"\\\"${localstatedir}/run/netdata\\\"\" \
  1145. -DWEB_DIR=\"\\\"${webdir}\\\"\" \
  1146. "
  1147. AC_SUBST([OPTIONAL_MATH_CFLAGS])
  1148. AC_SUBST([OPTIONAL_MATH_LIBS])
  1149. AC_SUBST([OPTIONAL_UV_LIBS])
  1150. AC_SUBST([OPTIONAL_LZ4_LIBS])
  1151. AC_SUBST([OPTIONAL_JUDY_LIBS])
  1152. AC_SUBST([OPTIONAL_SSL_LIBS])
  1153. AC_SUBST([OPTIONAL_EBPF_LIBS])
  1154. AC_SUBST([OPTIONAL_JSONC_LIBS])
  1155. AC_SUBST([OPTIONAL_NFACCT_CFLAGS])
  1156. AC_SUBST([OPTIONAL_NFACCT_LIBS])
  1157. AC_SUBST([OPTIONAL_ZLIB_CFLAGS])
  1158. AC_SUBST([OPTIONAL_ZLIB_LIBS])
  1159. AC_SUBST([OPTIONAL_UUID_CFLAGS])
  1160. AC_SUBST([OPTIONAL_UUID_LIBS])
  1161. AC_SUBST([OPTIONAL_MQTT_LIBS])
  1162. AC_SUBST([OPTIONAL_LIBCAP_CFLAGS])
  1163. AC_SUBST([OPTIONAL_LIBCAP_LIBS])
  1164. AC_SUBST([OPTIONAL_IPMIMONITORING_CFLAGS])
  1165. AC_SUBST([OPTIONAL_IPMIMONITORING_LIBS])
  1166. AC_SUBST([OPTIONAL_CUPS_CFLAGS])
  1167. AC_SUBST([OPTIONAL_CUPS_LIBS])
  1168. AC_SUBST([OPTIONAL_XENSTAT_CFLAGS])
  1169. AC_SUBST([OPTIONAL_XENSTAT_LIBS])
  1170. AC_SUBST([OPTIONAL_KINESIS_CFLAGS])
  1171. AC_SUBST([OPTIONAL_KINESIS_LIBS])
  1172. AC_SUBST([OPTIONAL_PUBSUB_CFLAGS])
  1173. AC_SUBST([OPTIONAL_PUBSUB_LIBS])
  1174. AC_SUBST([OPTIONAL_PROMETHEUS_REMOTE_WRITE_CFLAGS])
  1175. AC_SUBST([OPTIONAL_PROMETHEUS_REMOTE_WRITE_LIBS])
  1176. AC_SUBST([OPTIONAL_MONGOC_CFLAGS])
  1177. AC_SUBST([OPTIONAL_MONGOC_LIBS])
  1178. # -----------------------------------------------------------------------------
  1179. # Check if cmocka is available - needed for unit testing
  1180. AC_ARG_ENABLE(
  1181. [unit-tests],
  1182. [AS_HELP_STRING([--disable-unit-tests],
  1183. [Disables building and running the unit tests suite])],
  1184. [],
  1185. [enable_unit_tests="yes"]
  1186. )
  1187. PKG_CHECK_MODULES(
  1188. [CMOCKA],
  1189. [cmocka],
  1190. [have_cmocka="yes"],
  1191. [AC_MSG_NOTICE([CMocka not found on the system. Unit tests disabled])]
  1192. )
  1193. AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ])
  1194. AC_SUBST([ENABLE_UNITTESTS])
  1195. TEST_CFLAGS="${CFLAGS} ${CMOCKA_CFLAGS}"
  1196. TEST_LIBS="${CMOCKA_LIBS}"
  1197. AC_SUBST([TEST_CFLAGS])
  1198. AC_SUBST([TEST_LIBS])
  1199. AC_CONFIG_FILES([
  1200. Makefile
  1201. netdata.spec
  1202. backends/graphite/Makefile
  1203. backends/json/Makefile
  1204. backends/Makefile
  1205. backends/opentsdb/Makefile
  1206. backends/prometheus/Makefile
  1207. backends/prometheus/remote_write/Makefile
  1208. backends/aws_kinesis/Makefile
  1209. backends/mongodb/Makefile
  1210. collectors/Makefile
  1211. collectors/apps.plugin/Makefile
  1212. collectors/cgroups.plugin/Makefile
  1213. collectors/charts.d.plugin/Makefile
  1214. collectors/checks.plugin/Makefile
  1215. collectors/diskspace.plugin/Makefile
  1216. collectors/fping.plugin/Makefile
  1217. collectors/ioping.plugin/Makefile
  1218. collectors/freebsd.plugin/Makefile
  1219. collectors/freeipmi.plugin/Makefile
  1220. collectors/cups.plugin/Makefile
  1221. collectors/idlejitter.plugin/Makefile
  1222. collectors/macos.plugin/Makefile
  1223. collectors/nfacct.plugin/Makefile
  1224. collectors/node.d.plugin/Makefile
  1225. collectors/plugins.d/Makefile
  1226. collectors/proc.plugin/Makefile
  1227. collectors/python.d.plugin/Makefile
  1228. collectors/slabinfo.plugin/Makefile
  1229. collectors/statsd.plugin/Makefile
  1230. collectors/ebpf.plugin/Makefile
  1231. collectors/tc.plugin/Makefile
  1232. collectors/xenstat.plugin/Makefile
  1233. collectors/perf.plugin/Makefile
  1234. daemon/Makefile
  1235. database/Makefile
  1236. database/engine/Makefile
  1237. database/engine/metadata_log/Makefile
  1238. database/engine/global_uuid_map/Makefile
  1239. diagrams/Makefile
  1240. exporting/Makefile
  1241. exporting/graphite/Makefile
  1242. exporting/json/Makefile
  1243. exporting/opentsdb/Makefile
  1244. exporting/prometheus/Makefile
  1245. exporting/prometheus/remote_write/Makefile
  1246. exporting/aws_kinesis/Makefile
  1247. exporting/pubsub/Makefile
  1248. exporting/mongodb/Makefile
  1249. exporting/tests/Makefile
  1250. health/Makefile
  1251. health/notifications/Makefile
  1252. libnetdata/Makefile
  1253. libnetdata/tests/Makefile
  1254. libnetdata/adaptive_resortable_list/Makefile
  1255. libnetdata/avl/Makefile
  1256. libnetdata/buffer/Makefile
  1257. libnetdata/clocks/Makefile
  1258. libnetdata/config/Makefile
  1259. libnetdata/dictionary/Makefile
  1260. libnetdata/ebpf/Makefile
  1261. libnetdata/eval/Makefile
  1262. libnetdata/locks/Makefile
  1263. libnetdata/log/Makefile
  1264. libnetdata/popen/Makefile
  1265. libnetdata/procfile/Makefile
  1266. libnetdata/simple_pattern/Makefile
  1267. libnetdata/socket/Makefile
  1268. libnetdata/statistical/Makefile
  1269. libnetdata/storage_number/Makefile
  1270. libnetdata/storage_number/tests/Makefile
  1271. libnetdata/threads/Makefile
  1272. libnetdata/url/Makefile
  1273. libnetdata/json/Makefile
  1274. libnetdata/health/Makefile
  1275. registry/Makefile
  1276. streaming/Makefile
  1277. system/Makefile
  1278. tests/Makefile
  1279. web/Makefile
  1280. web/api/Makefile
  1281. web/api/badges/Makefile
  1282. web/api/exporters/Makefile
  1283. web/api/exporters/shell/Makefile
  1284. web/api/exporters/prometheus/Makefile
  1285. web/api/formatters/Makefile
  1286. web/api/formatters/csv/Makefile
  1287. web/api/formatters/json/Makefile
  1288. web/api/formatters/ssv/Makefile
  1289. web/api/formatters/value/Makefile
  1290. web/api/queries/Makefile
  1291. web/api/queries/average/Makefile
  1292. web/api/queries/des/Makefile
  1293. web/api/queries/incremental_sum/Makefile
  1294. web/api/queries/max/Makefile
  1295. web/api/queries/median/Makefile
  1296. web/api/queries/min/Makefile
  1297. web/api/queries/ses/Makefile
  1298. web/api/queries/stddev/Makefile
  1299. web/api/queries/sum/Makefile
  1300. web/api/health/Makefile
  1301. web/gui/Makefile
  1302. web/server/Makefile
  1303. web/server/static/Makefile
  1304. claim/Makefile
  1305. aclk/Makefile
  1306. spawn/Makefile
  1307. parser/Makefile
  1308. ])
  1309. AC_OUTPUT
  1310. test "${with_math}" != "yes" && AC_MSG_WARN([You are building without math. math allows accurate calculations. It should be enabled.]) || :
  1311. test "${with_zlib}" != "yes" && AC_MSG_WARN([You are building without zlib. zlib allows netdata to transfer a lot less data with web clients. It should be enabled.]) || :