]> arthur.barton.de Git - netdata.git/blob - m4/ax_c_mallopt.m4
rename chart fields to avoid conflicts with backends; fixes #1962
[netdata.git] / m4 / ax_c_mallopt.m4
1 # AC_C_MALLOPT
2 # -------------
3 # Define HAVE_C_MALLOPT if mallopt() works.
4 AN_IDENTIFIER([mallopt], [AC_C_MALLOPT])
5 AC_DEFUN([AC_C_MALLOPT],
6 [AC_CACHE_CHECK([for mallopt], ac_cv_c_mallopt,
7 [AC_LINK_IFELSE(
8    [AC_LANG_SOURCE(
9       [[#include <malloc.h>
10         int main(int argc, char **argv) {
11           mallopt(M_ARENA_MAX, 1);
12         }
13       ]])],
14    [ac_cv_c_mallopt=yes],
15    [ac_cv_c_mallopt=no])])
16 if test $ac_cv_c_mallopt = yes; then
17   AC_DEFINE([HAVE_C_MALLOPT], 1,
18            [Define to 1 if glibc mallopt exists.])
19 fi
20 ])# AC_C_MALLOPT