python: Added more useful logging to wsgidir.
[ashd.git] / configure.in
index 13dae8a..ece99db 100644 (file)
@@ -1,5 +1,5 @@
 AC_INIT(src/htparser.c)
-AM_INIT_AUTOMAKE([ashd], [0.1])
+AM_INIT_AUTOMAKE([ashd], [0.11])
 AM_CONFIG_HEADER(config.h)
 
 AC_PROG_CC
@@ -12,6 +12,35 @@ dnl AM_PROG_LIBTOOL
 
 AC_HEADER_STDC
 
+HAS_MAGIC=yes
+AC_CHECK_LIB(magic, magic_open, [:], [HAS_MAGIC=no])
+AC_CHECK_HEADER(magic.h, [], [HAS_MAGIC=no])
+if test "$HAS_MAGIC" = no; then
+       AC_MSG_ERROR([*** cannot find libmagic on this system])
+fi
+
+AH_TEMPLATE(HAVE_VALGRIND, [define to include debugging support for Valgrind])
+AC_CHECK_HEADER(valgrind/memcheck.h, [AC_DEFINE(HAVE_VALGRIND)], [])
+
+AH_TEMPLATE(HAVE_EPOLL, [define to enable epoll support])
+AC_ARG_WITH(epoll, [  --with-epoll            Enable epoll(2) support])
+HAS_EPOLL=""
+if test "$with_epoll" = no; then HAS_EPOLL=no; fi
+if test -z "$HAS_EPOLL"; then
+       AC_CHECK_LIB(c, epoll_ctl, [:], [HAS_EPOLL=no])
+fi
+if test -z "$HAS_EPOLL"; then
+       AC_CHECK_HEADER(sys/epoll.h, [], [HAS_EPOLL=no])
+fi
+if test "$HAS_EPOLL" != no; then HAS_EPOLL=yes; fi
+if test "$with_epoll" = yes -a "$HAS_EPOLL" = no; then
+       AC_MSG_ERROR([*** cannot find epoll support on this system])
+fi
+if test "$HAS_EPOLL" = yes; then
+       AC_DEFINE(HAVE_EPOLL)
+fi
+AM_CONDITIONAL(USE_EPOLL, [test "$HAS_EPOLL" = yes ])
+
 AH_TEMPLATE(HAVE_XATTR, [define to compile support for filesystem extended attributes])
 AC_ARG_WITH(xattr, [  --with-xattr            Enable XATTR support])
 HAS_XATTR=""
@@ -59,4 +88,5 @@ Makefile
 src/Makefile
 src/dirplex/Makefile
 lib/Makefile
+doc/Makefile
 ])