1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Added --enable-ruby-plugins option to configure.ac

This commit is contained in:
James Booth 2014-01-07 22:12:08 +00:00
parent 62d4360863
commit a33ca6238d

View File

@ -30,6 +30,8 @@ AS_IF([test "x$host_os" = xcygwin],
### Options ### Options
AC_ARG_ENABLE([notifications], AC_ARG_ENABLE([notifications],
[AS_HELP_STRING([--enable-notifications], [enable desktop notifications])]) [AS_HELP_STRING([--enable-notifications], [enable desktop notifications])])
AC_ARG_ENABLE([ruby-plugins],
[AS_HELP_STRING([--enable-ruby-plugins], [enable ruby plugins])])
AC_ARG_WITH([libxml2], AC_ARG_WITH([libxml2],
[AS_HELP_STRING([--with-libxml2], [link with libxml2 instead of expat])]) [AS_HELP_STRING([--with-libxml2], [link with libxml2 instead of expat])])
AC_ARG_WITH([xscreensaver], AC_ARG_WITH([xscreensaver],
@ -37,8 +39,9 @@ AC_ARG_WITH([xscreensaver],
### plugins ### plugins
# ruby # ruby
AC_CHECK_PROG(RUBY_CMD_EXISTS, ruby, yes, no) if test "x$enable_ruby_plugins" != xno; then
if test "$RUBY_CMD_EXISTS" == "yes"; then AC_CHECK_PROG(RUBY_CMD_EXISTS, ruby, yes, no)
if test "$RUBY_CMD_EXISTS" == "yes"; then
ac_mkmf_result=`ruby -rmkmf -e ";" 2>&1` ac_mkmf_result=`ruby -rmkmf -e ";" 2>&1`
if test -z "$ac_mkmf_result"; then if test -z "$ac_mkmf_result"; then
AC_DEFUN([AX_WITH_RUBY],[ AC_DEFUN([AX_WITH_RUBY],[
@ -47,13 +50,24 @@ if test "$RUBY_CMD_EXISTS" == "yes"; then
AX_RUBY_DEVEL AX_RUBY_DEVEL
AM_CONDITIONAL([BUILD_RUBY_API], [true]) AM_CONDITIONAL([BUILD_RUBY_API], [true])
AC_DEFINE([HAVE_RUBY], [1], [Ruby support]) AC_DEFINE([HAVE_RUBY], [1], [Ruby support])
else
if test "x$enable_ruby_plugins" = xyes; then
AC_MSG_ERROR([Ruby not found, cannot enable Ruby plugins.])
else else
AM_CONDITIONAL([BUILD_RUBY_API], [false]) AM_CONDITIONAL([BUILD_RUBY_API], [false])
AC_MSG_NOTICE([Ruby development package not found, Ruby plugin support disabled.]) AC_MSG_NOTICE([Ruby development package not found, Ruby plugin support disabled.])
fi fi
else fi
else
if test "x$enable_ruby_plugins" = xyes; then
AC_MSG_ERROR([Ruby not found, cannot enable Ruby plugins.])
else
AM_CONDITIONAL([BUILD_RUBY_API], [false]) AM_CONDITIONAL([BUILD_RUBY_API], [false])
AC_MSG_NOTICE([Ruby not installed, Ruby plugin support disabled.]) AC_MSG_NOTICE([Ruby not installed, Ruby plugin support disabled.])
fi
fi
else
AM_CONDITIONAL([BUILD_RUBY_API], [false])
fi fi
# python # python
@ -207,6 +221,7 @@ echo ""
echo "PACKAGE_STATUS : $PACKAGE_STATUS" echo "PACKAGE_STATUS : $PACKAGE_STATUS"
echo "AM_CFLAGS : $AM_CFLAGS" echo "AM_CFLAGS : $AM_CFLAGS"
echo "AM_CPPFLAGS : $AM_CPPFLAGS" echo "AM_CPPFLAGS : $AM_CPPFLAGS"
echo "AM_LDFLAGS : $AM_LDFLAGS"
echo "LIBS : $LIBS" echo "LIBS : $LIBS"
echo "XML Parser : $PARSER" echo "XML Parser : $PARSER"
echo "" echo ""