diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-09-21 12:33:20 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-10-13 20:22:46 +0200 |
commit | 1de311f56c78dc9683255ea34d8357e8bcd75374 (patch) | |
tree | 8aedc468e8f1b639248a44b245d8f0981f9c555f | |
parent | 208e2511add30d440be7f0690408d3bfe0ec79af (diff) | |
download | tdebindings-1de311f56c78dc9683255ea34d8357e8bcd75374.tar.gz tdebindings-1de311f56c78dc9683255ea34d8357e8bcd75374.zip |
Fix Ruby detection when .pc file is ruby-1.9
(cherry picked from commit 10fc891a7e282d2cbab27ab53d9b980147fadb9a)
-rw-r--r-- | korundum/rubylib/korundum/configure.in.in | 6 | ||||
-rw-r--r-- | qtruby/rubylib/qtruby/configure.in.in | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/korundum/rubylib/korundum/configure.in.in b/korundum/rubylib/korundum/configure.in.in index 924f42f8..e19d5b4f 100644 --- a/korundum/rubylib/korundum/configure.in.in +++ b/korundum/rubylib/korundum/configure.in.in @@ -10,15 +10,17 @@ else AC_MSG_CHECKING(for ruby dirs) if test -n "$PKGCONFIG"; then RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null` - if test -z "$RUBY_VERSION"; then + if test -n "$RUBY_VERSION"; then + RUBY_CFLAGS=`$PKGCONFIG ruby --cflags` + else RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null` + RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags` fi if test -n "$RUBY_VERSION"; then RUBY_ARCHDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'` RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'` RUBY_SITEDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'` RUBY_RUBYLIBDIR=`ruby -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'` - RUBY_CFLAGS=`$PKGCONFIG ruby --cflags` AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x]) fi fi diff --git a/qtruby/rubylib/qtruby/configure.in.in b/qtruby/rubylib/qtruby/configure.in.in index e7f4f2c9..f0594c60 100644 --- a/qtruby/rubylib/qtruby/configure.in.in +++ b/qtruby/rubylib/qtruby/configure.in.in @@ -10,8 +10,11 @@ else AC_MSG_CHECKING(for ruby dirs) if test -n "$PKGCONFIG"; then RUBY_VERSION=`$PKGCONFIG ruby --modversion 2>/dev/null` - if test -z "$RUBY_VERSION"; then + if test -n "$RUBY_VERSION"; then + RUBY_CFLAGS=`$PKGCONFIG ruby --cflags` + else RUBY_VERSION=`$PKGCONFIG ruby-1.9 --modversion 2>/dev/null` + RUBY_CFLAGS=`$PKGCONFIG ruby-1.9 --cflags` fi if test -n "$RUBY_VERSION"; then RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'` @@ -20,7 +23,6 @@ else RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'` RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'` RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` - RUBY_CFLAGS=`$PKGCONFIG ruby --cflags` AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x]) fi fi |