summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGrzegorz Nosek <root@localdomain.pl>2012-08-21 03:00:29 -0700
committerGrzegorz Nosek <root@localdomain.pl>2012-08-21 03:00:29 -0700
commit7f583a055c0a925c1b9dd25d7f831c5d6d9f4665 (patch)
treec752674e89e691f1a567914f01bbdd836b25b196 /configure.ac
parent13288627b4162ea417ab0edaff81648e0df82152 (diff)
parent3468d79391b13f4524cbdafd7085bca99a01d787 (diff)
downloadfcgiwrap-7f583a055c0a925c1b9dd25d7f831c5d6d9f4665.tar.xz
fcgiwrap-7f583a055c0a925c1b9dd25d7f831c5d6d9f4665.zip
Merge pull request #6 from falconindy/systemd
systemd socket activation support
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 899c219..4388cd4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,7 @@ AC_SUBST([AM_CFLAGS])
# Checks for programs.
AC_PROG_CC
+PKG_PROG_PKG_CONFIG
# Create the config.h.
AC_CONFIG_HEADERS([config.h])
@@ -21,6 +22,22 @@ AC_CONFIG_HEADERS([config.h])
# Checks for libraries.
AC_CHECK_LIB([fcgi], [FCGX_Init],, [AC_MSG_ERROR([FastCGI library is missing])])
+# systemd support.
+AC_ARG_WITH([systemd],
+ AS_HELP_STRING([--with-systemd], [support systemd socket activation]),
+ [], [with_systemd=check])
+have_systemd=no
+if test "x$with_systemd" != "xno"; then
+ PKG_CHECK_MODULES(systemd, [libsystemd-daemon],
+ [AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is available])
+ have_systemd=yes],
+ have_systemd=no)
+ if test "x$have_systemd" = xno -a "x$with_systemd" = xyes; then
+ AC_MSG_ERROR([systemd support requested but libraries not found])
+ fi
+fi
+AM_CONDITIONAL(HAVE_LIBSSL, [test "x$have_systemd" = "xyes"])
+
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h],, [AC_MSG_ERROR([fcntl.h header missing])])
AC_CHECK_HEADERS([limits.h stdlib.h string.h unistd.h],, [AC_MSG_ERROR([at least one important system header file is missing])])