]> git.eshelyaron.com Git - emacs.git/commitdiff
* configure.ac (dbus): Default to ifavailable. (Bug#75004)
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 23 Dec 2024 11:46:23 +0000 (12:46 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:20:39 +0000 (16:20 +0100)
(cherry picked from commit b1de495eeae9afc8abccd908e5c53c463afdb7dc)

configure.ac

index 084bccd45749ae57b71bb5a643d6e0078960b384..1794bcc8a2c6643d6cf5cf68eee1742c55751d96 100644 (file)
@@ -578,7 +578,7 @@ OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI in a Cygwin build])
 OPTION_DEFAULT_OFF([pgtk], [use GTK to support window systems other than X])
 
 OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console])
-OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support])
+OPTION_DEFAULT_IFAVAILABLE([dbus],[compile with D-Bus support])
 AC_ARG_WITH([gconf],[AS_HELP_STRING([--with-gconf],
 [compile with Gconf support (Gsettings replaces this)])],[],
 [if test $with_features = yes; then
@@ -4002,8 +4002,8 @@ dnl D-Bus has been tested under GNU/Linux only.  Must be adapted for
 dnl other platforms.
 HAVE_DBUS=no
 DBUS_OBJ=
-if test "${with_dbus}" = "yes"; then
-   EMACS_CHECK_MODULES([DBUS], [dbus-1 >= 1.0])
+if test "${with_dbus}" != "no" ; then
+   EMACS_CHECK_MODULES([DBUS], [dbus-1 >= 1.0], [HAVE_DBUS=yes], [HAVE_DBUS=no])
    if test "$HAVE_DBUS" = yes; then
      AC_DEFINE([HAVE_DBUS], [1], [Define to 1 if using D-Bus.])
      dnl dbus_watch_get_unix_fd has been introduced in D-Bus 1.1.1.
@@ -5597,6 +5597,11 @@ if test "${HAVE_X11}" = "yes"; then
        WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-tiff=ifavailable";;
   esac
 fi
+case $with_dbus,$HAVE_DBUS in
+  no,* | ifavailable,* | *,yes) ;;
+  *) MISSING="$MISSING dbus-1"
+     WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-dbus=ifavailable";;
+esac
 case $with_gnutls,$HAVE_GNUTLS in
   no,* | ifavailable,* | *,yes) ;;
   *) MISSING="$MISSING gnutls"