config: Don't attempt to use D-Bus when not strictly necessary
If we have D-Bus but have explicitly disabled it, don't build it.
This commit is contained in:
		
							parent
							
								
									35c89f3f5b
								
							
						
					
					
						commit
						441f084bfe
					
				| 
						 | 
					@ -3,7 +3,7 @@ AM_CFLAGS = @DIX_CFLAGS@
 | 
				
			||||||
noinst_LIBRARIES = libconfig.a
 | 
					noinst_LIBRARIES = libconfig.a
 | 
				
			||||||
libconfig_a_SOURCES = config.c config-backends.h
 | 
					libconfig_a_SOURCES = config.c config-backends.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if HAVE_DBUS
 | 
					if CONFIG_NEED_DBUS
 | 
				
			||||||
AM_CFLAGS += @DBUS_CFLAGS@
 | 
					AM_CFLAGS += @DBUS_CFLAGS@
 | 
				
			||||||
libconfig_a_SOURCES += dbus-core.c
 | 
					libconfig_a_SOURCES += dbus-core.c
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,7 @@
 | 
				
			||||||
#include <dix-config.h>
 | 
					#include <dix-config.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef HAVE_DBUS
 | 
					#ifdef CONFIG_NEED_DBUS
 | 
				
			||||||
#include <dbus/dbus.h>
 | 
					#include <dbus/dbus.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef void (*config_dbus_core_connect_hook)(DBusConnection *connection,
 | 
					typedef void (*config_dbus_core_connect_hook)(DBusConnection *connection,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -706,7 +706,7 @@ if test "x$CONFIG_DBUS_API" = xyes; then
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	AC_DEFINE(CONFIG_DBUS_API, 1, [Use the D-Bus input configuration API])
 | 
						AC_DEFINE(CONFIG_DBUS_API, 1, [Use the D-Bus input configuration API])
 | 
				
			||||||
	NEED_DBUS="yes"
 | 
						CONFIG_NEED_DBUS="yes"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
AM_CONDITIONAL(CONFIG_DBUS_API, [test "x$CONFIG_DBUS_API" = xyes])
 | 
					AM_CONDITIONAL(CONFIG_DBUS_API, [test "x$CONFIG_DBUS_API" = xyes])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -721,13 +721,15 @@ if test "x$CONFIG_HAL" = xyes; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	AC_DEFINE(CONFIG_HAL, 1, [Use the HAL hotplug API])
 | 
						AC_DEFINE(CONFIG_HAL, 1, [Use the HAL hotplug API])
 | 
				
			||||||
        REQUIRED_LIBS="$REQUIRED_LIBS hal"
 | 
					        REQUIRED_LIBS="$REQUIRED_LIBS hal"
 | 
				
			||||||
	NEED_DBUS="yes"
 | 
						CONFIG_NEED_DBUS="yes"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
AM_CONDITIONAL(CONFIG_HAL, [test "x$CONFIG_HAL" = xyes])
 | 
					AM_CONDITIONAL(CONFIG_HAL, [test "x$CONFIG_HAL" = xyes])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if test "x$NEED_DBUS" = xyes; then
 | 
					if test "x$CONFIG_NEED_DBUS" = xyes; then
 | 
				
			||||||
	REQUIRED_LIBS="$REQUIRED_LIBS dbus-1"
 | 
						REQUIRED_LIBS="$REQUIRED_LIBS dbus-1"
 | 
				
			||||||
 | 
					        AC_DEFINE(CONFIG_NEED_DBUS, 1, [Use D-Bus for input hotplug])
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					AM_CONDITIONAL(CONFIG_NEED_DBUS, [test "x$CONFIG_NEED_DBUS" = xyes])
 | 
				
			||||||
CONFIG_LIB='$(top_builddir)/config/libconfig.a'
 | 
					CONFIG_LIB='$(top_builddir)/config/libconfig.a'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_MSG_CHECKING([for glibc...])
 | 
					AC_MSG_CHECKING([for glibc...])
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -468,6 +468,9 @@
 | 
				
			||||||
/* Support D-Bus */
 | 
					/* Support D-Bus */
 | 
				
			||||||
#undef HAVE_DBUS
 | 
					#undef HAVE_DBUS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Use D-Bus for input hotplug */
 | 
				
			||||||
 | 
					#undef CONFIG_NEED_DBUS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Support the D-Bus hotplug API */
 | 
					/* Support the D-Bus hotplug API */
 | 
				
			||||||
#undef CONFIG_DBUS_API
 | 
					#undef CONFIG_DBUS_API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue