summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-01 07:40:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-01 07:40:58 +0000
commita106278e545119aea7e3f5fe94dde604e1a8a324 (patch)
tree2c674f81870a9fd5cab43afa1e1ef0f48dbfbd3f
parentc2310e8598e9fa4065ffcbdfe62df9a9aa0d73a7 (diff)
configure.in: use AC_SEARCH_LIBS
* configure.in (--with-gmp, --with-jemalloc): use AC_SEARCH_LIBS to check if no library is required, instead of AC_CHECK_LIB. [ruby-core:79368] [Bug #13175] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--configure.in12
1 files changed, 2 insertions, 10 deletions
diff --git a/configure.in b/configure.in
index c5132dc97fa..65581227970 100644
--- a/configure.in
+++ b/configure.in
@@ -1353,15 +1353,13 @@ AC_ARG_WITH([gmp],
AS_IF([test "x$with_gmp" != xno],
[AC_CHECK_HEADERS(gmp.h)
AS_IF([test "x$ac_cv_header_gmp_h" != xno],
- AC_CHECK_LIB([gmp], [__gmpz_init]))
- with_gmp="$ac_cv_lib_gmp___gmpz_init"
- AS_IF([test -z "$with_gmp"], [with_gmp=no])])
+ AC_SEARCH_LIBS([__gmpz_init], [gmp]))])
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_CHECK_LIB([jemalloc], [malloc_conf], [], [with_jemalloc=no])
+ AC_SEARCH_LIBS([malloc_conf], [jemalloc], [], [with_jemalloc=no])
AC_CHECK_HEADER(jemalloc/jemalloc.h, [
AC_DEFINE(RUBY_ALTERNATIVE_MALLOC_HEADER, [<jemalloc/jemalloc.h>])
])
@@ -4176,12 +4174,6 @@ AS_CASE(["$target_os"],
FIRSTMAKEFILE=GNUmakefile:nacl/GNUmakefile.in
])
-AS_CASE(["$with_gmp: $SOLIBS "], [no:* | *' -lgmp '*|*' $(LIBS) '*], [],
- [SOLIBS="-lgmp $SOLIBS"])
-
-AS_CASE(["$with_jemalloc: $LIBS "], [no:* | *' -ljemalloc '*], [],
- [LIBS="-ljemalloc $LIBS"])
-
MINIOBJS="$MINIDLNOBJ"
AS_CASE(["$THREAD_MODEL"],