Commit 943db405 authored by Benjamin Pracht's avatar Benjamin Pracht

* Fix the screensaver module for newer dbus APIs. Reported by Stone <syphyr at gmail dot com>

parent cad3fd6d
...@@ -838,18 +838,26 @@ AC_ARG_ENABLE(dbus, ...@@ -838,18 +838,26 @@ AC_ARG_ENABLE(dbus,
if test "${enable_dbus}" != "no" if test "${enable_dbus}" != "no"
then then
PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.30, PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.92,
[ AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the new D-BUS library API]) [ AC_DEFINE( HAVE_DBUS_2, 1, [Define if you have the D-BUS library API >= 0.92] )
AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the D-BUS library API >= 0.30] )
AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] ) AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS]) VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS])
VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])], VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
dnl older dbus dnl older dbus
[ PKG_CHECK_MODULES( DBUS, dbus-1, PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.30,
[AC_DEFINE(HAVE_DBUS, 1, [Define if you have the D-BUS library]) [ AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the D-BUS library API >= 0.30 ] )
AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS]) VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS])
VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])], VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
[AC_MSG_WARN(DBUS library not found)]) dnl much older dbus
] [ PKG_CHECK_MODULES( DBUS, dbus-1,
[AC_DEFINE(HAVE_DBUS, 1, [Define if you have the D-BUS library])
VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS])
VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
[AC_MSG_WARN(DBUS library not found)])
]
)
) )
fi fi
......
...@@ -110,7 +110,11 @@ static void Deactivate( vlc_object_t *p_this ) ...@@ -110,7 +110,11 @@ static void Deactivate( vlc_object_t *p_this )
if( p_intf->p_sys->p_connection ) if( p_intf->p_sys->p_connection )
{ {
# ifdef HAVE_DBUS_2
dbus_connection_close( p_intf->p_sys->p_connection );
# else
dbus_connection_disconnect( p_intf->p_sys->p_connection ); dbus_connection_disconnect( p_intf->p_sys->p_connection );
# endif
} }
if( p_intf->p_sys ) if( p_intf->p_sys )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment