From ebec2e6206cc2b5fbbc5d957ddbc3262ee839d8f Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sat, 17 Jan 2004 20:12:17 +0000 Subject: [PATCH] add check for ruby header --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index be6bdc1..e114707 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,10 @@ AC_SUBST(PYTHON_QUIET) AC_ARG_ENABLE([ruby-binding],[ --disable-ruby-binding Disable building of Ruby binding], [ENABLE_RUBY=$enableval],[ENABLE_RUBY="yes"]) AC_PATH_PROG(RUBY, ruby, no) -if test "$RUBY" == "no" ; then +if test "$RUBY" != "no" ; then + RUBY_INC_DIR=`$RUBY -e 'require \'rbconfig\'; c = ::Config:CONFIG; print c[[\'archdir\']];'` + AC_CHECK_HEADER([$RUBY_INC_DIR/ruby.h],[],[ENABLE_RUBY="no";AC_MSG_WARN([ruby.h not found, disabling Ruby binding])]) +else AC_MSG_WARN([ruby not found, disabling ruby binding]) ENABLE_RUBY="no" fi -- 2.26.2