forked from xapi-project/xen-api-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
63 lines (52 loc) · 1.36 KB
/
configure.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
AC_INIT([xen-api-libs], [0.1], [[email protected]])
AC_CONFIG_SRCDIR([])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_AUX_DIR(./mk)
AC_CANONICAL_SYSTEM
plat=generic
case $target_os in
darwin*)
plat=darwin
;;
*)
;;
esac
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([string.h sys/param.h])
AC_CHECK_HEADERS([xen/xen.h],[XEN=1],[XEN=0])
AC_CHECK_HEADERS([libdevmapper.h], [DEVICE_MAPPER=1], [DEVICE_MAPPER=0])
AC_CHECK_HEADERS([linux/cdrom.h], [LINUX_CDROM=1], [LINUX_CDROM=0])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_DECLS([XS_RESTRICT],[],[],[
[
#include <errno.h>
#include <xenctrl.h>
#include <xen/io/xs_wire.h>
]])
# Checks for library functions.
AC_CHECK_FUNCS([realpath])
AC_PROG_OCAML
if test "$OCAMLC" = "no"; then
AC_MSG_ERROR([You must install the OCaml compiler])
fi
AC_PROG_FINDLIB
if test "$OCAMLFIND" = "no"; then
AC_MSG_ERROR([You must install OCaml findlib (the ocamlfind command)])
fi
AC_CHECK_OCAML_PKG([xmlm])
AC_CHECK_OCAML_PKG([type-conv])
AC_CONFIG_FILES([Makefile config.mk])
AC_SUBST([XEN])
AC_SUBST([DEVICE_MAPPER])
AC_SUBST([LINUX_CDROM])
AC_SUBST([OCAML_PKG_xmlm])
AC_SUBST([OCAML_PKG_type_conv])
AC_OUTPUT