aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-05-19 21:21:52 +0400
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-05-20 00:07:05 +0400
commit62177d06bd9d31242e67995d4e33a755a3447ca2 (patch)
tree41cf5451e1d93a0e7a8ae94d60ebc2bdc7607e08 /configure.ac
parentc011363117c18d9332c42d4e5ec7f6ba3f932ec3 (diff)
check for sbrk() even on UNIX
* Turns out that not all UNIXes support sbrk(). FreeBSD arm64 and riscv ports don't implement sbrk(). It's also apparently not in POSIX - so other systems might also be affected. This needs to be passed on to dlmalloc. * We now use DLMALLOC_CPPFLAGS instead of conditionals to pass on flags to dlmalloc. * Should be backported to the FreeBSD v2.5.2 package to fix Poudriere fallout.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b5cac0b..43b4d1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,10 +18,10 @@ AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AX_CHECK_ENABLE_DEBUG
-AM_CONDITIONAL(DEBUG, [test x$ax_enable_debug != xno])
if [[ x$ax_enable_debug = xno ]]; then
# glib does not look at NDEBUG
AC_DEFINE(G_DISABLE_ASSERT, 1, [Disable g_assert()])
+ DLMALLOC_CPPFLAGS="$DLMALLOC_CPPFLAGS -DINSECURE=1"
fi
# Use the user provided CXXFLAGS for Scintilla as well.
@@ -224,6 +224,13 @@ case $host in
;;
esac
+# Optional UNIX libc functions.
+# FreeBSD arm64 and riscv are missing sbrk(), which can be used by dlmalloc.
+AC_CHECK_FUNCS([sbrk], , [
+ DLMALLOC_CPPFLAGS="$DLMALLOC_CPPFLAGS -DHAVE_MORECORE=0"
+])
+AC_SUBST(DLMALLOC_CPPFLAGS)
+
#
# Config options
#