Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /configure.ac [74fa95] .. [cd3bc9] Maximize Restore

  Switch to side-by-side view

--- a/configure.ac
+++ b/configure.ac
@@ -171,42 +171,35 @@
 fi
 
 dnl ---------------------------------------------
-dnl XDG screensaver
-dnl ---------------------------------------------
-AC_PATH_PROG(XDGSSCMD, xdg-screensaver)
-if test -n "$XDGSSCMD"; then
-  AC_DEFINE_UNQUOTED(XDG_SCREENSAVER_COMMAND, "$XDGSSCMD", [location of the xdg-screensaver binary])
-fi
-
-dnl ---------------------------------------------
-dnl GNOME screensaver, DBus
-dnl ---------------------------------------------
-AC_PATH_PROG(GSSCMD, gnome-screensaver-command)
-if test -n "$GSSCMD"; then
-  AC_ARG_WITH([dbus],
-	AS_HELP_STRING([--without-dbus], [disable dbus support (for GNOME screensaver)]),
-	[requested=Y], [requested=N])
-  if test "x$with_dbus" != 'xno'; then
-    with_dbus=yes
-    if test "x$requested" = "xY"; then
-      PKG_CHECK_MODULES(DBUS, dbus-glib-1)
-    else
-      PKG_CHECK_MODULES(DBUS, dbus-glib-1, [], [with_dbus=no; AC_MSG_RESULT([no])])
+dnl Screensaver commands
+dnl ---------------------------------------------
+AC_ARG_VAR([XDGSSCMD], [full pathname for xdg-screensaver (disabled, 'yes' to auto-detect)])
+AC_ARG_VAR([GSSCMD], [full pathname for gnome-screensaver-command (auto-detect, 'no' to disable)])
+AC_ARG_VAR([XSSCMD], [full pathname for xscreensaver-command (auto-detect, 'no' to disable)])
+
+dnl Disable XDG screensaver by default
+if test "$XDGSSCMD" = ''; then
+  XDGSSCMD=no
+fi
+
+GXINE_SCREENSAVER_CMD([XDGSSCMD], [XDG], [xdg-screensaver])
+GXINE_SCREENSAVER_CMD([GSSCMD], [GNOME], [gnome-screensaver],
+   [AC_ARG_WITH([dbus],
+		AS_HELP_STRING([--without-dbus], [disable dbus support (for GNOME screensaver)]),
+		[requested=Y], [requested=N])
+    if test "x$with_dbus" != 'xno'; then
+      with_dbus=yes
+      if test "x$requested" = "xY"; then
+	PKG_CHECK_MODULES([DBUS], [dbus-glib-1])
+      else
+	PKG_CHECK_MODULES([DBUS], [dbus-glib-1], [], [with_dbus=no; AC_MSG_RESULT([no])])
+      fi
     fi
-  fi
-  if test "$with_dbus" = yes; then
-    AC_DEFINE(WITH_DBUS, 1, [Define if dbus-glib is present and you want to use it to talk to gnome-screensaver.])
-  fi
-  AC_DEFINE_UNQUOTED(GNOME_SCREENSAVER_COMMAND, "$GSSCMD", [location of the gnome-screensaver-command binary])
-fi
-
-dnl ---------------------------------------------
-dnl X screensaver
-dnl ---------------------------------------------
-AC_PATH_PROG(XSSCMD, xscreensaver-command)
-if test -n "$XSSCMD"; then
-  AC_DEFINE_UNQUOTED(X_SCREENSAVER_COMMAND, "$XSSCMD", [location of the xscreensaver-command binary])
-fi
+    if test "$with_dbus" = yes; then
+      AC_DEFINE([WITH_DBUS], [1], [Define if dbus-glib is present and you want to use it to talk to gnome-screensaver.])
+    fi
+    ])
+GXINE_SCREENSAVER_CMD([XSSCMD], [X], [xscreensaver-command])
 
 dnl ---------------------------------------------
 dnl DPMS Extension