diff --git a/ChangeLog b/ChangeLog index 33f14028a7..93b7477cd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Fri Aug 23 17:06:48 2002 WATANABE Hirofumi + + * configure.in: RUBY_SO_NAME is msvcrt-rubyXX on mswin32/mingw32. + + * configure.in (sitearch): new var. + + * mkconfig.rb, lib/mkmf.rb (sitearch): ditto. + + * win32/Makefile.sub, win32/setup.mak (sitearch): ditto. + Wed Aug 21 16:53:00 2002 Michal Rokos * *.c: int, long types cleanup. diff --git a/configure.in b/configure.in index a457dba58a..f96249ad92 100644 --- a/configure.in +++ b/configure.in @@ -1045,7 +1045,17 @@ case "$target_os" in esac ;; cygwin*|mingw*) - RUBY_SO_NAME=$target_os-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR} + case "$target_os" in + cygwin*) + RUBY_SO_NAME=$target_os-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR} + AC_LIBOBJ([strftime]) + CCDLFLAGS=-DUSEIMPORTLIB ;; + mingw*) + RUBY_SO_NAME=msvcrt-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR} + AC_LIBOBJ([win32]) + CFLAGS="-DNT -D__NO_ISOCEXT $CFLAGS" + CCDLFLAGS=-DIMPORT ;; + esac if test x"$enable_shared" = xyes; then LIBRUBY_SO='$(RUBY_SO_NAME)'.dll LIBRUBY_DLDFLAGS='-Wl,--out-implib=$(LIBRUBY) $(RUBYDEF)' @@ -1060,18 +1070,9 @@ case "$target_os" in LIBRUBYARG='-L. -l$(RUBY_SO_NAME)' FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in SOLIBS='$(LIBS)' - case "$target_os" in - cygwin*) - AC_LIBOBJ([strftime]) - CCDLFLAGS=-DUSEIMPORTLIB ;; - mingw*) - AC_LIBOBJ([win32]) - CFLAGS="-DNT -D__NO_ISOCEXT $CFLAGS" - CCDLFLAGS=-DIMPORT ;; - esac ;; *) - ;; + ;; esac AC_SUBST(LIBRUBY_LDSHARED) @@ -1126,6 +1127,7 @@ AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}") AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}") AC_SUBST(arch)dnl +AC_SUBST(sitearch)dnl AC_SUBST(sitedir)dnl configure_args=$ac_configure_args @@ -1145,8 +1147,13 @@ else AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "${arch}") fi +case "$target_os" in + mingw*) sitearch="i386-msvcrt" ;; + *) sitearch="${arch}" ;; +esac + AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}") -AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${arch}") +AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${sitearch}") AC_ARG_WITH(search-path, [ --with-search-path=DIR specify the additional search path], diff --git a/lib/mkmf.rb b/lib/mkmf.rb index bdedce5482..a533b705de 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -542,6 +542,7 @@ LIBPATH = #{libpath} RUBY_INSTALL_NAME = #{CONFIG["RUBY_INSTALL_NAME"]} RUBY_SO_NAME = #{CONFIG["RUBY_SO_NAME"]} arch = #{CONFIG["arch"]} +sitearch = #{CONFIG["sitearch"]} ruby_version = #{Config::CONFIG["ruby_version"]} EOMF if destdir = CONFIG["prefix"].scan(drive)[0] and !destdir.empty? diff --git a/mkconfig.rb b/mkconfig.rb index 79bbe27144..0a0da828c7 100644 --- a/mkconfig.rb +++ b/mkconfig.rb @@ -93,7 +93,7 @@ print < $@ @echo srcdir = $(srcdir:\=/)>> $@ @echo RUBY_INSTALL_NAME = ruby>> $@ - @echo RUBY_SO_NAME = $(OS)-$$(RUBY_INSTALL_NAME)17>> $@ + @echo RUBY_SO_NAME = $(RT)-$$(RUBY_INSTALL_NAME)17>> $@ @echo prefix = /usr>> $@ @echo CFLAGS = -nologo -MD -DNT=1 $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG)>> $@ @echo CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)/missing -DLIBRUBY_SO=\"$$(LIBRUBY_SO)\">> $@