Use autoconf to generate the Makefile.
[virt-p2v.git] / configure.ac
1 # virt-p2v
2 # Copyright (C) 2007-2008 Red Hat Inc., Richard W.M. Jones
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2 of the License, or (at your option) any later version.
8 #
9 # This library 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 GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; 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 AC_INIT(virt-p2v,0.9.2)
20
21 dnl Check for basic OCaml script interpreter.
22 AC_PROG_OCAML
23
24 dnl Check for required OCaml modules.
25 AC_CHECK_OCAML_MODULE(unix,pkg_unix,Unix,[.])
26 if test "x$pkg_unix" = "xno"; then
27     AC_MSG_ERROR([Cannot find required OCaml package 'unix'])
28 fi
29
30 AC_CHECK_OCAML_MODULE(extlib,pkg_extlib,ExtString,[+extlib])
31 if test "x$pkg_extlib" = "xno"; then
32     AC_MSG_ERROR([Cannot find required OCaml package 'extlib'])
33 fi
34
35 AC_CHECK_OCAML_MODULE(xml-light,pkg_xml_light,Xml,[+xml-light])
36 if test "x$pkg_xml_light" = "xno"; then
37     AC_MSG_ERROR([Cannot find required OCaml package 'xml-light'])
38 fi
39
40 dnl Check for recommended livecd-creator (for building ISOs).
41 AC_CHECK_PROG(HAVE_LIVECD_CREATOR,livecd-creator,livecd-creator)
42
43 dnl Check for optional perldoc (for building manual pages).
44 AC_CHECK_PROG(HAVE_PERLDOC,perldoc,perldoc)
45
46 dnl Check for optional qemu or qemu-kvm (for test-booting).
47 AC_CHECK_PROG(HAVE_QEMU,qemu,qemu)
48 AC_CHECK_PROG(HAVE_QEMU_KVM,qemu-kvm,qemu-kvm)
49
50 dnl Summary.
51 echo "------------------------------------------------------------"
52 echo "Thanks for downloading" $PACKAGE_STRING
53 echo "------------------------------------------------------------"
54
55 dnl Produce output files.
56 AC_CONFIG_FILES([Makefile])
57 AC_OUTPUT