# -*- 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_ARG_VAR(PYTHON_CONFIG_PATH, [python3-config path]) AC_PATH_PROG(PYTHON_CONFIG_PATH, [python3-config], [no]) echo "PYTHON CONFIG == ${PYTHON_CONFIG_PATH}" if test x"${PYTHON_CONFIG_PATH}" != x"no"; then AC_SUBST([PYTHON_CONFIG_PATH]) PYTHON_CFLAGS=`${PYTHON_CONFIG_PATH} --includes` PYTHON_LDFLAGS=`${PYTHON_CONFIG_PATH} --libs` AC_SUBST([PYTHON_CFLAGS]) AC_SUBST([PYTHON_LDFLAGS]) PYTHON_SO_CFLAGS=`${PYTHON_CONFIG_PATH} --cflags` PYTHON_SO_LDFLAGS=`${PYTHON_CONFIG_PATH} --cflags` AC_SUBST([PYTHON_SO_CFLAGS]) AC_SUBST([PYTHON_SO_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_ENABLE_SHARED AC_DISABLE_STATIC AC_PROG_LIBTOOL LT_INIT 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