From 52bfc984390a656e6253be86ecc8242e905b052c Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 5 May 2014 11:54:30 +0200 Subject: [PATCH] erts: Fix linking with new systemd library Also changed so that only epmd links with systemd. --- erts/configure.in | 9 +++++++-- erts/epmd/src/Makefile.in | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/erts/configure.in b/erts/configure.in index cead75b..04303da 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -1684,18 +1684,23 @@ dnl Check the availability of systemd dnl ---------------------------------------------------------------------- if test x"$enable_systemd" != x"no"; then -AC_SEARCH_LIBS(sd_listen_fds,[systemd-daemon], - [have_sd_listen_fds=yes],[have_sd_listen_fds=no]) +systemd_daemon_save_LIBS=$LIBS +LIBS= +AC_SEARCH_LIBS(sd_listen_fds,[systemd systemd-daemon], + [have_sd_listen_fds=yes],[have_sd_listen_fds=no],$systemd_daemon_save_LIBS) AC_CHECK_HEADERS(systemd/sd-daemon.h, [have_systemd_sd_daemon_h=yes],[have_systemd_sd_daemon_h=no]) if test x"$have_sd_listen_fds" = x"yes" && \ test x"$have_systemd_sd_daemon_h" = x"yes"; then AC_DEFINE([HAVE_SYSTEMD_DAEMON],[1],[Define if you have systemd daemon]) + SYSTEMD_DAEMON_LIBS=$LIBS elif test x"$enable_systemd" = x"yes"; then AC_MSG_FAILURE([--enable-systemd was given, but test for systemd failed]) fi +LIBS=$systemd_daemon_save_LIBS fi +AC_SUBST(SYSTEMD_DAEMON_LIBS) dnl ---------------------------------------------------------------------- diff --git a/erts/epmd/src/Makefile.in b/erts/epmd/src/Makefile.in index 8dc8dae..0c7787a 100644 --- a/erts/epmd/src/Makefile.in +++ b/erts/epmd/src/Makefile.in @@ -84,7 +84,7 @@ LD = @LD@ ifeq ($(findstring ose,$(TARGET)),ose) LIBS = $(ERTS_INTERNAL_LIBS) @LIBS@ else -LIBS = @LIBS@ $(ERTS_INTERNAL_LIBS) +LIBS = @LIBS@ @SYSTEMD_DAEMON_LIBS@ $(ERTS_INTERNAL_LIBS) endif LDFLAGS = @LDFLAGS@ -- 1.9.1