Tests about a simple python3 fastcgi runner using libfcgi and the Python-C API.
python
c
wsgi
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

configure.ac 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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_CONFIG_MACRO_DIRS([m4])
  8. AC_ARG_ENABLE([debug],
  9. AS_HELP_STRING([--enable-debug], [Enable debug, disabling -Werror, etc.]))
  10. AC_ARG_ENABLE([check],
  11. AS_HELP_STRING([--disable-debug], [Disable unit test support]),
  12. [case "${enableval}" in
  13. yes) check=true;;
  14. no) check=false;;
  15. *) AC_MSG_ERROR([bad value ${enableval} for --disable-check]);;
  16. esac],[check=true])
  17. AM_CONDITIONAL([CHECK], [test x$check = xtrue])
  18. AC_USE_SYSTEM_EXTENSIONS
  19. AC_GNU_SOURCE
  20. # Checks for programs.
  21. AC_ARG_VAR(PYTHON_CONFIG_PATH, [python3-config path])
  22. AC_PATH_PROG(PYTHON_CONFIG_PATH, [python3-config], [no])
  23. echo "PYTHON CONFIG == ${PYTHON_CONFIG_PATH}"
  24. if test x"${PYTHON_CONFIG_PATH}" != x"no"; then
  25. AC_SUBST([PYTHON_CONFIG_PATH])
  26. PYTHON_CFLAGS=`${PYTHON_CONFIG_PATH} --includes`
  27. PYTHON_LDFLAGS=`${PYTHON_CONFIG_PATH} --libs`
  28. AC_SUBST([PYTHON_CFLAGS])
  29. AC_SUBST([PYTHON_LDFLAGS])
  30. PYTHON_SO_CFLAGS=`${PYTHON_CONFIG_PATH} --cflags`
  31. PYTHON_SO_LDFLAGS=`${PYTHON_CONFIG_PATH} --cflags`
  32. AC_SUBST([PYTHON_SO_CFLAGS])
  33. AC_SUBST([PYTHON_SO_LDFLAGS])
  34. else
  35. AC_MSG_ERROR([Unable to find python3-config])
  36. fi
  37. if test x"${enable_debug}" = x"yes"; then
  38. AM_CFLAGS="-Wall -g -DDEBUG"
  39. CFLAGS="-O0"
  40. else
  41. AM_CFLAGS="-Wall -Werror -O2"
  42. fi
  43. AC_PROG_CC
  44. AC_PROG_RANLIB
  45. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  46. if test -z "$DOXYGEN";
  47. then
  48. AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
  49. fi
  50. AC_ENABLE_SHARED
  51. AC_DISABLE_STATIC
  52. AC_PROG_LIBTOOL
  53. LT_INIT
  54. AC_SUBST([AM_CFLAGS])
  55. AC_C_INLINE
  56. # Checks for libraries.
  57. AC_CHECK_LIB([fcgi], [FCGI_Accept])
  58. AC_CHECK_LIB([rt], [timer_create])
  59. AC_CHECK_LIB([pthread], [sem_open shm_open])
  60. if test "x$check" = "xtrue"
  61. then
  62. PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [],
  63. AC_MSG_FAILURE([Unabe to locate (check unit test c framework).
  64. You can run ./configure --disable-check if you do not need unit tests.
  65. ]))
  66. AS_IF([test x"${enable_debug}" = x"yes"], [CK_FORK=no], [])
  67. fi
  68. # Checks for header files.
  69. AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h syslog.h unistd.h sem.h time.h])
  70. # Checks for typedefs, structures, and compiler characteristics.
  71. AC_TYPE_PID_T
  72. AC_TYPE_SIZE_T
  73. # Checks for library functions.
  74. AC_FUNC_FORK
  75. AC_FUNC_MALLOC
  76. AC_FUNC_REALLOC
  77. AC_CHECK_FUNCS([bzero getcwd gettimeofday memmove strdup strerror strndup get_current_dir_name timer_settime])
  78. AM_INIT_AUTOMAKE
  79. AC_CONFIG_FILES([Makefile
  80. src/Makefile
  81. tests/Makefile
  82. ])
  83. AM_CONDITIONAL([HAVE_DOXYGEN],
  84. [test -n "$DOXYGEN"])AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile
  85. docs/Makefile])])
  86. AC_OUTPUT