2 AC_INIT([spice-vdagent], [0.10.0])
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_WITH([session-info],
18 [AS_HELP_STRING([--with-session-info=@<:@auto/console-kit/systemd/none@:>@],
19 [Session-info source to use @<:@default=auto@:>@])],
20 [case "$with_session_info" in
21 auto|console-kit|systemd|none) ;;
22 *) AC_MSG_ERROR([invalid session-info type specified]) ;;
24 [with_session_info="auto"])
26 AC_ARG_ENABLE([pciaccess],
27 [AS_HELP_STRING([--enable-pciaccess], [Enable libpciaccess use for auto generation of Xinerama xorg.conf (default: yes)])],
28 [enable_pciaccess="$enableval"],
29 [enable_pciaccess="yes"])
31 AC_ARG_ENABLE([static-uinput],
32 [AS_HELP_STRING([--enable-statis-uinput], [Enable use of a fixed, static uinput device for X-servers without hotplug support (default: no)])],
33 [enable_static_uinput="$enableval"],
34 [enable_static_uinput="no"])
37 PKG_CHECK_MODULES(X, [xfixes xrandr xinerama x11])
38 PKG_CHECK_MODULES(SPICE, [spice-protocol >= 0.8.0])
40 if test "$with_session_info" = "auto" || test "$with_session_info" = "systemd"; then
41 PKG_CHECK_MODULES([LIBSYSTEMD_LOGIN],
42 [libsystemd-login >= 42],
43 [have_libsystemd_login="yes"],
44 [have_libsystemd_login="no"])
45 if test x"$have_libsystemd_login" = "xno" && test "$with_session_info" = "systemd"; then
46 AC_MSG_ERROR([libsystemd-login support explicitly requested, but some required packages are not available])
48 if test x"$have_libsystemd_login" = "xyes"; then
49 AC_DEFINE(HAVE_LIBSYSTEMD_LOGIN, [1], [If defined, vdagentd will be compiled with libsystemd-login support])
50 with_session_info="systemd"
53 have_libsystemd_login="no"
55 AM_CONDITIONAL(HAVE_LIBSYSTEMD_LOGIN, test x"$have_libsystemd_login" = "xyes")
57 if test "$with_session_info" = "auto" || test "$with_session_info" = "console-kit"; then
58 PKG_CHECK_MODULES([DBUS],
60 [have_console_kit="yes"],
61 [have_console_kit="no"])
62 if test x"$have_console_kit" = "xno" && test "$with_session_info" = "console-kit"; then
63 AC_MSG_ERROR([console-kit support explicitly requested, but some required packages are not available])
65 if test x"$have_console_kit" = "xyes"; then
66 AC_DEFINE([HAVE_CONSOLE_KIT], [1], [If defined, vdagentd will be compiled with ConsoleKit support])
67 with_session_info="console-kit"
69 with_session_info="none"
74 AM_CONDITIONAL(HAVE_CONSOLE_KIT, test x"$have_console_kit" = "xyes")
76 if test x"$enable_pciaccess" = "xyes" ; then
77 PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
78 AC_DEFINE([HAVE_PCIACCESS], [1], [If defined, vdagentd will be compiled with pciaccess support] )
80 AM_CONDITIONAL(HAVE_PCIACCESS, test x"$enable_pciaccess" = "xyes")
82 if test x"$enable_static_uinput" = "xyes" ; then
83 AC_DEFINE([WITH_STATIC_UINPUT], [1], [If defined, vdagentd will use a static uinput device] )
91 dnl ==========================================================================
94 spice-vdagent $VERSION
100 session-info: ${with_session_info}
101 pciaccess: ${enable_pciaccess}
102 static uinput: ${enable_static_uinput}
104 Now type 'make' to build $PACKAGE