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

ruby-changes:50562

From: nobu <ko1@a...>
Date: Fri, 9 Mar 2018 13:24:55 +0900 (JST)
Subject: [ruby-changes:50562] nobu:r62705 (trunk): configure.ac: --disable-mathn option

nobu	2018-03-09 13:24:48 +0900 (Fri, 09 Mar 2018)

  New Revision: 62705

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

  Log:
    configure.ac: --disable-mathn option
    
    * Makefile.in, win32/Makefile.sub: move CANONICALIZATION_FOR_MATHN
      from config.h which affects all extension libraries to XCFLAGS
      for the core only.
    
    * configure.ac: added --disable-mathn option.

  Modified files:
    trunk/Makefile.in
    trunk/configure.ac
    trunk/win32/Makefile.sub
Index: configure.ac
===================================================================
--- configure.ac	(revision 62704)
+++ configure.ac	(revision 62705)
@@ -76,7 +76,6 @@ AC_SUBST(TEENY) https://github.com/ruby/ruby/blob/trunk/configure.ac#L76
 AC_SUBST(RUBY_PROGRAM_VERSION)
 AC_SUBST(RUBY_API_VERSION, '$(MAJOR).$(MINOR)')
 RUBY_PATCHLEVEL=`sed -n 's/^#define RUBY_PATCHLEVEL //p' $srcdir/version.h`
-AC_DEFINE(CANONICALIZATION_FOR_MATHN)
 dnl checks for alternative programs
 AC_CANONICAL_BUILD
 RUBY_RM_RECURSIVE
@@ -1398,6 +1397,12 @@ AS_IF([test "$rb_cv_func_exported" != no https://github.com/ruby/ruby/blob/trunk/configure.ac#L1397
 
 RUBY_APPEND_OPTION(XCFLAGS, -DRUBY_EXPORT)
 
+AC_ARG_ENABLE(mathn,
+    AS_HELP_STRING([--disable-mathn], [disable canonicalization for mathn]),
+    [mathn=$enableval], [mathn=yes])
+test "x$mathn" = xyes || mathn=
+AC_SUBST(MATHN, $mathn)
+
 AC_CACHE_CHECK(for function name string predefined identifier,
     rb_cv_function_name_string,
     [rb_cv_function_name_string=no
Index: win32/Makefile.sub
===================================================================
--- win32/Makefile.sub	(revision 62704)
+++ win32/Makefile.sub	(revision 62705)
@@ -60,6 +60,9 @@ icondirs=$(ICONDIRS) https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L60
 icondirs=$(icondirs:\=/)
 iconinc=-I$(icondirs: = -I)
 !endif
+!if !defined(MATHN)
+MATHN = yes
+!endif
 ###############
 
 .SUFFIXES: .def .lib
@@ -285,6 +288,9 @@ ARFLAGS = -machine:$(MACHINE) -out: https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L288
 LD = $(CC)
 LDSHARED = $(LD) -LD
 XCFLAGS = -DRUBY_EXPORT $(INCFLAGS) $(XCFLAGS)
+!if "$(MATHN)" == "yes"
+XCFLAGS = $(XCFLAGS) -DCANONICALIZATION_FOR_MATHN
+!endif
 !if $(MSC_VER) >= 1400
 # Prevents VC++ 2005 (cl ver 14) warnings
 MANIFESTTOOL = mt -nologo
@@ -825,7 +831,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/ https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L831
 !if "$(MACHINE)" == "x86" || "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
 #define STACK_GROW_DIRECTION -1
 !endif
-#define CANONICALIZATION_FOR_MATHN 1
 #define DEFAULT_KCODE KCODE_NONE
 #define LOAD_RELATIVE 1
 #define DLEXT ".so"
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 62704)
+++ Makefile.in	(revision 62705)
@@ -69,7 +69,8 @@ optflags = @optflags@ https://github.com/ruby/ruby/blob/trunk/Makefile.in#L69
 debugflags = @debugflags@
 warnflags = @warnflags@ @strict_warnflags@
 cppflags = @cppflags@
-XCFLAGS = @XCFLAGS@
+MATHN = @MATHN@
+XCFLAGS = @XCFLAGS@ $(MATHN:yes=-DCANONICALIZATION_FOR_MATHN)
 CPPFLAGS = @CPPFLAGS@ $(INCFLAGS)
 MJIT_HEADER_FLAGS = @MJIT_HEADER_FLAGS@
 MJIT_HEADER_SUFFIX =

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

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