root / configure.ac @ d9f1d93c
History | View | Annotate | Download (23.8 kB)
1 | a5d17f9f | Michael Hanselmann | # Configure script for Ganeti |
---|---|---|---|
2 | 5e29d733 | Michael Hanselmann | m4_define([gnt_version_major], [2]) |
3 | 71f35985 | Klaus Aehlig | m4_define([gnt_version_minor], [10]) |
4 | b830193c | Guido Trotter | m4_define([gnt_version_revision], [0]) |
5 | 33bff17b | Michele Tartara | m4_define([gnt_version_suffix], [~alpha1]) |
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 | 553bd93f | Vitaly Kuznetsov | # --with-ssh-config-dir=... |
43 | 553bd93f | Vitaly Kuznetsov | AC_ARG_WITH([ssh-config-dir], |
44 | 553bd93f | Vitaly Kuznetsov | [AS_HELP_STRING([--with-ssh-config-dir=DIR], |
45 | 553bd93f | Vitaly Kuznetsov | [ directory with ssh host keys ] |
46 | 553bd93f | Vitaly Kuznetsov | [ (default is /etc/ssh)] |
47 | 553bd93f | Vitaly Kuznetsov | )], |
48 | 553bd93f | Vitaly Kuznetsov | [ssh_config_dir="$withval"], |
49 | 553bd93f | Vitaly Kuznetsov | [ssh_config_dir="/etc/ssh"]) |
50 | 553bd93f | Vitaly Kuznetsov | AC_SUBST(SSH_CONFIG_DIR, $ssh_config_dir) |
51 | 553bd93f | Vitaly Kuznetsov | |
52 | a8e8c0c6 | Michael Hanselmann | # --with-xen-config-dir=... |
53 | a8e8c0c6 | Michael Hanselmann | AC_ARG_WITH([xen-config-dir], |
54 | a8e8c0c6 | Michael Hanselmann | [AS_HELP_STRING([--with-xen-config-dir=DIR], |
55 | a8e8c0c6 | Michael Hanselmann | m4_normalize([Xen configuration directory |
56 | a8e8c0c6 | Michael Hanselmann | (default: /etc/xen)]))], |
57 | a8e8c0c6 | Michael Hanselmann | [xen_config_dir="$withval"], |
58 | a8e8c0c6 | Michael Hanselmann | [xen_config_dir=/etc/xen]) |
59 | a8e8c0c6 | Michael Hanselmann | AC_SUBST(XEN_CONFIG_DIR, $xen_config_dir) |
60 | a8e8c0c6 | Michael Hanselmann | |
61 | 7c3d51d4 | Guido Trotter | # --with-os-search-path=... |
62 | 7c3d51d4 | Guido Trotter | # do a bit of black sed magic to for quoting of the strings in the list |
63 | 7c3d51d4 | Guido Trotter | AC_ARG_WITH([os-search-path], |
64 | 7c3d51d4 | Guido Trotter | [AS_HELP_STRING([--with-os-search-path=LIST], |
65 | f00b46bc | Michael Hanselmann | [comma separated list of directories to] |
66 | f00b46bc | Michael Hanselmann | [ search for OS images (default is /srv/ganeti/os)] |
67 | 7c3d51d4 | Guido Trotter | )], |
68 | 7c3d51d4 | Guido Trotter | [os_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`], |
69 | 7c3d51d4 | Guido Trotter | [os_search_path="'/srv/ganeti/os'"]) |
70 | 7c3d51d4 | Guido Trotter | AC_SUBST(OS_SEARCH_PATH, $os_search_path) |
71 | 7c3d51d4 | Guido Trotter | |
72 | 376631d1 | Constantinos Venetsanopoulos | # --with-extstorage-search-path=... |
73 | 376631d1 | Constantinos Venetsanopoulos | # same black sed magic for quoting of the strings in the list |
74 | 376631d1 | Constantinos Venetsanopoulos | AC_ARG_WITH([extstorage-search-path], |
75 | 376631d1 | Constantinos Venetsanopoulos | [AS_HELP_STRING([--with-extstorage-search-path=LIST], |
76 | 376631d1 | Constantinos Venetsanopoulos | [comma separated list of directories to] |
77 | 376631d1 | Constantinos Venetsanopoulos | [ search for External Storage Providers] |
78 | 376631d1 | Constantinos Venetsanopoulos | [ (default is /srv/ganeti/extstorage)] |
79 | 376631d1 | Constantinos Venetsanopoulos | )], |
80 | 376631d1 | Constantinos Venetsanopoulos | [es_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`], |
81 | 376631d1 | Constantinos Venetsanopoulos | [es_search_path="'/srv/ganeti/extstorage'"]) |
82 | 376631d1 | Constantinos Venetsanopoulos | AC_SUBST(ES_SEARCH_PATH, $es_search_path) |
83 | 376631d1 | Constantinos Venetsanopoulos | |
84 | 298fe380 | Iustin Pop | # --with-iallocator-search-path=... |
85 | 298fe380 | Iustin Pop | # do a bit of black sed magic to for quoting of the strings in the list |
86 | 298fe380 | Iustin Pop | AC_ARG_WITH([iallocator-search-path], |
87 | 298fe380 | Iustin Pop | [AS_HELP_STRING([--with-iallocator-search-path=LIST], |
88 | 298fe380 | Iustin Pop | [comma separated list of directories to] |
89 | 298fe380 | Iustin Pop | [ search for instance allocators (default is $libdir/ganeti/iallocators)] |
90 | 298fe380 | Iustin Pop | )], |
91 | 298fe380 | Iustin Pop | [iallocator_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`], |
92 | 298fe380 | Iustin Pop | [iallocator_search_path="'$libdir/$PACKAGE_NAME/iallocators'"]) |
93 | 298fe380 | Iustin Pop | AC_SUBST(IALLOCATOR_SEARCH_PATH, $iallocator_search_path) |
94 | 298fe380 | Iustin Pop | |
95 | 2f2dbb4b | Jun Futagawa | # --with-xen-bootloader=... |
96 | 2f2dbb4b | Jun Futagawa | AC_ARG_WITH([xen-bootloader], |
97 | 2f2dbb4b | Jun Futagawa | [AS_HELP_STRING([--with-xen-bootloader=PATH], |
98 | 2f2dbb4b | Jun Futagawa | [bootloader for Xen hypervisor (default is empty)] |
99 | 2f2dbb4b | Jun Futagawa | )], |
100 | 2f2dbb4b | Jun Futagawa | [xen_bootloader="$withval"], |
101 | 2f2dbb4b | Jun Futagawa | [xen_bootloader=]) |
102 | 2f2dbb4b | Jun Futagawa | AC_SUBST(XEN_BOOTLOADER, $xen_bootloader) |
103 | 2f2dbb4b | Jun Futagawa | |
104 | f00b46bc | Michael Hanselmann | # --with-xen-kernel=... |
105 | f00b46bc | Michael Hanselmann | AC_ARG_WITH([xen-kernel], |
106 | f00b46bc | Michael Hanselmann | [AS_HELP_STRING([--with-xen-kernel=PATH], |
107 | b8203e1e | Iustin Pop | [DomU kernel image for Xen hypervisor (default is /boot/vmlinuz-3-xenU)] |
108 | f00b46bc | Michael Hanselmann | )], |
109 | f00b46bc | Michael Hanselmann | [xen_kernel="$withval"], |
110 | b8203e1e | Iustin Pop | [xen_kernel="/boot/vmlinuz-3-xenU"]) |
111 | f00b46bc | Michael Hanselmann | AC_SUBST(XEN_KERNEL, $xen_kernel) |
112 | f00b46bc | Michael Hanselmann | |
113 | f00b46bc | Michael Hanselmann | # --with-xen-initrd=... |
114 | f00b46bc | Michael Hanselmann | AC_ARG_WITH([xen-initrd], |
115 | f00b46bc | Michael Hanselmann | [AS_HELP_STRING([--with-xen-initrd=PATH], |
116 | b8203e1e | Iustin Pop | [DomU initrd image for Xen hypervisor (default is /boot/initrd-3-xenU)] |
117 | f00b46bc | Michael Hanselmann | )], |
118 | f00b46bc | Michael Hanselmann | [xen_initrd="$withval"], |
119 | b8203e1e | Iustin Pop | [xen_initrd="/boot/initrd-3-xenU"]) |
120 | f00b46bc | Michael Hanselmann | AC_SUBST(XEN_INITRD, $xen_initrd) |
121 | f00b46bc | Michael Hanselmann | |
122 | b8203e1e | Iustin Pop | # --with-kvm-kernel=... |
123 | b8203e1e | Iustin Pop | AC_ARG_WITH([kvm-kernel], |
124 | b8203e1e | Iustin Pop | [AS_HELP_STRING([--with-kvm-kernel=PATH], |
125 | b8203e1e | Iustin Pop | [Guest kernel image for KVM hypervisor (default is /boot/vmlinuz-3-kvmU)] |
126 | b8203e1e | Iustin Pop | )], |
127 | b8203e1e | Iustin Pop | [kvm_kernel="$withval"], |
128 | b8203e1e | Iustin Pop | [kvm_kernel="/boot/vmlinuz-3-kvmU"]) |
129 | b8203e1e | Iustin Pop | AC_SUBST(KVM_KERNEL, $kvm_kernel) |
130 | b8203e1e | Iustin Pop | |
131 | 4b97f902 | Apollon Oikonomopoulos | # --with-shared-file-storage-dir=... |
132 | 4b97f902 | Apollon Oikonomopoulos | AC_ARG_WITH([shared-file-storage-dir], |
133 | 4b97f902 | Apollon Oikonomopoulos | [AS_HELP_STRING([--with-shared-file-storage-dir=PATH], |
134 | 4b97f902 | Apollon Oikonomopoulos | [directory to store files for shared file-based backend] |
135 | 4b97f902 | Apollon Oikonomopoulos | [ (default is /srv/ganeti/shared-file-storage)] |
136 | 4b97f902 | Apollon Oikonomopoulos | )], |
137 | 4b97f902 | Apollon Oikonomopoulos | [[shared_file_storage_dir="$withval"; |
138 | 4b97f902 | Apollon Oikonomopoulos | if test "$withval" != no; then |
139 | 4b97f902 | Apollon Oikonomopoulos | enable_shared_file_storage=True |
140 | 4b97f902 | Apollon Oikonomopoulos | else |
141 | 4b97f902 | Apollon Oikonomopoulos | enable_shared_file_storage=False |
142 | 4b97f902 | Apollon Oikonomopoulos | fi |
143 | 4b97f902 | Apollon Oikonomopoulos | ]], |
144 | 30841576 | Michael Hanselmann | [[shared_file_storage_dir="/srv/ganeti/shared-file-storage"; |
145 | 52fca4ba | Michael Hanselmann | enable_shared_file_storage=True]]) |
146 | 4b97f902 | Apollon Oikonomopoulos | AC_SUBST(SHARED_FILE_STORAGE_DIR, $shared_file_storage_dir) |
147 | 4b97f902 | Apollon Oikonomopoulos | AC_SUBST(ENABLE_SHARED_FILE_STORAGE, $enable_shared_file_storage) |
148 | 4b97f902 | Apollon Oikonomopoulos | |
149 | 7e2c5b9e | Guido Trotter | # --with-kvm-path=... |
150 | 7e2c5b9e | Guido Trotter | AC_ARG_WITH([kvm-path], |
151 | 7e2c5b9e | Guido Trotter | [AS_HELP_STRING([--with-kvm-path=PATH], |
152 | 7e2c5b9e | Guido Trotter | [absolute path to the kvm binary] |
153 | 7e2c5b9e | Guido Trotter | [ (default is /usr/bin/kvm)] |
154 | 7e2c5b9e | Guido Trotter | )], |
155 | 7e2c5b9e | Guido Trotter | [kvm_path="$withval"], |
156 | 7e2c5b9e | Guido Trotter | [kvm_path="/usr/bin/kvm"]) |
157 | 7e2c5b9e | Guido Trotter | AC_SUBST(KVM_PATH, $kvm_path) |
158 | 7e2c5b9e | Guido Trotter | |
159 | 89b70f39 | Iustin Pop | # --with-lvm-stripecount=... |
160 | 3736cb6b | Iustin Pop | AC_ARG_WITH([lvm-stripecount], |
161 | 3736cb6b | Iustin Pop | [AS_HELP_STRING([--with-lvm-stripecount=NUM], |
162 | 43e11798 | Andrea Spadaccini | [the default number of stripes to use for LVM volumes] |
163 | 7b3ac94d | Iustin Pop | [ (default is 1)] |
164 | 3736cb6b | Iustin Pop | )], |
165 | 3736cb6b | Iustin Pop | [lvm_stripecount="$withval"], |
166 | 52fca4ba | Michael Hanselmann | [lvm_stripecount=1]) |
167 | 3736cb6b | Iustin Pop | AC_SUBST(LVM_STRIPECOUNT, $lvm_stripecount) |
168 | 3736cb6b | Iustin Pop | |
169 | 052783ff | Michael Hanselmann | # --with-ssh-login-user=... |
170 | 052783ff | Michael Hanselmann | AC_ARG_WITH([ssh-login-user], |
171 | 052783ff | Michael Hanselmann | [AS_HELP_STRING([--with-ssh-login-user=USERNAME], |
172 | 052783ff | Michael Hanselmann | [user to use for SSH logins within the cluster (default is root)] |
173 | 052783ff | Michael Hanselmann | )], |
174 | 052783ff | Michael Hanselmann | [ssh_login_user="$withval"], |
175 | 052783ff | Michael Hanselmann | [ssh_login_user=root]) |
176 | 052783ff | Michael Hanselmann | AC_SUBST(SSH_LOGIN_USER, $ssh_login_user) |
177 | 052783ff | Michael Hanselmann | |
178 | 052783ff | Michael Hanselmann | # --with-ssh-console-user=... |
179 | 052783ff | Michael Hanselmann | AC_ARG_WITH([ssh-console-user], |
180 | 052783ff | Michael Hanselmann | [AS_HELP_STRING([--with-ssh-console-user=USERNAME], |
181 | 052783ff | Michael Hanselmann | [user to use for SSH logins to access instance consoles (default is root)] |
182 | 052783ff | Michael Hanselmann | )], |
183 | 052783ff | Michael Hanselmann | [ssh_console_user="$withval"], |
184 | 052783ff | Michael Hanselmann | [ssh_console_user=root]) |
185 | 052783ff | Michael Hanselmann | AC_SUBST(SSH_CONSOLE_USER, $ssh_console_user) |
186 | 052783ff | Michael Hanselmann | |
187 | a6798ce1 | Michael Hanselmann | # --with-default-user=... |
188 | a6798ce1 | Michael Hanselmann | AC_ARG_WITH([default-user], |
189 | a6798ce1 | Michael Hanselmann | [AS_HELP_STRING([--with-default-user=USERNAME], |
190 | a6798ce1 | Michael Hanselmann | [default user for daemons] |
191 | a6798ce1 | Michael Hanselmann | [ (default is to run all daemons as root)] |
192 | a6798ce1 | Michael Hanselmann | )], |
193 | a6798ce1 | Michael Hanselmann | [user_default="$withval"], |
194 | a6798ce1 | Michael Hanselmann | [user_default=root]) |
195 | a6798ce1 | Michael Hanselmann | |
196 | a6798ce1 | Michael Hanselmann | # --with-default-group=... |
197 | a6798ce1 | Michael Hanselmann | AC_ARG_WITH([default-group], |
198 | a6798ce1 | Michael Hanselmann | [AS_HELP_STRING([--with-default-group=GROUPNAME], |
199 | a6798ce1 | Michael Hanselmann | [default group for daemons] |
200 | a6798ce1 | Michael Hanselmann | [ (default is to run all daemons under group root)] |
201 | a6798ce1 | Michael Hanselmann | )], |
202 | a6798ce1 | Michael Hanselmann | [group_default="$withval"], |
203 | a6798ce1 | Michael Hanselmann | [group_default=root]) |
204 | a6798ce1 | Michael Hanselmann | |
205 | 0d150c50 | René Nussbaumer | # --with-user-prefix=... |
206 | 0d150c50 | René Nussbaumer | AC_ARG_WITH([user-prefix], |
207 | 0d150c50 | René Nussbaumer | [AS_HELP_STRING([--with-user-prefix=PREFIX], |
208 | 0d150c50 | René Nussbaumer | [prefix for daemon users] |
209 | a6798ce1 | Michael Hanselmann | [ (default is to run all daemons as root; use --with-default-user] |
210 | a6798ce1 | Michael Hanselmann | [ to change the default)] |
211 | 0d150c50 | René Nussbaumer | )], |
212 | 3794937c | René Nussbaumer | [user_masterd="${withval}masterd"; |
213 | 0d150c50 | René Nussbaumer | user_rapi="${withval}rapi"; |
214 | 3794937c | René Nussbaumer | user_confd="${withval}confd"; |
215 | 3695a4e0 | Thomas Thrainer | user_luxid="${withval}luxid"; |
216 | 14013e5d | Michele Tartara | user_noded="$user_default"; |
217 | ebcbcfee | Michele Tartara | user_mond="$user_default"], |
218 | a6798ce1 | Michael Hanselmann | [user_masterd="$user_default"; |
219 | a6798ce1 | Michael Hanselmann | user_rapi="$user_default"; |
220 | a6798ce1 | Michael Hanselmann | user_confd="$user_default"; |
221 | 3695a4e0 | Thomas Thrainer | user_luxid="$user_default"; |
222 | 14013e5d | Michele Tartara | user_noded="$user_default"; |
223 | 14013e5d | Michele Tartara | user_mond="$user_default"]) |
224 | 0d150c50 | René Nussbaumer | AC_SUBST(MASTERD_USER, $user_masterd) |
225 | 0d150c50 | René Nussbaumer | AC_SUBST(RAPI_USER, $user_rapi) |
226 | 0d150c50 | René Nussbaumer | AC_SUBST(CONFD_USER, $user_confd) |
227 | 3695a4e0 | Thomas Thrainer | AC_SUBST(LUXID_USER, $user_luxid) |
228 | 0d150c50 | René Nussbaumer | AC_SUBST(NODED_USER, $user_noded) |
229 | 14013e5d | Michele Tartara | AC_SUBST(MOND_USER, $user_mond) |
230 | 0d150c50 | René Nussbaumer | |
231 | 0d150c50 | René Nussbaumer | # --with-group-prefix=... |
232 | 0d150c50 | René Nussbaumer | AC_ARG_WITH([group-prefix], |
233 | 0d150c50 | René Nussbaumer | [AS_HELP_STRING([--with-group-prefix=PREFIX], |
234 | 0d150c50 | René Nussbaumer | [prefix for daemon POSIX groups] |
235 | a6798ce1 | Michael Hanselmann | [ (default is to run all daemons under group root; use] |
236 | a6798ce1 | Michael Hanselmann | [ --with-default-group to change the default)] |
237 | 0d150c50 | René Nussbaumer | )], |
238 | 3794937c | René Nussbaumer | [group_rapi="${withval}rapi"; |
239 | 3794937c | René Nussbaumer | group_admin="${withval}admin"; |
240 | 3794937c | René Nussbaumer | group_confd="${withval}confd"; |
241 | 3695a4e0 | Thomas Thrainer | group_luxid="${withval}luxid"; |
242 | 3794937c | René Nussbaumer | group_masterd="${withval}masterd"; |
243 | a6798ce1 | Michael Hanselmann | group_noded="$group_default"; |
244 | 14013e5d | Michele Tartara | group_daemons="${withval}daemons"; |
245 | ebcbcfee | Michele Tartara | group_mond="$group_default"], |
246 | a6798ce1 | Michael Hanselmann | [group_rapi="$group_default"; |
247 | a6798ce1 | Michael Hanselmann | group_admin="$group_default"; |
248 | a6798ce1 | Michael Hanselmann | group_confd="$group_default"; |
249 | 3695a4e0 | Thomas Thrainer | group_luxid="$group_default"; |
250 | a6798ce1 | Michael Hanselmann | group_masterd="$group_default"; |
251 | a6798ce1 | Michael Hanselmann | group_noded="$group_default"; |
252 | 14013e5d | Michele Tartara | group_daemons="$group_default"; |
253 | 14013e5d | Michele Tartara | group_mond="$group_default"]) |
254 | 0d150c50 | René Nussbaumer | AC_SUBST(RAPI_GROUP, $group_rapi) |
255 | 0d150c50 | René Nussbaumer | AC_SUBST(ADMIN_GROUP, $group_admin) |
256 | 0d150c50 | René Nussbaumer | AC_SUBST(CONFD_GROUP, $group_confd) |
257 | 3695a4e0 | Thomas Thrainer | AC_SUBST(LUXID_GROUP, $group_luxid) |
258 | 0d150c50 | René Nussbaumer | AC_SUBST(MASTERD_GROUP, $group_masterd) |
259 | 03881cb0 | René Nussbaumer | AC_SUBST(NODED_GROUP, $group_noded) |
260 | 0d150c50 | René Nussbaumer | AC_SUBST(DAEMONS_GROUP, $group_daemons) |
261 | 14013e5d | Michele Tartara | AC_SUBST(MOND_GROUP, $group_mond) |
262 | 0d150c50 | René Nussbaumer | |
263 | 0d150c50 | René Nussbaumer | # Print the config to the user |
264 | 0d150c50 | René Nussbaumer | AC_MSG_NOTICE([Running ganeti-masterd as $group_masterd:$group_masterd]) |
265 | 0d150c50 | René Nussbaumer | AC_MSG_NOTICE([Running ganeti-rapi as $user_rapi:$group_rapi]) |
266 | 0d150c50 | René Nussbaumer | AC_MSG_NOTICE([Running ganeti-confd as $user_confd:$group_confd]) |
267 | 3695a4e0 | Thomas Thrainer | AC_MSG_NOTICE([Running ganeti-luxid as $user_luxid:$group_luxid]) |
268 | 0d150c50 | René Nussbaumer | AC_MSG_NOTICE([Group for daemons is $group_daemons]) |
269 | 0d150c50 | René Nussbaumer | AC_MSG_NOTICE([Group for clients is $group_admin]) |
270 | 0d150c50 | René Nussbaumer | |
271 | 89b70f39 | Iustin Pop | # --enable-drbd-barriers |
272 | 89b70f39 | Iustin Pop | AC_ARG_ENABLE([drbd-barriers], |
273 | 89b70f39 | Iustin Pop | [AS_HELP_STRING([--enable-drbd-barriers], |
274 | 52fca4ba | Michael Hanselmann | m4_normalize([enable the DRBD barriers functionality by |
275 | 52fca4ba | Michael Hanselmann | default (>= 8.0.12) (default: enabled)]))], |
276 | 89b70f39 | Iustin Pop | [[if test "$enableval" != no; then |
277 | 8a69b3a8 | Andrea Spadaccini | DRBD_BARRIERS=n |
278 | 8a69b3a8 | Andrea Spadaccini | DRBD_NO_META_FLUSH=False |
279 | 89b70f39 | Iustin Pop | else |
280 | 15618b63 | Michael Hanselmann | DRBD_BARRIERS=bf |
281 | 8a69b3a8 | Andrea Spadaccini | DRBD_NO_META_FLUSH=True |
282 | 89b70f39 | Iustin Pop | fi |
283 | 89b70f39 | Iustin Pop | ]], |
284 | 8a69b3a8 | Andrea Spadaccini | [DRBD_BARRIERS=n |
285 | 8a69b3a8 | Andrea Spadaccini | DRBD_NO_META_FLUSH=False |
286 | 8a69b3a8 | Andrea Spadaccini | ]) |
287 | 89b70f39 | Iustin Pop | AC_SUBST(DRBD_BARRIERS, $DRBD_BARRIERS) |
288 | 8a69b3a8 | Andrea Spadaccini | AC_SUBST(DRBD_NO_META_FLUSH, $DRBD_NO_META_FLUSH) |
289 | 89b70f39 | Iustin Pop | |
290 | 551b6283 | Iustin Pop | # --enable-syslog[=no/yes/only] |
291 | 551b6283 | Iustin Pop | AC_ARG_ENABLE([syslog], |
292 | 551b6283 | Iustin Pop | [AS_HELP_STRING([--enable-syslog], |
293 | 551b6283 | Iustin Pop | [enable use of syslog (default: disabled), one of no/yes/only])], |
294 | 551b6283 | Iustin Pop | [[case "$enableval" in |
295 | 551b6283 | Iustin Pop | no) |
296 | 551b6283 | Iustin Pop | SYSLOG=no |
297 | 551b6283 | Iustin Pop | ;; |
298 | 551b6283 | Iustin Pop | yes) |
299 | 551b6283 | Iustin Pop | SYSLOG=yes |
300 | 551b6283 | Iustin Pop | ;; |
301 | 551b6283 | Iustin Pop | only) |
302 | 551b6283 | Iustin Pop | SYSLOG=only |
303 | 551b6283 | Iustin Pop | ;; |
304 | 551b6283 | Iustin Pop | *) |
305 | 551b6283 | Iustin Pop | SYSLOG= |
306 | 551b6283 | Iustin Pop | ;; |
307 | 551b6283 | Iustin Pop | esac |
308 | 551b6283 | Iustin Pop | ]], |
309 | 551b6283 | Iustin Pop | [SYSLOG=no]) |
310 | 551b6283 | Iustin Pop | |
311 | 551b6283 | Iustin Pop | if test -z "$SYSLOG" |
312 | 551b6283 | Iustin Pop | then |
313 | 551b6283 | Iustin Pop | AC_MSG_ERROR([invalid value for syslog, choose one of no/yes/only]) |
314 | 551b6283 | Iustin Pop | fi |
315 | 551b6283 | Iustin Pop | AC_SUBST(SYSLOG_USAGE, $SYSLOG) |
316 | 551b6283 | Iustin Pop | |
317 | 1fdeb284 | Michael Hanselmann | AC_ARG_ENABLE([restricted-commands], |
318 | 1fdeb284 | Michael Hanselmann | [AS_HELP_STRING([--enable-restricted-commands], |
319 | 1fdeb284 | Michael Hanselmann | m4_normalize([enable restricted commands in the node daemon |
320 | 9108958f | Michael Hanselmann | (default: disabled)]))], |
321 | 9108958f | Michael Hanselmann | [[if test "$enableval" = no; then |
322 | 1fdeb284 | Michael Hanselmann | enable_restricted_commands=False |
323 | 9108958f | Michael Hanselmann | else |
324 | 1fdeb284 | Michael Hanselmann | enable_restricted_commands=True |
325 | 9108958f | Michael Hanselmann | fi |
326 | 9108958f | Michael Hanselmann | ]], |
327 | 1fdeb284 | Michael Hanselmann | [enable_restricted_commands=False]) |
328 | 1fdeb284 | Michael Hanselmann | AC_SUBST(ENABLE_RESTRICTED_COMMANDS, $enable_restricted_commands) |
329 | 9108958f | Michael Hanselmann | |
330 | 3536c792 | Iustin Pop | # --with-disk-separator=... |
331 | 3536c792 | Iustin Pop | AC_ARG_WITH([disk-separator], |
332 | 3536c792 | Iustin Pop | [AS_HELP_STRING([--with-disk-separator=STRING], |
333 | 30841576 | Michael Hanselmann | [Disk index separator, useful if the default of ':' is handled] |
334 | 30841576 | Michael Hanselmann | [ specially by the hypervisor] |
335 | 3536c792 | Iustin Pop | )], |
336 | 3536c792 | Iustin Pop | [disk_separator="$withval"], |
337 | 3536c792 | Iustin Pop | [disk_separator=":"]) |
338 | 3536c792 | Iustin Pop | AC_SUBST(DISK_SEPARATOR, $disk_separator) |
339 | 3536c792 | Iustin Pop | |
340 | a5d17f9f | Michael Hanselmann | # Check common programs |
341 | a8083063 | Iustin Pop | AC_PROG_INSTALL |
342 | 9ff7e35c | Michael Hanselmann | AC_PROG_LN_S |
343 | a8083063 | Iustin Pop | |
344 | c4dfb0b6 | Andrea Spadaccini | # Check for the ip command |
345 | c4dfb0b6 | Andrea Spadaccini | AC_ARG_VAR(IP_PATH, [ip path]) |
346 | c4dfb0b6 | Andrea Spadaccini | AC_PATH_PROG(IP_PATH, [ip], []) |
347 | c4dfb0b6 | Andrea Spadaccini | if test -z "$IP_PATH" |
348 | c4dfb0b6 | Andrea Spadaccini | then |
349 | c4dfb0b6 | Andrea Spadaccini | AC_MSG_ERROR([ip command not found]) |
350 | c4dfb0b6 | Andrea Spadaccini | fi |
351 | c4dfb0b6 | Andrea Spadaccini | |
352 | 18e2b6e4 | Iustin Pop | # Check for pandoc |
353 | 5208e732 | Iustin Pop | AC_ARG_VAR(PANDOC, [pandoc path]) |
354 | 5208e732 | Iustin Pop | AC_PATH_PROG(PANDOC, [pandoc], []) |
355 | 5208e732 | Iustin Pop | if test -z "$PANDOC" |
356 | 5208e732 | Iustin Pop | then |
357 | 5208e732 | Iustin Pop | AC_MSG_WARN([pandoc not found, man pages rebuild will not be possible]) |
358 | 5208e732 | Iustin Pop | fi |
359 | 5208e732 | Iustin Pop | |
360 | d17e74b4 | Iustin Pop | # Check for python-sphinx |
361 | d17e74b4 | Iustin Pop | AC_ARG_VAR(SPHINX, [sphinx-build path]) |
362 | d17e74b4 | Iustin Pop | AC_PATH_PROG(SPHINX, [sphinx-build], []) |
363 | d17e74b4 | Iustin Pop | if test -z "$SPHINX" |
364 | f05c99f3 | Michael Hanselmann | then |
365 | 30841576 | Michael Hanselmann | AC_MSG_WARN(m4_normalize([sphinx-build not found, documentation rebuild will |
366 | 30841576 | Michael Hanselmann | not be possible])) |
367 | 96b28307 | Michael Hanselmann | else |
368 | 96b28307 | Michael Hanselmann | # Sphinx exits with code 1 when it prints its usage |
369 | 96b28307 | Michael Hanselmann | sphinxver=`{ $SPHINX --version 2>&1 || :; } | head -n 3` |
370 | 96b28307 | Michael Hanselmann | |
371 | 96b28307 | Michael Hanselmann | if ! echo "$sphinxver" | grep -q -w -e '^Sphinx' -e '^Usage:'; then |
372 | 96b28307 | Michael Hanselmann | AC_MSG_ERROR([Unable to determine Sphinx version]) |
373 | 96b28307 | Michael Hanselmann | |
374 | 96b28307 | Michael Hanselmann | # Note: Character classes ([...]) need to be double quoted due to autoconf |
375 | 96b28307 | Michael Hanselmann | # using m4 |
376 | 96b28307 | Michael Hanselmann | elif ! echo "$sphinxver" | grep -q -E '^Sphinx[[[:space:]]]+v[[1-9]]\>'; then |
377 | 96b28307 | Michael Hanselmann | AC_MSG_ERROR([Sphinx 1.0 or higher is required]) |
378 | 96b28307 | Michael Hanselmann | fi |
379 | f05c99f3 | Michael Hanselmann | fi |
380 | f05c99f3 | Michael Hanselmann | |
381 | 41806ef4 | Michael Hanselmann | AC_ARG_ENABLE([manpages-in-doc], |
382 | 41806ef4 | Michael Hanselmann | [AS_HELP_STRING([--enable-manpages-in-doc], |
383 | 41806ef4 | Michael Hanselmann | m4_normalize([include man pages in HTML documentation |
384 | 41806ef4 | Michael Hanselmann | (requires sphinx; default disabled)]))], |
385 | 41806ef4 | Michael Hanselmann | [case "$enableval" in |
386 | 41806ef4 | Michael Hanselmann | yes) manpages_in_doc=yes ;; |
387 | 41806ef4 | Michael Hanselmann | no) manpages_in_doc= ;; |
388 | 41806ef4 | Michael Hanselmann | *) |
389 | 41806ef4 | Michael Hanselmann | AC_MSG_ERROR([Bad value $enableval for --enable-manpages-in-doc]) |
390 | 41806ef4 | Michael Hanselmann | ;; |
391 | 41806ef4 | Michael Hanselmann | esac |
392 | 41806ef4 | Michael Hanselmann | ], |
393 | 41806ef4 | Michael Hanselmann | [manpages_in_doc=]) |
394 | 41806ef4 | Michael Hanselmann | AM_CONDITIONAL([MANPAGES_IN_DOC], [test -n "$manpages_in_doc"]) |
395 | 41806ef4 | Michael Hanselmann | AC_SUBST(MANPAGES_IN_DOC, $manpages_in_doc) |
396 | 41806ef4 | Michael Hanselmann | |
397 | 41806ef4 | Michael Hanselmann | if test -z "$SPHINX" -a -n "$manpages_in_doc"; then |
398 | 41806ef4 | Michael Hanselmann | AC_MSG_ERROR([Including man pages in HTML documentation requires sphinx]) |
399 | 41806ef4 | Michael Hanselmann | fi |
400 | 41806ef4 | Michael Hanselmann | |
401 | f86e82ef | Iustin Pop | # Check for graphviz (dot) |
402 | f86e82ef | Iustin Pop | AC_ARG_VAR(DOT, [dot path]) |
403 | f86e82ef | Iustin Pop | AC_PATH_PROG(DOT, [dot], []) |
404 | f86e82ef | Iustin Pop | if test -z "$DOT" |
405 | f86e82ef | Iustin Pop | then |
406 | 30841576 | Michael Hanselmann | AC_MSG_WARN(m4_normalize([dot (from the graphviz suite) not found, |
407 | 30841576 | Michael Hanselmann | documentation rebuild not possible])) |
408 | f86e82ef | Iustin Pop | fi |
409 | f86e82ef | Iustin Pop | |
410 | 6d7cc5ff | Michael Hanselmann | # Check for pylint |
411 | 6d7cc5ff | Michael Hanselmann | AC_ARG_VAR(PYLINT, [pylint path]) |
412 | 6d7cc5ff | Michael Hanselmann | AC_PATH_PROG(PYLINT, [pylint], []) |
413 | 6d7cc5ff | Michael Hanselmann | if test -z "$PYLINT" |
414 | 6d7cc5ff | Michael Hanselmann | then |
415 | 6d7cc5ff | Michael Hanselmann | AC_MSG_WARN([pylint not found, checking code will not be possible]) |
416 | 6d7cc5ff | Michael Hanselmann | fi |
417 | 6d7cc5ff | Michael Hanselmann | |
418 | 08366664 | Michael Hanselmann | # Check for pep8 |
419 | 08366664 | Michael Hanselmann | AC_ARG_VAR(PEP8, [pep8 path]) |
420 | 08366664 | Michael Hanselmann | AC_PATH_PROG(PEP8, [pep8], []) |
421 | 08366664 | Michael Hanselmann | if test -z "$PEP8" |
422 | 08366664 | Michael Hanselmann | then |
423 | 08366664 | Michael Hanselmann | AC_MSG_WARN([pep8 not found, checking code will not be complete]) |
424 | 08366664 | Michael Hanselmann | fi |
425 | 141c8421 | Michael Hanselmann | AM_CONDITIONAL([HAS_PEP8], [test -n "$PEP8"]) |
426 | 141c8421 | Michael Hanselmann | |
427 | 141c8421 | Michael Hanselmann | # Check for python-coverage |
428 | 141c8421 | Michael Hanselmann | AC_ARG_VAR(PYCOVERAGE, [python-coverage path]) |
429 | 141c8421 | Michael Hanselmann | AC_PATH_PROGS(PYCOVERAGE, [python-coverage coverage], []) |
430 | 141c8421 | Michael Hanselmann | if test -z "$PYCOVERAGE" |
431 | 141c8421 | Michael Hanselmann | then |
432 | 141c8421 | Michael Hanselmann | AC_MSG_WARN(m4_normalize([python-coverage or coverage not found, evaluating |
433 | 141c8421 | Michael Hanselmann | Python test coverage will not be possible])) |
434 | 141c8421 | Michael Hanselmann | fi |
435 | 08366664 | Michael Hanselmann | |
436 | fe5b0c42 | Michael Hanselmann | # Check for socat |
437 | fe5b0c42 | Michael Hanselmann | AC_ARG_VAR(SOCAT, [socat path]) |
438 | fe5b0c42 | Michael Hanselmann | AC_PATH_PROG(SOCAT, [socat], []) |
439 | 87c1d0c7 | Guido Trotter | if test -z "$SOCAT" |
440 | 87c1d0c7 | Guido Trotter | then |
441 | fe5b0c42 | Michael Hanselmann | AC_MSG_ERROR([socat not found]) |
442 | 87c1d0c7 | Guido Trotter | fi |
443 | 87c1d0c7 | Guido Trotter | |
444 | a002ed79 | Agata Murawska | # Check for qemu-img |
445 | a002ed79 | Agata Murawska | AC_ARG_VAR(QEMUIMG_PATH, [qemu-img path]) |
446 | a002ed79 | Agata Murawska | AC_PATH_PROG(QEMUIMG_PATH, [qemu-img], []) |
447 | a002ed79 | Agata Murawska | if test -z "$QEMUIMG_PATH" |
448 | a002ed79 | Agata Murawska | then |
449 | a002ed79 | Agata Murawska | AC_MSG_WARN([qemu-img not found, using ovfconverter will not be possible]) |
450 | a002ed79 | Agata Murawska | fi |
451 | a002ed79 | Agata Murawska | |
452 | 21a5e56c | Iustin Pop | # --enable-confd |
453 | 21a5e56c | Iustin Pop | ENABLE_CONFD= |
454 | 21a5e56c | Iustin Pop | AC_ARG_ENABLE([confd], |
455 | 21a5e56c | Iustin Pop | [AS_HELP_STRING([--enable-confd], |
456 | 21a5e56c | Iustin Pop | [enable the ganeti-confd daemon (default: check)])], |
457 | 21a5e56c | Iustin Pop | [], |
458 | 21a5e56c | Iustin Pop | [enable_confd=check]) |
459 | acf70442 | Iustin Pop | |
460 | 14013e5d | Michele Tartara | ENABLE_MOND= |
461 | 35c6e63d | Michele Tartara | AC_ARG_ENABLE([monitoring], |
462 | 35c6e63d | Michele Tartara | [AS_HELP_STRING([--enable-monitoring], |
463 | 13cc7b84 | Michele Tartara | [enable the ganeti monitoring daemon (default: check)])], |
464 | 35c6e63d | Michele Tartara | [], |
465 | 35c6e63d | Michele Tartara | [enable_monitoring=check]) |
466 | 35c6e63d | Michele Tartara | |
467 | e5bd9de5 | Iustin Pop | # Check for ghc |
468 | e5bd9de5 | Iustin Pop | AC_ARG_VAR(GHC, [ghc path]) |
469 | e5bd9de5 | Iustin Pop | AC_PATH_PROG(GHC, [ghc], []) |
470 | e5bd9de5 | Iustin Pop | if test -z "$GHC"; then |
471 | 21a5e56c | Iustin Pop | AC_MSG_FAILURE([ghc not found, compilation will not possible]) |
472 | e5bd9de5 | Iustin Pop | fi |
473 | e5bd9de5 | Iustin Pop | |
474 | 39f0eea5 | Iustin Pop | AC_MSG_CHECKING([checking for extra GHC flags]) |
475 | 52fca4ba | Michael Hanselmann | GHC_BYVERSION_FLAGS= |
476 | 39f0eea5 | Iustin Pop | # check for GHC supported flags that vary accross versions |
477 | 39f0eea5 | Iustin Pop | for flag in -fwarn-incomplete-uni-patterns; do |
478 | 52fca4ba | Michael Hanselmann | if $GHC -e '0' $flag >/dev/null 2>/dev/null; then |
479 | 39f0eea5 | Iustin Pop | GHC_BYVERSION_FLAGS="$GHC_BYVERSION_FLAGS $flag" |
480 | 39f0eea5 | Iustin Pop | fi |
481 | 39f0eea5 | Iustin Pop | done |
482 | 39f0eea5 | Iustin Pop | AC_MSG_RESULT($GHC_BYVERSION_FLAGS) |
483 | 39f0eea5 | Iustin Pop | AC_SUBST(GHC_BYVERSION_FLAGS) |
484 | 39f0eea5 | Iustin Pop | |
485 | e5bd9de5 | Iustin Pop | # Check for ghc-pkg |
486 | e5bd9de5 | Iustin Pop | AC_ARG_VAR(GHC_PKG, [ghc-pkg path]) |
487 | e5bd9de5 | Iustin Pop | AC_PATH_PROG(GHC_PKG, [ghc-pkg], []) |
488 | e5bd9de5 | Iustin Pop | if test -z "$GHC_PKG"; then |
489 | 21a5e56c | Iustin Pop | AC_MSG_FAILURE([ghc-pkg not found, compilation will not be possible]) |
490 | 21a5e56c | Iustin Pop | fi |
491 | 21a5e56c | Iustin Pop | |
492 | 21a5e56c | Iustin Pop | # check for modules, first custom/special checks |
493 | 21a5e56c | Iustin Pop | AC_MSG_NOTICE([checking for required haskell modules]) |
494 | d9a900dc | Iustin Pop | HS_PARALLEL3= |
495 | d9a900dc | Iustin Pop | AC_GHC_PKG_CHECK([parallel-3.*], [HS_PARALLEL3=-DPARALLEL3], |
496 | 21a5e56c | Iustin Pop | [AC_GHC_PKG_REQUIRE(parallel)], t) |
497 | d9a900dc | Iustin Pop | AC_SUBST(HS_PARALLEL3) |
498 | 21a5e56c | Iustin Pop | |
499 | 21a5e56c | Iustin Pop | # and now standard modules |
500 | 1ca709c1 | Iustin Pop | AC_GHC_PKG_REQUIRE(curl) |
501 | 21a5e56c | Iustin Pop | AC_GHC_PKG_REQUIRE(json) |
502 | 21a5e56c | Iustin Pop | AC_GHC_PKG_REQUIRE(network) |
503 | 21a5e56c | Iustin Pop | AC_GHC_PKG_REQUIRE(mtl) |
504 | 21a5e56c | Iustin Pop | AC_GHC_PKG_REQUIRE(bytestring) |
505 | 21a5e56c | Iustin Pop | AC_GHC_PKG_REQUIRE(utf8-string) |
506 | 21a5e56c | Iustin Pop | |
507 | 21a5e56c | Iustin Pop | # extra modules for confd functionality |
508 | d9a900dc | Iustin Pop | HS_REGEX_PCRE=-DNO_REGEX_PCRE |
509 | 21a5e56c | Iustin Pop | has_confd=False |
510 | 52fca4ba | Michael Hanselmann | if test "$enable_confd" != no; then |
511 | 21a5e56c | Iustin Pop | CONFD_PKG= |
512 | d9a900dc | Iustin Pop | AC_GHC_PKG_CHECK([regex-pcre], [HS_REGEX_PCRE=], |
513 | 21a5e56c | Iustin Pop | [CONFD_PKG="$CONFD_PKG regex-pcre"]) |
514 | 21a5e56c | Iustin Pop | AC_GHC_PKG_CHECK([hslogger], [], [CONFD_PKG="$CONFD_PKG hslogger"]) |
515 | 21a5e56c | Iustin Pop | AC_GHC_PKG_CHECK([Crypto], [], [CONFD_PKG="$CONFD_PKG Crypto"]) |
516 | 21a5e56c | Iustin Pop | AC_GHC_PKG_CHECK([text], [], [CONFD_PKG="$CONFD_PKG text"]) |
517 | 21a5e56c | Iustin Pop | AC_GHC_PKG_CHECK([hinotify], [], [CONFD_PKG="$CONFD_PKG hinotify"]) |
518 | 432d62a8 | Helga Velroyen | AC_GHC_PKG_CHECK([vector], [], [CONFD_PKG="$CONFD_PKG vector"]) |
519 | 21a5e56c | Iustin Pop | if test -z "$CONFD_PKG"; then |
520 | 21a5e56c | Iustin Pop | has_confd=True |
521 | 52fca4ba | Michael Hanselmann | elif test "$enable_confd" = check; then |
522 | 52fca4ba | Michael Hanselmann | AC_MSG_WARN(m4_normalize([The required extra libraries for confd were |
523 | 52fca4ba | Michael Hanselmann | not found ($CONFD_PKG), confd disabled])) |
524 | e5bd9de5 | Iustin Pop | else |
525 | 52fca4ba | Michael Hanselmann | AC_MSG_FAILURE(m4_normalize([The confd functionality was requested, but |
526 | 52fca4ba | Michael Hanselmann | required libraries were not found: |
527 | 52fca4ba | Michael Hanselmann | $CONFD_PKG])) |
528 | e5bd9de5 | Iustin Pop | fi |
529 | e5bd9de5 | Iustin Pop | fi |
530 | d9a900dc | Iustin Pop | AC_SUBST(HS_REGEX_PCRE) |
531 | 52fca4ba | Michael Hanselmann | if test "$has_confd" = True; then |
532 | 21a5e56c | Iustin Pop | AC_MSG_NOTICE([Enabling confd usage]) |
533 | 21a5e56c | Iustin Pop | fi |
534 | 21a5e56c | Iustin Pop | AC_SUBST(ENABLE_CONFD, $has_confd) |
535 | 21a5e56c | Iustin Pop | AM_CONDITIONAL([ENABLE_CONFD], [test x$has_confd = xTrue]) |
536 | 21a5e56c | Iustin Pop | |
537 | 13cc7b84 | Michele Tartara | #extra modules for monitoring daemon functionality |
538 | 35c6e63d | Michele Tartara | has_monitoring=False |
539 | 52fca4ba | Michael Hanselmann | if test "$enable_monitoring" != no; then |
540 | 35c6e63d | Michele Tartara | MONITORING_PKG= |
541 | 52fca4ba | Michael Hanselmann | AC_GHC_PKG_CHECK([attoparsec], [], |
542 | 52fca4ba | Michael Hanselmann | [MONITORING_PKG="$MONITORING_PKG attoparsec"]) |
543 | 13cc7b84 | Michele Tartara | AC_GHC_PKG_CHECK([snap-server], [], |
544 | 13cc7b84 | Michele Tartara | [MONITORING_PKG="$MONITORING_PKG snap-server"]) |
545 | 74685117 | Michele Tartara | AC_GHC_PKG_CHECK([process], [], |
546 | 74685117 | Michele Tartara | [MONITORING_PKG="$MONITORING_PKG process"]) |
547 | 5d453688 | Michele Tartara | MONITORING_DEP= |
548 | 5d453688 | Michele Tartara | if test "$has_confd" = False; then |
549 | 5d453688 | Michele Tartara | MONITORING_DEP="$MONITORING_DEP confd" |
550 | 5d453688 | Michele Tartara | fi |
551 | 5d453688 | Michele Tartara | has_monitoring_pkg=False |
552 | 35c6e63d | Michele Tartara | if test -z "$MONITORING_PKG"; then |
553 | 5d453688 | Michele Tartara | has_monitoring_pkg=True |
554 | 52fca4ba | Michael Hanselmann | elif test "$enable_monitoring" = check; then |
555 | 52fca4ba | Michael Hanselmann | AC_MSG_WARN(m4_normalize([The required extra libraries for the monitoring |
556 | 13cc7b84 | Michele Tartara | daemon were not found ($MONITORING_PKG), |
557 | 52fca4ba | Michael Hanselmann | monitoring disabled])) |
558 | 35c6e63d | Michele Tartara | else |
559 | 52fca4ba | Michael Hanselmann | AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but |
560 | 52fca4ba | Michael Hanselmann | required libraries were not found: |
561 | 52fca4ba | Michael Hanselmann | $MONITORING_PKG])) |
562 | 35c6e63d | Michele Tartara | fi |
563 | 5d453688 | Michele Tartara | has_monitoring_dep=False |
564 | 5d453688 | Michele Tartara | if test -z "$MONITORING_DEP"; then |
565 | 5d453688 | Michele Tartara | has_monitoring_dep=True |
566 | 5d453688 | Michele Tartara | elif test "$enable_monitoring" = check; then |
567 | 5d453688 | Michele Tartara | AC_MSG_WARN(m4_normalize([The optional Ganeti components required for the |
568 | 5d453688 | Michele Tartara | monitoring agent were not enabled |
569 | 5d453688 | Michele Tartara | ($MONITORING_DEP), monitoring disabled])) |
570 | 5d453688 | Michele Tartara | else |
571 | 5d453688 | Michele Tartara | AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but |
572 | 5d453688 | Michele Tartara | required optional Ganeti components were not |
573 | 5d453688 | Michele Tartara | found: $MONITORING_DEP])) |
574 | 5d453688 | Michele Tartara | fi |
575 | 5d453688 | Michele Tartara | |
576 | 35c6e63d | Michele Tartara | fi |
577 | 5d453688 | Michele Tartara | if test "$has_monitoring_pkg" = True -a "$has_monitoring_dep" = True; then |
578 | 5d453688 | Michele Tartara | has_monitoring=True |
579 | 35c6e63d | Michele Tartara | AC_MSG_NOTICE([Enabling the monitoring agent usage]) |
580 | 35c6e63d | Michele Tartara | fi |
581 | 14013e5d | Michele Tartara | AC_SUBST(ENABLE_MOND, $has_monitoring) |
582 | 14013e5d | Michele Tartara | AM_CONDITIONAL([ENABLE_MOND], [test "$has_monitoring" = True]) |
583 | 35c6e63d | Michele Tartara | |
584 | 21a5e56c | Iustin Pop | # development modules |
585 | d9a900dc | Iustin Pop | HS_NODEV= |
586 | d9a900dc | Iustin Pop | AC_GHC_PKG_CHECK([QuickCheck-2.*], [], [HS_NODEV=1], t) |
587 | d9a900dc | Iustin Pop | AC_GHC_PKG_CHECK([test-framework-0.6*], [], [HS_NODEV=1], t) |
588 | d9a900dc | Iustin Pop | AC_GHC_PKG_CHECK([test-framework-hunit], [], [HS_NODEV=1]) |
589 | d9a900dc | Iustin Pop | AC_GHC_PKG_CHECK([test-framework-quickcheck2], [], [HS_NODEV=1]) |
590 | d9a900dc | Iustin Pop | AC_GHC_PKG_CHECK([temporary], [], [HS_NODEV=1]) |
591 | 35c6e63d | Michele Tartara | # FIXME: unify checks for non-test libraries (attoparsec, hinotify, ...) |
592 | 35c6e63d | Michele Tartara | # that are needed to execute the tests, avoiding the duplication |
593 | 35c6e63d | Michele Tartara | # of the checks. |
594 | d9a900dc | Iustin Pop | AC_GHC_PKG_CHECK([attoparsec], [], [HS_NODEV=1]) |
595 | d9a900dc | Iustin Pop | AC_GHC_PKG_CHECK([vector], [], [HS_NODEV=1]) |
596 | 74685117 | Michele Tartara | AC_GHC_PKG_CHECK([process], [], |
597 | 74685117 | Michele Tartara | [MONITORING_PKG="$MONITORING_PKG process"]) |
598 | d9a900dc | Iustin Pop | if test -n "$HS_NODEV"; then |
599 | 21a5e56c | Iustin Pop | AC_MSG_WARN(m4_normalize([Required development modules were not found, |
600 | 21a5e56c | Iustin Pop | you won't be able to run Haskell unittests])) |
601 | 21a5e56c | Iustin Pop | else |
602 | 21a5e56c | Iustin Pop | AC_MSG_NOTICE([Haskell development modules found, unittests enabled]) |
603 | 21a5e56c | Iustin Pop | fi |
604 | d9a900dc | Iustin Pop | AC_SUBST(HS_NODEV) |
605 | 21a5e56c | Iustin Pop | |
606 | 21a5e56c | Iustin Pop | HTOOLS=yes |
607 | e5bd9de5 | Iustin Pop | AC_SUBST(HTOOLS) |
608 | e5bd9de5 | Iustin Pop | |
609 | 55837756 | Iustin Pop | # --enable-split-query |
610 | 55837756 | Iustin Pop | ENABLE_SPLIT_QUERY= |
611 | 55837756 | Iustin Pop | AC_ARG_ENABLE([split-query], |
612 | 55837756 | Iustin Pop | [AS_HELP_STRING([--enable-split-query], |
613 | 55837756 | Iustin Pop | [enable use of custom query daemon via confd])], |
614 | 55837756 | Iustin Pop | [[case "$enableval" in |
615 | 55837756 | Iustin Pop | no) |
616 | 55837756 | Iustin Pop | enable_split_query=False |
617 | 55837756 | Iustin Pop | ;; |
618 | 55837756 | Iustin Pop | yes) |
619 | 55837756 | Iustin Pop | enable_split_query=True |
620 | 55837756 | Iustin Pop | ;; |
621 | 55837756 | Iustin Pop | *) |
622 | 55837756 | Iustin Pop | echo "Invalid value for enable-confd '$enableval'" |
623 | 55837756 | Iustin Pop | exit 1 |
624 | 55837756 | Iustin Pop | ;; |
625 | 55837756 | Iustin Pop | esac |
626 | 55837756 | Iustin Pop | ]], |
627 | 1ca709c1 | Iustin Pop | [[case "x${has_confd}x" in |
628 | 1ca709c1 | Iustin Pop | xTruex) |
629 | 55837756 | Iustin Pop | enable_split_query=True |
630 | 55837756 | Iustin Pop | ;; |
631 | 55837756 | Iustin Pop | *) |
632 | 55837756 | Iustin Pop | enable_split_query=False |
633 | 55837756 | Iustin Pop | ;; |
634 | 55837756 | Iustin Pop | esac]]) |
635 | 55837756 | Iustin Pop | AC_SUBST(ENABLE_SPLIT_QUERY, $enable_split_query) |
636 | 55837756 | Iustin Pop | |
637 | 21a5e56c | Iustin Pop | if test x$enable_split_query = xTrue -a x$has_confd != xTrue; then |
638 | 55837756 | Iustin Pop | AC_MSG_ERROR([Split queries require the confd daemon]) |
639 | 55837756 | Iustin Pop | fi |
640 | 55837756 | Iustin Pop | |
641 | 55837756 | Iustin Pop | if test x$enable_split_query = xTrue; then |
642 | 55837756 | Iustin Pop | AC_MSG_NOTICE([Split query functionality enabled]) |
643 | 55837756 | Iustin Pop | fi |
644 | 55837756 | Iustin Pop | |
645 | e5bd9de5 | Iustin Pop | # Check for HsColour |
646 | d9a900dc | Iustin Pop | HS_APIDOC=no |
647 | e5bd9de5 | Iustin Pop | AC_ARG_VAR(HSCOLOUR, [HsColour path]) |
648 | e5bd9de5 | Iustin Pop | AC_PATH_PROG(HSCOLOUR, [HsColour], []) |
649 | e5bd9de5 | Iustin Pop | if test -z "$HSCOLOUR"; then |
650 | 30841576 | Michael Hanselmann | AC_MSG_WARN(m4_normalize([HsColour not found, htools API documentation will |
651 | 30841576 | Michael Hanselmann | not be generated])) |
652 | e5bd9de5 | Iustin Pop | fi |
653 | e5bd9de5 | Iustin Pop | |
654 | e5bd9de5 | Iustin Pop | # Check for haddock |
655 | e5bd9de5 | Iustin Pop | AC_ARG_VAR(HADDOCK, [haddock path]) |
656 | e5bd9de5 | Iustin Pop | AC_PATH_PROG(HADDOCK, [haddock], []) |
657 | e5bd9de5 | Iustin Pop | if test -z "$HADDOCK"; then |
658 | 30841576 | Michael Hanselmann | AC_MSG_WARN(m4_normalize([haddock not found, htools API documentation will |
659 | 30841576 | Michael Hanselmann | not be generated])) |
660 | e5bd9de5 | Iustin Pop | fi |
661 | 52fca4ba | Michael Hanselmann | if test -n "$HADDOCK" && test -n "$HSCOLOUR"; then |
662 | d9a900dc | Iustin Pop | HS_APIDOC=yes |
663 | e5bd9de5 | Iustin Pop | fi |
664 | d9a900dc | Iustin Pop | AC_SUBST(HS_APIDOC) |
665 | e5bd9de5 | Iustin Pop | |
666 | 6e4c8f68 | Iustin Pop | # Check for hlint |
667 | 6e4c8f68 | Iustin Pop | AC_ARG_VAR(HLINT, [hlint path]) |
668 | 6e4c8f68 | Iustin Pop | AC_PATH_PROG(HLINT, [hlint], []) |
669 | 6e4c8f68 | Iustin Pop | if test -z "$HLINT"; then |
670 | 6e4c8f68 | Iustin Pop | AC_MSG_WARN([hlint not found, checking code will not be possible]) |
671 | 6e4c8f68 | Iustin Pop | fi |
672 | 6e4c8f68 | Iustin Pop | |
673 | 52fca4ba | Michael Hanselmann | if test "$HTOOLS" != yes && test "$ENABLE_CONFD" = True; then |
674 | 52fca4ba | Michael Hanselmann | AC_MSG_ERROR(m4_normalize([cannot enable ganeti-confd if |
675 | 52fca4ba | Michael Hanselmann | htools support is not enabled])) |
676 | 73b0fa69 | Iustin Pop | fi |
677 | 73b0fa69 | Iustin Pop | |
678 | 52fca4ba | Michael Hanselmann | AM_CONDITIONAL([WANT_HTOOLS], [test "$HTOOLS" = yes]) |
679 | d9a900dc | Iustin Pop | AM_CONDITIONAL([WANT_HSTESTS], [test "x$HS_NODEV" = x]) |
680 | d9a900dc | Iustin Pop | AM_CONDITIONAL([WANT_HSAPIDOC], [test "$HS_APIDOC" = yes]) |
681 | 6e4c8f68 | Iustin Pop | AM_CONDITIONAL([HAS_HLINT], [test "$HLINT"]) |
682 | e5bd9de5 | Iustin Pop | |
683 | 70041061 | Bernardo Dal Seno | # Check for fakeroot |
684 | 70041061 | Bernardo Dal Seno | AC_ARG_VAR(FAKEROOT_PATH, [fakeroot path]) |
685 | 70041061 | Bernardo Dal Seno | AC_PATH_PROG(FAKEROOT_PATH, [fakeroot], []) |
686 | 70041061 | Bernardo Dal Seno | if test -z "$FAKEROOT_PATH"; then |
687 | 70041061 | Bernardo Dal Seno | AC_MSG_WARN(m4_normalize([fakeroot not found, tests that must run as root |
688 | 70041061 | Bernardo Dal Seno | will not be executed])) |
689 | 70041061 | Bernardo Dal Seno | fi |
690 | 70041061 | Bernardo Dal Seno | AM_CONDITIONAL([HAS_FAKEROOT], [test "x$FAKEROOT_PATH" != x]) |
691 | 70041061 | Bernardo Dal Seno | |
692 | fe5b0c42 | Michael Hanselmann | SOCAT_USE_ESCAPE= |
693 | fe5b0c42 | Michael Hanselmann | AC_ARG_ENABLE([socat-escape], |
694 | fe5b0c42 | Michael Hanselmann | [AS_HELP_STRING([--enable-socat-escape], |
695 | fe5b0c42 | Michael Hanselmann | [use escape functionality available in socat >= 1.7 (default: detect |
696 | fe5b0c42 | Michael Hanselmann | automatically)])], |
697 | fe5b0c42 | Michael Hanselmann | [[if test "$enableval" = yes; then |
698 | fe5b0c42 | Michael Hanselmann | SOCAT_USE_ESCAPE=True |
699 | fe5b0c42 | Michael Hanselmann | else |
700 | fe5b0c42 | Michael Hanselmann | SOCAT_USE_ESCAPE=False |
701 | fe5b0c42 | Michael Hanselmann | fi |
702 | fe5b0c42 | Michael Hanselmann | ]]) |
703 | fe5b0c42 | Michael Hanselmann | |
704 | fe5b0c42 | Michael Hanselmann | if test -z "$SOCAT_USE_ESCAPE" |
705 | 87c1d0c7 | Guido Trotter | then |
706 | fe5b0c42 | Michael Hanselmann | if $SOCAT -hh | grep -w -q escape; then |
707 | fe5b0c42 | Michael Hanselmann | SOCAT_USE_ESCAPE=True |
708 | fe5b0c42 | Michael Hanselmann | else |
709 | fe5b0c42 | Michael Hanselmann | SOCAT_USE_ESCAPE=False |
710 | fe5b0c42 | Michael Hanselmann | fi |
711 | 87c1d0c7 | Guido Trotter | fi |
712 | 87c1d0c7 | Guido Trotter | |
713 | fe5b0c42 | Michael Hanselmann | AC_SUBST(SOCAT_USE_ESCAPE) |
714 | fe5b0c42 | Michael Hanselmann | |
715 | e90739d6 | Michael Hanselmann | SOCAT_USE_COMPRESS= |
716 | e90739d6 | Michael Hanselmann | AC_ARG_ENABLE([socat-compress], |
717 | e90739d6 | Michael Hanselmann | [AS_HELP_STRING([--enable-socat-compress], |
718 | e90739d6 | Michael Hanselmann | [use OpenSSL compression option available in patched socat builds |
719 | e90739d6 | Michael Hanselmann | (see INSTALL for details; default: detect automatically)])], |
720 | e90739d6 | Michael Hanselmann | [[if test "$enableval" = yes; then |
721 | e90739d6 | Michael Hanselmann | SOCAT_USE_COMPRESS=True |
722 | e90739d6 | Michael Hanselmann | else |
723 | e90739d6 | Michael Hanselmann | SOCAT_USE_COMPRESS=False |
724 | e90739d6 | Michael Hanselmann | fi |
725 | e90739d6 | Michael Hanselmann | ]]) |
726 | e90739d6 | Michael Hanselmann | |
727 | e90739d6 | Michael Hanselmann | if test -z "$SOCAT_USE_COMPRESS" |
728 | e90739d6 | Michael Hanselmann | then |
729 | e90739d6 | Michael Hanselmann | if $SOCAT -hhh | grep -w -q openssl-compress; then |
730 | e90739d6 | Michael Hanselmann | SOCAT_USE_COMPRESS=True |
731 | e90739d6 | Michael Hanselmann | else |
732 | e90739d6 | Michael Hanselmann | SOCAT_USE_COMPRESS=False |
733 | e90739d6 | Michael Hanselmann | fi |
734 | e90739d6 | Michael Hanselmann | fi |
735 | e90739d6 | Michael Hanselmann | |
736 | e90739d6 | Michael Hanselmann | AC_SUBST(SOCAT_USE_COMPRESS) |
737 | e90739d6 | Michael Hanselmann | |
738 | 5f55173b | Iustin Pop | if man --help | grep -q -e --warnings |
739 | 5f55173b | Iustin Pop | then |
740 | 5f55173b | Iustin Pop | MAN_HAS_WARNINGS=1 |
741 | 5f55173b | Iustin Pop | else |
742 | 5f55173b | Iustin Pop | MAN_HAS_WARNINGS= |
743 | 30841576 | Michael Hanselmann | AC_MSG_WARN(m4_normalize([man does not support --warnings, man page checks |
744 | 30841576 | Michael Hanselmann | will not be possible])) |
745 | 5f55173b | Iustin Pop | fi |
746 | 5f55173b | Iustin Pop | |
747 | 5f55173b | Iustin Pop | AC_SUBST(MAN_HAS_WARNINGS) |
748 | 5f55173b | Iustin Pop | |
749 | a5d17f9f | Michael Hanselmann | # Check for Python |
750 | 777ea2c6 | Guido Trotter | AM_PATH_PYTHON(2.6) |
751 | a8083063 | Iustin Pop | |
752 | 6e06b36c | Iustin Pop | AC_PYTHON_MODULE(OpenSSL, t) |
753 | 6e06b36c | Iustin Pop | AC_PYTHON_MODULE(simplejson, t) |
754 | 6e06b36c | Iustin Pop | AC_PYTHON_MODULE(pyparsing, t) |
755 | 0f18ee6d | Guido Trotter | AC_PYTHON_MODULE(pyinotify, t) |
756 | 28af40c8 | Guido Trotter | AC_PYTHON_MODULE(pycurl, t) |
757 | 0a09b080 | Michael Hanselmann | AC_PYTHON_MODULE(bitarray, t) |
758 | 0a09b080 | Michael Hanselmann | AC_PYTHON_MODULE(ipaddr, t) |
759 | 7a694e30 | Thomas Thrainer | AC_PYTHON_MODULE(mock) |
760 | 4f6396fd | Iustin Pop | AC_PYTHON_MODULE(affinity) |
761 | a40b1fc4 | René Nussbaumer | AC_PYTHON_MODULE(paramiko) |
762 | a40b1fc4 | René Nussbaumer | |
763 | 27df5b73 | Michele Tartara | # Development-only Python modules |
764 | 27df5b73 | Michele Tartara | PY_NODEV= |
765 | 27df5b73 | Michele Tartara | AC_PYTHON_MODULE(yaml) |
766 | 27df5b73 | Michele Tartara | if test $HAVE_PYMOD_YAML == "no"; then |
767 | 27df5b73 | Michele Tartara | PY_NODEV="$PY_NODEV yaml" |
768 | 27df5b73 | Michele Tartara | fi |
769 | 27df5b73 | Michele Tartara | |
770 | 27df5b73 | Michele Tartara | if test -n "$PY_NODEV"; then |
771 | 27df5b73 | Michele Tartara | AC_MSG_WARN(m4_normalize([Required development modules ($PY_NODEV) were not |
772 | 27df5b73 | Michele Tartara | found, you won't be able to run Python unittests])) |
773 | 27df5b73 | Michele Tartara | else |
774 | d14d93b0 | Helga Velroyen | AC_MSG_NOTICE([Python development modules found, unittests enabled]) |
775 | 27df5b73 | Michele Tartara | fi |
776 | 27df5b73 | Michele Tartara | AC_SUBST(PY_NODEV) |
777 | d14d93b0 | Helga Velroyen | AM_CONDITIONAL([PY_UNIT], [test -n $PY_NODEV]) |
778 | 27df5b73 | Michele Tartara | |
779 | e8230860 | Michael Hanselmann | AC_CONFIG_FILES([ Makefile ]) |
780 | 3571f686 | Iustin Pop | |
781 | a8083063 | Iustin Pop | AC_OUTPUT |