Forks and watches multiple instances of a program in the same context (environment + fds) https://redmine.lighttpd.net/projects/multiwatch
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.
 
 
 
 
 
 

58 lines
1.7 KiB

  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.61)
  4. AC_INIT([multiwatch], [1.0.0], [])
  5. AC_CONFIG_SRCDIR([multiwatch.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. # lib ev
  18. AC_CHECK_HEADERS([ev.h], [], [AC_MSG_ERROR("ev.h not found")])
  19. AC_CHECK_LIB([ev], [ev_time], [
  20. LIBS="-lev ${LIBS}"
  21. AC_DEFINE([HAVE_LIBEV], [1], [ev_time in -lev])
  22. ], [AC_MSG_ERROR("libev not found")])
  23. # Checks for header files.
  24. AC_CHECK_HEADERS([stdlib.h unistd.h], [])
  25. # Checks for typedefs, structures, and compiler characteristics.
  26. AC_TYPE_PID_T
  27. # Checks for library functions.
  28. AC_FUNC_FORK
  29. # check for extra compiler options (warning options)
  30. if test "${GCC}" = "yes"; then
  31. CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic -std=gnu99"
  32. fi
  33. AC_ARG_ENABLE([extra-warnings],
  34. [AS_HELP_STRING([--enable-extra-warnings],[enable extra warnings (gcc specific)])],
  35. [case "${enableval}" in
  36. yes) extrawarnings=true ;;
  37. no) extrawarnings=false ;;
  38. *) AC_MSG_ERROR([bad value ${enableval} for --enable-extra-warnings]) ;;
  39. esac],[extrawarnings=false])
  40. if test x$extrawarnings = xtrue; then
  41. CFLAGS="${CFLAGS} -g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -Wmissing-prototypes -Wshadow -Wno-pointer-sign -Wformat-security -Wl,--as-needed -Wl,--no-undefined"
  42. fi
  43. AC_CONFIG_FILES([Makefile])
  44. AC_OUTPUT