add check for ruby header

This commit is contained in:
Frank Mori Hess 2004-01-17 20:12:17 +00:00
parent f59b64a8de
commit ebec2e6206

View file

@ -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