|
@@ -5,10 +5,19 @@ AC_PREREQ([2.69])
|
5
|
5
|
AC_INIT([PyFCGI], [0.0.1], [yann.weber@member.fsf.org])
|
6
|
6
|
AC_CONFIG_SRCDIR([src/main.c])
|
7
|
7
|
AC_CONFIG_HEADERS([include/config.h])
|
|
8
|
+AC_CONFIG_MACRO_DIRS([m4])
|
8
|
9
|
|
9
|
10
|
|
10
|
11
|
AC_ARG_ENABLE([debug],
|
11
|
12
|
AS_HELP_STRING([--enable-debug], [Enable debug, disabling -Werror, etc.]))
|
|
13
|
+AC_ARG_ENABLE([check],
|
|
14
|
+ AS_HELP_STRING([--disable-debug], [Disable unit test support]),
|
|
15
|
+ [case "${enableval}" in
|
|
16
|
+ yes) check=true;;
|
|
17
|
+ no) check=false;;
|
|
18
|
+ *) AC_MSG_ERROR([bad value ${enableval} for --disable-check]);;
|
|
19
|
+ esac],[check=true])
|
|
20
|
+AM_CONDITIONAL([CHECK], [test x$check = xtrue])
|
12
|
21
|
|
13
|
22
|
AC_USE_SYSTEM_EXTENSIONS
|
14
|
23
|
AC_GNU_SOURCE
|
|
@@ -62,7 +71,14 @@ AC_C_INLINE
|
62
|
71
|
AC_CHECK_LIB([fcgi], [FCGI_Accept])
|
63
|
72
|
AC_CHECK_LIB([rt], [timer_create])
|
64
|
73
|
AC_CHECK_LIB([pthread], [sem_open shm_open])
|
65
|
|
-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
|
|
74
|
+if test "x$check" = "xtrue"
|
|
75
|
+then
|
|
76
|
+ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [],
|
|
77
|
+ AC_MSG_FAILURE([Unabe to locate (check unit test c framework).
|
|
78
|
+You can run ./configure --disable-check if you do not need unit tests.
|
|
79
|
+]))
|
|
80
|
+ AS_IF([test x"${enable_debug}" = x"yes"], [CK_FORK=no], [])
|
|
81
|
+fi
|
66
|
82
|
|
67
|
83
|
# Checks for header files.
|
68
|
84
|
AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h syslog.h unistd.h sem.h time.h])
|