fi
AC_SUBST(SYSLOG_USAGE, $SYSLOG)
+AC_ARG_ENABLE([remote-commands],
+ [AS_HELP_STRING([--enable-remote-commands],
+ m4_normalize([enable remote commands in the node daemon
+ (default: disabled)]))],
+ [[if test "$enableval" = no; then
+ enable_remote_commands=False
+ else
+ enable_remote_commands=True
+ fi
+ ]],
+ [enable_remote_commands=False])
+AC_SUBST(ENABLE_REMOTE_COMMANDS, $enable_remote_commands)
+
# --with-disk-separator=...
AC_ARG_WITH([disk-separator],
[AS_HELP_STRING([--with-disk-separator=STRING],
then
AC_MSG_WARN([pep8 not found, checking code will not be complete])
fi
-AM_CONDITIONAL([HAS_PEP8], [test "$PEP8"])
+AM_CONDITIONAL([HAS_PEP8], [test -n "$PEP8"])
+
+# Check for python-coverage
+AC_ARG_VAR(PYCOVERAGE, [python-coverage path])
+AC_PATH_PROGS(PYCOVERAGE, [python-coverage coverage], [])
+if test -z "$PYCOVERAGE"
+then
+ AC_MSG_WARN(m4_normalize([python-coverage or coverage not found, evaluating
+ Python test coverage will not be possible]))
+fi
# Check for socat
AC_ARG_VAR(SOCAT, [socat path])
[],
[enable_confd=check])
+ENABLE_MONITORING=
+AC_ARG_ENABLE([monitoring],
+ [AS_HELP_STRING([--enable-monitoring],
+ [enable the ganeti monitoring agent (default: check)])],
+ [],
+ [enable_monitoring=check])
+
# Check for ghc
AC_ARG_VAR(GHC, [ghc path])
AC_PATH_PROG(GHC, [ghc], [])
AC_MSG_FAILURE([ghc not found, compilation will not possible])
fi
+AC_MSG_CHECKING([checking for extra GHC flags])
+GHC_BYVERSION_FLAGS=""
+# check for GHC supported flags that vary accross versions
+for flag in -fwarn-incomplete-uni-patterns; do
+ if $GHC -e "0" $flag >/dev/null 2>/dev/null; then
+ GHC_BYVERSION_FLAGS="$GHC_BYVERSION_FLAGS $flag"
+ fi
+done
+AC_MSG_RESULT($GHC_BYVERSION_FLAGS)
+AC_SUBST(GHC_BYVERSION_FLAGS)
+
# Check for ghc-pkg
AC_ARG_VAR(GHC_PKG, [ghc-pkg path])
AC_PATH_PROG(GHC_PKG, [ghc-pkg], [])
AC_SUBST(ENABLE_CONFD, $has_confd)
AM_CONDITIONAL([ENABLE_CONFD], [test x$has_confd = xTrue])
+#extra modules for monitoring agent functionality
+has_monitoring=False
+if test "$enable_monitoring" != "no"; then
+ MONITORING_PKG=
+ AC_GHC_PKG_CHECK([attoparsec], [], [MONITORING_PKG="$MONITORING_PKG attoparsec"])
+ if test -z "$MONITORING_PKG"; then
+ has_monitoring=True
+ else
+ if test "$enable_monitoring" = "check"; then
+ AC_MSG_WARN(m4_normalize([The required extra libraries for the monitoring
+ agent were not found ($MONITORING_PKG),
+ monitoring disabled]))
+ else
+ AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but
+ required libraries were not found:
+ $MONITORING_PKG]))
+ fi
+ fi
+fi
+if test "$has_monitoring" = "True"; then
+ AC_MSG_NOTICE([Enabling the monitoring agent usage])
+fi
+AC_SUBST(ENABLE_MONITORING, $has_monitoring)
+AM_CONDITIONAL([ENABLE_MONITORING], [test x$has_monitoring = xTrue])
+
# development modules
HTOOLS_NODEV=
AC_GHC_PKG_CHECK([QuickCheck-2.*], [], [HTOOLS_NODEV=1], t)
AC_GHC_PKG_CHECK([test-framework-0.6*], [], [HTOOLS_NODEV=1], t)
AC_GHC_PKG_CHECK([test-framework-hunit], [], [HTOOLS_NODEV=1])
AC_GHC_PKG_CHECK([test-framework-quickcheck2], [], [HTOOLS_NODEV=1])
+# FIXME: unify checks for non-test libraries (attoparsec, hinotify, ...)
+# that are needed to execute the tests, avoiding the duplication
+# of the checks.
+AC_GHC_PKG_CHECK([attoparsec], [], [HTOOLS_NODEV=1])
if test -n "$HTOOLS_NODEV"; then
AC_MSG_WARN(m4_normalize([Required development modules were not found,
you won't be able to run Haskell unittests]))
AC_PYTHON_MODULE(pyinotify, t)
AC_PYTHON_MODULE(pycurl, t)
AC_PYTHON_MODULE(affinity)
-
-# This is optional but then we've limited functionality
AC_PYTHON_MODULE(paramiko)
-if test "$HAVE_PYMOD_PARAMIKO" = "no"; then
- AC_MSG_WARN(m4_normalize([You do not have Paramiko installed. While this is
- optional you have to configure SSH and the node
- daemon on the joining nodes yourself.]))
-fi
AC_CONFIG_FILES([ Makefile ])