1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- # -*- Autoconf -*-
- # Process this file with autoconf to produce a configure script.
-
- AC_PREREQ([2.69])
- AC_INIT([PyFCGI], [0.0.1], [yann.weber@member.fsf.org])
- AC_CONFIG_SRCDIR([src/main.c])
- AC_CONFIG_HEADERS([include/config.h])
-
- AC_ARG_ENABLE([debug],
- AS_HELP_STRING([--enable-debug], [Enable debug, disabling -Werror, etc.]))
-
- AC_USE_SYSTEM_EXTENSIONS
- AC_GNU_SOURCE
-
- # Checks for programs.
- AC_PROG_CC
- AC_PROG_RANLIB
- AC_CHECK_PROG(PYTHON_CONFIG, [python3-config], [yes])
- if test x"${PYTHON_CONFIG}" == x"yes"; then
- PYTHON_CFLAGS=`python3-config --includes`
- PYTHON_LDFLAGS=`python3-config --libs`
- AC_SUBST([PYTHON_CFLAGS])
- AC_SUBST([PYTHON_LDFLAGS])
- else
- AC_MSG_ERROR([Unable to find python3-config])
- fi
-
- if test x"${enable_debug}" = x"yes"; then
- AM_CFLAGS="-Wall -g"
- else
- AM_CFLAGS="-Wall -Werror -O2"
- fi
-
- AC_SUBST([AM_CFLAGS])
-
- AC_C_INLINE
-
- # Checks for libraries.
- AC_CHECK_LIB([fcgi], [FCGI_Accept])
- PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
-
- # Checks for header files.
- AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h syslog.h unistd.h sem.h])
-
- # Checks for typedefs, structures, and compiler characteristics.
- AC_TYPE_PID_T
- AC_TYPE_SIZE_T
-
- # Checks for library functions.
- AC_FUNC_FORK
- AC_FUNC_MALLOC
- AC_FUNC_REALLOC
- AC_CHECK_FUNCS([bzero getcwd gettimeofday memmove strdup strerror strndup semop clone get_current_dir_name])
-
- AM_INIT_AUTOMAKE
- AC_CONFIG_FILES([Makefile
- src/Makefile
- tests/Makefile])
- AC_OUTPUT
|