configure.ac: add checks for Haskell compiler/libs
configure.ac: add checks for Haskell compiler/libs

This patch adds an enable/disable option for htools (--enable-htools),
and associated tests for determining whether GHC (the compiler we use
for htools) and required libraries are present.

The method to do so is not very nice; usually, Haskell programs are
configured and compiled using cabal (http://www.haskell.org/cabal/, a
tool similar to Python's setuptools)), but that doesn't suit itself to
nice integration with autoconf/automake, so we test for the modules
presence manually.

In the end, we set a few variables:

- GHC: the path to the ghc compiler
- HTOOLS_MODULES: command line option for ghc to select the wanted
  'parallel' module
- HTOOLS_NOCURL: set to -DNO_CURL if we don't want to enable curl (and
  thus RAPI) support in htools
- HTOOLS: set to 'yes' if we should compile/install the htools
  programs
- HTOOLS_APIDOC: set to yes if we should build/install the htools
  API documentation
- WANT_HTOOLS, WANT_HTOOLSAPIDOC: two automake conditionals for later
  use in Makefile.am

Signed-off-by: Iustin Pop <acf83a5274f31a43af6b914614365999469c1a31@google.com>
Reviewed-by: Michael Hanselmann <68b67885ff74281219b4a4be33cc20fd45078d7c@google.com>

dimara/ganeti,grnet/snf-ganeti,mbakke/ganeti,leshchevds/ganeti,ganeti/ganeti,andir/ganeti,ganeti/ganeti,bitemyapp/ganeti,apyrgio/ganeti,leshchevds/ganeti,apyrgio/ganeti,ganeti-github-testing/ganeti-test-1,dimara/ganeti,onponomarev/ganeti,ganeti-github-testing/ganeti-test-1,ganeti/ganeti,yiannist/ganeti,onponomarev/ganeti,bitemyapp/ganeti,andir/ganeti,apyrgio/snf-ganeti,mbakke/ganeti,apyrgio/snf-ganeti,leshchevds/ganeti,andir/ganeti,grnet/snf-ganeti,yiannist/ganeti,yiannist/ganeti,mbakke/ganeti