From: Tony Finch Date: Wed, 21 Sep 2022 16:44:48 +0000 (+0100) Subject: A more helpful error when --without-jemalloc is impossible X-Git-Tag: v9.19.6~45^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f0e79458beebfb7f247f38bdd9991b6998f97040;p=thirdparty%2Fbind9.git A more helpful error when --without-jemalloc is impossible When jemalloc is the system allocator (on FreeBSD and NetBSD), trying to build --without-jemalloc caused an obscure compiler error. Instead, complain at configure time that --without-jemalloc cannot work. (It needs to remain an error because it is vexing when configure quietly ignores an explicit direction.) --- diff --git a/configure.ac b/configure.ac index 903287748b3..a8b4ac290c4 100644 --- a/configure.ac +++ b/configure.ac @@ -1400,7 +1400,10 @@ AS_CASE([$with_jemalloc], with_jemalloc=no])]) AS_IF([test "$with_jemalloc" = "no"], - [AC_CHECK_FUNCS([malloc_size malloc_usable_size])]) + [AS_CASE([$host], + [*-freebsd*],[AC_MSG_ERROR([You cannot compile without jemalloc; jemalloc is the system allocator on FreeBSD])], + [*-netbsd*],[AC_MSG_ERROR([You cannot compile without jemalloc; jemalloc is the system allocator on NetBSD])]) + AC_CHECK_FUNCS([malloc_size malloc_usable_size])]) AM_CONDITIONAL([HAVE_JEMALLOC], [test "$with_jemalloc" = "yes"])