summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-04 14:29:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-04 14:29:58 +0000
commitd34f9699fc3adf72e40e4eb3f837eaf8ee60137f (patch)
tree94dabd1933396f1c6d66153de45c2292b8c333cd /win32
parent40c2dd156bd983d5f7a6cf85a11b4977f3720fef (diff)
* configure.in, win32/configure.bat (--enable-win95): new option
to enable/disable win95 support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile.sub4
-rwxr-xr-xwin32/configure.bat15
-rw-r--r--win32/setup.mak6
3 files changed, 22 insertions, 3 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 2f264eeb92..4dc1ec6de0 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -178,7 +178,7 @@ EXTLIBS =
!if !defined(LIBS)
LIBS = oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib $(EXTLIBS)
!endif
-!if defined(HAVE_UNICOWS)
+!if "$(ENABLE_WIN95)" == "yes"
LIBS = unicows.lib $(LIBS)
!endif
!if !defined(MISSING)
@@ -335,7 +335,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
#if _MSC_VER != $(MSC_VER)
#error MSC version unmatch: _MSC_VER: $(MSC_VER) is expected.
#endif
-!if defined(HAVE_UNICOWS) && "$(MACHINE)" == "x86"
+!if "$(ENABLE_WIN95)" == "yes" && "$(MACHINE)" == "x86"
#define WIN95 1
!endif
#define STDC_HEADERS 1
diff --git a/win32/configure.bat b/win32/configure.bat
index f9d287b21c..8c157927e4 100755
--- a/win32/configure.bat
+++ b/win32/configure.bat
@@ -25,6 +25,8 @@ if "%1" == "--install-name" goto :installname
if "%1" == "--so-name" goto :soname
if "%1" == "--enable-install-doc" goto :enable-rdoc
if "%1" == "--disable-install-doc" goto :disable-rdoc
+if "%1" == "--enable-win95" goto :enable-win95
+if "%1" == "--disable-win95" goto :disable-win95
if "%1" == "--extout" goto :extout
if "%1" == "--path" goto :path
if "%1" == "--with-baseruby" goto :baseruby
@@ -95,6 +97,16 @@ goto :loop
echo>>confargs.tmp %1 \
shift
goto :loop
+:enable-win95
+ echo>> ~tmp~.mak "ENABLE_WIN95=yes" \
+ echo>>confargs.tmp %1 \
+ shift
+goto :loop
+:disable-win95
+ echo>> ~tmp~.mak "ENABLE_WIN95=no" \
+ echo>>confargs.tmp %1 \
+ shift
+goto :loop
:extout
echo>> ~tmp~.mak "EXTOUT=%2" \
echo>>confargs.tmp %1=%2 \
@@ -125,6 +137,7 @@ goto :loop
echo --with-baseruby=RUBY use RUBY as baseruby [ruby]
echo --with-static-linked-ext link external modules statically
echo --disable-install-doc do not install rdoc indexes during install
+ echo --enable-win95 enable win95 support
del *.tmp
del ~tmp~.mak
goto :exit
@@ -132,8 +145,10 @@ goto :exit
echo>> ~tmp~.mak WIN32DIR=$(@D)
echo.>>confargs.tmp
echo>confargs.c #define $ $$
+echo>>confargs.c !ifndef CONFIGURE_ARGS
type>>confargs.c confargs.tmp
echo>>confargs.c configure_args = CONFIGURE_ARGS
+echo>>confargs.c !endif
echo>>confargs.c #undef $
if exist pathlist.tmp echo>>confargs.c #define PATH_LIST \
if exist pathlist.tmp type>>confargs.c pathlist.tmp
diff --git a/win32/setup.mak b/win32/setup.mak
index 0ddf401bff..1f14a08f1a 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -142,8 +142,9 @@ int main(int argc, char **argv)
@del rtname.*
-unicows-: nul
+!if "$(ENABLE_WIN95)" == ""
@echo Checking unicows.lib
- @$(CC) -MD <<conftest.c unicows.lib user32.lib > nul && echo>>$(MAKEFILE) HAVE_UNICOWS = 1 || rem
+ @$(CC) -MD <<conftest.c unicows.lib user32.lib > nul && echo>>$(MAKEFILE) ENABLE_WIN95 = yes || rem
#include <windows.h>
int main()
{
@@ -151,6 +152,9 @@ int main()
}
<<
@del conftest.*
+!else if "$(ENABLE_WIN95)" == "yes"
+ @echo>>$(MAKEFILE) ENABLE_WIN95 = yes
+!endif
-version-: nul
@$(APPEND)