ruby-changes:46140
From: shyouhei <ko1@a...>
Date: Wed, 5 Apr 2017 17:52:37 +0900 (JST)
Subject: [ruby-changes:46140] shyouhei:r58254 (trunk): fix --with-gmp (broken by r57490)
shyouhei 2017-04-05 17:52:31 +0900 (Wed, 05 Apr 2017) New Revision: 58254 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58254 Log: fix --with-gmp (broken by r57490) Looking at the generated shell script (also the autoconf manual), it seems AC_SEARCH_LIBS() m4 macro does not define HAVE_LIBsomething C preprocessor macros, unlike AC_CHECK_LIB() which does define them. This previous change effectively killed building with GMP because building that mode depends on existence of HAVE_LIBGMP. [Bug #13402] Modified files: trunk/configure.in Index: configure.in =================================================================== --- configure.in (revision 58253) +++ configure.in (revision 58254) @@ -1386,13 +1386,15 @@ AC_ARG_WITH([gmp], https://github.com/ruby/ruby/blob/trunk/configure.in#L1386 AS_IF([test "x$with_gmp" != xno], [AC_CHECK_HEADERS(gmp.h) AS_IF([test "x$ac_cv_header_gmp_h" != xno], - AC_SEARCH_LIBS([__gmpz_init], [gmp]))]) + AC_SEARCH_LIBS([__gmpz_init], [gmp], + [AC_DEFINE(HAVE_LIBGMP, 1)]))]) AC_ARG_WITH([jemalloc], [AS_HELP_STRING([--with-jemalloc],[use jemalloc allocator])], [with_jemalloc=$withval], [with_jemalloc=no]) AS_IF([test "x$with_jemalloc" = xyes],[ - AC_SEARCH_LIBS([malloc_conf], [jemalloc], [], [with_jemalloc=no]) + AC_SEARCH_LIBS([malloc_conf], [jemalloc], + [AC_DEFINE(HAVE_LIBJEMALLOC, 1)], [with_jemalloc=no]) AC_CHECK_HEADER(jemalloc/jemalloc.h, [ AC_DEFINE(RUBY_ALTERNATIVE_MALLOC_HEADER, [<jemalloc/jemalloc.h>]) ]) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/