configure: Don't build python or perl plugin when plugins are disabled

This commit is contained in:
TingPing 2014-01-16 00:12:06 -05:00
parent 37d92dd69c
commit 6f6070b8c8

View File

@ -226,6 +226,8 @@ dnl ** PERL *************************************************************
dnl ********************************************************************* dnl *********************************************************************
if test "$perl" = yes; then if test "$perl" = yes; then
AC_MSG_CHECKING(for plugin interface used by Perl)
if test "$plugin" = yes; then
AC_PATH_PROG(perlpath, perl) AC_PATH_PROG(perlpath, perl)
AC_MSG_CHECKING(for Perl compile flags) AC_MSG_CHECKING(for Perl compile flags)
PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null` PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
@ -273,6 +275,10 @@ if test "$perl" = yes; then
perl=no perl=no
fi fi
fi fi
else
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Perl])
perl=no
fi
fi fi
dnl ********************************************************************* dnl *********************************************************************
@ -280,6 +286,8 @@ dnl ** PYTHON ***********************************************************
dnl ********************************************************************* dnl *********************************************************************
if test "x$python" != xno ; then if test "x$python" != xno ; then
AC_MSG_CHECKING(for plugin interface used by Python)
if test "$plugin" = yes; then
case $python in case $python in
dnl set python2 default here dnl set python2 default here
python2) python2)
@ -302,6 +310,10 @@ if test "x$python" != xno ; then
AC_MSG_CHECKING(Python version) AC_MSG_CHECKING(Python version)
AC_MSG_RESULT($PY_VER) AC_MSG_RESULT($PY_VER)
python="python-${PY_VER}" python="python-${PY_VER}"
else
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Python])
python=no
fi
fi fi
dnl ********************************************************************* dnl *********************************************************************