From ce557d0508a59c1bc6716ab727160f19c5e2e2d2 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 13 Apr 2005 11:24:44 +0000 Subject: * configure.in (mingw32): use actual runtime DLL name as ruby DLL name and default load path. * win32/Makefile.sub, win32/setup.mak: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.in | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 2d19328c48..99bed3096f 100644 --- a/configure.in +++ b/configure.in @@ -174,6 +174,19 @@ cygwin*|mingw*) AC_CHECK_TOOL(WINDRES, windres) AC_CHECK_TOOL(DLLWRAP, dllwrap) target_cpu=`echo $target_cpu | sed s/i.86/i386/` + case "$target_os" in + mingw*) + test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt + AC_CHECK_TOOL(OBJDUMP, objdump) + AC_CACHE_CHECK(for mingw32 runtime DLL, rb_cv_msvcrt, [ + AC_TRY_LINK([#include ], + [FILE* volatile f = stdin; return 0;], + [rb_cv_msvcrt=`$OBJDUMP -p conftest$ac_exeext | + sed -n '/^[[ ]]*DLL Name: /{s///p;q;}' | + tr A-Z a-z | sed 's/\.dll$//'`], + [rb_cv_msvcrt=msvcrt])]) + test "$rb_cv_msvcrt" = "" && AC_MSG_ERROR([must be linked to DLL]) + esac : ${enable_shared=yes} ;; aix*) @@ -1318,7 +1331,7 @@ case "$target_os" in AC_LIBOBJ([strftime]) ;; mingw*) - RUBY_SO_NAME=msvcrt-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR} + RUBY_SO_NAME=${rb_cv_msvcrt}-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR} if test x"$enable_shared" = xyes; then LIBRUBY_SO='$(RUBY_SO_NAME)'.dll LIBRUBY='lib$(LIBRUBY_SO).a' @@ -1449,7 +1462,7 @@ else fi case "$target_os" in - mingw*) sitearch="i386-msvcrt" ;; + mingw*) sitearch="i386-$rb_cv_msvcrt" ;; *) sitearch="${arch}" ;; esac -- cgit v1.2.3