summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in4
-rw-r--r--configure.ac5
-rwxr-xr-xtool/mkconfig.rb1
-rw-r--r--win32/Makefile.sub3
-rwxr-xr-xwin32/configure.bat4
5 files changed, 11 insertions, 6 deletions
diff --git a/Makefile.in b/Makefile.in
index a17881b..7d3f54a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -72,7 +72,9 @@ warnflags = @warnflags@ @strict_warnflags@
cppflags = @cppflags@
MATHN = @MATHN@
XCFLAGS = @XCFLAGS@ $(MATHN:yes=-DCANONICALIZATION_FOR_MATHN)
-CPPFLAGS = @CPPFLAGS@ $(INCFLAGS)
+USE_RUBYGEMS = @USE_RUBYGEMS@
+USE_RUBYGEMS_ = $(USE_RUBYGEMS:yes=)
+CPPFLAGS = @CPPFLAGS@ $(INCFLAGS) $(USE_RUBYGEMS_:no=-DDISABLE_RUBYGEMS=1)
MJIT_HEADER_FLAGS = @MJIT_HEADER_FLAGS@
MJIT_HEADER_SUFFIX =
MJIT_HEADER_ARCH =
diff --git a/configure.ac b/configure.ac
index 55504c1..d9283d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3731,10 +3731,9 @@ AC_ARG_ENABLE(rubygems,
AS_HELP_STRING([--disable-rubygems], [disable rubygems by default]),
[enable_rubygems="$enableval"], [enable_rubygems=yes])
AS_IF([test x"$enable_rubygems" = xno], [
- AC_DEFINE(DISABLE_RUBYGEMS, 1)
- USE_RUBYGEMS=NO
+ USE_RUBYGEMS=no
], [
- USE_RUBYGEMS=YES
+ USE_RUBYGEMS=yes
])
AC_SUBST(USE_RUBYGEMS)
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index 266b1f8..2a3af97 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -70,6 +70,7 @@ File.foreach "config.status" do |line|
when /^arch$/; if val.empty? then val = arch else arch = val end
when /^sitearch$/; val = '$(arch)' if val.empty?
when /^DESTDIR$/; next
+ when /RUBYGEMS/; next
end
case val
when /^\$\(ac_\w+\)$/; next
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 48788c2..20b47a5 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -299,6 +299,9 @@ LDSHARED_1 = @if exist $(@).manifest $(MANIFESTTOOL) -manifest $(@).manifest -ou
LDSHARED_2 = @if exist $(@).manifest @$(RM) $(@:/=\).manifest
!endif
CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS)
+!if "$(USE_RUBYGEMS)" == "no"
+CPPFLAGS = -DDISABLE_RUBYGEMS $(CPPFLAGS)
+!endif
!if "$(CPPOUTFLAG)" == ">"
MJIT_HEADER_FLAGS =
!else
diff --git a/win32/configure.bat b/win32/configure.bat
index cce2cc8..09de87a 100755
--- a/win32/configure.bat
+++ b/win32/configure.bat
@@ -143,12 +143,12 @@ goto :loop ;
shift
goto :loop ;
:enable-rubygems
- echo>> ~tmp~.mak "USE_RUBYGEMS=YES" \
+ echo>> ~tmp~.mak "USE_RUBYGEMS=yes" \
echo>>confargs.tmp %1 \
shift
goto :loop ;
:disable-rubygems
- echo>> ~tmp~.mak "USE_RUBYGEMS=NO" \
+ echo>> ~tmp~.mak "USE_RUBYGEMS=no" \
echo>>confargs.tmp %1 \
shift
goto :loop ;