configure.ac 48 KB

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