root / configure.ac @ 89b70f39
History | View | Annotate | Download (6.2 kB)
1 | a5d17f9f | Michael Hanselmann | # Configure script for Ganeti |
---|---|---|---|
2 | 5e29d733 | Michael Hanselmann | m4_define([gnt_version_major], [2]) |
3 | b03ee906 | Michael Hanselmann | m4_define([gnt_version_minor], [1]) |
4 | b03ee906 | Michael Hanselmann | m4_define([gnt_version_revision], [0]) |
5 | 0ea0ce20 | Michael Hanselmann | m4_define([gnt_version_suffix], [~rc4]) |
6 | d5fd92ed | Michael Hanselmann | m4_define([gnt_version_full], |
7 | d5fd92ed | Michael Hanselmann | m4_format([%d.%d.%d%s], |
8 | d5fd92ed | Michael Hanselmann | gnt_version_major, gnt_version_minor, |
9 | d5fd92ed | Michael Hanselmann | gnt_version_revision, gnt_version_suffix)) |
10 | d5fd92ed | Michael Hanselmann | |
11 | a8083063 | Iustin Pop | AC_PREREQ(2.59) |
12 | d5fd92ed | Michael Hanselmann | AC_INIT(ganeti, gnt_version_full, ganeti@googlegroups.com) |
13 | 16ebf761 | Iustin Pop | AC_CONFIG_AUX_DIR(autotools) |
14 | 9ff7e35c | Michael Hanselmann | AC_CONFIG_SRCDIR(configure) |
15 | e70f1b7c | Michael Hanselmann | AM_INIT_AUTOMAKE([1.9 foreign tar-ustar -Wall -Wno-portability]) |
16 | a8083063 | Iustin Pop | |
17 | d5fd92ed | Michael Hanselmann | AC_SUBST([VERSION_MAJOR], gnt_version_major) |
18 | d5fd92ed | Michael Hanselmann | AC_SUBST([VERSION_MINOR], gnt_version_minor) |
19 | d5fd92ed | Michael Hanselmann | AC_SUBST([VERSION_REVISION], gnt_version_revision) |
20 | d5fd92ed | Michael Hanselmann | AC_SUBST([VERSION_SUFFIX], gnt_version_suffix) |
21 | d5fd92ed | Michael Hanselmann | AC_SUBST([VERSION_FULL], gnt_version_full) |
22 | d5fd92ed | Michael Hanselmann | |
23 | c6b8baba | Michael Hanselmann | # --with-ssh-initscript=... |
24 | c6b8baba | Michael Hanselmann | AC_ARG_WITH([ssh-initscript], |
25 | 8f106515 | Guido Trotter | [AS_HELP_STRING([--with-ssh-initscript=SCRIPT], |
26 | c6b8baba | Michael Hanselmann | [SSH init script to use (default is /etc/init.d/ssh)] |
27 | c6b8baba | Michael Hanselmann | )], |
28 | f491c3a8 | Michael Hanselmann | [ssh_initd_script="$withval"], |
29 | f491c3a8 | Michael Hanselmann | [ssh_initd_script="/etc/init.d/ssh"]) |
30 | f491c3a8 | Michael Hanselmann | AC_SUBST(SSH_INITD_SCRIPT, $ssh_initd_script) |
31 | c6b8baba | Michael Hanselmann | |
32 | 68dccc07 | Guido Trotter | # --with-export-dir=... |
33 | 68dccc07 | Guido Trotter | AC_ARG_WITH([export-dir], |
34 | 68dccc07 | Guido Trotter | [AS_HELP_STRING([--with-export-dir=DIR], |
35 | f00b46bc | Michael Hanselmann | [directory to use by default for instance image] |
36 | f00b46bc | Michael Hanselmann | [ exports (default is /srv/ganeti/export)] |
37 | 68dccc07 | Guido Trotter | )], |
38 | 68dccc07 | Guido Trotter | [export_dir="$withval"], |
39 | 68dccc07 | Guido Trotter | [export_dir="/srv/ganeti/export"]) |
40 | 68dccc07 | Guido Trotter | AC_SUBST(EXPORT_DIR, $export_dir) |
41 | 68dccc07 | Guido Trotter | |
42 | 7c3d51d4 | Guido Trotter | # --with-os-search-path=... |
43 | 7c3d51d4 | Guido Trotter | # do a bit of black sed magic to for quoting of the strings in the list |
44 | 7c3d51d4 | Guido Trotter | AC_ARG_WITH([os-search-path], |
45 | 7c3d51d4 | Guido Trotter | [AS_HELP_STRING([--with-os-search-path=LIST], |
46 | f00b46bc | Michael Hanselmann | [comma separated list of directories to] |
47 | f00b46bc | Michael Hanselmann | [ search for OS images (default is /srv/ganeti/os)] |
48 | 7c3d51d4 | Guido Trotter | )], |
49 | 7c3d51d4 | Guido Trotter | [os_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`], |
50 | 7c3d51d4 | Guido Trotter | [os_search_path="'/srv/ganeti/os'"]) |
51 | 7c3d51d4 | Guido Trotter | AC_SUBST(OS_SEARCH_PATH, $os_search_path) |
52 | 7c3d51d4 | Guido Trotter | |
53 | 298fe380 | Iustin Pop | # --with-iallocator-search-path=... |
54 | 298fe380 | Iustin Pop | # do a bit of black sed magic to for quoting of the strings in the list |
55 | 298fe380 | Iustin Pop | AC_ARG_WITH([iallocator-search-path], |
56 | 298fe380 | Iustin Pop | [AS_HELP_STRING([--with-iallocator-search-path=LIST], |
57 | 298fe380 | Iustin Pop | [comma separated list of directories to] |
58 | 298fe380 | Iustin Pop | [ search for instance allocators (default is $libdir/ganeti/iallocators)] |
59 | 298fe380 | Iustin Pop | )], |
60 | 298fe380 | Iustin Pop | [iallocator_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`], |
61 | 298fe380 | Iustin Pop | [iallocator_search_path="'$libdir/$PACKAGE_NAME/iallocators'"]) |
62 | 298fe380 | Iustin Pop | AC_SUBST(IALLOCATOR_SEARCH_PATH, $iallocator_search_path) |
63 | 298fe380 | Iustin Pop | |
64 | 2f2dbb4b | Jun Futagawa | # --with-xen-bootloader=... |
65 | 2f2dbb4b | Jun Futagawa | AC_ARG_WITH([xen-bootloader], |
66 | 2f2dbb4b | Jun Futagawa | [AS_HELP_STRING([--with-xen-bootloader=PATH], |
67 | 2f2dbb4b | Jun Futagawa | [bootloader for Xen hypervisor (default is empty)] |
68 | 2f2dbb4b | Jun Futagawa | )], |
69 | 2f2dbb4b | Jun Futagawa | [xen_bootloader="$withval"], |
70 | 2f2dbb4b | Jun Futagawa | [xen_bootloader=]) |
71 | 2f2dbb4b | Jun Futagawa | AC_SUBST(XEN_BOOTLOADER, $xen_bootloader) |
72 | 2f2dbb4b | Jun Futagawa | |
73 | f00b46bc | Michael Hanselmann | # --with-xen-kernel=... |
74 | f00b46bc | Michael Hanselmann | AC_ARG_WITH([xen-kernel], |
75 | f00b46bc | Michael Hanselmann | [AS_HELP_STRING([--with-xen-kernel=PATH], |
76 | f00b46bc | Michael Hanselmann | [DomU kernel image for Xen hypervisor (default is /boot/vmlinuz-2.6-xenU)] |
77 | f00b46bc | Michael Hanselmann | )], |
78 | f00b46bc | Michael Hanselmann | [xen_kernel="$withval"], |
79 | f00b46bc | Michael Hanselmann | [xen_kernel="/boot/vmlinuz-2.6-xenU"]) |
80 | f00b46bc | Michael Hanselmann | AC_SUBST(XEN_KERNEL, $xen_kernel) |
81 | f00b46bc | Michael Hanselmann | |
82 | f00b46bc | Michael Hanselmann | # --with-xen-initrd=... |
83 | f00b46bc | Michael Hanselmann | AC_ARG_WITH([xen-initrd], |
84 | f00b46bc | Michael Hanselmann | [AS_HELP_STRING([--with-xen-initrd=PATH], |
85 | f00b46bc | Michael Hanselmann | [DomU initrd image for Xen hypervisor (default is /boot/initrd-2.6-xenU)] |
86 | f00b46bc | Michael Hanselmann | )], |
87 | f00b46bc | Michael Hanselmann | [xen_initrd="$withval"], |
88 | f00b46bc | Michael Hanselmann | [xen_initrd="/boot/initrd-2.6-xenU"]) |
89 | f00b46bc | Michael Hanselmann | AC_SUBST(XEN_INITRD, $xen_initrd) |
90 | f00b46bc | Michael Hanselmann | |
91 | 22c734bc | Manuel Franceschini | # --with-file-storage-dir=... |
92 | 22c734bc | Manuel Franceschini | AC_ARG_WITH([file-storage-dir], |
93 | 22c734bc | Manuel Franceschini | [AS_HELP_STRING([--with-file-storage-dir=PATH], |
94 | 22c734bc | Manuel Franceschini | [directory to store files for file-based backend] |
95 | 22c734bc | Manuel Franceschini | [ (default is /srv/ganeti/file-storage)] |
96 | 22c734bc | Manuel Franceschini | )], |
97 | 22c734bc | Manuel Franceschini | [file_storage_dir="$withval"], |
98 | 22c734bc | Manuel Franceschini | [file_storage_dir="/srv/ganeti/file-storage"]) |
99 | 22c734bc | Manuel Franceschini | AC_SUBST(FILE_STORAGE_DIR, $file_storage_dir) |
100 | 22c734bc | Manuel Franceschini | |
101 | 7e2c5b9e | Guido Trotter | # --with-kvm-path=... |
102 | 7e2c5b9e | Guido Trotter | AC_ARG_WITH([kvm-path], |
103 | 7e2c5b9e | Guido Trotter | [AS_HELP_STRING([--with-kvm-path=PATH], |
104 | 7e2c5b9e | Guido Trotter | [absolute path to the kvm binary] |
105 | 7e2c5b9e | Guido Trotter | [ (default is /usr/bin/kvm)] |
106 | 7e2c5b9e | Guido Trotter | )], |
107 | 7e2c5b9e | Guido Trotter | [kvm_path="$withval"], |
108 | 7e2c5b9e | Guido Trotter | [kvm_path="/usr/bin/kvm"]) |
109 | 7e2c5b9e | Guido Trotter | AC_SUBST(KVM_PATH, $kvm_path) |
110 | 7e2c5b9e | Guido Trotter | |
111 | 89b70f39 | Iustin Pop | # --with-lvm-stripecount=... |
112 | 3736cb6b | Iustin Pop | AC_ARG_WITH([lvm-stripecount], |
113 | 3736cb6b | Iustin Pop | [AS_HELP_STRING([--with-lvm-stripecount=NUM], |
114 | 3736cb6b | Iustin Pop | [the number of stripes to use for LVM volumes] |
115 | 7b3ac94d | Iustin Pop | [ (default is 1)] |
116 | 3736cb6b | Iustin Pop | )], |
117 | 3736cb6b | Iustin Pop | [lvm_stripecount="$withval"], |
118 | 7b3ac94d | Iustin Pop | [lvm_stripecount="1"]) |
119 | 3736cb6b | Iustin Pop | AC_SUBST(LVM_STRIPECOUNT, $lvm_stripecount) |
120 | 3736cb6b | Iustin Pop | |
121 | 89b70f39 | Iustin Pop | # --enable-drbd-barriers |
122 | 89b70f39 | Iustin Pop | AC_ARG_ENABLE([drbd-barriers], |
123 | 89b70f39 | Iustin Pop | [AS_HELP_STRING([--enable-drbd-barriers], |
124 | 89b70f39 | Iustin Pop | [enable the DRBD barrier functionality (>= 8.0.12) (default: enabled)])], |
125 | 89b70f39 | Iustin Pop | [[if test "$enableval" != no; then |
126 | 89b70f39 | Iustin Pop | DRBD_BARRIERS=True |
127 | 89b70f39 | Iustin Pop | else |
128 | 89b70f39 | Iustin Pop | DRBD_BARRIERS=False |
129 | 89b70f39 | Iustin Pop | fi |
130 | 89b70f39 | Iustin Pop | ]], |
131 | 89b70f39 | Iustin Pop | [DRBD_BARRIERS=True]) |
132 | 89b70f39 | Iustin Pop | AC_SUBST(DRBD_BARRIERS, $DRBD_BARRIERS) |
133 | 89b70f39 | Iustin Pop | |
134 | a5d17f9f | Michael Hanselmann | # Check common programs |
135 | a8083063 | Iustin Pop | AC_PROG_INSTALL |
136 | 9ff7e35c | Michael Hanselmann | AC_PROG_LN_S |
137 | a8083063 | Iustin Pop | |
138 | 1efbe18e | Michael Hanselmann | # Check for docbook programs |
139 | 1efbe18e | Michael Hanselmann | AC_ARG_VAR(DOCBOOK2MAN, [docbook2man path]) |
140 | 1efbe18e | Michael Hanselmann | AC_PATH_PROG(DOCBOOK2MAN, [docbook2man], []) |
141 | 1efbe18e | Michael Hanselmann | if test -z "$DOCBOOK2MAN" |
142 | 1efbe18e | Michael Hanselmann | then |
143 | 2ab2b9f5 | Iustin Pop | AC_MSG_WARN([docbook2man not found, man pages rebuild will not be possible]) |
144 | 1efbe18e | Michael Hanselmann | fi |
145 | 1efbe18e | Michael Hanselmann | |
146 | 1efbe18e | Michael Hanselmann | AC_ARG_VAR(DOCBOOK2HTML, [docbook2html path]) |
147 | 1efbe18e | Michael Hanselmann | AC_PATH_PROG(DOCBOOK2HTML, [docbook2html], []) |
148 | 1efbe18e | Michael Hanselmann | if test -z "$DOCBOOK2HTML" |
149 | 1efbe18e | Michael Hanselmann | then |
150 | 2ab2b9f5 | Iustin Pop | AC_MSG_WARN([docbook2html not found, man pages rebuild will not be possible]) |
151 | 1efbe18e | Michael Hanselmann | fi |
152 | 1efbe18e | Michael Hanselmann | |
153 | d17e74b4 | Iustin Pop | # Check for python-sphinx |
154 | d17e74b4 | Iustin Pop | AC_ARG_VAR(SPHINX, [sphinx-build path]) |
155 | d17e74b4 | Iustin Pop | AC_PATH_PROG(SPHINX, [sphinx-build], []) |
156 | d17e74b4 | Iustin Pop | if test -z "$SPHINX" |
157 | f05c99f3 | Michael Hanselmann | then |
158 | d17e74b4 | Iustin Pop | AC_MSG_WARN([sphinx-build not found, documentation rebuild will not be possible]) |
159 | f05c99f3 | Michael Hanselmann | fi |
160 | f05c99f3 | Michael Hanselmann | |
161 | f86e82ef | Iustin Pop | # Check for graphviz (dot) |
162 | f86e82ef | Iustin Pop | AC_ARG_VAR(DOT, [dot path]) |
163 | f86e82ef | Iustin Pop | AC_PATH_PROG(DOT, [dot], []) |
164 | f86e82ef | Iustin Pop | if test -z "$DOT" |
165 | f86e82ef | Iustin Pop | then |
166 | 2ab2b9f5 | Iustin Pop | AC_MSG_WARN([dot (from the graphviz suite) not found, documentation rebuild not possible]) |
167 | f86e82ef | Iustin Pop | fi |
168 | f86e82ef | Iustin Pop | |
169 | 6d7cc5ff | Michael Hanselmann | # Check for pylint |
170 | 6d7cc5ff | Michael Hanselmann | AC_ARG_VAR(PYLINT, [pylint path]) |
171 | 6d7cc5ff | Michael Hanselmann | AC_PATH_PROG(PYLINT, [pylint], []) |
172 | 6d7cc5ff | Michael Hanselmann | if test -z "$PYLINT" |
173 | 6d7cc5ff | Michael Hanselmann | then |
174 | 6d7cc5ff | Michael Hanselmann | AC_MSG_WARN([pylint not found, checking code will not be possible]) |
175 | 6d7cc5ff | Michael Hanselmann | fi |
176 | 6d7cc5ff | Michael Hanselmann | |
177 | fe5b0c42 | Michael Hanselmann | # Check for socat |
178 | fe5b0c42 | Michael Hanselmann | AC_ARG_VAR(SOCAT, [socat path]) |
179 | fe5b0c42 | Michael Hanselmann | AC_PATH_PROG(SOCAT, [socat], []) |
180 | 87c1d0c7 | Guido Trotter | if test -z "$SOCAT" |
181 | 87c1d0c7 | Guido Trotter | then |
182 | fe5b0c42 | Michael Hanselmann | AC_MSG_ERROR([socat not found]) |
183 | 87c1d0c7 | Guido Trotter | fi |
184 | 87c1d0c7 | Guido Trotter | |
185 | fe5b0c42 | Michael Hanselmann | SOCAT_USE_ESCAPE= |
186 | fe5b0c42 | Michael Hanselmann | AC_ARG_ENABLE([socat-escape], |
187 | fe5b0c42 | Michael Hanselmann | [AS_HELP_STRING([--enable-socat-escape], |
188 | fe5b0c42 | Michael Hanselmann | [use escape functionality available in socat >= 1.7 (default: detect |
189 | fe5b0c42 | Michael Hanselmann | automatically)])], |
190 | fe5b0c42 | Michael Hanselmann | [[if test "$enableval" = yes; then |
191 | fe5b0c42 | Michael Hanselmann | SOCAT_USE_ESCAPE=True |
192 | fe5b0c42 | Michael Hanselmann | else |
193 | fe5b0c42 | Michael Hanselmann | SOCAT_USE_ESCAPE=False |
194 | fe5b0c42 | Michael Hanselmann | fi |
195 | fe5b0c42 | Michael Hanselmann | ]]) |
196 | fe5b0c42 | Michael Hanselmann | |
197 | fe5b0c42 | Michael Hanselmann | if test -z "$SOCAT_USE_ESCAPE" |
198 | 87c1d0c7 | Guido Trotter | then |
199 | fe5b0c42 | Michael Hanselmann | if $SOCAT -hh | grep -w -q escape; then |
200 | fe5b0c42 | Michael Hanselmann | SOCAT_USE_ESCAPE=True |
201 | fe5b0c42 | Michael Hanselmann | else |
202 | fe5b0c42 | Michael Hanselmann | SOCAT_USE_ESCAPE=False |
203 | fe5b0c42 | Michael Hanselmann | fi |
204 | 87c1d0c7 | Guido Trotter | fi |
205 | 87c1d0c7 | Guido Trotter | |
206 | fe5b0c42 | Michael Hanselmann | AC_SUBST(SOCAT_USE_ESCAPE) |
207 | fe5b0c42 | Michael Hanselmann | |
208 | a5d17f9f | Michael Hanselmann | # Check for Python |
209 | a8083063 | Iustin Pop | AM_PATH_PYTHON(2.4) |
210 | a8083063 | Iustin Pop | |
211 | 6e06b36c | Iustin Pop | AC_PYTHON_MODULE(OpenSSL, t) |
212 | 6e06b36c | Iustin Pop | AC_PYTHON_MODULE(simplejson, t) |
213 | 6e06b36c | Iustin Pop | AC_PYTHON_MODULE(pyparsing, t) |
214 | 0f18ee6d | Guido Trotter | AC_PYTHON_MODULE(pyinotify, t) |
215 | 6e06b36c | Iustin Pop | |
216 | e8230860 | Michael Hanselmann | AC_CONFIG_FILES([ Makefile ]) |
217 | 3571f686 | Iustin Pop | |
218 | a8083063 | Iustin Pop | AC_OUTPUT |