make D-BUS optional
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
b7a57f2a62
commit
2cb52ca2d1
2
README
2
README
|
@ -11,7 +11,7 @@ In order to build awesome itself, you need header files and libs of:
|
||||||
- pango and pangocairo
|
- pango and pangocairo
|
||||||
- glib
|
- glib
|
||||||
- GTK+ or Imlib2 (use --with-imlib2 with ./configure)
|
- GTK+ or Imlib2 (use --with-imlib2 with ./configure)
|
||||||
- dbus
|
- dbus (optional, use --with-dbus=no with ./configure to disable)
|
||||||
|
|
||||||
In order to build the awesome man pages, you need these tools:
|
In order to build the awesome man pages, you need these tools:
|
||||||
- asciidoc (recent version)
|
- asciidoc (recent version)
|
||||||
|
|
|
@ -125,8 +125,14 @@ PKG_CHECK_MODULES([glib], [glib-2.0],,
|
||||||
[AC_MSG_ERROR([awesome requires glib-2.0.])])
|
[AC_MSG_ERROR([awesome requires glib-2.0.])])
|
||||||
PKG_CHECK_MODULES([gthread], [gthread-2.0],,
|
PKG_CHECK_MODULES([gthread], [gthread-2.0],,
|
||||||
[AC_MSG_ERROR([awesome requires gthread-2.0.])])
|
[AC_MSG_ERROR([awesome requires gthread-2.0.])])
|
||||||
|
|
||||||
|
AC_ARG_WITH([dbus], AS_HELP_STRING([--with-dbus], [Build with D-BUS (default: enabled)]), [], [with_dbus=yes])
|
||||||
|
if test "x$with_dbus" == "xyes"; then
|
||||||
PKG_CHECK_MODULES([dbus], [dbus-1],,
|
PKG_CHECK_MODULES([dbus], [dbus-1],,
|
||||||
[AC_MSG_ERROR([awesome requires dbus-1.])])
|
[AC_MSG_ERROR([awesome requires dbus-1.])])
|
||||||
|
AC_DEFINE([WITH_DBUS],1,[Defined to use D-BUS])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH([imlib2], AS_HELP_STRING([--with-imlib2], [Build with Imlib2 (default: disabled)]))
|
AC_ARG_WITH([imlib2], AS_HELP_STRING([--with-imlib2], [Build with Imlib2 (default: disabled)]))
|
||||||
|
|
||||||
if test "x$with_imlib2" == "xyes"; then
|
if test "x$with_imlib2" == "xyes"; then
|
||||||
|
|
27
dbus.c
27
dbus.c
|
@ -18,6 +18,9 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_DBUS
|
||||||
|
|
||||||
#include <dbus/dbus.h>
|
#include <dbus/dbus.h>
|
||||||
|
|
||||||
|
@ -189,4 +192,28 @@ a_dbus_cleanup(void)
|
||||||
dbus_connection = NULL;
|
dbus_connection = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /* HAVE_DBUS */
|
||||||
|
|
||||||
|
#include "dbus.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
a_dbus_process_requests(int *fd __attribute__((unused)))
|
||||||
|
{
|
||||||
|
/* empty */
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
a_dbus_init(int *fd)
|
||||||
|
{
|
||||||
|
*fd = -1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
a_dbus_cleanup(void)
|
||||||
|
{
|
||||||
|
/* empty */
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue