--- a/configure.ac +++ b/configure.ac @@ -10,8 +10,6 @@ AC_PROG_CC AC_PROG_CC_C99 AC_PROG_INSTALL -AC_CHECK_PROG([HALIBUT],[halibut],[yes],[no]) -AM_CONDITIONAL([HAVE_HALIBUT],[test "x$HALIBUT" = "xyes"]) # Checks for libraries. @@ -43,13 +41,28 @@ AC_CHECK_FUNCS([ftruncate fdopendir lstat64 stat64 memchr munmap select socket strcasecmp strchr strcspn strerror strrchr strspn strtoul strtoull connect inet_ntoa inet_addr gethostbyname getaddrinfo]) +AC_ARG_ENABLE([halibut], + AS_HELP_STRING([--disable-halibut], + [disable documentation with halibut (default off)]), + [halibut=$enableval],[halibut=no]) + +if test "$halibut" = "no"; then + AM_CONDITIONAL([HAVE_HALIBUT],[false]) +else + AC_CHECK_PROG([have_halibut],[halibut],[yes],[no]) + if test "$have_halibut" = "no"; then + AC_MSG_ERROR([halibut configured but not found]) + fi + AM_CONDITIONAL([HAVE_HALIBUT],[true]) +fi + AC_ARG_ENABLE([ipv6], AS_HELP_STRING([--disable-ipv6], - [disable IPv6 in the built-in web server]), - [ipv6=$enableval],[ipv6=$ac_cv_func_getaddrinfo]) + [disable IPv6 in the built-in web server (default off)]), + [ipv6=$enableval],[ipv6=no]) AC_ARG_ENABLE([ipv4], AS_HELP_STRING([--disable-ipv4], - [disable IPv4 in the built-in web server]), + [disable IPv4 in the built-in web server (default on)]), [ipv4=$enableval],[ipv4=yes]) if test "$ipv6" = "no"; then AC_DEFINE([NO_IPV6], [1], [define if IPv6 is disabled at configure time])