Revision 1ca709c1 configure.ac

b/configure.ac
467 467
  AC_MSG_WARN([qemu-img not found, using ovfconverter will not be possible])
468 468
fi
469 469

  
470
# --enable-htools-rapi
471
HTOOLS_RAPI=
472
AC_ARG_ENABLE([htools-rapi],
473
        [AS_HELP_STRING([--enable-htools-rapi],
474
        [enable use of curl in the Haskell code (default: check)])],
475
        [],
476
        [enable_htools_rapi=check])
477

  
478 470
# --enable-confd
479 471
ENABLE_CONFD=
480 472
AC_ARG_ENABLE([confd],
......
517 509

  
518 510
# check for modules, first custom/special checks
519 511
AC_MSG_NOTICE([checking for required haskell modules])
520
HS_NOCURL=-DNO_CURL
521
if test "$enable_htools_rapi" != no; then
522
  AC_GHC_PKG_CHECK([curl], [HS_NOCURL=], [])
523
  if test -n "$HS_NOCURL"; then
524
    if test "$enable_htools_rapi" = check; then
525
      AC_MSG_WARN(m4_normalize([The curl library was not found, Haskell
526
                                code will be compiled without RAPI support]))
527
    else
528
      AC_MSG_FAILURE(m4_normalize([The curl library was not found, but it has
529
                                   been requested]))
530
    fi
531
  else
532
    AC_MSG_NOTICE([Enabling curl/RAPI/RPC usage in Haskell code])
533
  fi
534
fi
535
AC_SUBST(HS_NOCURL)
536

  
537 512
HS_PARALLEL3=
538 513
AC_GHC_PKG_CHECK([parallel-3.*], [HS_PARALLEL3=-DPARALLEL3],
539 514
                 [AC_GHC_PKG_REQUIRE(parallel)], t)
540 515
AC_SUBST(HS_PARALLEL3)
541 516

  
542 517
# and now standard modules
518
AC_GHC_PKG_REQUIRE(curl)
543 519
AC_GHC_PKG_REQUIRE(json)
544 520
AC_GHC_PKG_REQUIRE(network)
545 521
AC_GHC_PKG_REQUIRE(mtl)
......
641 617
        ;;
642 618
    esac
643 619
  ]],
644
  [[case "x${has_confd}x${HS_NOCURL}x" in
645
     xTruexx)
620
  [[case "x${has_confd}x" in
621
     xTruex)
646 622
       enable_split_query=True
647 623
       ;;
648 624
     *)
......
655 631
  AC_MSG_ERROR([Split queries require the confd daemon])
656 632
fi
657 633

  
658
if test x$enable_split_query = xTrue -a x$HS_NOCURL != x; then
659
  AC_MSG_ERROR([Split queries require the htools-rapi feature (curl library)])
660
fi
661

  
662 634
if test x$enable_split_query = xTrue; then
663 635
  AC_MSG_NOTICE([Split query functionality enabled])
664 636
fi

Also available in: Unified diff