1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 21:36:37 +02:00

Fix compilation of Ruby plugin with ruby >= 1.9.1, give higher priority to newest ruby when many versions are installed

This commit is contained in:
Sebastien Helleu
2011-01-13 17:44:03 +01:00
parent eb1a2d9a36
commit 89424130d2
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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}
)
+3 -3
View File
@@ -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([