Changes so that the Ruby testsuite and examples work with Ruby, SWIG and Mingw32 when running under windows.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7507 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8d598c61fc
commit
01c81c6de1
1 changed files with 21 additions and 2 deletions
|
|
@ -1023,7 +1023,21 @@ if test -n "$RUBY"; then
|
||||||
else # 1.6.x
|
else # 1.6.x
|
||||||
link = "-l" + c[["RUBY_INSTALL_NAME"]]
|
link = "-l" + c[["RUBY_INSTALL_NAME"]]
|
||||||
end
|
end
|
||||||
puts link') 2>/dev/null`
|
|
||||||
|
# Get the target Ruby was built for
|
||||||
|
target = c[["target"]]
|
||||||
|
|
||||||
|
if target == "i386-pc-mswin32"
|
||||||
|
# Need to change msvcrt-ruby*.lib to -lmsvcrt-ruby*
|
||||||
|
ext = File.extname(link)
|
||||||
|
# Get index that counts backwards from end of string
|
||||||
|
index = -1 - ext.size
|
||||||
|
# Strip off the extension
|
||||||
|
link = link.slice(0..index)
|
||||||
|
puts "-l#{link}"
|
||||||
|
else
|
||||||
|
puts link
|
||||||
|
end') 2>/dev/null`
|
||||||
|
|
||||||
if test "$rb_libruby" != ""; then
|
if test "$rb_libruby" != ""; then
|
||||||
for i in $dirs; do
|
for i in $dirs; do
|
||||||
|
|
@ -1044,7 +1058,12 @@ if test -n "$RUBY"; then
|
||||||
RUBYINCLUDE="-I$RUBYDIR"
|
RUBYINCLUDE="-I$RUBYDIR"
|
||||||
RUBYLIB="$RUBYDIR"
|
RUBYLIB="$RUBYDIR"
|
||||||
fi
|
fi
|
||||||
RUBYLINK="$RUBYLINK `($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBS"]]') 2>/dev/null`"
|
|
||||||
|
case $host in
|
||||||
|
*-*-mingw*) ;; # do nothing, the default windows libraries are already included
|
||||||
|
*) RUBYLINK="$RUBYLINK `($RUBY -rrbconfig -e 'print Config::CONFIG[["LIBS"]]') 2>/dev/null`";;
|
||||||
|
esac
|
||||||
|
|
||||||
RUBYCCDLFLAGS=`($RUBY -rrbconfig -e 'print Config::CONFIG[["CCDLFLAGS"]]') 2>/dev/null`
|
RUBYCCDLFLAGS=`($RUBY -rrbconfig -e 'print Config::CONFIG[["CCDLFLAGS"]]') 2>/dev/null`
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(could not figure out how to run ruby)
|
AC_MSG_RESULT(could not figure out how to run ruby)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue