|
@@ -0,0 +1,54 @@
|
|
1
|
+# -*- Autoconf -*-
|
|
2
|
+# Process this file with autoconf to produce a configure script.
|
|
3
|
+
|
|
4
|
+AC_PREREQ([2.69])
|
|
5
|
+AC_INIT([PyFCGI], [0.0.1], [yann.weber@member.fsf.org])
|
|
6
|
+AC_CONFIG_SRCDIR([src/main.c])
|
|
7
|
+AC_CONFIG_HEADERS([include/config.h])
|
|
8
|
+
|
|
9
|
+AC_ARG_ENABLE([debug],
|
|
10
|
+ AS_HELP_STRING([--enable-debug], [Enable debug, disabling -Werror, etc.]))
|
|
11
|
+
|
|
12
|
+# Checks for programs.
|
|
13
|
+AC_PROG_CC
|
|
14
|
+AC_PROG_RANLIB
|
|
15
|
+AC_CHECK_PROG(PYTHON_CONFIG, [python3-config], [yes])
|
|
16
|
+if test x"${PYTHON_CONFIG}" == x"yes"; then
|
|
17
|
+ PYTHON_CFLAGS=`python3-config --includes`
|
|
18
|
+ PYTHON_LDFLAGS=`python3-config --libs`
|
|
19
|
+ AC_SUBST([PYTHON_CFLAGS])
|
|
20
|
+ AC_SUBST([PYTHON_LDFLAGS])
|
|
21
|
+else
|
|
22
|
+ AC_MSG_ERROR([Unable to find python3-config])
|
|
23
|
+fi
|
|
24
|
+
|
|
25
|
+if test x"${enable_debug}" = x"yes"; then
|
|
26
|
+ AM_CFLAGS="-Wall -g"
|
|
27
|
+else
|
|
28
|
+ AM_CFLAGS="-Wall -Werror -O2"
|
|
29
|
+fi
|
|
30
|
+
|
|
31
|
+AC_SUBST([AM_CFLAGS])
|
|
32
|
+
|
|
33
|
+# Checks for libraries.
|
|
34
|
+AC_CHECK_LIB([fcgi], [FCGI_Accept])
|
|
35
|
+PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
|
|
36
|
+
|
|
37
|
+# Checks for header files.
|
|
38
|
+AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h syslog.h unistd.h sem.h])
|
|
39
|
+
|
|
40
|
+# Checks for typedefs, structures, and compiler characteristics.
|
|
41
|
+AC_TYPE_PID_T
|
|
42
|
+AC_TYPE_SIZE_T
|
|
43
|
+
|
|
44
|
+# Checks for library functions.
|
|
45
|
+AC_FUNC_FORK
|
|
46
|
+AC_FUNC_MALLOC
|
|
47
|
+AC_FUNC_REALLOC
|
|
48
|
+AC_CHECK_FUNCS([bzero getcwd gettimeofday memmove strdup strerror strndup semop clone])
|
|
49
|
+
|
|
50
|
+AM_INIT_AUTOMAKE
|
|
51
|
+AC_CONFIG_FILES([Makefile
|
|
52
|
+ src/Makefile
|
|
53
|
+ tests/Makefile])
|
|
54
|
+AC_OUTPUT
|