Lines 32-67
if test "$CONFIG_SCRIPTING_RUBY" = "yes"
Link Here
|
32 |
if test "$CONFIG_SCRIPTING_RUBY" != "no"; then |
32 |
if test "$CONFIG_SCRIPTING_RUBY" != "no"; then |
33 |
|
33 |
|
34 |
AC_MSG_CHECKING(Ruby version) |
34 |
AC_MSG_CHECKING(Ruby version) |
35 |
if $CONFIG_SCRIPTING_RUBY -e 'exit((VERSION or RUBY_VERSION) >= "1.6.0")' >/dev/null 2>/dev/null; then |
35 |
if $CONFIG_SCRIPTING_RUBY -e 'exit((VERSION rescue RUBY_VERSION) >= "1.6.0")' >/dev/null 2>/dev/null; then |
36 |
ruby_version=`$CONFIG_SCRIPTING_RUBY -e 'puts "#{VERSION rescue RUBY_VERSION}"'` |
36 |
ruby_version=`$CONFIG_SCRIPTING_RUBY -e 'puts "#{VERSION rescue RUBY_VERSION}"'` |
37 |
AC_MSG_RESULT($ruby_version) |
37 |
AC_MSG_RESULT($ruby_version) |
38 |
|
38 |
|
39 |
AC_MSG_CHECKING(for Ruby header files) |
39 |
AC_MSG_CHECKING(for Ruby header files) |
40 |
rubyhdrdir=`$CONFIG_SCRIPTING_RUBY -r mkmf -e 'print Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null` |
40 |
rubyhdrdir=`$CONFIG_SCRIPTING_RUBY -r mkmf -e 'print RbConfig::CONFIG[["rubyhdrdir"]] || RbConfig::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null` |
41 |
|
41 |
|
42 |
if test "X$rubyhdrdir" != "X"; then |
42 |
if test "X$rubyhdrdir" != "X"; then |
43 |
AC_MSG_RESULT($rubyhdrdir) |
43 |
AC_MSG_RESULT($rubyhdrdir) |
44 |
RUBY_CFLAGS="-I$rubyhdrdir" |
44 |
RUBY_CFLAGS="-I$rubyhdrdir" |
45 |
rubylibs=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'` |
45 |
rubyarch=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print RbConfig::CONFIG[["arch"]]'` |
|
|
46 |
if test -d "$rubyhdrdir/$rubyarch"; then |
47 |
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" |
48 |
fi |
49 |
rubylibs=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print RbConfig::CONFIG[["LIBS"]]'` |
46 |
|
50 |
|
47 |
if test "X$rubylibs" != "X"; then |
51 |
if test "X$rubylibs" != "X"; then |
48 |
RUBY_LIBS="$rubylibs" |
52 |
RUBY_LIBS="$rubylibs" |
49 |
fi |
53 |
fi |
50 |
|
54 |
|
51 |
librubyarg=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` |
55 |
librubyarg=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print RbConfig.expand(RbConfig::CONFIG[["LIBRUBYARG"]])'` |
52 |
|
56 |
|
53 |
if test -f "$rubyhdrdir/$librubyarg"; then |
57 |
if test -f "$rubyhdrdir/$librubyarg"; then |
54 |
librubyarg="$rubyhdrdir/$librubyarg" |
58 |
librubyarg="$rubyhdrdir/$librubyarg" |
55 |
|
59 |
|
56 |
else |
60 |
else |
57 |
rubylibdir=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'` |
61 |
rubylibdir=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print RbConfig.expand(RbConfig::CONFIG[["libdir"]])'` |
58 |
if test -f "$rubylibdir/$librubyarg"; then |
62 |
if test -f "$rubylibdir/$librubyarg"; then |
59 |
librubyarg="$rubylibdir/$librubyarg" |
63 |
librubyarg="$rubylibdir/$librubyarg" |
60 |
elif test "$librubyarg" = "libruby.a"; then |
64 |
elif test "$librubyarg" = "libruby.a"; then |
61 |
dnl required on Mac OS 10.3 where libruby.a doesn't exist |
65 |
dnl required on Mac OS 10.3 where libruby.a doesn't exist |
62 |
librubyarg="-lruby" |
66 |
librubyarg="-lruby" |
63 |
else |
67 |
else |
64 |
librubyarg=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` |
68 |
librubyarg=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{RbConfig.expand(RbConfig::CONFIG[\"libdir\"])}')"` |
65 |
fi |
69 |
fi |
66 |
fi |
70 |
fi |
67 |
|
71 |
|
Lines 69-75
if test "$CONFIG_SCRIPTING_RUBY" = "yes"
Link Here
|
69 |
RUBY_LIBS="$librubyarg $RUBY_LIBS" |
73 |
RUBY_LIBS="$librubyarg $RUBY_LIBS" |
70 |
fi |
74 |
fi |
71 |
|
75 |
|
72 |
rubyldflags=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'` |
76 |
rubyldflags=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print RbConfig::CONFIG[["LDFLAGS"]]'` |
73 |
if test "X$rubyldflags" != "X"; then |
77 |
if test "X$rubyldflags" != "X"; then |
74 |
LDFLAGS="$rubyldflags $LDFLAGS" |
78 |
LDFLAGS="$rubyldflags $LDFLAGS" |
75 |
fi |
79 |
fi |
Lines 86-91
if test "$CONFIG_SCRIPTING_RUBY" = "yes"
Link Here
|
86 |
AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later) |
90 |
AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later) |
87 |
fi |
91 |
fi |
88 |
fi |
92 |
fi |
|
|
93 |
if test "$CONFIG_SCRIPTING_RUBY" = "yes"; then |
94 |
AC_MSG_CHECKING([for rb_errinfo]) |
95 |
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ruby.h>]], [[rb_errinfo();]])],have_rb_errinfo="yes",have_rb_errinfo="no") |
96 |
AC_MSG_RESULT($have_rb_errinfo) |
97 |
if test "$have_rb_errinfo" = "yes"; then |
98 |
AC_DEFINE([HAVE_RB_ERRINFO], [1], |
99 |
[Define to 1 if you have the `rb_errinfo' function.]) |
100 |
fi |
101 |
fi |
89 |
fi |
102 |
fi |
90 |
|
103 |
|
91 |
EL_RESTORE_FLAGS |
104 |
EL_RESTORE_FLAGS |