mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
40c2dd156b
commit
d34f9699fc
5 changed files with 41 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Mar 4 23:29:56 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in, win32/configure.bat (--enable-win95): new option
|
||||
to enable/disable win95 support.
|
||||
|
||||
Wed Mar 4 21:21:51 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* lib/thread.rb (SizedQueue#push): fix limit condition.
|
||||
|
|
16
configure.in
16
configure.in
|
@ -551,6 +551,12 @@ dnl Check whether we need to define sys_nerr locally
|
|||
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 @@ when(mingw*) LIBS="-lshell32 -lws2_32 $LIBS"
|
|||
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(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
|
|||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue