Skip to content

Commit 902628f

Browse files
committed
Import patch for gmp and jemalloc issue
https://bugs.ruby-lang.org/issues/13899
1 parent b7e4980 commit 902628f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

configure.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,13 +1337,15 @@ AC_ARG_WITH([gmp],
13371337
AS_IF([test "x$with_gmp" != xno],
13381338
[AC_CHECK_HEADERS(gmp.h)
13391339
AS_IF([test "x$ac_cv_header_gmp_h" != xno],
1340-
AC_SEARCH_LIBS([__gmpz_init], [gmp]))])
1340+
AC_SEARCH_LIBS([__gmpz_init], [gmp],
1341+
[AC_DEFINE(HAVE_LIBGMP, 1)]))])
13411342

13421343
AC_ARG_WITH([jemalloc],
13431344
[AS_HELP_STRING([--with-jemalloc],[use jemalloc allocator])],
13441345
[with_jemalloc=$withval], [with_jemalloc=no])
13451346
AS_IF([test "x$with_jemalloc" = xyes],[
1346-
AC_SEARCH_LIBS([malloc_conf], [jemalloc], [], [with_jemalloc=no])
1347+
AC_SEARCH_LIBS([malloc_conf], [jemalloc],
1348+
[AC_DEFINE(HAVE_LIBJEMALLOC, 1)], [with_jemalloc=no])
13471349
AC_CHECK_HEADER(jemalloc/jemalloc.h, [
13481350
AC_DEFINE(RUBY_ALTERNATIVE_MALLOC_HEADER, [<jemalloc/jemalloc.h>])
13491351
])

0 commit comments

Comments
 (0)