]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-startup.m4
Update all references to OS X to macOS.
[thirdparty/cups.git] / config-scripts / cups-startup.m4
index 2aeeac16e42dac235d9c5f95f6b31e40b81dabe9..4410a10ef856a9aae9ecc3a928827a4b023b1937 100644 (file)
@@ -1,6 +1,4 @@
 dnl
-dnl "$Id$"
-dnl
 dnl Launch-on-demand/startup stuff for CUPS.
 dnl
 dnl Copyright 2007-2015 by Apple Inc.
@@ -18,7 +16,7 @@ ONDEMANDLIBS=""
 AC_SUBST(ONDEMANDFLAGS)
 AC_SUBST(ONDEMANDLIBS)
 
-dnl Launchd is used on OS X/Darwin...
+dnl Launchd is used on macOS/Darwin...
 AC_ARG_ENABLE(launchd, [  --disable-launchd       disable launchd support])
 LAUNCHD_DIR=""
 AC_SUBST(LAUNCHD_DIR)
@@ -34,7 +32,7 @@ if test x$enable_launchd != xno; then
 
        case "$uname" in
                Darwin*)
-                       # Darwin, MacOS X
+                       # Darwin, MacmacOS
                        LAUNCHD_DIR="/System/Library/LaunchDaemons"
                        # liblaunch is already part of libSystem
                        ;;
@@ -56,18 +54,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
@@ -170,8 +183,3 @@ if test "x$xinetd" = x; then
 elif test "x$xinetd" != xno; then
        XINETD="$xinetd"
 fi
-
-
-dnl
-dnl End of "$Id$".
-dnl