[前][次][番号順一覧][スレッド一覧]

ruby-changes:45417

From: nobu <ko1@a...>
Date: Wed, 1 Feb 2017 16:41:02 +0900 (JST)
Subject: [ruby-changes:45417] nobu:r57490 (trunk): configure.in: use AC_SEARCH_LIBS

nobu	2017-02-01 16:40:58 +0900 (Wed, 01 Feb 2017)

  New Revision: 57490

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57490

  Log:
    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]

  Modified files:
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 57489)
+++ configure.in	(revision 57490)
@@ -1353,15 +1353,13 @@ AC_ARG_WITH([gmp], https://github.com/ruby/ruby/blob/trunk/configure.in#L1353
 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"], https://github.com/ruby/ruby/blob/trunk/configure.in#L4174
 	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"],

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]