From 89424130d2c52a75490768e05a0c38413fb74e2b Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 13 Jan 2011 17:44:03 +0100 Subject: Fix compilation of Ruby plugin with ruby >= 1.9.1, give higher priority to newest ruby when many versions are installed --- cmake/FindRuby.cmake | 4 ++-- configure.in | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/FindRuby.cmake b/cmake/FindRuby.cmake index 753eb34cb..0ef3ce180 100644 --- a/cmake/FindRuby.cmake +++ b/cmake/FindRuby.cmake @@ -32,7 +32,7 @@ IF(RUBY_FOUND) ENDIF(RUBY_FOUND) FIND_PROGRAM(RUBY_EXECUTABLE - NAMES ruby ruby1.9 ruby19 ruby1.8 ruby18 ruby1.6 ruby16 + NAMES ruby1.9.2 ruby192 ruby1.9.1 ruby191 ruby1.9 ruby19 ruby1.8 ruby18 ruby1.6 ruby16 ruby PATHS /usr/bin /usr/local/bin /usr/pkg/bin ) @@ -78,7 +78,7 @@ IF(RUBY_EXECUTABLE) "${RUBY_INCLUDE_PATH}/${RUBY_ARCH}") FIND_LIBRARY(RUBY_LIBRARY - NAMES ruby ruby1.6 ruby16 ruby1.8 ruby18 ruby1.9 ruby19 + NAMES ruby-1.9.2 ruby1.9.2 ruby192 ruby-1.9.1 ruby1.9.1 ruby191 ruby1.9 ruby19 ruby1.8 ruby18 ruby1.6 ruby16 ruby PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH} ) diff --git a/configure.in b/configure.in index a38c67c62..ba951793e 100644 --- a/configure.in +++ b/configure.in @@ -538,7 +538,7 @@ fi RUBY_VERSION= if test "x$enable_ruby" = "xyes" ; then - AC_PATH_PROGS(RUBY, ruby ruby1.8 ruby1.9) + AC_PATH_PROGS(RUBY, ruby1.9.2 ruby1.9.1 ruby1.9 ruby1.8 ruby) if test -z $RUBY ; then AC_MSG_WARN([ *** Ruby must be installed on your system but ruby interpreter couldn't be found in path. @@ -552,7 +552,7 @@ if test "x$enable_ruby" = "xyes" ; then AC_MSG_WARN([ *** Ruby header files have been found, but they're of the version 1.9.0. *** Ruby 1.9.0 is an unstable release and should not be used in production. -*** Please install Ruby >=1.8.6 or 1.9.1. +*** Please install Ruby 1.8.x (>= 1.8.6) or >= 1.9.1. *** WeeChat will be built without Ruby support.]) enable_ruby="no" not_found="$not_found ruby" @@ -561,7 +561,7 @@ if test "x$enable_ruby" = "xyes" ; then RUBY_ARCH=`$RUBY -rrbconfig -e 'print Config::CONFIG[["arch"]]'` AC_MSG_CHECKING(for Ruby header files) if test -d "$RUBY_INCLUDE/"; then - M_RUBY_VERSION=`$RUBY -rrbconfig -e "puts Config::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"` + M_RUBY_VERSION=`$RUBY -rrbconfig -e "puts Config::CONFIG[['ruby_version']].gsub(/\./, '')[[0,3]]"` RUBY_CFLAGS="-I$RUBY_INCLUDE/ -I$RUBY_INCLUDE/$RUBY_ARCH -DRUBY_VERSION=$M_RUBY_VERSION" else AC_MSG_WARN([ -- cgit v1.2.3