Version 0.0.1
[guestfs-browser.git] / configure.ac
1 dnl Guestfs Browser.
2 dnl Copyright (C) 2010 Red Hat Inc.
3 dnl
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 2 of the License, or
7 dnl (at your option) any later version.
8 dnl
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 dnl GNU General Public License for more details.
13 dnl
14 dnl You should have received a copy of the GNU General Public License along
15 dnl with this program; if not, write to the Free Software Foundation, Inc.,
16 dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18 AC_INIT([guestfs-browser],[0.0.1])
19 AM_INIT_AUTOMAKE([foreign])
20 AC_CONFIG_MACRO_DIR([m4])
21
22 dnl Check for C compiler.
23 AC_PROG_CC_STDC
24 AC_PROG_INSTALL
25 AC_PROG_CPP
26 AC_C_PROTOTYPES
27 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
28 AM_PROG_CC_C_O
29 AC_SYS_LARGEFILE
30
31 dnl Check for OCaml compiler.
32 AC_PROG_OCAML
33 if test "$OCAMLOPT" = "no"; then
34     AC_MSG_ERROR([You must install the OCaml native compiler (ocamlopt)])
35 fi
36
37 dnl Check for OCaml findlib.
38 AC_PROG_FINDLIB
39 if test "$OCAMLFIND" = "no"; then
40     AC_MSG_ERROR([You must install OCaml findlib (ocamlfind)])
41 fi
42
43 dnl Check for all OCaml packages.
44 AC_CHECK_OCAML_PKG([lablgtk2])
45 if test "$OCAML_PKG_lablgtk2" = "no"; then
46     AC_MSG_ERROR([Please install OCaml module 'lablgtk2'.])
47 fi
48
49 AC_CHECK_OCAML_PKG([libvirt])
50 if test "$OCAML_PKG_libvirt" = "no"; then
51     AC_MSG_ERROR([Please install OCaml module 'libvirt'.])
52 fi
53
54 AC_CHECK_OCAML_PKG([guestfs])
55 if test "$OCAML_PKG_guestfs" = "no"; then
56     AC_MSG_ERROR([Please install OCaml module 'guestfs'.])
57 fi
58
59 AC_CHECK_OCAML_PKG([xml-light])
60 if test "$OCAML_PKG_xml_light" = "no"; then
61     AC_MSG_ERROR([Please install OCaml module 'xml-light'.])
62 fi
63
64 AC_CHECK_OCAML_PKG([extlib])
65 if test "$OCAML_PKG_extlib" = "no"; then
66     AC_MSG_ERROR([Please install OCaml module 'extlib'.])
67 fi
68
69 dnl Check for gdk_pixbuf_mlsource program.
70 AC_PATH_PROGS([GDK_PIXBUF_MLSOURCE], [gdk_pixbuf_mlsource])
71
72 AC_CONFIG_HEADERS([config.h])
73 AC_CONFIG_FILES([Makefile config.ml])
74 AC_OUTPUT