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([caml-stubdom], [caml])
24AX_STUBDOM_DEFAULT_ENABLE([pv-grub], [grub])
25AX_STUBDOM_DEFAULT_ENABLE([xenstore-stubdom], [xenstore])
26AX_STUBDOM_CONDITIONAL([vtpm-stubdom], [vtpm])
27AX_STUBDOM_CONDITIONAL([vtpmmgr-stubdom], [vtpmmgr])
28
29AC_ARG_ENABLE([qemu-traditional],,,[
30    case "$host_cpu" in
31        i[[3456]]86|x86_64)
32           enable_qemu_traditional="yes";;
33        *) enable_qemu_traditional="no";;
34    esac
35])
36AS_IF([test "x$enable_qemu_traditional" = "xyes"], [
37    qemu_traditional=y],[
38    qemu_traditional=n
39])
40AS_IF([test "x$ioemu" = "x"], [
41    ioemu=$qemu_traditional
42])
43echo "x$ioemu$qemu_traditional"
44AS_IF([test "x$ioemu$qemu_traditional" = "xyn"], [
45    AC_MSG_ERROR(IOEMU stubdomain requires qemu-traditional)
46])
47
48AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of stubdom])
49AX_ARG_DEFAULT_ENABLE([extfiles], [Use xen extfiles repository for libraries])
50
51AC_ARG_VAR([CMAKE], [Path to the cmake program])
52AX_CHECK_FETCHER
53
54# Checks for programs.
55AC_PROG_CC
56AC_PROG_MAKE_SET
57AC_PROG_INSTALL
58
59# Checks for programs that depend on a feature
60AX_DEPENDS_PATH_PROG([vtpm], [CMAKE], [cmake])
61
62# Stubdom libraries version and url setup
63AX_STUBDOM_LIB([ZLIB], [zlib], [1.2.3], [http://www.zlib.net])
64AX_STUBDOM_LIB([LIBPCI], [libpci], [2.2.9], [http://www.kernel.org/pub/software/utils/pciutils])
65AX_STUBDOM_LIB([NEWLIB], [newlib], [1.16.0], [ftp://sources.redhat.com/pub/newlib])
66AX_STUBDOM_LIB([LWIP], [lwip], [1.3.0], [http://download.savannah.gnu.org/releases/lwip])
67AX_STUBDOM_LIB([GRUB], [grub], [0.97], [http://alpha.gnu.org/gnu/grub])
68AX_STUBDOM_LIB_NOEXT([OCAML], [ocaml], [4.02.0], [http://caml.inria.fr/pub/distrib/ocaml-4.02])
69AX_STUBDOM_LIB([GMP], [libgmp], [4.3.2], [ftp://ftp.gmplib.org/pub/gmp-4.3.2])
70AX_STUBDOM_LIB([POLARSSL], [polarssl], [1.1.4], [http://polarssl.org/code/releases])
71AX_STUBDOM_LIB([TPMEMU], [berlios tpm emulator], [0.7.4], [http://download.berlios.de/tpm-emulator])
72
73#These stubdoms should be enabled if the dependent one is
74AX_STUBDOM_AUTO_DEPENDS([vtpmmgr], [vtpm])
75
76#Conditionally enable these stubdoms based on the presense of dependencies
77AX_STUBDOM_CONDITIONAL_FINISH([vtpm-stubdom], [vtpm])
78AX_STUBDOM_CONDITIONAL_FINISH([vtpmmgr-stubdom], [vtpmmgr])
79AX_STUBDOM_CONDITIONAL_FINISH([ioemu-stubdom], [ioemu])
80
81AX_STUBDOM_FINISH
82AC_OUTPUT()
83