From 2dafe8df55c7eb7412ffe760dd7f2b4bafcb1da8 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 9 Mar 2018 04:24:48 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- Makefile.in | 3 ++- configure.ac | 7 ++++++- win32/Makefile.sub | 7 ++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 047f781030..62fea44052 100644 --- a/Makefile.in +++ b/Makefile.in @@ -69,7 +69,8 @@ optflags = @optflags@ 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 = diff --git a/configure.ac b/configure.ac index f4c1688032..02fec2e0a4 100644 --- a/configure.ac +++ b/configure.ac @@ -76,7 +76,6 @@ AC_SUBST(TEENY) 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], [ 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 diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 821e7207b8..e4d3d48a61 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -60,6 +60,9 @@ icondirs=$(ICONDIRS) icondirs=$(icondirs:\=/) iconinc=-I$(icondirs: = -I) !endif +!if !defined(MATHN) +MATHN = yes +!endif ############### .SUFFIXES: .def .lib @@ -285,6 +288,9 @@ ARFLAGS = -machine:$(MACHINE) -out: 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/Makefile.sub $(win_srcdir)/Makefile.sub !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"