build: Add ./configure --disable-ruby option.
authorMaxim Koltsov <kolmax94@gmail.com>
Mon, 8 Nov 2010 14:35:13 +0000 (14:35 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 8 Nov 2010 14:35:13 +0000 (14:35 +0000)
This disables the Ruby language bindings.

configure.ac

index 4f29fcd..bda6c3a 100644 (file)
@@ -610,9 +610,15 @@ AM_CONDITIONAL([HAVE_PYTHON],
     [test "x$PYTHON_INCLUDEDIR" != "x" && test "x$PYTHON_SITE_PACKAGES" != "x"])
 
 dnl Check for Ruby and rake (optional, for Ruby bindings).
-AC_CHECK_LIB([ruby],[ruby_init],[HAVE_LIBRUBY=1],[HAVE_LIBRUBY=0])
-AC_CHECK_PROG([RAKE],[rake],[rake],[no])
-
+AC_ARG_ENABLE([ruby],
+        AS_HELP_STRING([--disable-ruby], [Disable Ruby language bindings]),
+        [],
+        [enable_ruby=yes])
+AS_IF([test "x$enable_ruby" != "xno"],
+        [
+        AC_CHECK_LIB([ruby],[ruby_init],[HAVE_LIBRUBY=1],[HAVE_LIBRUBY=0])
+        AC_CHECK_PROG([RAKE],[rake],[rake],[no])
+        ])
 AM_CONDITIONAL([HAVE_RUBY],
     [test "x$RAKE" != "xno" && test -n "$HAVE_LIBRUBY"])