зеркало из https://github.com/github/ruby.git
Fix check for malloc_conf when no library is required
This commit is contained in:
Родитель
c5e6fa4853
Коммит
166d148355
|
@ -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])
|
||||
|
|
Загрузка…
Ссылка в новой задаче