Tests about a simple python3 fastcgi runner using libfcgi and the Python-C API.
python
c
wsgi
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure.ac 1.8KB

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