From b5626f78ec111a05d791073e3ba5c016531080df Mon Sep 17 00:00:00 2001 From: Thomas Claveirole Date: Tue, 19 Jul 2016 11:28:10 +0200 Subject: [PATCH 1/2] Makefile.in: Use LIBS from configure rather than specifying -lfcgi manually. fcgiwrap uses libfcgi, and libfcgi uses libm. This is an issue when using static libs, because -lm does not get properly added to the link flags in this case. A solution is to provide LIBS=-lm to configure when needed. However, fcgiwrap does not use Automake and its Makefile.in ignores LIBS from configure. Fix that. Signed-off-by: Thomas Claveirole --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 97378e5..bee81c2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,7 +16,7 @@ ifneq ("@systemdsystemunitdir@", "") install -m 644 systemd/fcgiwrap.service $(DESTDIR)@systemdsystemunitdir@ endif -LDLIBS = -lfcgi @systemd_LIBS@ +LDLIBS = @LIBS@ @systemd_LIBS@ CFLAGS = @AM_CFLAGS@ fcgiwrap: fcgiwrap.c From e621d6acb538d717d6767429e3f85190019a887d Mon Sep 17 00:00:00 2001 From: Thomas Claveirole Date: Mon, 18 Jul 2016 15:06:59 +0200 Subject: [PATCH 2/2] configure.ac: Check for libsystemd, not libsystemd-daemon. Newer versions of systemd do not provide libsystemd-daemon anymore. Therefore, use libsystemd instead. Signed-off-by: Thomas Claveirole --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bb3674e..2b02ef4 100644 --- a/configure.ac +++ b/configure.ac @@ -28,7 +28,7 @@ AC_ARG_WITH([systemd], [], [with_systemd=check]) have_systemd=no if test "x$with_systemd" != "xno"; then - PKG_CHECK_MODULES(systemd, [libsystemd-daemon], + PKG_CHECK_MODULES(systemd, [libsystemd], [AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is available]) have_systemd=yes], have_systemd=no)