2 dnl Copyright (C) 2010-2011 Red Hat Inc.
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.
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.
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.
18 AC_INIT([guestfs-browser],[0.1.6])
19 AM_INIT_AUTOMAKE([foreign])
20 AC_CONFIG_MACRO_DIR([m4])
22 dnl Check for C compiler.
27 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
33 dnl Check for OCaml compiler.
35 if test "$OCAMLOPT" = "no"; then
36 AC_MSG_ERROR([You must install the OCaml native compiler (ocamlopt)])
39 dnl Check for OCaml findlib.
41 if test "$OCAMLFIND" = "no"; then
42 AC_MSG_ERROR([You must install OCaml findlib (ocamlfind)])
45 dnl Check for all OCaml packages.
46 AC_CHECK_OCAML_PKG([lablgtk2])
47 if test "$OCAML_PKG_lablgtk2" = "no"; then
48 AC_MSG_ERROR([Please install OCaml module 'lablgtk2'.])
51 AC_CHECK_OCAML_PKG([libvirt])
52 if test "$OCAML_PKG_libvirt" = "no"; then
53 AC_MSG_ERROR([Please install OCaml module 'libvirt'.])
56 AC_CHECK_OCAML_PKG([guestfs])
57 if test "$OCAML_PKG_guestfs" = "no"; then
58 AC_MSG_ERROR([Please install OCaml module 'guestfs'.])
61 AC_CHECK_OCAML_PKG([hivex])
62 if test "$OCAML_PKG_hivex" = "no"; then
63 AC_MSG_ERROR([Please install OCaml module 'hivex'.])
66 AC_CHECK_OCAML_PKG([xml-light])
67 if test "$OCAML_PKG_xml_light" = "no"; then
68 AC_MSG_ERROR([Please install OCaml module 'xml-light'.])
71 AC_CHECK_OCAML_PKG([camomile])
72 if test "$OCAML_PKG_camomile" = "no"; then
73 AC_MSG_ERROR([Please install OCaml module 'camomile' (>= 0.8, including the data module if that is separate).])
76 AC_CHECK_OCAML_PKG([bitstring])
77 if test "$OCAML_PKG_bitstring" = "no"; then
78 AC_MSG_ERROR([Please install OCaml module 'bitstring'.])
81 AC_CHECK_OCAML_PKG([extlib])
82 if test "$OCAML_PKG_extlib" = "no"; then
83 AC_MSG_ERROR([Please install OCaml module 'extlib'.])
86 dnl Check for gdk_pixbuf_mlsource program.
87 AC_PATH_PROGS([GDK_PIXBUF_MLSOURCE], [gdk_pixbuf_mlsource])
89 dnl Optional programs.
91 dnl XXX Other desktop environments?
92 AC_CHECK_PROGS([OPENER], [gnome-open], [no])
94 AC_CHECK_PROG([HIVEXREGEDIT], [hivexregedit], [hivexregedit], [no])
96 AC_CHECK_PROG([PERLDOC],[perldoc],[perldoc],[no])
97 if test "x$PERLDOC" = "xno" ; then
98 AC_MSG_WARN([perldoc not found - install perl to make man pages])
100 AM_CONDITIONAL([HAVE_PERLDOC],[test "x$PERLDOC" != "xno"])
102 AC_CONFIG_HEADERS([config.h])
103 AC_CONFIG_FILES([Makefile config.ml guestfs-browser.spec])