Statistics
| Branch: | Tag: | Revision:

root / configure.ac @ d9a900dc

History | View | Annotate | Download (22.1 kB)

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