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.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.61)
  4. AC_INIT([spawn-fcgi], [2.0.0], [])
  5. AC_CONFIG_SRCDIR([spawn-fcgi.c])
  6. AC_CONFIG_HEADER([config.h])
  7. AM_INIT_AUTOMAKE([-Wall -Werror foreign])
  8. # Checks for programs.
  9. AC_PROG_CC
  10. AC_PROG_MAKE_SET
  11. AC_PROG_INSTALL
  12. # Checks for libraries.
  13. # glib-2.0
  14. PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16.0, [
  15. AC_DEFINE([HAVE_GLIB_H], [1], [glib.h])
  16. ],[AC_MSG_ERROR("glib-2.0 >= 2.16.0 not found")])
  17. # Checks for header files.
  18. AC_HEADER_STDC
  19. AC_HEADER_SYS_WAIT
  20. AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h stdlib.h string.h syslog.h unistd.h utmp.h])
  21. # Checks for typedefs, structures, and compiler characteristics.
  22. AC_C_CONST
  23. AC_TYPE_UID_T
  24. AC_TYPE_PID_T
  25. AC_TYPE_SIZE_T
  26. AC_HEADER_TIME
  27. # Checks for library functions.
  28. AC_FUNC_CHOWN
  29. AC_FUNC_FORK
  30. AC_FUNC_SELECT_ARGTYPES
  31. AC_FUNC_STAT
  32. AC_CHECK_FUNCS([dup2 memset putenv select socket strchr strerror strtol strtoul strtoull])
  33. # pam limits?
  34. AC_ARG_ENABLE(pam-limits,
  35. AC_HELP_STRING([--enable-pam-limits],[enable pam limits]),
  36. [case "${enableval}" in
  37. yes) pamlimits=yes ;;
  38. no) pamlimits=no ;;
  39. *) AC_MSG_ERROR(bad value ${enableval} for --enable-pam-limits) ;;
  40. esac],[pamlimits=yes])
  41. AM_CONDITIONAL(PAM_LIMITS, test "x$pamlimits" = xyes)
  42. if test "x$pamlimits" = xyes; then
  43. AC_DEFINE([USE_LIMITS], [1], [pam limits])
  44. fi
  45. # check for extra compiler options (warning options)
  46. if test "${GCC}" = "yes"; then
  47. CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic -std=gnu99"
  48. fi
  49. AC_ARG_ENABLE(extra-warnings,
  50. AC_HELP_STRING([--enable-extra-warnings],[enable extra warnings (gcc specific)]),
  51. [case "${enableval}" in
  52. yes) extrawarnings=true ;;
  53. no) extrawarnings=false ;;
  54. *) AC_MSG_ERROR(bad value ${enableval} for --enable-extra-warnings) ;;
  55. esac],[extrawarnings=false])
  56. if test x$extrawarnings = xtrue; then
  57. CFLAGS="${CFLAGS} -g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wno-pointer-sign -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wl,--as-needed -Wformat-security"
  58. fi
  59. AC_CONFIG_FILES([Makefile])
  60. AC_OUTPUT