|
Lines 25-34
Link Here
|
| 25 |
# Check for Ruby |
25 |
# Check for Ruby |
| 26 |
|
26 |
|
| 27 |
if test "x$compile_kross" = "xyes" ; then |
27 |
if test "x$compile_kross" = "xyes" ; then |
| 28 |
AC_CHECK_PROGS([RUBY], [ruby ruby1.8 ruby18], ruby) |
28 |
AC_CHECK_PROGS([RUBY], [ruby ruby1.8 ruby18 ruby1.9 ruby19], ruby) |
| 29 |
|
29 |
|
| 30 |
if test -n "$RUBY"; then |
30 |
if test -n "$RUBY"; then |
| 31 |
AC_MSG_CHECKING(for Ruby dirs) |
31 |
AC_MSG_CHECKING(for Ruby dirs) |
|
|
32 |
# Note: pkgconfig file exists only for ruby >= 1.9.3 |
| 32 |
if test -n "$PKGCONFIG"; then |
33 |
if test -n "$PKGCONFIG"; then |
| 33 |
RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null` |
34 |
RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null` |
| 34 |
if test -n "$RUBY_VERSION"; then |
35 |
if test -n "$RUBY_VERSION"; then |
|
Lines 37-49
Link Here
|
| 37 |
RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null` |
38 |
RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null` |
| 38 |
RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags` |
39 |
RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags` |
| 39 |
fi |
40 |
fi |
|
|
41 |
if test -z "$RUBY_VERSION"; then |
| 42 |
# pkgconfig file does not exist but might be 1.9.1: RUBY_VERSION defined in ruby/version.h |
| 43 |
if test -n "$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'"; then |
| 44 |
# rubyhdrdir parameter works only in >=1.9.1; this is 1.9.1 |
| 45 |
RUBY_MAJOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MAJOR']"@:>@)'` |
| 46 |
RUBY_MINOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MINOR']"@:>@)'` |
| 47 |
RUBY_TEENY=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['TEENY']"@:>@)'` |
| 48 |
if test "$RUBY_MAJOR" == "1" && test "$RUBY_MINOR" == "9"; then |
| 49 |
RUBY_VERSION="$RUBY_MAJOR.$RUBY_MINOR.$RUBY_TEENY" |
| 50 |
fi |
| 51 |
fi |
| 52 |
fi |
| 40 |
if test -n "$RUBY_VERSION"; then |
53 |
if test -n "$RUBY_VERSION"; then |
| 41 |
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'` |
54 |
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'` |
| 42 |
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'` |
55 |
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'` |
| 43 |
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'` |
56 |
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'` |
|
|
57 |
RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'` |
| 44 |
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'` |
58 |
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'` |
|
|
59 |
RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'` |
| 45 |
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` |
60 |
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` |
| 46 |
RUBY_ENABLESHARED=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"ENABLE_SHARED"@:>@)'` |
|
|
| 47 |
AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x]) |
61 |
AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x]) |
| 48 |
fi |
62 |
fi |
| 49 |
fi |
63 |
fi |
|
Lines 51-76
Link Here
|
| 51 |
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` |
65 |
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` |
| 52 |
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'` |
66 |
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'` |
| 53 |
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'` |
67 |
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'` |
| 54 |
RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyincludedir"@:>@)'` |
68 |
RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'` |
| 55 |
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` |
69 |
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` |
|
|
70 |
RUBY_INCLUDEDIR=$RUBY_ARCHDIR |
| 56 |
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` |
71 |
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` |
| 57 |
RUBY_ENABLESHARED=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"ENABLE_SHARED"@:>@)'` |
|
|
| 58 |
fi |
72 |
fi |
| 59 |
AC_MSG_RESULT([ |
73 |
AC_MSG_RESULT([ |
| 60 |
archdir $RUBY_ARCHDIR, |
74 |
archdir $RUBY_ARCHDIR, |
| 61 |
sitearchdir $RUBY_SITEARCHDIR, |
75 |
sitearchdir $RUBY_SITEARCHDIR, |
| 62 |
sitedir $RUBY_SITEDIR, |
76 |
sitedir $RUBY_SITEDIR, |
| 63 |
includedir $RUBY_INCLUDEDIR, |
77 |
rubylibdir $RUBY_RUBYLIBDIR, |
| 64 |
libdir $RUBY_LIBDIR, |
78 |
libdir $RUBY_LIBDIR, |
| 65 |
librubyarg $RUBY_LIBRUBYARG, |
79 |
includedir $RUBY_INCLUDEDIR, |
| 66 |
rubysharedenabled $RUBY_ENABLESHARED]) |
80 |
librubyarg $RUBY_LIBRUBYARG, |
|
|
81 |
cflags $RUBY_CFLAGS]) |
| 67 |
AC_SUBST(RUBY_ARCHDIR) |
82 |
AC_SUBST(RUBY_ARCHDIR) |
| 68 |
AC_SUBST(RUBY_SITEARCHDIR) |
83 |
AC_SUBST(RUBY_SITEARCHDIR) |
| 69 |
AC_SUBST(RUBY_SITEDIR) |
84 |
AC_SUBST(RUBY_RUBYLIBDIR) |
| 70 |
AC_SUBST(RUBY_INCLUDEDIR) |
85 |
AC_SUBST(RUBY_INCLUDEDIR) |
| 71 |
AC_SUBST(RUBY_LIBDIR) |
86 |
AC_SUBST(RUBY_SITEDIR) |
| 72 |
AC_SUBST(RUBY_LIBRUBYARG) |
|
|
| 73 |
AC_SUBST(RUBY_ENABLESHARED) |
| 74 |
AC_SUBST(RUBY_CFLAGS) |
87 |
AC_SUBST(RUBY_CFLAGS) |
| 75 |
|
88 |
|
| 76 |
AC_MSG_CHECKING(for Ruby header) |
89 |
AC_MSG_CHECKING(for Ruby header) |