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 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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_ARG_VAR(PYTHON_CONFIG_PATH, [python3-config path])
  13. AC_PATH_PROG(PYTHON_CONFIG_PATH, [python3-config], [no])
  14. echo "PYTHON CONFIG == ${PYTHON_CONFIG_PATH}"
  15. if test x"${PYTHON_CONFIG_PATH}" != x"no"; then
  16. AC_SUBST([PYTHON_CONFIG_PATH])
  17. PYTHON_CFLAGS=`${PYTHON_CONFIG_PATH} --includes`
  18. PYTHON_LDFLAGS=`${PYTHON_CONFIG_PATH} --libs`
  19. AC_SUBST([PYTHON_CFLAGS])
  20. AC_SUBST([PYTHON_LDFLAGS])
  21. PYTHON_SO_CFLAGS=`${PYTHON_CONFIG_PATH} --cflags`
  22. PYTHON_SO_LDFLAGS=`${PYTHON_CONFIG_PATH} --cflags`
  23. AC_SUBST([PYTHON_SO_CFLAGS])
  24. AC_SUBST([PYTHON_SO_LDFLAGS])
  25. else
  26. AC_MSG_ERROR([Unable to find python3-config])
  27. fi
  28. if test x"${enable_debug}" = x"yes"; then
  29. AM_CFLAGS="-Wall -g -DDEBUG"
  30. CFLAGS="-O0"
  31. else
  32. AM_CFLAGS="-Wall -Werror -O2"
  33. fi
  34. AC_PROG_CC
  35. AC_PROG_RANLIB
  36. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  37. if test -z "$DOXYGEN";
  38. then
  39. AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
  40. fi
  41. AC_ENABLE_SHARED
  42. AC_DISABLE_STATIC
  43. AC_PROG_LIBTOOL
  44. LT_INIT
  45. AC_SUBST([AM_CFLAGS])
  46. AC_C_INLINE
  47. # Checks for libraries.
  48. AC_CHECK_LIB([fcgi], [FCGI_Accept])
  49. AC_CHECK_LIB([rt], [timer_create])
  50. AC_CHECK_LIB([pthread], [sem_open shm_open])
  51. PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
  52. # Checks for header files.
  53. AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h syslog.h unistd.h sem.h time.h])
  54. # Checks for typedefs, structures, and compiler characteristics.
  55. AC_TYPE_PID_T
  56. AC_TYPE_SIZE_T
  57. # Checks for library functions.
  58. AC_FUNC_FORK
  59. AC_FUNC_MALLOC
  60. AC_FUNC_REALLOC
  61. AC_CHECK_FUNCS([bzero getcwd gettimeofday memmove strdup strerror strndup get_current_dir_name timer_settime])
  62. AM_INIT_AUTOMAKE
  63. AC_CONFIG_FILES([Makefile
  64. src/Makefile
  65. tests/Makefile
  66. ])
  67. AM_CONDITIONAL([HAVE_DOXYGEN],
  68. [test -n "$DOXYGEN"])AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile
  69. docs/Makefile])])
  70. AC_OUTPUT