976cf82510e55f28d64d32373bf628c85b8e95e7
[virt-v2v-test-cases-nonfree.git] / configure.ac
1 # virt-v2v test cases (not redistributable)
2 # Copyright (C) 2014-2015 Red Hat Inc., Richard W.M. Jones
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18 dnl Process this file with autoconf to produce a configure script.
19
20 AC_INIT([virt-v2v-test-cases-nonfree],[1.0.0])
21 AC_CONFIG_MACRO_DIR([m4])
22 AM_INIT_AUTOMAKE([foreign])
23
24 AC_PROG_CC
25 AC_PROG_INSTALL
26
27 AC_PROG_SED
28
29 dnl Check for basic OCaml environment & findlib.
30 AC_PROG_OCAML
31 AC_PROG_FINDLIB
32
33 if test "x$OCAMLFIND" = "xno"; then
34     AC_MSG_ERROR([OCaml findlib is required])
35 fi
36
37 dnl Use ocamlfind to find the required packages ...
38
39 dnl Check for required OCaml packages.
40 AC_CHECK_OCAML_PKG(str)
41 if test "x$OCAML_PKG_str" = "xno"; then
42     AC_MSG_ERROR([Cannot find required OCaml package 'str'])
43 fi
44
45 AC_CHECK_OCAML_PKG(unix)
46 if test "x$OCAML_PKG_unix" = "xno"; then
47     AC_MSG_ERROR([Cannot find required OCaml package 'unix'])
48 fi
49
50 AC_CHECK_OCAML_PKG(gettext)
51 if test "x$OCAML_PKG_gettext" = "xno"; then
52     AC_MSG_ERROR([Cannot find required OCaml package 'gettext'])
53 fi
54
55 AC_CHECK_OCAML_PKG(libvirt)
56 if test "x$OCAML_PKG_libvirt" = "xno"; then
57     AC_MSG_ERROR([Cannot find required OCaml package 'libvirt'])
58 fi
59
60 AC_CHECK_OCAML_PKG(guestfs)
61 if test "x$OCAML_PKG_guestfs" = "xno"; then
62     AC_MSG_ERROR([Cannot find required OCaml package 'guestfs'])
63 fi
64
65 AC_CHECK_OCAML_PKG(v2v_test_harness)
66 if test "x$OCAML_PKG_v2v_test_harness" = "xno"; then
67     AC_MSG_ERROR([Cannot find required OCaml package 'v2v_test_harness'])
68 fi
69
70 dnl libxml2 (required)
71 PKG_CHECK_MODULES([LIBXML2], [libxml-2.0])
72
73 dnl Summary.
74 echo "------------------------------------------------------------"
75 echo "Thanks for downloading" $PACKAGE_STRING
76 echo "------------------------------------------------------------"
77
78 dnl Produce output files.
79 AC_CONFIG_HEADERS([config.h])
80 AC_CONFIG_FILES([Makefile
81         rhel5xen-rhel/Makefile
82         vmware-rhel/Makefile
83         vmware-win/Makefile
84         windows-virtio/Makefile])
85 AC_OUTPUT