2 # Copyright (C) 2007-2008 Red Hat Inc., Richard W.M. Jones
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.
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.
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
18 dnl Process this file with autoconf to produce a configure script.
19 AC_INIT(virt-p2v,0.9.9)
23 dnl Override CD properties.
24 AC_ARG_ENABLE([cd-arch],
25 [AS_HELP_STRING([--enable-cd-arch],
26 [set CD architecture @<:@default=i386@:>@])],
29 AC_ARG_ENABLE([cd-lang],
30 [AS_HELP_STRING([--enable-cd-lang],
31 [set CD language @<:@default=en_US.UTF-8@:>@])],
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],
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=10@:>@])],
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 AC_ARG_ENABLE([cd-updates-url],
55 [AS_HELP_STRING([--enable-cd-updates-url],
56 [set download URL for package updates])],
57 [CD_UPDATES_URL=$enableval],
58 [CD_UPDATES_URL=http://download.fedora.redhat.com/pub/fedora/linux/updates/$CD_BASE/$CD_ARCH/])
63 AC_SUBST(CD_UPDATES_URL)
68 dnl Allow a local repository.
69 AC_ARG_ENABLE([localrepo],
70 [AS_HELP_STRING([--enable-localrepo],
71 [set path to local repository with additional packages])],
72 [LOCALREPO=$enableval],
75 if test "x$LOCALREPO" != "xno"; then
76 if test -d "$LOCALREPO"; then
77 # Turn a pathname into a file URL.
78 LOCALREPO=`cd $LOCALREPO && pwd`
79 LOCALREPO=file://$LOCALREPO
81 LOCALREPO="repo --name=local --baseurl=$LOCALREPO"
87 dnl Check for basic OCaml script interpreter.
91 dnl Check for required OCaml modules.
92 AC_CHECK_OCAML_MODULE(unix,pkg_unix,Unix,[.])
93 if test "x$pkg_unix" = "xno"; then
94 AC_MSG_ERROR([Cannot find required OCaml package 'unix'])
97 AC_CHECK_OCAML_MODULE(extlib,pkg_extlib,ExtString,[+extlib])
98 if test "x$pkg_extlib" = "xno"; then
99 AC_MSG_ERROR([Cannot find required OCaml package 'extlib'])
102 AC_CHECK_OCAML_MODULE(xml-light,pkg_xml_light,Xml,[+xml-light])
103 if test "x$pkg_xml_light" = "xno"; then
104 AC_MSG_ERROR([Cannot find required OCaml package 'xml-light'])
107 AC_CHECK_OCAML_MODULE(newt,pkg_newt,Newt,[+newt])
108 if test "x$pkg_newt" = "xno"; then
109 AC_MSG_ERROR([Cannot find required OCaml package 'ocaml-newt'])
112 AC_CHECK_OCAML_MODULE(pcre,pkg_pcre,Pcre,[+pcre])
113 if test "x$pkg_pcre" = "xno"; then
114 AC_MSG_ERROR([Cannot find required OCaml package 'ocaml-pcre'])
117 AC_CHECK_OCAML_MODULE(libvirt,pkg_libvirt,Libvirt_version,[+libvirt])
118 if test "x$pkg_libvirt" = "xno"; then
119 AC_MSG_ERROR([Cannot find required OCaml package 'ocaml-libvirt'])
122 AC_CHECK_OCAML_MODULE(gettext,pkg_gettext,Gettext,[+gettext])
123 if test "x$pkg_gettext" = "xno"; then
124 AC_MSG_ERROR([Cannot find required OCaml package 'ocaml-gettext'])
127 dnl Check for recommended livecd-creator (for building ISOs).
128 AC_CHECK_PROG(HAVE_LIVECD_CREATOR,livecd-creator,livecd-creator)
130 dnl Check for optional livecd-iso-to-pxeboot.
131 AC_CHECK_PROG(HAVE_LIVECD_ISO_TO_PXEBOOT,livecd-iso-to-pxeboot,livecd-iso-to-pxeboot)
133 dnl Check for optional perldoc (for building manual pages).
134 AC_CHECK_PROG(HAVE_PERLDOC,perldoc,perldoc)
136 dnl Check for optional qemu or qemu-kvm (for test-booting).
137 AC_CHECK_PROG(HAVE_QEMU,qemu,qemu)
138 AC_CHECK_PROG(HAVE_QEMU_KVM,qemu-kvm,qemu-kvm)
140 dnl Check for recommended ocaml-gettext tool.
141 AC_CHECK_PROG(OCAML_GETTEXT,ocaml-gettext,ocaml-gettext)
144 echo "------------------------------------------------------------"
145 echo "Thanks for downloading" $PACKAGE_STRING
146 echo "------------------------------------------------------------"
148 dnl Produce output files.
149 AC_CONFIG_FILES([Makefile po/Makefile p2v.ks virt-p2v.spec])