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], [~rc1])
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)
23 AC_SUBST([BINDIR], $bindir)
24 AC_SUBST([SBINDIR], $sbindir)
25 AC_SUBST([MANDIR], $mandir)
27 # --enable-versionfull
28 AC_ARG_ENABLE([versionfull],
29 [AS_HELP_STRING([--enable-versionfull],
30 m4_normalize([use the full version string rather
31 than major.minor for version directories]))],
32 [[if test "$enableval" != no; then
40 AC_SUBST(USE_VERSION_FULL, $USE_VERSION_FULL)
41 AM_CONDITIONAL([USE_VERSION_FULL], [test "$USE_VERSION_FULL" = yes])
44 AC_ARG_ENABLE([symlinks],
45 [AS_HELP_STRING([--enable-symlinks],
46 m4_normalize([also install version-dependent symlinks under
47 $sysconfdir (default: enabled)]))],
48 [[if test "$enableval" != no; then
56 AC_SUBST(INSTALL_SYMLINKS, $INSTALL_SYMLINKS)
57 AM_CONDITIONAL([INSTALL_SYMLINKS], [test "$INSTALL_SYMLINKS" = yes])
59 # --with-ssh-initscript=...
60 AC_ARG_WITH([ssh-initscript],
61 [AS_HELP_STRING([--with-ssh-initscript=SCRIPT],
62 [SSH init script to use (default is /etc/init.d/ssh)]
64 [ssh_initd_script="$withval"],
65 [ssh_initd_script="/etc/init.d/ssh"])
66 AC_SUBST(SSH_INITD_SCRIPT, $ssh_initd_script)
68 # --with-export-dir=...
69 AC_ARG_WITH([export-dir],
70 [AS_HELP_STRING([--with-export-dir=DIR],
71 [directory to use by default for instance image]
72 [ exports (default is /srv/ganeti/export)]
74 [export_dir="$withval"],
75 [export_dir="/srv/ganeti/export"])
76 AC_SUBST(EXPORT_DIR, $export_dir)
78 # --with-ssh-config-dir=...
79 AC_ARG_WITH([ssh-config-dir],
80 [AS_HELP_STRING([--with-ssh-config-dir=DIR],
81 [ directory with ssh host keys ]
82 [ (default is /etc/ssh)]
84 [ssh_config_dir="$withval"],
85 [ssh_config_dir="/etc/ssh"])
86 AC_SUBST(SSH_CONFIG_DIR, $ssh_config_dir)
88 # --with-xen-config-dir=...
89 AC_ARG_WITH([xen-config-dir],
90 [AS_HELP_STRING([--with-xen-config-dir=DIR],
91 m4_normalize([Xen configuration directory
92 (default: /etc/xen)]))],
93 [xen_config_dir="$withval"],
94 [xen_config_dir=/etc/xen])
95 AC_SUBST(XEN_CONFIG_DIR, $xen_config_dir)
97 # --with-os-search-path=...
98 AC_ARG_WITH([os-search-path],
99 [AS_HELP_STRING([--with-os-search-path=LIST],
100 [comma separated list of directories to]
101 [ search for OS images (default is /srv/ganeti/os)]
103 [os_search_path="$withval"],
104 [os_search_path="/srv/ganeti/os"])
105 AC_SUBST(OS_SEARCH_PATH, $os_search_path)
107 # --with-extstorage-search-path=...
108 AC_ARG_WITH([extstorage-search-path],
109 [AS_HELP_STRING([--with-extstorage-search-path=LIST],
110 [comma separated list of directories to]
111 [ search for External Storage Providers]
112 [ (default is /srv/ganeti/extstorage)]
114 [es_search_path="$withval"],
115 [es_search_path="/srv/ganeti/extstorage"])
116 AC_SUBST(ES_SEARCH_PATH, $es_search_path)
118 # --with-iallocator-search-path=...
119 AC_ARG_WITH([iallocator-search-path],
120 [AS_HELP_STRING([--with-iallocator-search-path=LIST],
121 [comma separated list of directories to]
122 [ search for instance allocators (default is $libdir/ganeti/iallocators)]
124 [iallocator_search_path="$withval"],
125 [iallocator_search_path="$libdir/$PACKAGE_NAME/iallocators"])
126 AC_SUBST(IALLOCATOR_SEARCH_PATH, $iallocator_search_path)
128 # --with-xen-bootloader=...
129 AC_ARG_WITH([xen-bootloader],
130 [AS_HELP_STRING([--with-xen-bootloader=PATH],
131 [bootloader for Xen hypervisor (default is empty)]
133 [xen_bootloader="$withval"],
135 AC_SUBST(XEN_BOOTLOADER, $xen_bootloader)
137 # --with-xen-kernel=...
138 AC_ARG_WITH([xen-kernel],
139 [AS_HELP_STRING([--with-xen-kernel=PATH],
140 [DomU kernel image for Xen hypervisor (default is /boot/vmlinuz-3-xenU)]
142 [xen_kernel="$withval"],
143 [xen_kernel="/boot/vmlinuz-3-xenU"])
144 AC_SUBST(XEN_KERNEL, $xen_kernel)
146 # --with-xen-initrd=...
147 AC_ARG_WITH([xen-initrd],
148 [AS_HELP_STRING([--with-xen-initrd=PATH],
149 [DomU initrd image for Xen hypervisor (default is /boot/initrd-3-xenU)]
151 [xen_initrd="$withval"],
152 [xen_initrd="/boot/initrd-3-xenU"])
153 AC_SUBST(XEN_INITRD, $xen_initrd)
155 # --with-kvm-kernel=...
156 AC_ARG_WITH([kvm-kernel],
157 [AS_HELP_STRING([--with-kvm-kernel=PATH],
158 [Guest kernel image for KVM hypervisor (default is /boot/vmlinuz-3-kvmU)]
160 [kvm_kernel="$withval"],
161 [kvm_kernel="/boot/vmlinuz-3-kvmU"])
162 AC_SUBST(KVM_KERNEL, $kvm_kernel)
164 # --with-kvm-path=...
165 AC_ARG_WITH([kvm-path],
166 [AS_HELP_STRING([--with-kvm-path=PATH],
167 [absolute path to the kvm binary]
168 [ (default is /usr/bin/kvm)]
170 [kvm_path="$withval"],
171 [kvm_path="/usr/bin/kvm"])
172 AC_SUBST(KVM_PATH, $kvm_path)
174 # --with-lvm-stripecount=...
175 AC_ARG_WITH([lvm-stripecount],
176 [AS_HELP_STRING([--with-lvm-stripecount=NUM],
177 [the default number of stripes to use for LVM volumes]
180 [lvm_stripecount="$withval"],
182 AC_SUBST(LVM_STRIPECOUNT, $lvm_stripecount)
184 # --with-ssh-login-user=...
185 AC_ARG_WITH([ssh-login-user],
186 [AS_HELP_STRING([--with-ssh-login-user=USERNAME],
187 [user to use for SSH logins within the cluster (default is root)]
189 [ssh_login_user="$withval"],
190 [ssh_login_user=root])
191 AC_SUBST(SSH_LOGIN_USER, $ssh_login_user)
193 # --with-ssh-console-user=...
194 AC_ARG_WITH([ssh-console-user],
195 [AS_HELP_STRING([--with-ssh-console-user=USERNAME],
196 [user to use for SSH logins to access instance consoles (default is root)]
198 [ssh_console_user="$withval"],
199 [ssh_console_user=root])
200 AC_SUBST(SSH_CONSOLE_USER, $ssh_console_user)
202 # --with-default-user=...
203 AC_ARG_WITH([default-user],
204 [AS_HELP_STRING([--with-default-user=USERNAME],
205 [default user for daemons]
206 [ (default is to run all daemons as root)]
208 [user_default="$withval"],
211 # --with-default-group=...
212 AC_ARG_WITH([default-group],
213 [AS_HELP_STRING([--with-default-group=GROUPNAME],
214 [default group for daemons]
215 [ (default is to run all daemons under group root)]
217 [group_default="$withval"],
218 [group_default=root])
220 # --with-user-prefix=...
221 AC_ARG_WITH([user-prefix],
222 [AS_HELP_STRING([--with-user-prefix=PREFIX],
223 [prefix for daemon users]
224 [ (default is to run all daemons as root; use --with-default-user]
225 [ to change the default)]
227 [user_masterd="${withval}masterd";
228 user_rapi="${withval}rapi";
229 user_confd="${withval}confd";
230 user_luxid="${withval}luxid";
231 user_noded="$user_default";
232 user_mond="$user_default"],
233 [user_masterd="$user_default";
234 user_rapi="$user_default";
235 user_confd="$user_default";
236 user_luxid="$user_default";
237 user_noded="$user_default";
238 user_mond="$user_default"])
239 AC_SUBST(MASTERD_USER, $user_masterd)
240 AC_SUBST(RAPI_USER, $user_rapi)
241 AC_SUBST(CONFD_USER, $user_confd)
242 AC_SUBST(LUXID_USER, $user_luxid)
243 AC_SUBST(NODED_USER, $user_noded)
244 AC_SUBST(MOND_USER, $user_mond)
246 # --with-group-prefix=...
247 AC_ARG_WITH([group-prefix],
248 [AS_HELP_STRING([--with-group-prefix=PREFIX],
249 [prefix for daemon POSIX groups]
250 [ (default is to run all daemons under group root; use]
251 [ --with-default-group to change the default)]
253 [group_rapi="${withval}rapi";
254 group_admin="${withval}admin";
255 group_confd="${withval}confd";
256 group_luxid="${withval}luxid";
257 group_masterd="${withval}masterd";
258 group_noded="$group_default";
259 group_daemons="${withval}daemons";
260 group_mond="$group_default"],
261 [group_rapi="$group_default";
262 group_admin="$group_default";
263 group_confd="$group_default";
264 group_luxid="$group_default";
265 group_masterd="$group_default";
266 group_noded="$group_default";
267 group_daemons="$group_default";
268 group_mond="$group_default"])
269 AC_SUBST(RAPI_GROUP, $group_rapi)
270 AC_SUBST(ADMIN_GROUP, $group_admin)
271 AC_SUBST(CONFD_GROUP, $group_confd)
272 AC_SUBST(LUXID_GROUP, $group_luxid)
273 AC_SUBST(MASTERD_GROUP, $group_masterd)
274 AC_SUBST(NODED_GROUP, $group_noded)
275 AC_SUBST(DAEMONS_GROUP, $group_daemons)
276 AC_SUBST(MOND_GROUP, $group_mond)
278 # Print the config to the user
279 AC_MSG_NOTICE([Running ganeti-masterd as $group_masterd:$group_masterd])
280 AC_MSG_NOTICE([Running ganeti-rapi as $user_rapi:$group_rapi])
281 AC_MSG_NOTICE([Running ganeti-confd as $user_confd:$group_confd])
282 AC_MSG_NOTICE([Running ganeti-luxid as $user_luxid:$group_luxid])
283 AC_MSG_NOTICE([Group for daemons is $group_daemons])
284 AC_MSG_NOTICE([Group for clients is $group_admin])
286 # --enable-drbd-barriers
287 AC_ARG_ENABLE([drbd-barriers],
288 [AS_HELP_STRING([--enable-drbd-barriers],
289 m4_normalize([enable the DRBD barriers functionality by
290 default (>= 8.0.12) (default: enabled)]))],
291 [[if test "$enableval" != no; then
293 DRBD_NO_META_FLUSH=False
296 DRBD_NO_META_FLUSH=True
300 DRBD_NO_META_FLUSH=False
302 AC_SUBST(DRBD_BARRIERS, $DRBD_BARRIERS)
303 AC_SUBST(DRBD_NO_META_FLUSH, $DRBD_NO_META_FLUSH)
305 # --enable-syslog[=no/yes/only]
306 AC_ARG_ENABLE([syslog],
307 [AS_HELP_STRING([--enable-syslog],
308 [enable use of syslog (default: disabled), one of no/yes/only])],
309 [[case "$enableval" in
328 AC_MSG_ERROR([invalid value for syslog, choose one of no/yes/only])
330 AC_SUBST(SYSLOG_USAGE, $SYSLOG)
332 # --enable-restricted-commands[=no/yes]
333 AC_ARG_ENABLE([restricted-commands],
334 [AS_HELP_STRING([--enable-restricted-commands],
335 m4_normalize([enable restricted commands in the node daemon
336 (default: disabled)]))],
337 [[if test "$enableval" = no; then
338 enable_restricted_commands=False
340 enable_restricted_commands=True
343 [enable_restricted_commands=False])
344 AC_SUBST(ENABLE_RESTRICTED_COMMANDS, $enable_restricted_commands)
346 # --with-disk-separator=...
347 AC_ARG_WITH([disk-separator],
348 [AS_HELP_STRING([--with-disk-separator=STRING],
349 [Disk index separator, useful if the default of ':' is handled]
350 [ specially by the hypervisor]
352 [disk_separator="$withval"],
353 [disk_separator=":"])
354 AC_SUBST(DISK_SEPARATOR, $disk_separator)
356 # Check common programs
360 # check if ln is the GNU version of ln (and hence supports -T)
361 if ln --version 2> /dev/null | head -1 | grep -q GNU
363 AC_SUBST(HAS_GNU_LN, True)
365 AC_SUBST(HAS_GNU_LN, False)
368 # Check for the ip command
369 AC_ARG_VAR(IP_PATH, [ip path])
370 AC_PATH_PROG(IP_PATH, [ip], [])
371 if test -z "$IP_PATH"
373 AC_MSG_ERROR([ip command not found])
377 AC_ARG_VAR(PANDOC, [pandoc path])
378 AC_PATH_PROG(PANDOC, [pandoc], [])
381 AC_MSG_WARN([pandoc not found, man pages rebuild will not be possible])
384 # Check for python-sphinx
385 AC_ARG_VAR(SPHINX, [sphinx-build path])
386 AC_PATH_PROG(SPHINX, [sphinx-build], [])
389 AC_MSG_WARN(m4_normalize([sphinx-build not found, documentation rebuild will
392 # Sphinx exits with code 1 when it prints its usage
393 sphinxver=`{ $SPHINX --version 2>&1 || :; } | head -n 3`
395 if ! echo "$sphinxver" | grep -q -w -e '^Sphinx' -e '^Usage:'; then
396 AC_MSG_ERROR([Unable to determine Sphinx version])
398 # Note: Character classes ([...]) need to be double quoted due to autoconf
400 elif ! echo "$sphinxver" | grep -q -E \
401 '^Sphinx[[[:space:]]]+(\(sphinx-build\)[[[:space:]]]+|v)[[1-9]]\>'; then
402 AC_MSG_ERROR([Sphinx 1.0 or higher is required])
405 AM_CONDITIONAL([HAS_SPHINX], [test -n "$SPHINX"])
407 AC_ARG_ENABLE([manpages-in-doc],
408 [AS_HELP_STRING([--enable-manpages-in-doc],
409 m4_normalize([include man pages in HTML documentation
410 (requires sphinx; default disabled)]))],
411 [case "$enableval" in
412 yes) manpages_in_doc=yes ;;
413 no) manpages_in_doc= ;;
415 AC_MSG_ERROR([Bad value $enableval for --enable-manpages-in-doc])
420 AM_CONDITIONAL([MANPAGES_IN_DOC], [test -n "$manpages_in_doc"])
421 AC_SUBST(MANPAGES_IN_DOC, $manpages_in_doc)
423 if test -z "$SPHINX" -a -n "$manpages_in_doc"; then
424 AC_MSG_ERROR([Including man pages in HTML documentation requires sphinx])
427 # Check for graphviz (dot)
428 AC_ARG_VAR(DOT, [dot path])
429 AC_PATH_PROG(DOT, [dot], [])
432 AC_MSG_WARN(m4_normalize([dot (from the graphviz suite) not found,
433 documentation rebuild not possible]))
437 AC_ARG_VAR(PYLINT, [pylint path])
438 AC_PATH_PROG(PYLINT, [pylint], [])
441 AC_MSG_WARN([pylint not found, checking code will not be possible])
445 AC_ARG_VAR(PEP8, [pep8 path])
446 AC_PATH_PROG(PEP8, [pep8], [])
449 AC_MSG_WARN([pep8 not found, checking code will not be complete])
451 AM_CONDITIONAL([HAS_PEP8], [test -n "$PEP8"])
453 # Check for python-coverage
454 AC_ARG_VAR(PYCOVERAGE, [python-coverage path])
455 AC_PATH_PROGS(PYCOVERAGE, [python-coverage coverage], [])
456 if test -z "$PYCOVERAGE"
458 AC_MSG_WARN(m4_normalize([python-coverage or coverage not found, evaluating
459 Python test coverage will not be possible]))
463 AC_ARG_VAR(SOCAT, [socat path])
464 AC_PATH_PROG(SOCAT, [socat], [])
467 AC_MSG_ERROR([socat not found])
471 AC_ARG_VAR(QEMUIMG_PATH, [qemu-img path])
472 AC_PATH_PROG(QEMUIMG_PATH, [qemu-img], [])
473 if test -z "$QEMUIMG_PATH"
475 AC_MSG_WARN([qemu-img not found, using ovfconverter will not be possible])
480 AC_ARG_ENABLE([confd],
481 [AS_HELP_STRING([--enable-confd],
482 [enable the ganeti-confd daemon (default: check)])],
484 [enable_confd=check])
487 AC_ARG_ENABLE([monitoring],
488 [AS_HELP_STRING([--enable-monitoring],
489 [enable the ganeti monitoring daemon (default: check)])],
491 [enable_monitoring=check])
494 AC_ARG_VAR(GHC, [ghc path])
495 AC_PATH_PROG(GHC, [ghc], [])
496 if test -z "$GHC"; then
497 AC_MSG_FAILURE([ghc not found, compilation will not possible])
500 AC_MSG_CHECKING([checking for extra GHC flags])
502 # check for GHC supported flags that vary accross versions
503 for flag in -fwarn-incomplete-uni-patterns; do
504 if $GHC -e '0' $flag >/dev/null 2>/dev/null; then
505 GHC_BYVERSION_FLAGS="$GHC_BYVERSION_FLAGS $flag"
508 AC_MSG_RESULT($GHC_BYVERSION_FLAGS)
509 AC_SUBST(GHC_BYVERSION_FLAGS)
512 AC_ARG_VAR(GHC_PKG, [ghc-pkg path])
513 AC_PATH_PROG(GHC_PKG, [ghc-pkg], [])
514 if test -z "$GHC_PKG"; then
515 AC_MSG_FAILURE([ghc-pkg not found, compilation will not be possible])
518 # check for modules, first custom/special checks
519 AC_MSG_NOTICE([checking for required haskell modules])
521 AC_GHC_PKG_CHECK([parallel-3.*], [HS_PARALLEL3=-DPARALLEL3],
522 [AC_GHC_PKG_REQUIRE(parallel)], t)
523 AC_SUBST(HS_PARALLEL3)
525 # and now standard modules
526 AC_GHC_PKG_REQUIRE(curl)
527 AC_GHC_PKG_REQUIRE(json)
528 AC_GHC_PKG_REQUIRE(network)
529 AC_GHC_PKG_REQUIRE(mtl)
530 AC_GHC_PKG_REQUIRE(bytestring)
531 AC_GHC_PKG_REQUIRE(utf8-string)
532 AC_GHC_PKG_REQUIRE(hslogger)
534 # extra modules for confd functionality
535 HS_REGEX_PCRE=-DNO_REGEX_PCRE
537 if test "$enable_confd" != no; then
539 AC_GHC_PKG_CHECK([regex-pcre], [HS_REGEX_PCRE=],
540 [CONFD_PKG="$CONFD_PKG regex-pcre"])
541 AC_GHC_PKG_CHECK([Crypto], [], [CONFD_PKG="$CONFD_PKG Crypto"])
542 AC_GHC_PKG_CHECK([text], [], [CONFD_PKG="$CONFD_PKG text"])
543 AC_GHC_PKG_CHECK([hinotify], [], [CONFD_PKG="$CONFD_PKG hinotify"])
544 AC_GHC_PKG_CHECK([vector], [], [CONFD_PKG="$CONFD_PKG vector"])
545 if test -z "$CONFD_PKG"; then
547 elif test "$enable_confd" = check; then
548 AC_MSG_WARN(m4_normalize([The required extra libraries for confd were
549 not found ($CONFD_PKG), confd disabled]))
551 AC_MSG_FAILURE(m4_normalize([The confd functionality was requested, but
552 required libraries were not found:
556 AC_SUBST(HS_REGEX_PCRE)
557 if test "$has_confd" = True; then
558 AC_MSG_NOTICE([Enabling confd usage])
560 AC_SUBST(ENABLE_CONFD, $has_confd)
561 AM_CONDITIONAL([ENABLE_CONFD], [test x$has_confd = xTrue])
563 #extra modules for monitoring daemon functionality
565 if test "$enable_monitoring" != no; then
567 AC_GHC_PKG_CHECK([attoparsec], [],
568 [MONITORING_PKG="$MONITORING_PKG attoparsec"])
569 AC_GHC_PKG_CHECK([snap-server], [],
570 [MONITORING_PKG="$MONITORING_PKG snap-server"])
571 AC_GHC_PKG_CHECK([process], [],
572 [MONITORING_PKG="$MONITORING_PKG process"])
574 if test "$has_confd" = False; then
575 MONITORING_DEP="$MONITORING_DEP confd"
577 has_monitoring_pkg=False
578 if test -z "$MONITORING_PKG"; then
579 has_monitoring_pkg=True
580 elif test "$enable_monitoring" = check; then
581 AC_MSG_WARN(m4_normalize([The required extra libraries for the monitoring
582 daemon were not found ($MONITORING_PKG),
583 monitoring disabled]))
585 AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but
586 required libraries were not found:
589 has_monitoring_dep=False
590 if test -z "$MONITORING_DEP"; then
591 has_monitoring_dep=True
592 elif test "$enable_monitoring" = check; then
593 AC_MSG_WARN(m4_normalize([The optional Ganeti components required for the
594 monitoring agent were not enabled
595 ($MONITORING_DEP), monitoring disabled]))
597 AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but
598 required optional Ganeti components were not
599 found: $MONITORING_DEP]))
603 if test "$has_monitoring_pkg" = True -a "$has_monitoring_dep" = True; then
605 AC_MSG_NOTICE([Enabling the monitoring agent usage])
607 AC_SUBST(ENABLE_MOND, $has_monitoring)
608 AM_CONDITIONAL([ENABLE_MOND], [test "$has_monitoring" = True])
610 # development modules
612 AC_GHC_PKG_CHECK([QuickCheck-2.*], [], [HS_NODEV=1], t)
613 AC_GHC_PKG_CHECK([test-framework-0.6*], [], [HS_NODEV=1], t)
614 AC_GHC_PKG_CHECK([test-framework-hunit], [], [HS_NODEV=1])
615 AC_GHC_PKG_CHECK([test-framework-quickcheck2], [], [HS_NODEV=1])
616 AC_GHC_PKG_CHECK([temporary], [], [HS_NODEV=1])
617 # FIXME: unify checks for non-test libraries (attoparsec, hinotify, ...)
618 # that are needed to execute the tests, avoiding the duplication
620 AC_GHC_PKG_CHECK([attoparsec], [], [HS_NODEV=1])
621 AC_GHC_PKG_CHECK([vector], [], [HS_NODEV=1])
622 AC_GHC_PKG_CHECK([process], [], [HS_NODEV=1])
623 AC_GHC_PKG_CHECK([snap-server], [], [HS_NODEV=1])
624 AC_GHC_PKG_CHECK([regex-pcre], [], [HS_NODEV=1])
625 AC_GHC_PKG_CHECK([Crypto], [], [HS_NODEV=1])
626 AC_GHC_PKG_CHECK([text], [], [HS_NODEV=1])
627 AC_GHC_PKG_CHECK([hinotify], [], [HS_NODEV=1])
628 if test -n "$HS_NODEV"; then
629 AC_MSG_WARN(m4_normalize([Required development modules were not found,
630 you won't be able to run Haskell unittests]))
632 AC_MSG_NOTICE([Haskell development modules found, unittests enabled])
639 # --enable-split-query
641 AC_ARG_ENABLE([split-query],
642 [AS_HELP_STRING([--enable-split-query],
643 [enable use of custom query daemon via confd])],
644 [[case "$enableval" in
646 enable_split_query=False
649 enable_split_query=True
652 echo "Invalid value for enable-confd '$enableval'"
657 [[case "x${has_confd}x" in
659 enable_split_query=True
662 enable_split_query=False
665 AC_SUBST(ENABLE_SPLIT_QUERY, $enable_split_query)
667 if test x$enable_split_query = xTrue -a x$has_confd != xTrue; then
668 AC_MSG_ERROR([Split queries require the confd daemon])
671 if test x$enable_split_query = xTrue; then
672 AC_MSG_NOTICE([Split query functionality enabled])
677 AC_ARG_VAR(HSCOLOUR, [HsColour path])
678 AC_PATH_PROG(HSCOLOUR, [HsColour], [])
679 if test -z "$HSCOLOUR"; then
680 AC_MSG_WARN(m4_normalize([HsColour not found, htools API documentation will
685 AC_ARG_VAR(HADDOCK, [haddock path])
686 AC_PATH_PROG(HADDOCK, [haddock], [])
687 if test -z "$HADDOCK"; then
688 AC_MSG_WARN(m4_normalize([haddock not found, htools API documentation will
691 if test -n "$HADDOCK" && test -n "$HSCOLOUR"; then
697 AC_ARG_VAR(HLINT, [hlint path])
698 AC_PATH_PROG(HLINT, [hlint], [])
699 if test -z "$HLINT"; then
700 AC_MSG_WARN([hlint not found, checking code will not be possible])
703 if test "$HTOOLS" != yes && test "$ENABLE_CONFD" = True; then
704 AC_MSG_ERROR(m4_normalize([cannot enable ganeti-confd if
705 htools support is not enabled]))
708 AM_CONDITIONAL([WANT_HTOOLS], [test "$HTOOLS" = yes])
709 AM_CONDITIONAL([WANT_HSTESTS], [test "x$HS_NODEV" = x])
710 AM_CONDITIONAL([WANT_HSAPIDOC], [test "$HS_APIDOC" = yes])
711 AM_CONDITIONAL([HAS_HLINT], [test "$HLINT"])
714 AC_ARG_VAR(FAKEROOT_PATH, [fakeroot path])
715 AC_PATH_PROG(FAKEROOT_PATH, [fakeroot], [])
716 if test -z "$FAKEROOT_PATH"; then
717 AC_MSG_WARN(m4_normalize([fakeroot not found, tests that must run as root
718 will not be executed]))
720 AM_CONDITIONAL([HAS_FAKEROOT], [test "x$FAKEROOT_PATH" != x])
723 AC_ARG_ENABLE([socat-escape],
724 [AS_HELP_STRING([--enable-socat-escape],
725 [use escape functionality available in socat >= 1.7 (default: detect
727 [[if test "$enableval" = yes; then
728 SOCAT_USE_ESCAPE=True
730 SOCAT_USE_ESCAPE=False
734 if test -z "$SOCAT_USE_ESCAPE"
736 if $SOCAT -hh | grep -w -q escape; then
737 SOCAT_USE_ESCAPE=True
739 SOCAT_USE_ESCAPE=False
743 AC_SUBST(SOCAT_USE_ESCAPE)
746 AC_ARG_ENABLE([socat-compress],
747 [AS_HELP_STRING([--enable-socat-compress],
748 [use OpenSSL compression option available in patched socat builds
749 (see INSTALL for details; default: detect automatically)])],
750 [[if test "$enableval" = yes; then
751 SOCAT_USE_COMPRESS=True
753 SOCAT_USE_COMPRESS=False
757 if test -z "$SOCAT_USE_COMPRESS"
759 if $SOCAT -hhh | grep -w -q openssl-compress; then
760 SOCAT_USE_COMPRESS=True
762 SOCAT_USE_COMPRESS=False
766 AC_SUBST(SOCAT_USE_COMPRESS)
768 if man --help | grep -q -e --warnings
773 AC_MSG_WARN(m4_normalize([man does not support --warnings, man page checks
774 will not be possible]))
777 AC_SUBST(MAN_HAS_WARNINGS)
782 AC_PYTHON_MODULE(OpenSSL, t)
783 AC_PYTHON_MODULE(simplejson, t)
784 AC_PYTHON_MODULE(pyparsing, t)
785 AC_PYTHON_MODULE(pyinotify, t)
786 AC_PYTHON_MODULE(pycurl, t)
787 AC_PYTHON_MODULE(bitarray, t)
788 AC_PYTHON_MODULE(ipaddr, t)
789 AC_PYTHON_MODULE(mock)
790 AC_PYTHON_MODULE(affinity)
791 AC_PYTHON_MODULE(paramiko)
793 # Development-only Python modules
795 AC_PYTHON_MODULE(yaml)
796 if test $HAVE_PYMOD_YAML == "no"; then
797 PY_NODEV="$PY_NODEV yaml"
800 if test -n "$PY_NODEV"; then
801 AC_MSG_WARN(m4_normalize([Required development modules ($PY_NODEV) were not
802 found, you won't be able to run Python unittests]))
804 AC_MSG_NOTICE([Python development modules found, unittests enabled])
807 AM_CONDITIONAL([PY_UNIT], [test -n $PY_NODEV])
809 AC_CONFIG_FILES([ Makefile ])