Modify Disk.GetNodes() to support LD_FILE
[ganeti-local] / configure.ac
1 # Configure script for Ganeti
2 AC_PREREQ(2.59)
3 AC_INIT(ganeti, 1.2.3, ganeti@googlegroups.com)
4 AC_CONFIG_AUX_DIR(autotools)
5 AC_CONFIG_SRCDIR(configure)
6 AM_INIT_AUTOMAKE([foreign tar-ustar])
7
8 # --with-ssh-initscript=...
9 AC_ARG_WITH([ssh-initscript],
10   [AS_HELP_STRING([--with-ssh-initscript=SCRIPT],
11     [SSH init script to use (default is /etc/init.d/ssh)]
12   )],
13   [ssh_initd_script="$withval"],
14   [ssh_initd_script="/etc/init.d/ssh"])
15 AC_SUBST(SSH_INITD_SCRIPT, $ssh_initd_script)
16
17 # --with-export-dir=...
18 AC_ARG_WITH([export-dir],
19   [AS_HELP_STRING([--with-export-dir=DIR],
20     [directory to use by default for instance image]
21     [ exports (default is /srv/ganeti/export)]
22   )],
23   [export_dir="$withval"],
24   [export_dir="/srv/ganeti/export"])
25 AC_SUBST(EXPORT_DIR, $export_dir)
26
27 # --with-os-search-path=...
28 # do a bit of black sed magic to for quoting of the strings in the list
29 AC_ARG_WITH([os-search-path],
30   [AS_HELP_STRING([--with-os-search-path=LIST],
31     [comma separated list of directories to]
32     [ search for OS images (default is /srv/ganeti/os)]
33   )],
34   [os_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`],
35   [os_search_path="'/srv/ganeti/os'"])
36 AC_SUBST(OS_SEARCH_PATH, $os_search_path)
37
38 # --with-xen-kernel=...
39 AC_ARG_WITH([xen-kernel],
40   [AS_HELP_STRING([--with-xen-kernel=PATH],
41     [DomU kernel image for Xen hypervisor (default is /boot/vmlinuz-2.6-xenU)]
42   )],
43   [xen_kernel="$withval"],
44   [xen_kernel="/boot/vmlinuz-2.6-xenU"])
45 AC_SUBST(XEN_KERNEL, $xen_kernel)
46
47 # --with-xen-initrd=...
48 AC_ARG_WITH([xen-initrd],
49   [AS_HELP_STRING([--with-xen-initrd=PATH],
50     [DomU initrd image for Xen hypervisor (default is /boot/initrd-2.6-xenU)]
51   )],
52   [xen_initrd="$withval"],
53   [xen_initrd="/boot/initrd-2.6-xenU"])
54 AC_SUBST(XEN_INITRD, $xen_initrd)
55
56 # --with-file-storage-dir=...
57 AC_ARG_WITH([file-storage-dir],
58   [AS_HELP_STRING([--with-file-storage-dir=PATH],
59     [directory to store files for file-based backend]
60     [ (default is /srv/ganeti/file-storage)]
61   )],
62   [file_storage_dir="$withval"],
63   [file_storage_dir="/srv/ganeti/file-storage"])
64 AC_SUBST(FILE_STORAGE_DIR, $file_storage_dir)
65
66 # Check common programs
67 AC_PROG_INSTALL
68 AC_PROG_LN_S
69
70 # Check for Python
71 AM_PATH_PYTHON(2.4)
72
73 AC_PYTHON_MODULE(twisted.internet, t)
74 AC_PYTHON_MODULE(twisted.cred, t)
75 AC_PYTHON_MODULE(twisted.spread, t)
76 AC_PYTHON_MODULE(OpenSSL, t)
77 AC_PYTHON_MODULE(simplejson, t)
78 AC_PYTHON_MODULE(pyparsing, t)
79
80 # Check for docbook2man
81 found_docbook2man=
82 AC_CHECK_PROG(found_docbook2man, [docbook2man], [yes])
83 if test "$found_docbook2man" != "yes"
84 then
85   AC_MSG_WARN([docbook2man not found.])
86 fi
87
88 AC_CONFIG_FILES([
89   Makefile
90   daemons/Makefile
91   doc/Makefile
92   doc/examples/Makefile
93   lib/Makefile
94   man/Makefile
95   qa/Makefile
96   qa/hooks/Makefile
97   scripts/Makefile
98   test/Makefile
99   tools/Makefile
100 ])
101
102 AC_OUTPUT