emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Defaulting DBus support on macOS to 'off'?


From: Robert Pluim
Subject: Re: Defaulting DBus support on macOS to 'off'?
Date: Mon, 14 Mar 2022 15:30:05 +0100

>>>>> On Mon, 14 Mar 2022 21:53:37 +0800, Po Lu <luangruo@yahoo.com> said:

    Po> Robert Pluim <rpluim@gmail.com> writes:
    >> Exactly. We can discuss if that should be 'off in configure', or
    >> 'built if found, but off in Emacs' (Iʼd prefer the former).

    Po> Then it should be made conditional on macOS, and not just NS being
    Po> enabled.  Emacs can also be built on that platform with X11 support, or
    Po> no toolkit at all.

That was my plan all along:

diff --git a/configure.ac b/configure.ac
index a315eeb6bd..4be5a9c767 100644
--- a/configure.ac
+++ b/configure.ac
@@ -474,7 +474,9 @@ AC_DEFUN
 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])
+AC_ARG_WITH([dbus],[AS_HELP_STRING([--with-dbus],
+[compile with D-Bus support.
+Off by default on macOS.])],[],[with_dbus=maybe])
 AC_ARG_WITH([gconf],[AS_HELP_STRING([--with-gconf],
 [compile with Gconf support (Gsettings replaces this)])],[],
 [if test $with_features = yes; then
@@ -2930,6 +2932,15 @@ AC_DEFUN
 dnl other platforms.
 HAVE_DBUS=no
 DBUS_OBJ=
+
+# Only use dbus on macOS if it's explicitly requested
+if test "${with_dbus}" = maybe; then
+   if test "${opsys}" = darwin; then
+      with_dbus=no
+   else
+      with_dbus=yes
+   fi
+fi
 if test "${with_dbus}" = "yes"; then
    EMACS_CHECK_MODULES([DBUS], [dbus-1 >= 1.0])
    if test "$HAVE_DBUS" = yes; then

    Po> I will see if I can stop that message from showing up, thanks.

That would be a good first step.

Robert
-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]