diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index d6f00aac6d..015237c43a 100644 --- a/configure.ac +++ b/configure.ac @@ -1303,8 +1303,11 @@ AS_IF([test "x$with_jemalloc" != xno],[ with_jemalloc=yes ], [test x$with_jemalloc = xyes && with_jemalloc=no]) - AC_CHECK_HEADER(jemalloc/jemalloc.h, [ - AC_DEFINE(RUBY_ALTERNATIVE_MALLOC_HEADER, [<jemalloc/jemalloc.h>]) + for malloc_header in jemalloc/jemalloc.h jemalloc.h; do + AC_CHECK_HEADER($malloc_header, [break], [malloc_header=]) + done + AS_IF([test "$malloc_header" != ""], [ + AC_DEFINE_UNQUOTED(RUBY_ALTERNATIVE_MALLOC_HEADER, [<$malloc_header>]) ], [test x$with_jemalloc = xyes && with_jemalloc=no]) AS_IF([test "x$with_jemalloc" != xyes], [ @@ -1313,7 +1316,7 @@ AS_IF([test "x$with_jemalloc" != xno],[ @%:@ifdef RUBY_ALTERNATIVE_MALLOC_HEADER @%:@include RUBY_ALTERNATIVE_MALLOC_HEADER @%:@else - @%:@include <jemalloc.h> + extern const char *malloc_conf; @%:@endif], [return !&malloc_conf])], [rb_cv_jemalloc_demangle=yes], [rb_cv_jemalloc_demangle=no]) |