ruby: Fix libruby test.

If -lruby was not available, this used to define HAVE_LIBRUBY=0.
However this meant that the later test -n "$HAVE_LIBRUBY" would
be successful, whereas it should fail in this case.
This commit is contained in:
Richard W.M. Jones
2012-06-22 09:45:06 +01:00
parent 6cb74d46ba
commit 823ba05ebd

View File

@@ -976,11 +976,10 @@ AC_ARG_ENABLE([ruby],
AS_HELP_STRING([--disable-ruby], [Disable Ruby language bindings]),
[],
[enable_ruby=yes])
AS_IF([test "x$enable_ruby" != "xno"],
[
AS_IF([test "x$enable_ruby" != "xno"],[
AC_CHECK_PROG([RUBY],[ruby],[ruby],[no])
AC_CHECK_PROG([RAKE],[rake],[rake],[no])
AC_CHECK_LIB([ruby],[ruby_init],[HAVE_LIBRUBY=1],[HAVE_LIBRUBY=0])
AC_CHECK_LIB([ruby],[ruby_init],[HAVE_LIBRUBY=1],[HAVE_LIBRUBY=])
AC_SUBST([RAKE])
])
AM_CONDITIONAL([HAVE_RUBY],