configure: Add option to enable remote commands
[ganeti-local] / configure.ac
index 3e134a2..e6ff101 100644 (file)
@@ -310,6 +310,19 @@ then
 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],
@@ -430,6 +443,17 @@ if test -z "$GHC"; then
   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], [])