2 AC_INIT([spice-vdagent], [0.8.2])
3 AC_CONFIG_SRCDIR([configure.ac])
5 AM_CONFIG_HEADER([src/config.h])
7 AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip subdir-objects])
8 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
15 AC_DEFINE(_GNU_SOURCE, [1], [Enable GNU extensions])
17 AC_ARG_ENABLE([console-kit],
18 [AS_HELP_STRING([--enable-console-kit], [Enable ConsoleKit use (default: yes)])],
19 [enable_console_kit="$enableval"],
20 [enable_console_kit="yes"])
22 AC_ARG_ENABLE([pciaccess],
23 [AS_HELP_STRING([--enable-pciaccess], [Enable libpciaccess use for auto generation of Xinerama xorg.conf (default: yes)])],
24 [enable_pciaccess="$enableval"],
25 [enable_pciaccess="yes"])
27 AC_ARG_ENABLE([static-uinput],
28 [AS_HELP_STRING([--enable-statis-uinput], [Enable use of a fixed, static uinput device for X-servers without hotplug support (default: no)])],
29 [enable_static_uinput="$enableval"],
30 [enable_static_uinput="yes"])
33 PKG_CHECK_MODULES(X, [xfixes xrandr xinerama x11])
34 PKG_CHECK_MODULES(SPICE, [spice-protocol >= 0.8.0])
36 if test x"$enable_console_kit" = "xyes" ; then
37 PKG_CHECK_MODULES(DBUS, [dbus-1])
38 AC_DEFINE([HAVE_CONSOLE_KIT], [1], [If defined, vdagentd will be compiled with ConsoleKit support] )
40 AM_CONDITIONAL(HAVE_CONSOLE_KIT, test x"$enable_console_kit" = "xyes")
42 if test x"$enable_pciaccess" = "xyes" ; then
43 PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
44 AC_DEFINE([HAVE_PCIACCESS], [1], [If defined, vdagentd will be compiled with pciaccess support] )
46 AM_CONDITIONAL(HAVE_PCIACCESS, test x"$enable_pciaccess" = "xyes")
48 if test x"$enable_static_uinput" = "xyes" ; then
49 AC_DEFINE([WITH_STATIC_UINPUT], [1], [If defined, vdagentd will use a static uinput device] )