mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[Bug #20494] Search non-default directories for GMP
Co-Authored-by: lish82 (Hiroki Katagiri)
This commit is contained in:
parent
eb410c9fde
commit
18eaf0be90
2 changed files with 10 additions and 1 deletions
|
@ -16,6 +16,7 @@ m4_include([tool/m4/ruby_append_option.m4])dnl
|
|||
m4_include([tool/m4/ruby_append_options.m4])dnl
|
||||
m4_include([tool/m4/ruby_check_builtin_func.m4])dnl
|
||||
m4_include([tool/m4/ruby_check_builtin_setjmp.m4])dnl
|
||||
m4_include([tool/m4/ruby_check_header.m4])dnl
|
||||
m4_include([tool/m4/ruby_check_printf_prefix.m4])dnl
|
||||
m4_include([tool/m4/ruby_check_setjmp.m4])dnl
|
||||
m4_include([tool/m4/ruby_check_signedness.m4])dnl
|
||||
|
@ -1375,7 +1376,7 @@ AS_CASE("$target_cpu", [x64|x86_64|i[3-6]86*], [
|
|||
RUBY_UNIVERSAL_CHECK_HEADER([x86_64, i386], x86intrin.h)
|
||||
|
||||
AS_IF([test "x$with_gmp" != xno],
|
||||
[AC_CHECK_HEADERS(gmp.h)
|
||||
[RUBY_CHECK_HEADER(gmp.h)
|
||||
AS_IF([test "x$ac_cv_header_gmp_h" != xno],
|
||||
AC_SEARCH_LIBS([__gmpz_init], [gmp],
|
||||
[AC_DEFINE(HAVE_LIBGMP, 1)]))])
|
||||
|
|
8
tool/m4/ruby_check_header.m4
Normal file
8
tool/m4/ruby_check_header.m4
Normal file
|
@ -0,0 +1,8 @@
|
|||
dnl -*- Autoconf -*-
|
||||
AC_DEFUN([RUBY_CHECK_HEADER],
|
||||
[# RUBY_CHECK_HEADER($@)
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS m4_if([$5], [], [$INCFLAGS], [$5])"
|
||||
AC_CHECK_HEADER([$1], [$2], [$3], [$4])
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
unset save_CPPFLAGS])
|
Loading…
Add table
Add a link
Reference in a new issue