]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
A more helpful error when --without-jemalloc is impossible
authorTony Finch <fanf@isc.org>
Wed, 21 Sep 2022 16:44:48 +0000 (17:44 +0100)
committerTony Finch <fanf@isc.org>
Tue, 27 Sep 2022 13:35:29 +0000 (14:35 +0100)
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.)

(cherry picked from commit f0e79458beebfb7f247f38bdd9991b6998f97040)

configure.ac

index 6eaac533a44d7938ad6e98f7bbc7ae7ce3af88e2..d2363f0e2f6d221e86ac86fdc8ecf9d217d94e37 100644 (file)
@@ -1354,7 +1354,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"])