1 # virt-v2v test cases (not redistributable)
2 # Copyright (C) 2014-2015 Red Hat Inc., Richard W.M. Jones
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.
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.
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.
18 dnl Process this file with autoconf to produce a configure script.
20 AC_INIT([virt-v2v-test-cases-nonfree],[1.0.0])
21 AC_CONFIG_MACRO_DIR([m4])
22 AM_INIT_AUTOMAKE([foreign])
29 dnl Check for basic OCaml environment & findlib.
33 if test "x$OCAMLFIND" = "xno"; then
34 AC_MSG_ERROR([OCaml findlib is required])
37 dnl Use ocamlfind to find the required packages ...
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'])
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'])
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'])
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'])
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'])
65 dnl Choose the installed v2v_test_harness module (default) or
66 dnl use --with-test-harness=/path/to/libguestfs/v2v/test-harness to
67 dnl compile against local libguestfs sources.
69 AC_ARG_WITH([test-harness],
70 [AS_HELP_STRING([--with-test-harness],
71 [path to v2v test harness sources])],
72 [with_test_harness=$withval],
73 [with_test_harness=installed])
74 if test "x$with_test_harness" = "xinstalled"; then
75 AC_CHECK_OCAML_PKG(v2v_test_harness)
76 if test "x$OCAML_PKG_v2v_test_harness" = "xno"; then
77 AC_MSG_ERROR([Cannot find required OCaml package 'v2v_test_harness' (try: --with-test-harness=/path/to/libguestfs/v2v/test-harness)])
80 AC_MSG_CHECKING([$with_test_harness contains the compiled v2v test harness])
81 if test ! -f $with_test_harness/v2v_test_harness.cmi ; then
82 AC_MSG_ERROR([$with_test_harness does not contain the compiled v2v test harness])
85 AC_SUBST([TEST_HARNESS_DIR],[$with_test_harness])
87 AM_CONDITIONAL([INSTALLED_TEST_HARNESS],
88 [test "x$with_test_harness" = "xinstalled"])
90 dnl libxml2 (required)
91 PKG_CHECK_MODULES([LIBXML2], [libxml-2.0])
94 echo "------------------------------------------------------------"
95 echo "Thanks for downloading" $PACKAGE_STRING
96 echo "------------------------------------------------------------"
98 dnl Produce output files.
99 AC_CONFIG_HEADERS([config.h])
100 AC_CONFIG_FILES([Makefile
101 rhel5xen-rhel/Makefile
104 windows-virtio/Makefile])