1 # Configure script for Ganeti
2 m4_define([gnt_version_major], [2])
3 m4_define([gnt_version_minor], [10])
4 m4_define([gnt_version_revision], [0])
5 m4_define([gnt_version_suffix], [~alpha1])
6 m4_define([gnt_version_full],
7 m4_format([%d.%d.%d%s],
8 gnt_version_major, gnt_version_minor,
9 gnt_version_revision, gnt_version_suffix))
12 AC_INIT(ganeti, gnt_version_full, ganeti@googlegroups.com)
13 AC_CONFIG_AUX_DIR(autotools)
14 AC_CONFIG_SRCDIR(configure)
15 AM_INIT_AUTOMAKE([1.9 foreign tar-ustar -Wall -Wno-portability])
17 AC_SUBST([VERSION_MAJOR], gnt_version_major)
18 AC_SUBST([VERSION_MINOR], gnt_version_minor)
19 AC_SUBST([VERSION_REVISION], gnt_version_revision)
20 AC_SUBST([VERSION_SUFFIX], gnt_version_suffix)
21 AC_SUBST([VERSION_FULL], gnt_version_full)
24 AC_ARG_ENABLE([symlinks],
25 [AS_HELP_STRING([--enable-symlinks],
26 m4_normalize([also install symlinks under $PREFIX pointing
27 into the Ganeti package directory (default: enabled)]))],
28 [[if test "$enableval" != no; then
36 AC_SUBST(INSTALL_SYMLINKS, $INSTALL_SYMLINKS)
37 AM_CONDITIONAL([INSTALL_SYMLINKS], [test "$INSTALL_SYMLINKS" = yes])
39 # --with-ssh-initscript=...
40 AC_ARG_WITH([ssh-initscript],
41 [AS_HELP_STRING([--with-ssh-initscript=SCRIPT],
42 [SSH init script to use (default is /etc/init.d/ssh)]
44 [ssh_initd_script="$withval"],
45 [ssh_initd_script="/etc/init.d/ssh"])
46 AC_SUBST(SSH_INITD_SCRIPT, $ssh_initd_script)
48 # --with-export-dir=...
49 AC_ARG_WITH([export-dir],
50 [AS_HELP_STRING([--with-export-dir=DIR],
51 [directory to use by default for instance image]
52 [ exports (default is /srv/ganeti/export)]
54 [export_dir="$withval"],
55 [export_dir="/srv/ganeti/export"])
56 AC_SUBST(EXPORT_DIR, $export_dir)
58 # --with-ssh-config-dir=...
59 AC_ARG_WITH([ssh-config-dir],
60 [AS_HELP_STRING([--with-ssh-config-dir=DIR],
61 [ directory with ssh host keys ]
62 [ (default is /etc/ssh)]
64 [ssh_config_dir="$withval"],
65 [ssh_config_dir="/etc/ssh"])
66 AC_SUBST(SSH_CONFIG_DIR, $ssh_config_dir)
68 # --with-xen-config-dir=...
69 AC_ARG_WITH([xen-config-dir],
70 [AS_HELP_STRING([--with-xen-config-dir=DIR],
71 m4_normalize([Xen configuration directory
72 (default: /etc/xen)]))],
73 [xen_config_dir="$withval"],
74 [xen_config_dir=/etc/xen])
75 AC_SUBST(XEN_CONFIG_DIR, $xen_config_dir)
77 # --with-os-search-path=...
78 # do a bit of black sed magic to for quoting of the strings in the list
79 AC_ARG_WITH([os-search-path],
80 [AS_HELP_STRING([--with-os-search-path=LIST],
81 [comma separated list of directories to]
82 [ search for OS images (default is /srv/ganeti/os)]
84 [os_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`],
85 [os_search_path="'/srv/ganeti/os'"])
86 AC_SUBST(OS_SEARCH_PATH, $os_search_path)
88 # --with-extstorage-search-path=...
89 # same black sed magic for quoting of the strings in the list
90 AC_ARG_WITH([extstorage-search-path],
91 [AS_HELP_STRING([--with-extstorage-search-path=LIST],
92 [comma separated list of directories to]
93 [ search for External Storage Providers]
94 [ (default is /srv/ganeti/extstorage)]
96 [es_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`],
97 [es_search_path="'/srv/ganeti/extstorage'"])
98 AC_SUBST(ES_SEARCH_PATH, $es_search_path)
100 # --with-iallocator-search-path=...
101 # do a bit of black sed magic to for quoting of the strings in the list
102 AC_ARG_WITH([iallocator-search-path],
103 [AS_HELP_STRING([--with-iallocator-search-path=LIST],
104 [comma separated list of directories to]
105 [ search for instance allocators (default is $libdir/ganeti/iallocators)]
107 [iallocator_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`],
108 [iallocator_search_path="'$libdir/$PACKAGE_NAME/iallocators'"])
109 AC_SUBST(IALLOCATOR_SEARCH_PATH, $iallocator_search_path)
111 # --with-xen-bootloader=...
112 AC_ARG_WITH([xen-bootloader],
113 [AS_HELP_STRING([--with-xen-bootloader=PATH],
114 [bootloader for Xen hypervisor (default is empty)]
116 [xen_bootloader="$withval"],
118 AC_SUBST(XEN_BOOTLOADER, $xen_bootloader)
120 # --with-xen-kernel=...
121 AC_ARG_WITH([xen-kernel],
122 [AS_HELP_STRING([--with-xen-kernel=PATH],
123 [DomU kernel image for Xen hypervisor (default is /boot/vmlinuz-3-xenU)]
125 [xen_kernel="$withval"],
126 [xen_kernel="/boot/vmlinuz-3-xenU"])
127 AC_SUBST(XEN_KERNEL, $xen_kernel)
129 # --with-xen-initrd=...
130 AC_ARG_WITH([xen-initrd],
131 [AS_HELP_STRING([--with-xen-initrd=PATH],
132 [DomU initrd image for Xen hypervisor (default is /boot/initrd-3-xenU)]
134 [xen_initrd="$withval"],
135 [xen_initrd="/boot/initrd-3-xenU"])
136 AC_SUBST(XEN_INITRD, $xen_initrd)
138 # --with-kvm-kernel=...
139 AC_ARG_WITH([kvm-kernel],
140 [AS_HELP_STRING([--with-kvm-kernel=PATH],
141 [Guest kernel image for KVM hypervisor (default is /boot/vmlinuz-3-kvmU)]
143 [kvm_kernel="$withval"],
144 [kvm_kernel="/boot/vmlinuz-3-kvmU"])
145 AC_SUBST(KVM_KERNEL, $kvm_kernel)
147 # --with-shared-file-storage-dir=...
148 AC_ARG_WITH([shared-file-storage-dir],
149 [AS_HELP_STRING([--with-shared-file-storage-dir=PATH],
150 [directory to store files for shared file-based backend]
151 [ (default is /srv/ganeti/shared-file-storage)]
153 [[shared_file_storage_dir="/srv/ganeti/shared-file-storage"]])
154 AC_SUBST(SHARED_FILE_STORAGE_DIR, $shared_file_storage_dir)
156 # --with-kvm-path=...
157 AC_ARG_WITH([kvm-path],
158 [AS_HELP_STRING([--with-kvm-path=PATH],
159 [absolute path to the kvm binary]
160 [ (default is /usr/bin/kvm)]
162 [kvm_path="$withval"],
163 [kvm_path="/usr/bin/kvm"])
164 AC_SUBST(KVM_PATH, $kvm_path)
166 # --with-lvm-stripecount=...
167 AC_ARG_WITH([lvm-stripecount],
168 [AS_HELP_STRING([--with-lvm-stripecount=NUM],
169 [the default number of stripes to use for LVM volumes]
172 [lvm_stripecount="$withval"],
174 AC_SUBST(LVM_STRIPECOUNT, $lvm_stripecount)
176 # --with-ssh-login-user=...
177 AC_ARG_WITH([ssh-login-user],
178 [AS_HELP_STRING([--with-ssh-login-user=USERNAME],
179 [user to use for SSH logins within the cluster (default is root)]
181 [ssh_login_user="$withval"],
182 [ssh_login_user=root])
183 AC_SUBST(SSH_LOGIN_USER, $ssh_login_user)
185 # --with-ssh-console-user=...
186 AC_ARG_WITH([ssh-console-user],
187 [AS_HELP_STRING([--with-ssh-console-user=USERNAME],
188 [user to use for SSH logins to access instance consoles (default is root)]
190 [ssh_console_user="$withval"],
191 [ssh_console_user=root])
192 AC_SUBST(SSH_CONSOLE_USER, $ssh_console_user)
194 # --with-default-user=...
195 AC_ARG_WITH([default-user],
196 [AS_HELP_STRING([--with-default-user=USERNAME],
197 [default user for daemons]
198 [ (default is to run all daemons as root)]
200 [user_default="$withval"],
203 # --with-default-group=...
204 AC_ARG_WITH([default-group],
205 [AS_HELP_STRING([--with-default-group=GROUPNAME],
206 [default group for daemons]
207 [ (default is to run all daemons under group root)]
209 [group_default="$withval"],
210 [group_default=root])
212 # --with-user-prefix=...
213 AC_ARG_WITH([user-prefix],
214 [AS_HELP_STRING([--with-user-prefix=PREFIX],
215 [prefix for daemon users]
216 [ (default is to run all daemons as root; use --with-default-user]
217 [ to change the default)]
219 [user_masterd="${withval}masterd";
220 user_rapi="${withval}rapi";
221 user_confd="${withval}confd";
222 user_luxid="${withval}luxid";
223 user_noded="$user_default";
224 user_mond="$user_default"],
225 [user_masterd="$user_default";
226 user_rapi="$user_default";
227 user_confd="$user_default";
228 user_luxid="$user_default";
229 user_noded="$user_default";
230 user_mond="$user_default"])
231 AC_SUBST(MASTERD_USER, $user_masterd)
232 AC_SUBST(RAPI_USER, $user_rapi)
233 AC_SUBST(CONFD_USER, $user_confd)
234 AC_SUBST(LUXID_USER, $user_luxid)
235 AC_SUBST(NODED_USER, $user_noded)
236 AC_SUBST(MOND_USER, $user_mond)
238 # --with-group-prefix=...
239 AC_ARG_WITH([group-prefix],
240 [AS_HELP_STRING([--with-group-prefix=PREFIX],
241 [prefix for daemon POSIX groups]
242 [ (default is to run all daemons under group root; use]
243 [ --with-default-group to change the default)]
245 [group_rapi="${withval}rapi";
246 group_admin="${withval}admin";
247 group_confd="${withval}confd";
248 group_luxid="${withval}luxid";
249 group_masterd="${withval}masterd";
250 group_noded="$group_default";
251 group_daemons="${withval}daemons";
252 group_mond="$group_default"],
253 [group_rapi="$group_default";
254 group_admin="$group_default";
255 group_confd="$group_default";
256 group_luxid="$group_default";
257 group_masterd="$group_default";
258 group_noded="$group_default";
259 group_daemons="$group_default";
260 group_mond="$group_default"])
261 AC_SUBST(RAPI_GROUP, $group_rapi)
262 AC_SUBST(ADMIN_GROUP, $group_admin)
263 AC_SUBST(CONFD_GROUP, $group_confd)
264 AC_SUBST(LUXID_GROUP, $group_luxid)
265 AC_SUBST(MASTERD_GROUP, $group_masterd)
266 AC_SUBST(NODED_GROUP, $group_noded)
267 AC_SUBST(DAEMONS_GROUP, $group_daemons)
268 AC_SUBST(MOND_GROUP, $group_mond)
270 # Print the config to the user
271 AC_MSG_NOTICE([Running ganeti-masterd as $group_masterd:$group_masterd])
272 AC_MSG_NOTICE([Running ganeti-rapi as $user_rapi:$group_rapi])
273 AC_MSG_NOTICE([Running ganeti-confd as $user_confd:$group_confd])
274 AC_MSG_NOTICE([Running ganeti-luxid as $user_luxid:$group_luxid])
275 AC_MSG_NOTICE([Group for daemons is $group_daemons])
276 AC_MSG_NOTICE([Group for clients is $group_admin])
278 # --enable-drbd-barriers
279 AC_ARG_ENABLE([drbd-barriers],
280 [AS_HELP_STRING([--enable-drbd-barriers],
281 m4_normalize([enable the DRBD barriers functionality by
282 default (>= 8.0.12) (default: enabled)]))],
283 [[if test "$enableval" != no; then
285 DRBD_NO_META_FLUSH=False
288 DRBD_NO_META_FLUSH=True
292 DRBD_NO_META_FLUSH=False
294 AC_SUBST(DRBD_BARRIERS, $DRBD_BARRIERS)
295 AC_SUBST(DRBD_NO_META_FLUSH, $DRBD_NO_META_FLUSH)
297 # --enable-syslog[=no/yes/only]
298 AC_ARG_ENABLE([syslog],
299 [AS_HELP_STRING([--enable-syslog],
300 [enable use of syslog (default: disabled), one of no/yes/only])],
301 [[case "$enableval" in
320 AC_MSG_ERROR([invalid value for syslog, choose one of no/yes/only])
322 AC_SUBST(SYSLOG_USAGE, $SYSLOG)
324 AC_ARG_ENABLE([restricted-commands],
325 [AS_HELP_STRING([--enable-restricted-commands],
326 m4_normalize([enable restricted commands in the node daemon
327 (default: disabled)]))],
328 [[if test "$enableval" = no; then
329 enable_restricted_commands=False
331 enable_restricted_commands=True
334 [enable_restricted_commands=False])
335 AC_SUBST(ENABLE_RESTRICTED_COMMANDS, $enable_restricted_commands)
337 # --with-disk-separator=...
338 AC_ARG_WITH([disk-separator],
339 [AS_HELP_STRING([--with-disk-separator=STRING],
340 [Disk index separator, useful if the default of ':' is handled]
341 [ specially by the hypervisor]
343 [disk_separator="$withval"],
344 [disk_separator=":"])
345 AC_SUBST(DISK_SEPARATOR, $disk_separator)
347 # Check common programs
351 # Check for the ip command
352 AC_ARG_VAR(IP_PATH, [ip path])
353 AC_PATH_PROG(IP_PATH, [ip], [])
354 if test -z "$IP_PATH"
356 AC_MSG_ERROR([ip command not found])
360 AC_ARG_VAR(PANDOC, [pandoc path])
361 AC_PATH_PROG(PANDOC, [pandoc], [])
364 AC_MSG_WARN([pandoc not found, man pages rebuild will not be possible])
367 # Check for python-sphinx
368 AC_ARG_VAR(SPHINX, [sphinx-build path])
369 AC_PATH_PROG(SPHINX, [sphinx-build], [])
372 AC_MSG_WARN(m4_normalize([sphinx-build not found, documentation rebuild will
375 # Sphinx exits with code 1 when it prints its usage
376 sphinxver=`{ $SPHINX --version 2>&1 || :; } | head -n 3`
378 if ! echo "$sphinxver" | grep -q -w -e '^Sphinx' -e '^Usage:'; then
379 AC_MSG_ERROR([Unable to determine Sphinx version])
381 # Note: Character classes ([...]) need to be double quoted due to autoconf
383 elif ! echo "$sphinxver" | grep -q -E '^Sphinx[[[:space:]]]+v[[1-9]]\>'; then
384 AC_MSG_ERROR([Sphinx 1.0 or higher is required])
387 AM_CONDITIONAL([HAS_SPHINX], [test -n "$SPHINX"])
389 AC_ARG_ENABLE([manpages-in-doc],
390 [AS_HELP_STRING([--enable-manpages-in-doc],
391 m4_normalize([include man pages in HTML documentation
392 (requires sphinx; default disabled)]))],
393 [case "$enableval" in
394 yes) manpages_in_doc=yes ;;
395 no) manpages_in_doc= ;;
397 AC_MSG_ERROR([Bad value $enableval for --enable-manpages-in-doc])
402 AM_CONDITIONAL([MANPAGES_IN_DOC], [test -n "$manpages_in_doc"])
403 AC_SUBST(MANPAGES_IN_DOC, $manpages_in_doc)
405 if test -z "$SPHINX" -a -n "$manpages_in_doc"; then
406 AC_MSG_ERROR([Including man pages in HTML documentation requires sphinx])
409 # Check for graphviz (dot)
410 AC_ARG_VAR(DOT, [dot path])
411 AC_PATH_PROG(DOT, [dot], [])
414 AC_MSG_WARN(m4_normalize([dot (from the graphviz suite) not found,
415 documentation rebuild not possible]))
419 AC_ARG_VAR(PYLINT, [pylint path])
420 AC_PATH_PROG(PYLINT, [pylint], [])
423 AC_MSG_WARN([pylint not found, checking code will not be possible])
427 AC_ARG_VAR(PEP8, [pep8 path])
428 AC_PATH_PROG(PEP8, [pep8], [])
431 AC_MSG_WARN([pep8 not found, checking code will not be complete])
433 AM_CONDITIONAL([HAS_PEP8], [test -n "$PEP8"])
435 # Check for python-coverage
436 AC_ARG_VAR(PYCOVERAGE, [python-coverage path])
437 AC_PATH_PROGS(PYCOVERAGE, [python-coverage coverage], [])
438 if test -z "$PYCOVERAGE"
440 AC_MSG_WARN(m4_normalize([python-coverage or coverage not found, evaluating
441 Python test coverage will not be possible]))
445 AC_ARG_VAR(SOCAT, [socat path])
446 AC_PATH_PROG(SOCAT, [socat], [])
449 AC_MSG_ERROR([socat not found])
453 AC_ARG_VAR(QEMUIMG_PATH, [qemu-img path])
454 AC_PATH_PROG(QEMUIMG_PATH, [qemu-img], [])
455 if test -z "$QEMUIMG_PATH"
457 AC_MSG_WARN([qemu-img not found, using ovfconverter will not be possible])
462 AC_ARG_ENABLE([confd],
463 [AS_HELP_STRING([--enable-confd],
464 [enable the ganeti-confd daemon (default: check)])],
466 [enable_confd=check])
469 AC_ARG_ENABLE([monitoring],
470 [AS_HELP_STRING([--enable-monitoring],
471 [enable the ganeti monitoring daemon (default: check)])],
473 [enable_monitoring=check])
476 AC_ARG_VAR(GHC, [ghc path])
477 AC_PATH_PROG(GHC, [ghc], [])
478 if test -z "$GHC"; then
479 AC_MSG_FAILURE([ghc not found, compilation will not possible])
482 AC_MSG_CHECKING([checking for extra GHC flags])
484 # check for GHC supported flags that vary accross versions
485 for flag in -fwarn-incomplete-uni-patterns; do
486 if $GHC -e '0' $flag >/dev/null 2>/dev/null; then
487 GHC_BYVERSION_FLAGS="$GHC_BYVERSION_FLAGS $flag"
490 AC_MSG_RESULT($GHC_BYVERSION_FLAGS)
491 AC_SUBST(GHC_BYVERSION_FLAGS)
494 AC_ARG_VAR(GHC_PKG, [ghc-pkg path])
495 AC_PATH_PROG(GHC_PKG, [ghc-pkg], [])
496 if test -z "$GHC_PKG"; then
497 AC_MSG_FAILURE([ghc-pkg not found, compilation will not be possible])
500 # check for modules, first custom/special checks
501 AC_MSG_NOTICE([checking for required haskell modules])
503 AC_GHC_PKG_CHECK([parallel-3.*], [HS_PARALLEL3=-DPARALLEL3],
504 [AC_GHC_PKG_REQUIRE(parallel)], t)
505 AC_SUBST(HS_PARALLEL3)
507 # and now standard modules
508 AC_GHC_PKG_REQUIRE(curl)
509 AC_GHC_PKG_REQUIRE(json)
510 AC_GHC_PKG_REQUIRE(network)
511 AC_GHC_PKG_REQUIRE(mtl)
512 AC_GHC_PKG_REQUIRE(bytestring)
513 AC_GHC_PKG_REQUIRE(utf8-string)
515 # extra modules for confd functionality
516 HS_REGEX_PCRE=-DNO_REGEX_PCRE
518 if test "$enable_confd" != no; then
520 AC_GHC_PKG_CHECK([regex-pcre], [HS_REGEX_PCRE=],
521 [CONFD_PKG="$CONFD_PKG regex-pcre"])
522 AC_GHC_PKG_CHECK([hslogger], [], [CONFD_PKG="$CONFD_PKG hslogger"])
523 AC_GHC_PKG_CHECK([Crypto], [], [CONFD_PKG="$CONFD_PKG Crypto"])
524 AC_GHC_PKG_CHECK([text], [], [CONFD_PKG="$CONFD_PKG text"])
525 AC_GHC_PKG_CHECK([hinotify], [], [CONFD_PKG="$CONFD_PKG hinotify"])
526 AC_GHC_PKG_CHECK([vector], [], [CONFD_PKG="$CONFD_PKG vector"])
527 if test -z "$CONFD_PKG"; then
529 elif test "$enable_confd" = check; then
530 AC_MSG_WARN(m4_normalize([The required extra libraries for confd were
531 not found ($CONFD_PKG), confd disabled]))
533 AC_MSG_FAILURE(m4_normalize([The confd functionality was requested, but
534 required libraries were not found:
538 AC_SUBST(HS_REGEX_PCRE)
539 if test "$has_confd" = True; then
540 AC_MSG_NOTICE([Enabling confd usage])
542 AC_SUBST(ENABLE_CONFD, $has_confd)
543 AM_CONDITIONAL([ENABLE_CONFD], [test x$has_confd = xTrue])
545 #extra modules for monitoring daemon functionality
547 if test "$enable_monitoring" != no; then
549 AC_GHC_PKG_CHECK([attoparsec], [],
550 [MONITORING_PKG="$MONITORING_PKG attoparsec"])
551 AC_GHC_PKG_CHECK([snap-server], [],
552 [MONITORING_PKG="$MONITORING_PKG snap-server"])
553 AC_GHC_PKG_CHECK([process], [],
554 [MONITORING_PKG="$MONITORING_PKG process"])
556 if test "$has_confd" = False; then
557 MONITORING_DEP="$MONITORING_DEP confd"
559 has_monitoring_pkg=False
560 if test -z "$MONITORING_PKG"; then
561 has_monitoring_pkg=True
562 elif test "$enable_monitoring" = check; then
563 AC_MSG_WARN(m4_normalize([The required extra libraries for the monitoring
564 daemon were not found ($MONITORING_PKG),
565 monitoring disabled]))
567 AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but
568 required libraries were not found:
571 has_monitoring_dep=False
572 if test -z "$MONITORING_DEP"; then
573 has_monitoring_dep=True
574 elif test "$enable_monitoring" = check; then
575 AC_MSG_WARN(m4_normalize([The optional Ganeti components required for the
576 monitoring agent were not enabled
577 ($MONITORING_DEP), monitoring disabled]))
579 AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but
580 required optional Ganeti components were not
581 found: $MONITORING_DEP]))
585 if test "$has_monitoring_pkg" = True -a "$has_monitoring_dep" = True; then
587 AC_MSG_NOTICE([Enabling the monitoring agent usage])
589 AC_SUBST(ENABLE_MOND, $has_monitoring)
590 AM_CONDITIONAL([ENABLE_MOND], [test "$has_monitoring" = True])
592 # development modules
594 AC_GHC_PKG_CHECK([QuickCheck-2.*], [], [HS_NODEV=1], t)
595 AC_GHC_PKG_CHECK([test-framework-0.6*], [], [HS_NODEV=1], t)
596 AC_GHC_PKG_CHECK([test-framework-hunit], [], [HS_NODEV=1])
597 AC_GHC_PKG_CHECK([test-framework-quickcheck2], [], [HS_NODEV=1])
598 AC_GHC_PKG_CHECK([temporary], [], [HS_NODEV=1])
599 # FIXME: unify checks for non-test libraries (attoparsec, hinotify, ...)
600 # that are needed to execute the tests, avoiding the duplication
602 AC_GHC_PKG_CHECK([attoparsec], [], [HS_NODEV=1])
603 AC_GHC_PKG_CHECK([vector], [], [HS_NODEV=1])
604 AC_GHC_PKG_CHECK([process], [],
605 [MONITORING_PKG="$MONITORING_PKG process"])
606 if test -n "$HS_NODEV"; then
607 AC_MSG_WARN(m4_normalize([Required development modules were not found,
608 you won't be able to run Haskell unittests]))
610 AC_MSG_NOTICE([Haskell development modules found, unittests enabled])
617 # --enable-split-query
619 AC_ARG_ENABLE([split-query],
620 [AS_HELP_STRING([--enable-split-query],
621 [enable use of custom query daemon via confd])],
622 [[case "$enableval" in
624 enable_split_query=False
627 enable_split_query=True
630 echo "Invalid value for enable-confd '$enableval'"
635 [[case "x${has_confd}x" in
637 enable_split_query=True
640 enable_split_query=False
643 AC_SUBST(ENABLE_SPLIT_QUERY, $enable_split_query)
645 if test x$enable_split_query = xTrue -a x$has_confd != xTrue; then
646 AC_MSG_ERROR([Split queries require the confd daemon])
649 if test x$enable_split_query = xTrue; then
650 AC_MSG_NOTICE([Split query functionality enabled])
655 AC_ARG_VAR(HSCOLOUR, [HsColour path])
656 AC_PATH_PROG(HSCOLOUR, [HsColour], [])
657 if test -z "$HSCOLOUR"; then
658 AC_MSG_WARN(m4_normalize([HsColour not found, htools API documentation will
663 AC_ARG_VAR(HADDOCK, [haddock path])
664 AC_PATH_PROG(HADDOCK, [haddock], [])
665 if test -z "$HADDOCK"; then
666 AC_MSG_WARN(m4_normalize([haddock not found, htools API documentation will
669 if test -n "$HADDOCK" && test -n "$HSCOLOUR"; then
675 AC_ARG_VAR(HLINT, [hlint path])
676 AC_PATH_PROG(HLINT, [hlint], [])
677 if test -z "$HLINT"; then
678 AC_MSG_WARN([hlint not found, checking code will not be possible])
681 if test "$HTOOLS" != yes && test "$ENABLE_CONFD" = True; then
682 AC_MSG_ERROR(m4_normalize([cannot enable ganeti-confd if
683 htools support is not enabled]))
686 AM_CONDITIONAL([WANT_HTOOLS], [test "$HTOOLS" = yes])
687 AM_CONDITIONAL([WANT_HSTESTS], [test "x$HS_NODEV" = x])
688 AM_CONDITIONAL([WANT_HSAPIDOC], [test "$HS_APIDOC" = yes])
689 AM_CONDITIONAL([HAS_HLINT], [test "$HLINT"])
692 AC_ARG_VAR(FAKEROOT_PATH, [fakeroot path])
693 AC_PATH_PROG(FAKEROOT_PATH, [fakeroot], [])
694 if test -z "$FAKEROOT_PATH"; then
695 AC_MSG_WARN(m4_normalize([fakeroot not found, tests that must run as root
696 will not be executed]))
698 AM_CONDITIONAL([HAS_FAKEROOT], [test "x$FAKEROOT_PATH" != x])
701 AC_ARG_ENABLE([socat-escape],
702 [AS_HELP_STRING([--enable-socat-escape],
703 [use escape functionality available in socat >= 1.7 (default: detect
705 [[if test "$enableval" = yes; then
706 SOCAT_USE_ESCAPE=True
708 SOCAT_USE_ESCAPE=False
712 if test -z "$SOCAT_USE_ESCAPE"
714 if $SOCAT -hh | grep -w -q escape; then
715 SOCAT_USE_ESCAPE=True
717 SOCAT_USE_ESCAPE=False
721 AC_SUBST(SOCAT_USE_ESCAPE)
724 AC_ARG_ENABLE([socat-compress],
725 [AS_HELP_STRING([--enable-socat-compress],
726 [use OpenSSL compression option available in patched socat builds
727 (see INSTALL for details; default: detect automatically)])],
728 [[if test "$enableval" = yes; then
729 SOCAT_USE_COMPRESS=True
731 SOCAT_USE_COMPRESS=False
735 if test -z "$SOCAT_USE_COMPRESS"
737 if $SOCAT -hhh | grep -w -q openssl-compress; then
738 SOCAT_USE_COMPRESS=True
740 SOCAT_USE_COMPRESS=False
744 AC_SUBST(SOCAT_USE_COMPRESS)
746 if man --help | grep -q -e --warnings
751 AC_MSG_WARN(m4_normalize([man does not support --warnings, man page checks
752 will not be possible]))
755 AC_SUBST(MAN_HAS_WARNINGS)
760 AC_PYTHON_MODULE(OpenSSL, t)
761 AC_PYTHON_MODULE(simplejson, t)
762 AC_PYTHON_MODULE(pyparsing, t)
763 AC_PYTHON_MODULE(pyinotify, t)
764 AC_PYTHON_MODULE(pycurl, t)
765 AC_PYTHON_MODULE(bitarray, t)
766 AC_PYTHON_MODULE(ipaddr, t)
767 AC_PYTHON_MODULE(mock)
768 AC_PYTHON_MODULE(affinity)
769 AC_PYTHON_MODULE(paramiko)
771 # Development-only Python modules
773 AC_PYTHON_MODULE(yaml)
774 if test $HAVE_PYMOD_YAML == "no"; then
775 PY_NODEV="$PY_NODEV yaml"
778 if test -n "$PY_NODEV"; then
779 AC_MSG_WARN(m4_normalize([Required development modules ($PY_NODEV) were not
780 found, you won't be able to run Python unittests]))
782 AC_MSG_NOTICE([Python development modules found, unittests enabled])
785 AM_CONDITIONAL([PY_UNIT], [test -n $PY_NODEV])
787 AC_CONFIG_FILES([ Makefile ])