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

ruby-changes:11161

From: nobu <ko1@a...>
Date: Wed, 4 Mar 2009 23:30:18 +0900 (JST)
Subject: [ruby-changes:11161] Ruby:r22766 (trunk): * configure.in, win32/configure.bat (--enable-win95): new option

nobu	2009-03-04 23:29:58 +0900 (Wed, 04 Mar 2009)

  New Revision: 22766

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22766

  Log:
    * configure.in, win32/configure.bat (--enable-win95): new option
      to enable/disable win95 support.

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
    trunk/win32/Makefile.sub
    trunk/win32/configure.bat
    trunk/win32/setup.mak

Index: configure.in
===================================================================
--- configure.in	(revision 22765)
+++ configure.in	(revision 22766)
@@ -551,6 +551,12 @@
 AC_CHECK_DECLS([sys_nerr], [], [], [$ac_includes_default
 #include <errno.h>])
 
+AC_ARG_ENABLE(win95, [  --enable-win95          enable Windows 95 series support]
+  [case "$enableval" in
+    when(yes|no) enable_win95=$enableval;;
+    when(*) unset enable_win95;;
+  esac])
+
 case "$target_os" in
 when(freebsd*)
   AC_CACHE_CHECK([whether pthread should be enabled by default],
@@ -709,8 +715,7 @@
 		ac_cv_func_fcntl=yes
 		ac_cv_func_flock=yes
 		AC_LIBOBJ([langinfo])
-		AC_HAVE_LIBRARY(unicows, [LIBS="-lunicows $LIBS"
-		    AC_DEFINE(WIN95)])
+		: ${enable_win95=maybe}
 		;;
 when(os2-emx*)	LIBS="-lm $LIBS"
 		ac_cv_lib_dir_opendir=no;;
@@ -742,6 +747,13 @@
 AC_CHECK_LIB(dld, shl_load)	# Dynamic linking for HP-UX
 AC_CHECK_LIB(socket, socketpair)	# SunOS/Solaris
 AC_CHECK_LIB(rt, clock_gettime)	# GNU/Linux
+if test "${enable_win95}" = maybe; then
+    AC_HAVE_LIBRARY(unicows, [enable_win95=yes], [enable_win95=no])
+fi
+if test "${enable_win95}" = yes; then
+    AC_DEFINE(WIN95)
+    LIBS="-lunicows $LIBS"
+fi
 
 case "$target_cpu" in
 when(alpha*)	case "$target_os"::"$GCC" in
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 22765)
+++ ChangeLog	(revision 22766)
@@ -1,3 +1,8 @@
+Wed Mar  4 23:29:56 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* configure.in, win32/configure.bat (--enable-win95): new option
+	  to enable/disable win95 support.
+
 Wed Mar  4 21:21:51 2009  Yusuke Endoh  <mame@t...>
 
 	* lib/thread.rb (SizedQueue#push): fix limit condition.
Index: win32/Makefile.sub
===================================================================
--- win32/Makefile.sub	(revision 22765)
+++ win32/Makefile.sub	(revision 22766)
@@ -178,7 +178,7 @@
 !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 @@
 #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
Index: win32/configure.bat
===================================================================
--- win32/configure.bat	(revision 22765)
+++ win32/configure.bat	(revision 22766)
@@ -25,6 +25,8 @@
 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 @@
   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 @@
   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 @@
 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
Index: win32/setup.mak
===================================================================
--- win32/setup.mak	(revision 22765)
+++ win32/setup.mak	(revision 22766)
@@ -142,8 +142,9 @@
 	@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 @@
 }
 <<
 	@del conftest.*
+!else if "$(ENABLE_WIN95)" == "yes"
+	@echo>>$(MAKEFILE) ENABLE_WIN95 = yes
+!endif
 
 -version-: nul
 	@$(APPEND)

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

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