summaryrefslogtreecommitdiff
path: root/sys-apps/agedu/files/agedu-r9671-fix-automagic.patch
blob: 0ea79d1a170a43f8cd946ff7116450f3a178a7bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- 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])