X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=configure.ac;h=9c23ec9d88f132afeae3e4649a404119f4cbe00d;hb=HEAD;hp=9f9f73e9569049ec4a954bb00fe88ec9927e8451;hpb=3678804a681bb01bbf057c6bf9344aabc285e1d5;p=virt-v2v-test-cases-nonfree.git diff --git a/configure.ac b/configure.ac index 9f9f73e..9c23ec9 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([virt-v2v-test-cases-free],[1.0.0]) +AC_INIT([virt-v2v-test-cases-nonfree],[1.0.0]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign]) @@ -62,10 +62,30 @@ if test "x$OCAML_PKG_guestfs" = "xno"; then AC_MSG_ERROR([Cannot find required OCaml package 'guestfs']) fi -AC_CHECK_OCAML_PKG(v2v_test_harness) -if test "x$OCAML_PKG_v2v_test_harness" = "xno"; then - AC_MSG_ERROR([Cannot find required OCaml package 'v2v_test_harness']) +dnl Choose the installed v2v_test_harness module (default) or +dnl use --with-test-harness=/path/to/libguestfs/v2v/test-harness to +dnl compile against local libguestfs sources. + +AC_ARG_WITH([test-harness], + [AS_HELP_STRING([--with-test-harness], + [path to v2v test harness sources])], + [with_test_harness=$withval], + [with_test_harness=installed]) +if test "x$with_test_harness" = "xinstalled"; then + AC_CHECK_OCAML_PKG(v2v_test_harness) + if test "x$OCAML_PKG_v2v_test_harness" = "xno"; then + AC_MSG_ERROR([Cannot find required OCaml package 'v2v_test_harness' (try: --with-test-harness=/path/to/libguestfs/v2v/test-harness)]) + fi +else + AC_MSG_CHECKING([$with_test_harness contains the compiled v2v test harness]) + if test ! -f $with_test_harness/v2v_test_harness.cmi ; then + AC_MSG_ERROR([$with_test_harness does not contain the compiled v2v test harness]) + fi + AC_MSG_RESULT([yes]) + AC_SUBST([TEST_HARNESS_DIR],[$with_test_harness]) fi +AM_CONDITIONAL([INSTALLED_TEST_HARNESS], + [test "x$with_test_harness" = "xinstalled"]) dnl libxml2 (required) PKG_CHECK_MODULES([LIBXML2], [libxml-2.0]) @@ -80,6 +100,7 @@ AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile rhel5xen-rhel/Makefile vmware-rhel/Makefile + vmware-uefi/Makefile vmware-win/Makefile windows-virtio/Makefile]) AC_OUTPUT