Commit 74013739 authored by Kevin Cozens's avatar Kevin Cozens Committed by Kevin Cozens

Added checks for Interactive Ruby.

2006-10-12  Kevin Cozens  <kcozens@cvs.gnome.org>

	* configure.in: Added checks for Interactive Ruby.

	* acinclude.m4: Added AM_CHECK_RUBY_IRB. Eliminated warnings about
	"underquoted definition".
parent 7e507f51
2006-10-12 Kevin Cozens <kcozens@cvs.gnome.org>
* configure.in: Added checks for Interactive Ruby.
* acinclude.m4: Added AM_CHECK_RUBY_IRB. Eliminated warnings about
"underquoted definition".
2006-08-21 Scott Lembcke <slembcke@cvs.gnome.org>
* Updated the INSTALL file with Kevins suggestions.
......
......@@ -6,7 +6,7 @@ dnl AM_CHECK_RUBY([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for Ruby, and define RUBY_CFLAGS, RUBY_LIBS, RUBY_LDSHARED, RUBY_DLEXT,
dnl ruby_libdir, ruby_archdir, ruby_sitelibdir and ruby_sitearchdir
dnl
AC_DEFUN(AM_CHECK_RUBY,
AC_DEFUN([AM_CHECK_RUBY],
[dnl
dnl Get the cflags and libraries from the rbconfig.rb
dnl
......@@ -80,3 +80,61 @@ dnl
AC_SUBST(ruby_sitelibdir)
AC_SUBST(ruby_sitearchdir)
])
dnl AM_CHECK_RUBY_IRB([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for Interactive Ruby and define RUBY_IRB.
dnl
AC_DEFUN([AM_CHECK_RUBY_IRB],
[
AC_PATH_PROG(RUBY_IRB, irb, no)
if test "$RUBY_IRB" = "no"; then
AC_MSG_ERROR([*** Could not find Interactive Ruby (irb).])
fi
HAS_RUBY_IRB=yes
minimum_version=ifelse([$1], ,0.9.0, $1)
RUBY_IRB_VERSION=`$RUBY_IRB --version | \
sed -e 's/irb //' | sed -e 's/[(].*[)]//'`
AC_MSG_CHECKING([for irb - version >= $minimum_version])
min_major_version=`echo $minimum_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
min_minor_version=`echo $minimum_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
min_micro_version=`echo $minimum_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
ruby_irb_major_version=`echo $RUBY_IRB_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
ruby_irb_minor_version=`echo $RUBY_IRB_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
ruby_irb_micro_version=`echo $RUBY_IRB_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if expr "$ruby_irb_major_version" = "$min_major_version" > /dev/null; then
if expr "$ruby_irb_minor_version" \> "$min_minor_version" > /dev/null; then
echo "yes (version $RUBY_IRB_VERSION)"
elif expr "$ruby_irb_minor_version" = "$min_minor_version" > /dev/null; then
if expr "$ruby_irb_micro_version" \>= "$min_micro_version" > /dev/null; then
echo "yes (version $RUBY_IRB_VERSION)"
else
AC_MSG_WARN([Too old (version $RUBY_IRB_VERSION)])
echo "Too old (version $RUBY_IRB_VERSION)"
DIE=1
fi
else
AC_MSG_WARN([Too old (version $RUBY_IRB_VERSION)])
DIE=1
fi
elif expr "$ruby_irb_major_version" \> "$min_major_version" > /dev/null; then
AC_MSG_WARN([version might be too new ($RUBY_IRB_VERSION)])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([*** Interactive Ruby version is too old.])
fi
AC_SUBST(RUBY_IRB)
AC_SUBST(HAS_RUBY_IRB)
])
......@@ -71,8 +71,6 @@ AM_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AM_PROG_AS
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
......@@ -385,6 +383,8 @@ m4_define([rg_check_error], [
dnl check for Ruby
AM_CHECK_RUBY(1.8.4,,
[AC_MSG_ERROR([rg_check_error([Ruby 1.8.4 or better], [it])])])
AM_CHECK_RUBY_IRB(0.9.0,,
[AC_MSG_ERROR([rg_check_error([irb 0.9.0 or better], [it])])])
#########################################
......@@ -443,6 +443,7 @@ Building $plugin_name with prefix=$prefix
Ruby settings:
RUBY_BIN: $RUBY_BIN
RUBY_IRB: $RUBY_IRB
RUBY_CFLAGS: $RUBY_CFLAGS
RUBY_LIBS: $RUBY_LIBS
RUBY_DLEXT: $RUBY_DLEXT
......@@ -453,8 +454,8 @@ Ruby settings:
ruby_sitearchdir: $ruby_sitearchdir
GIMP directories:
GIMP_DATADIR: $GIMP_DATADIR
GIMP_LIBDIR: $GIMP_LIBDIR
GIMP_PLUGINDIR: $GIMP_PLUGINDIR
GIMP_LOCALEDIR: $GIMP_LOCALEDIR
GIMP_DATADIR: $GIMP_DATADIR
GIMP_LIBDIR: $GIMP_LIBDIR
GIMP_PLUGINDIR: $GIMP_PLUGINDIR
GIMP_LOCALEDIR: $GIMP_LOCALEDIR
]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment