From 4ea148f9e2fe50ac2aaa9971ea19fb2435244f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 8 Dec 2015 00:38:55 +0100 Subject: [PATCH] Add ruby 2.2 detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- korundum/rubylib/korundum/configure.in.in | 12 ++++++++++++ qtruby/rubylib/qtruby/configure.in.in | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/korundum/rubylib/korundum/configure.in.in b/korundum/rubylib/korundum/configure.in.in index 29769f10..d2c4928c 100644 --- a/korundum/rubylib/korundum/configure.in.in +++ b/korundum/rubylib/korundum/configure.in.in @@ -26,6 +26,18 @@ else RUBY_CFLAGS=`$PKGCONFIG ruby-2.0 --cflags` fi fi + if test -z "$RUBY_VERSION"; then + RUBY_VERSION=`$PKGCONFIG ruby-2.1 --modversion 2>/dev/null` + if test -n "$RUBY_VERSION"; then + RUBY_CFLAGS=`$PKGCONFIG ruby-2.1 --cflags` + fi + fi + if test -z "$RUBY_VERSION"; then + RUBY_VERSION=`$PKGCONFIG ruby-2.2 --modversion 2>/dev/null` + if test -n "$RUBY_VERSION"; then + RUBY_CFLAGS=`$PKGCONFIG ruby-2.2 --cflags` + fi + fi if test -z "$RUBY_VERSION"; then # pkgconfig file does not exist but might be 1.9.1: RUBY_VERSION defined in ruby/version.h if test -n "$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'"; then diff --git a/qtruby/rubylib/qtruby/configure.in.in b/qtruby/rubylib/qtruby/configure.in.in index a381e839..f17f03b3 100644 --- a/qtruby/rubylib/qtruby/configure.in.in +++ b/qtruby/rubylib/qtruby/configure.in.in @@ -32,6 +32,12 @@ else RUBY_CFLAGS=`$PKGCONFIG ruby-2.1 --cflags` fi fi + if test -z "$RUBY_VERSION"; then + RUBY_VERSION=`$PKGCONFIG ruby-2.2 --modversion 2>/dev/null` + if test -n "$RUBY_VERSION"; then + RUBY_CFLAGS=`$PKGCONFIG ruby-2.2 --cflags` + fi + fi if test -z "$RUBY_VERSION"; then # pkgconfig file does not exist but might be 1.9.1: RUBY_VERSION defined in ruby/version.h if test -n "$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'"; then