Version 0.9.5 for release.
[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.5)
20
21 AC_PROG_INSTALL
22
23 dnl Override CD properties.
24 AC_ARG_ENABLE([cd-arch],
25         [AS_HELP_STRING([--enable-cd-arch],
26                 [set CD architecture @<:@default=i386@:>@])],
27         [CD_ARCH=$enableval],
28         [CD_ARCH=i386])
29 AC_ARG_ENABLE([cd-lang],
30         [AS_HELP_STRING([--enable-cd-lang],
31                 [set CD language @<:@default=en_US.UTF-8@:>@])],
32         [CD_LANG=$enableval],
33         [CD_LANG=en_US.UTF-8])
34 AC_ARG_ENABLE([cd-keyboard],
35         [AS_HELP_STRING([--enable-cd-keyboard],
36                 [set CD keyboard @<:@default=us@:>@])],
37         [CD_KEYBOARD=$enableval],
38         [CD_KEYBOARD=us])
39 AC_ARG_ENABLE([cd-timezone],
40         [AS_HELP_STRING([--enable-cd-timezone],
41                 [set CD timezone @<:@default=US/Eastern@:>@])],
42         [CD_TIMEZONE=$enableval],
43         [CD_TIMEZONE=US/Eastern])
44 AC_ARG_ENABLE([cd-base],
45         [AS_HELP_STRING([--enable-cd-base],
46                 [set base Fedora for CD @<:@default=8@:>@])],
47         [CD_BASE=$enableval],
48         [CD_BASE=8])
49 AC_ARG_ENABLE([cd-base-url],
50         [AS_HELP_STRING([--enable-cd-base-url],
51                 [set download URL for packages])],
52         [CD_BASE_URL=$enableval],
53         [CD_BASE_URL=http://download.fedora.redhat.com/pub/fedora/linux/releases/$CD_BASE/Everything/$CD_ARCH/os/])
54
55 AC_SUBST(CD_ARCH)
56 AC_SUBST(CD_BASE)
57 AC_SUBST(CD_BASE_URL)
58 AC_SUBST(CD_LANG)
59 AC_SUBST(CD_KEYBOARD)
60 AC_SUBST(CD_TIMEZONE)
61
62 dnl Check for basic OCaml script interpreter.
63 AC_PROG_OCAML
64
65 dnl Check for required OCaml modules.
66 AC_CHECK_OCAML_MODULE(unix,pkg_unix,Unix,[.])
67 if test "x$pkg_unix" = "xno"; then
68     AC_MSG_ERROR([Cannot find required OCaml package 'unix'])
69 fi
70
71 AC_CHECK_OCAML_MODULE(extlib,pkg_extlib,ExtString,[+extlib])
72 if test "x$pkg_extlib" = "xno"; then
73     AC_MSG_ERROR([Cannot find required OCaml package 'extlib'])
74 fi
75
76 AC_CHECK_OCAML_MODULE(xml-light,pkg_xml_light,Xml,[+xml-light])
77 if test "x$pkg_xml_light" = "xno"; then
78     AC_MSG_ERROR([Cannot find required OCaml package 'xml-light'])
79 fi
80
81 dnl Check for recommended livecd-creator (for building ISOs).
82 AC_CHECK_PROG(HAVE_LIVECD_CREATOR,livecd-creator,livecd-creator)
83
84 dnl Check for optional perldoc (for building manual pages).
85 AC_CHECK_PROG(HAVE_PERLDOC,perldoc,perldoc)
86
87 dnl Check for optional qemu or qemu-kvm (for test-booting).
88 AC_CHECK_PROG(HAVE_QEMU,qemu,qemu)
89 AC_CHECK_PROG(HAVE_QEMU_KVM,qemu-kvm,qemu-kvm)
90
91 dnl Summary.
92 echo "------------------------------------------------------------"
93 echo "Thanks for downloading" $PACKAGE_STRING
94 echo "------------------------------------------------------------"
95
96 dnl Produce output files.
97 AC_CONFIG_FILES([Makefile p2v.ks])
98 AC_OUTPUT