summaryrefslogtreecommitdiffstats
path: root/build/m4/ax_c_mallopt.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:22:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:22:31 +0000
commit8d4f58e49b9dc7d3545651023a36729de773ad86 (patch)
tree7bc7be4a8e9e298daa1349348400aa2a653866f2 /build/m4/ax_c_mallopt.m4
parentInitial commit. (diff)
downloadnetdata-8d4f58e49b9dc7d3545651023a36729de773ad86.tar.xz
netdata-8d4f58e49b9dc7d3545651023a36729de773ad86.zip
Adding upstream version 1.12.0.upstream/1.12.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build/m4/ax_c_mallopt.m4')
-rw-r--r--build/m4/ax_c_mallopt.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/build/m4/ax_c_mallopt.m4 b/build/m4/ax_c_mallopt.m4
new file mode 100644
index 0000000..31c4fdc
--- /dev/null
+++ b/build/m4/ax_c_mallopt.m4
@@ -0,0 +1,20 @@
+# AC_C_MALLOPT
+# -------------
+# Define HAVE_C_MALLOPT if mallopt() works.
+AN_IDENTIFIER([mallopt], [AC_C_MALLOPT])
+AC_DEFUN([AC_C_MALLOPT],
+[AC_CACHE_CHECK([for mallopt], ac_cv_c_mallopt,
+[AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#include <malloc.h>
+ int main(int argc, char **argv) {
+ mallopt(M_ARENA_MAX, 1);
+ }
+ ]])],
+ [ac_cv_c_mallopt=yes],
+ [ac_cv_c_mallopt=no])])
+if test $ac_cv_c_mallopt = yes; then
+ AC_DEFINE([HAVE_C_MALLOPT], 1,
+ [Define to 1 if glibc mallopt exists.])
+fi
+])# AC_C_MALLOPT