From 3b9b6d0b8e7f798023c9d109c490449d528fde80 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:59:48 +0200 Subject: Adding upstream version 1:9.18.19. Signed-off-by: Daniel Baumann --- m4/ax_jemalloc.m4 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 m4/ax_jemalloc.m4 (limited to 'm4/ax_jemalloc.m4') diff --git a/m4/ax_jemalloc.m4 b/m4/ax_jemalloc.m4 new file mode 100644 index 0000000..b400178 --- /dev/null +++ b/m4/ax_jemalloc.m4 @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: FSFAP +# +# =========================================================================== +# https://gitlab.isc.org/isc-projects/autoconf-archive/ax_jemalloc.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_JEMALLOC([, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# Test for the jemalloc library in a path +# +# LICENSE +# +# Copyright (c) 2021 Internet Systems Consortium +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 1 + +# +AC_DEFUN([AX_CHECK_JEMALLOC], [ + found=false + PKG_CHECK_MODULES( + [JEMALLOC], [jemalloc], + [ + found=true + ], [ + AC_CHECK_HEADERS([malloc_np.h jemalloc/jemalloc.h], + [ + save_LIBS="$LIBS" + save_LDFLAGS="$LDFLAGS" + save_CPPFLAGS="$CPPFLAGS" + AC_SEARCH_LIBS([mallocx], [jemalloc], + [ + found=true + AS_IF([test "$ac_cv_search_mallocx" != "none required"], + [JEMALLOC_LIBS="$ac_cv_search_mallocx"]) + ]) + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ]) + ]) + + AS_IF([$found], [$1], [$2]) + + AC_SUBST([JEMALLOC_CFLAGS]) + AC_SUBST([JEMALLOC_LIBS]) +]) -- cgit v1.2.3