1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.67])
5AC_INIT([Xen Hypervisor Stub Domains], m4_esyscmd([../version.sh ../xen/Makefile]),
6    [xen-devel@lists.xen.org], [xen], [https://www.xen.org/])
7AC_CONFIG_SRCDIR([xenstore-minios.cfg])
8AC_CONFIG_FILES([../config/Stubdom.mk])
9AC_CONFIG_AUX_DIR([../])
10
11AC_CANONICAL_HOST
12
13# M4 Macro includes
14m4_include([../m4/stubdom.m4])
15m4_include([../m4/features.m4])
16m4_include([../m4/path_or_fail.m4])
17m4_include([../m4/depends.m4])
18m4_include([../m4/fetcher.m4])
19
20# Enable/disable stub domains
21AX_STUBDOM_CONDITIONAL([ioemu-stubdom], [ioemu])
22AX_STUBDOM_DEFAULT_DISABLE([c-stubdom], [c])
23AX_STUBDOM_DEFAULT_DISABLE([pv-grub], [grub])
24AX_STUBDOM_DEFAULT_ENABLE([xenstore-stubdom], [xenstore])
25AX_STUBDOM_DEFAULT_ENABLE([xenstorepvh-stubdom], [xenstorepvh])
26AX_STUBDOM_CONDITIONAL([vtpm-stubdom], [vtpm])
27AX_STUBDOM_CONDITIONAL([vtpmmgr-stubdom], [vtpmmgr])
28
29AC_ARG_ENABLE([qemu-traditional])
30AS_IF([test "x$enable_qemu_traditional" = "xyes"], [
31    qemu_traditional=y],[
32    qemu_traditional=n
33])
34AS_IF([test "x$ioemu" = "x"], [
35    ioemu=$qemu_traditional
36])
37echo "x$ioemu$qemu_traditional"
38AS_IF([test "x$ioemu$qemu_traditional" = "xyn"], [
39    AC_MSG_ERROR(IOEMU stubdomain requires qemu-traditional)
40])
41
42AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of stubdom])
43AX_ARG_DEFAULT_ENABLE([extfiles], [Use xen extfiles repository for libraries])
44
45AC_ARG_VAR([CMAKE], [Path to the cmake program])
46AX_CHECK_FETCHER
47
48# Checks for programs.
49AC_PROG_CC
50AC_PROG_MAKE_SET
51AC_PROG_INSTALL
52
53# Checks for programs that depend on a feature
54AX_DEPENDS_PATH_PROG([vtpm], [CMAKE], [cmake])
55
56# Stubdom libraries version and url setup
57AX_STUBDOM_LIB([ZLIB], [zlib], [1.2.3])
58AX_STUBDOM_LIB([LIBPCI], [libpci], [2.2.9], [https://mirrors.edge.kernel.org/pub/software/utils/pciutils])
59AX_STUBDOM_LIB([NEWLIB], [newlib], [1.16.0], [https://sourceware.org/ftp/newlib])
60AX_STUBDOM_LIB([LWIP], [lwip], [1.3.0], [https://download.savannah.gnu.org/releases/lwip])
61AX_STUBDOM_LIB([GRUB], [grub], [0.97], [https://alpha.gnu.org/gnu/grub])
62AX_STUBDOM_LIB([GMP], [libgmp], [4.3.2], [https://gmplib.org/download/gmp/archive])
63AX_STUBDOM_LIB([POLARSSL], [polarssl], [1.1.4])
64AX_STUBDOM_LIB([TPMEMU], [berlios tpm emulator], [0.7.4])
65
66#These stubdoms should be enabled if the dependent one is
67AX_STUBDOM_AUTO_DEPENDS([vtpmmgr], [vtpm])
68
69#Conditionally enable these stubdoms based on the presense of dependencies
70AX_STUBDOM_CONDITIONAL_FINISH([vtpm-stubdom], [vtpm])
71AX_STUBDOM_CONDITIONAL_FINISH([vtpmmgr-stubdom], [vtpmmgr])
72AX_STUBDOM_CONDITIONAL_FINISH([ioemu-stubdom], [ioemu])
73
74AX_STUBDOM_FINISH
75AC_OUTPUT()
76