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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
AC_PREREQ([2.57])
AC_INIT(spice-xpi, [2.8.90], [], spice-xpi)
AC_CONFIG_MACRO_DIR([m4])
AM_CONFIG_HEADER([config.h])
AC_CONFIG_AUX_DIR(.)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_CANONICAL_HOST
AC_PROG_LIBTOOL
LT_LANG([Windows Resource])
AM_PROG_CC_C_O
AC_MSG_CHECKING([operating system])
case $host in
*-linux*)
AC_MSG_RESULT([Linux])
backend="linux"
AC_DEFINE([XP_UNIX], 1, [Building Linux plugin])
;;
*-mingw*)
AC_MSG_RESULT([Windows])
backend="windows"
AC_CHECK_TOOL([WINDRES], [windres], [no])
AC_DEFINE([XP_WIN], 1, [Building Windows plugin])
;;
esac
AM_CONDITIONAL([OS_LINUX], [test "x$backend" = xlinux])
AM_CONDITIONAL([OS_WINDOWS], [test "x$backend" = xwindows])
dnl =========================================================================
dnl Check deps
AC_CONFIG_SUBDIRS([spice-protocol])
SPICE_PROTOCOL_CFLAGS='-I ${top_srcdir}/spice-protocol'
AC_SUBST(SPICE_PROTOCOL_CFLAGS)
SPICE_XPI_REQUIRES="glib-2.0 gio-2.0 gthread-2.0"
AS_IF([test "x$backend" = "xwindows"], [SPICE_XPI_REQUIRES="$SPICE_XPI_REQUIRES gio-windows-2.0"])
PKG_CHECK_MODULES([GLIB],[$SPICE_XPI_REQUIRES])
AC_ARG_ENABLE([xpi],
[AS_HELP_STRING([--enable-xpi],
[Enable compilation of an xpi package])],
[], [enable_xpi=no])
if test x"$enable_xpi" != xno; then
AM_PATH_PYTHON
PKG_CHECK_MODULES(XUL, libxul-embedding >= 10)
AC_SUBST(XUL_CFLAGS)
AC_SUBST(XUL_LIBS)
XUL_INCLUDEDIR=`pkg-config --variable=includedir libxul`
XUL_IDLDIR=`pkg-config --variable=idldir libxul`
AC_SUBST(XUL_INCLUDEDIR)
AC_SUBST(XUL_IDLDIR)
fi
AM_CONDITIONAL([BUILD_XPI], [test x"$enable_xpi" != xno])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_ARG_ENABLE([generator],
[AS_HELP_STRING([--enable-generator],
[Enable compilation of a test page generator])],
[], [enable_generator=no])
AM_CONDITIONAL([BUILD_GENERATOR], [test x$enable_generator != xno])
AC_OUTPUT([
Makefile
data/Makefile
generator/Makefile
SpiceXPI/Makefile
SpiceXPI/src/Makefile
SpiceXPI/src/plugin/Makefile
])
dnl ==========================================================================
AC_MSG_NOTICE([
Spice-XPI $VERSION
==============
prefix: ${prefix}
compiler: ${CC}
XUL includes: ${XUL_INCLUDEDIR}
XUL IDL files: ${XUL_IDLDIR}
Build test page generator: ${enable_generator}
Build XPI package: ${enable_xpi}
Now type 'make' to build $PACKAGE
])
|