Old distributions don't provide dynamic jemalloc or only provide a very old one (that crashes). One possible approach would be to change WITH_JEMALLOC=auto to try first dynamic and if not found — static jemalloc library. I'll only install distribution dynamic jemalloc where it's available, and where it's not available we'll only install static one. That should work both for new and old distros.
Old distributions don't provide dynamic jemalloc or only provide a very old one (that crashes). One possible approach would be to change WITH_JEMALLOC=auto to try first dynamic and if not found — static jemalloc library. I'll only install distribution dynamic jemalloc where it's available, and where it's not available we'll only install static one. That should work both for new and old distros.