diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2015-08-31 15:00:45 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2015-08-31 15:00:45 +0000 |
commit | f495e905dd39afc788246388a88077abd2767d86 (patch) | |
tree | 04eb01b12c5e94fa85c6bf47446949db995866c8 /config-scripts | |
parent | 0b2b24c55848bdb2fb2e92006cf28eb545f97389 (diff) |
Fix another journald issue, and partially revert the systemd change so that
CUPS 2.1 builds with systemd support on RHEL 7.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12857 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'config-scripts')
-rw-r--r-- | config-scripts/cups-startup.m4 | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/config-scripts/cups-startup.m4 b/config-scripts/cups-startup.m4 index 2aeeac16e..223cf2bde 100644 --- a/config-scripts/cups-startup.m4 +++ b/config-scripts/cups-startup.m4 @@ -56,18 +56,33 @@ if test x$enable_systemd != xno; then AC_MSG_ERROR(Need pkg-config to enable systemd support.) fi else + have_systemd=no AC_MSG_CHECKING(for libsystemd) if $PKGCONFIG --exists libsystemd; then AC_MSG_RESULT(yes) + have_systemd=yes ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd` ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd` + elif $PKGCONFIG --exists libsystemd-daemon; then + AC_MSG_RESULT(yes - legacy) + have_systemd=yes + ONDEMANDFLAGS=`$PKGCONFIG --cflags libsystemd-daemon` + ONDEMANDLIBS=`$PKGCONFIG --libs libsystemd-daemon` + + if $PKGCONFIG --exists libsystemd-journal; then + ONDEMANDFLAGS="$ONDEMANDFLAGS `$PKGCONFIG --cflags libsystemd-journal`" + ONDEMANDLIBS="$ONDEMANDLIBS `$PKGCONFIG --libs libsystemd-journal`" + fi + else + AC_MSG_RESULT(no) + fi + + if test $have_systemd = yes; then AC_DEFINE(HAVE_SYSTEMD) AC_CHECK_HEADER(systemd/sd-journal.h,AC_DEFINE(HAVE_SYSTEMD_SD_JOURNAL_H)) if test "x$SYSTEMD_DIR" = x; then SYSTEMD_DIR="`$PKGCONFIG --variable=systemdsystemunitdir systemd`" fi - else - AC_MSG_RESULT(no) fi fi fi |