|
Lines 8-13
Link Here
|
| 8 |
DO_NOT_COMPILE="$DO_NOT_COMPILE korundum" |
8 |
DO_NOT_COMPILE="$DO_NOT_COMPILE korundum" |
| 9 |
else |
9 |
else |
| 10 |
AC_MSG_CHECKING(for ruby dirs) |
10 |
AC_MSG_CHECKING(for ruby dirs) |
|
|
11 |
# Note: pkgconfig file exists only for ruby >= 1.9.3 |
| 11 |
if test -n "$PKGCONFIG"; then |
12 |
if test -n "$PKGCONFIG"; then |
| 12 |
RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null` |
13 |
RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null` |
| 13 |
if test -n "$RUBY_VERSION"; then |
14 |
if test -n "$RUBY_VERSION"; then |
|
Lines 16-39
Link Here
|
| 16 |
RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null` |
17 |
RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null` |
| 17 |
RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags` |
18 |
RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags` |
| 18 |
fi |
19 |
fi |
|
|
20 |
if test -z "$RUBY_VERSION"; then |
| 21 |
# pkgconfig file does not exist but might be 1.9.1: RUBY_VERSION defined in ruby/version.h |
| 22 |
if test -n "$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'"; then |
| 23 |
# rubyhdrdir parameter works only in >=1.9.1; this is 1.9.1 |
| 24 |
RUBY_MAJOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MAJOR']"@:>@)'` |
| 25 |
RUBY_MINOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MINOR']"@:>@)'` |
| 26 |
RUBY_TEENY=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['TEENY']"@:>@)'` |
| 27 |
if test "$RUBY_MAJOR" == "1" && test "$RUBY_MINOR" == "9"; then |
| 28 |
RUBY_VERSION="$RUBY_MAJOR.$RUBY_MINOR.$RUBY_TEENY" |
| 29 |
fi |
| 30 |
fi |
| 31 |
fi |
| 19 |
if test -n "$RUBY_VERSION"; then |
32 |
if test -n "$RUBY_VERSION"; then |
| 20 |
RUBY_ARCHDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'` |
33 |
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'` |
| 21 |
RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'` |
34 |
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'` |
| 22 |
RUBY_SITEDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'` |
35 |
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'` |
| 23 |
RUBY_RUBYLIBDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'` |
36 |
RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'` |
|
|
37 |
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'` |
| 38 |
RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'` |
| 39 |
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` |
| 24 |
AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x]) |
40 |
AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x]) |
| 25 |
fi |
41 |
fi |
| 26 |
fi |
42 |
fi |
| 27 |
if test -z "$RUBY_VERSION"; then |
43 |
if test -z "$RUBY_VERSION"; then |
| 28 |
RUBY_ARCHDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` |
44 |
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` |
| 29 |
RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'` |
45 |
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'` |
| 30 |
RUBY_SITEDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'` |
46 |
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'` |
| 31 |
RUBY_RUBYLIBDIR=`ruby -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'` |
47 |
RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubylibdir"@:>@)'` |
|
|
48 |
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` |
| 49 |
RUBY_INCLUDEDIR=$RUBY_ARCHDIR |
| 50 |
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` |
| 32 |
fi |
51 |
fi |
| 33 |
AC_MSG_RESULT([archdir $RUBY_ARCHDIR, sitearchdir $RUBY_SITEARCHDIR, sitedir $RUBY_SITEDIR, cflags $RUBY_CFLAGS]) |
52 |
AC_MSG_RESULT([ |
|
|
53 |
archdir $RUBY_ARCHDIR, |
| 54 |
sitearchdir $RUBY_SITEARCHDIR, |
| 55 |
sitedir $RUBY_SITEDIR, |
| 56 |
rubylibdir $RUBY_RUBYLIBDIR, |
| 57 |
libdir $RUBY_LIBDIR, |
| 58 |
includedir $RUBY_INCLUDEDIR, |
| 59 |
librubyarg $RUBY_LIBRUBYARG, |
| 60 |
cflags $RUBY_CFLAGS]) |
| 34 |
AC_SUBST(RUBY_ARCHDIR) |
61 |
AC_SUBST(RUBY_ARCHDIR) |
| 35 |
AC_SUBST(RUBY_SITEARCHDIR) |
62 |
AC_SUBST(RUBY_SITEARCHDIR) |
| 36 |
AC_SUBST(RUBY_RUBYLIBDIR) |
63 |
AC_SUBST(RUBY_RUBYLIBDIR) |
|
|
64 |
AC_SUBST(RUBY_INCLUDEDIR) |
| 37 |
AC_SUBST(RUBY_SITEDIR) |
65 |
AC_SUBST(RUBY_SITEDIR) |
| 38 |
AC_SUBST(RUBY_CFLAGS) |
66 |
AC_SUBST(RUBY_CFLAGS) |
| 39 |
fi |
67 |
fi |