-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gssproxy] Modernize systemd.m4 macro
libsystemd-daemon hasn't been a thing since systemd 209 was released (February 2014, before RHEL 7). And the thing we really want to look for is libsystemd, that's it. Signed-off-by: David Härdeman <david@hardeman.nu>
- Loading branch information
Showing
1 changed file
with
11 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,14 @@ | ||
dnl A macro to check presence of systemd on the system | ||
dnl A macro to check presence of libsystemd on the system | ||
AC_DEFUN([AM_CHECK_SYSTEMD], | ||
[ | ||
PKG_CHECK_EXISTS([systemd], | ||
[HAVE_SYSTEMD=yes], | ||
[HAVE_SYSTEMD=no]) | ||
dnl older system uses libsystemd | ||
PKG_CHECK_EXISTS([libsystemd], | ||
[HAVE_LIBSYSTEMD=yes], | ||
[HAVE_LIBSYSTEMD=no]) | ||
dnl newer systemd splits libsystemd in slaler libs | ||
AS_IF([test x$HAVE_LIBSYSTEMD = xyes], | ||
[daemon_lib_name=libsystemd], | ||
[daemon_lib_name=libsystemd-daemon]) | ||
AS_IF([test x$HAVE_SYSTEMD = xyes], | ||
[PKG_CHECK_MODULES( | ||
[SYSTEMD_DAEMON], | ||
[$daemon_lib_name], | ||
[AC_DEFINE_UNQUOTED([HAVE_SYSTEMD_DAEMON], 1, | ||
[Build with $daemon_lib_name support]) | ||
AC_MSG_NOTICE([Will enable systemd socket activation])], | ||
[AC_MSG_NOTICE([Build without $daemon_lib_name support])])], | ||
[AC_MSG_NOTICE([Build without $daemon_lib_name support])]) | ||
AM_CONDITIONAL([HAVE_SYSTEMD_DAEMON], [test x"$daemon_lib_name" != x]) | ||
PKG_CHECK_MODULES([SYSTEMD_DAEMON], | ||
[libsystemd], | ||
[AC_DEFINE_UNQUOTED([HAVE_SYSTEMD_DAEMON], 1, | ||
[Build with libsystemd support]) | ||
HAVE_SYSTEMD_DAEMON=yes | ||
AC_MSG_NOTICE([Build with libsystemd support])], | ||
[HAVE_SYSTEMD_DAEMON=no | ||
AC_MSG_NOTICE([Build without libsystemd support])]) | ||
AM_CONDITIONAL([HAVE_SYSTEMD_DAEMON], [test x"$HAVE_SYSTEMD_DAEMON" = xyes]) | ||
]) |