summaryrefslogtreecommitdiffstats
path: root/configure.ac
blob: 93070b2c6b31ff4327501e12e7f07ca4a108be2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
AC_PREREQ(2.59)
AC_INIT([spice-vdagent], [0.8.2])
AC_CONFIG_SRCDIR([configure.ac])

AM_CONFIG_HEADER([src/config.h])

AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip subdir-objects])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

AC_PROG_CC
AM_PROG_CC_C_O
AC_HEADER_STDC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_DEFINE(_GNU_SOURCE, [1], [Enable GNU extensions])

AC_ARG_ENABLE([console-kit],
              [AS_HELP_STRING([--enable-console-kit], [Enable ConsoleKit use (default: yes)])],
              [enable_console_kit="$enableval"],
              [enable_console_kit="yes"])

AC_ARG_ENABLE([pciaccess],
              [AS_HELP_STRING([--enable-pciaccess], [Enable libpciaccess use for auto generation of Xinerama xorg.conf (default: yes)])],
              [enable_pciaccess="$enableval"],
              [enable_pciaccess="yes"])

AC_ARG_ENABLE([static-uinput],
              [AS_HELP_STRING([--enable-statis-uinput], [Enable use of a fixed, static uinput device for X-servers without hotplug support (default: no)])],
              [enable_static_uinput="$enableval"],
              [enable_static_uinput="yes"])

PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(X, [xfixes xrandr xinerama x11])
PKG_CHECK_MODULES(SPICE, [spice-protocol >= 0.8.0])

if test x"$enable_console_kit" = "xyes" ; then
    PKG_CHECK_MODULES(DBUS, [dbus-1])
    AC_DEFINE([HAVE_CONSOLE_KIT], [1], [If defined, vdagentd will be compiled with ConsoleKit support] )
fi
AM_CONDITIONAL(HAVE_CONSOLE_KIT, test x"$enable_console_kit" = "xyes")

if test x"$enable_pciaccess" = "xyes" ; then
    PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
    AC_DEFINE([HAVE_PCIACCESS], [1], [If defined, vdagentd will be compiled with pciaccess support] )
fi
AM_CONDITIONAL(HAVE_PCIACCESS, test x"$enable_pciaccess" = "xyes")

if test x"$enable_static_uinput" = "xyes" ; then
    AC_DEFINE([WITH_STATIC_UINPUT], [1], [If defined, vdagentd will use a static uinput device] )
fi

AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT