source: trunk/cf/ax_ruby_version.m4 @ 4503

Last change on this file since 4503 was 1081, checked in by gah, 12 years ago

fix for perl, ruby bindings; visviewer SendBytes? method sends all data at once

File size: 693 bytes
Line 
1
2AC_DEFUN([AX_PROG_RUBY_VERSION],[
3    AC_REQUIRE([AC_PROG_SED])
4    AC_REQUIRE([AC_PROG_GREP])
5
6    AS_IF([test -n "$RUBY"],[
7        ax_ruby_version="$1"
8
9        AC_MSG_CHECKING([for ruby version])
10        changequote(<<,>>)
11        ruby_version=`$RUBY --version 2>&1 | $GREP "^ruby " | $SED -e 's/^.* \([0-9]*\.[0-9]*\.[0-9]*\) .*/\1/'`
12        changequote([,])
13        AC_MSG_RESULT($ruby_version)
14
15        AC_SUBST([RUBY_VERSION],[$ruby_version])
16
17        AX_COMPARE_VERSION([$ax_ruby_version],[le],[$ruby_version],[
18            :
19            $2
20        ],[
21            :
22            $3
23        ])
24    ],[
25        AC_MSG_WARN([could not find the ruby interpreter])
26        $3
27    ])
28])
29
Note: See TracBrowser for help on using the repository browser.