configure: support --without-ruby

Apparently some ruby installs are broken in ways that prevent the ruby
bindings from building.
This commit is contained in:
David Bremner 2015-07-30 08:16:29 +02:00
parent a57b3d4303
commit 2eb558fd9b

14
configure vendored
View file

@ -68,6 +68,7 @@ LIBDIR=
WITH_DOCS=1 WITH_DOCS=1
WITH_EMACS=1 WITH_EMACS=1
WITH_BASH=1 WITH_BASH=1
WITH_RUBY=1
WITH_ZSH=1 WITH_ZSH=1
# Compatible GMime versions (with constraints). # Compatible GMime versions (with constraints).
@ -147,6 +148,7 @@ Some features can be disabled (--with-feature=no is equivalent to
--without-bash-completion Do not install bash completions files --without-bash-completion Do not install bash completions files
--without-docs Do not install documentation and man pages --without-docs Do not install documentation and man pages
--without-emacs Do not install lisp file --without-emacs Do not install lisp file
--without-ruby Do not install ruby bindings
--without-zsh-completion Do not install zsh completions files --without-zsh-completion Do not install zsh completions files
Additional options are accepted for compatibility with other Additional options are accepted for compatibility with other
@ -211,6 +213,14 @@ for option; do
fi fi
elif [ "${option}" = '--without-bash-completion' ] ; then elif [ "${option}" = '--without-bash-completion' ] ; then
WITH_BASH=0 WITH_BASH=0
elif [ "${option%%=*}" = '--with-ruby' ]; then
if [ "${option#*=}" = 'no' ]; then
WITH_RUBY=0
else
WITH_RUBY=1
fi
elif [ "${option}" = '--without-ruby' ] ; then
WITH_RUBY=0
elif [ "${option%%=*}" = '--with-zsh-completion' ]; then elif [ "${option%%=*}" = '--with-zsh-completion' ]; then
if [ "${option#*=}" = 'no' ]; then if [ "${option#*=}" = 'no' ]; then
WITH_ZSH=0 WITH_ZSH=0
@ -487,13 +497,15 @@ if [ $WITH_DOCS = "1" ] ; then
fi fi
fi fi
have_ruby_dev=0
if [ $WITH_RUBY = "1" ] ; then
printf "Checking for ruby development files... " printf "Checking for ruby development files... "
if ruby -e "require 'mkmf'"> /dev/null 2>&1; then if ruby -e "require 'mkmf'"> /dev/null 2>&1; then
printf "Yes.\n" printf "Yes.\n"
have_ruby_dev=1 have_ruby_dev=1
else else
printf "No (skipping ruby bindings)\n" printf "No (skipping ruby bindings)\n"
have_ruby_dev=0 fi
fi fi
have_sphinx=0 have_sphinx=0