Statistics
| Branch: | Tag: | Revision:

root / configure.ac @ 277c969f

History | View | Annotate | Download (23.4 kB)

1 a5d17f9f Michael Hanselmann
# Configure script for Ganeti
2 5e29d733 Michael Hanselmann
m4_define([gnt_version_major], [2])
3 c777c5fc Helga Velroyen
m4_define([gnt_version_minor], [12])
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 ae6a0a7c Jose A. Lopes
AC_SUBST([BINDIR], $bindir)
24 ae6a0a7c Jose A. Lopes
AC_SUBST([SBINDIR], $sbindir)
25 ae6a0a7c Jose A. Lopes
AC_SUBST([MANDIR], $mandir)
26 ae6a0a7c Jose A. Lopes
27 838d26ef Klaus Aehlig
# --enable-versionfull
28 838d26ef Klaus Aehlig
AC_ARG_ENABLE([versionfull],
29 838d26ef Klaus Aehlig
  [AS_HELP_STRING([--enable-versionfull],
30 838d26ef Klaus Aehlig
                  m4_normalize([use the full version string rather
31 838d26ef Klaus Aehlig
                  than major.minor for version directories]))],
32 fd653cbd Klaus Aehlig
  [[if test "$enableval" != no; then
33 838d26ef Klaus Aehlig
      USE_VERSION_FULL=yes
34 838d26ef Klaus Aehlig
    else
35 838d26ef Klaus Aehlig
      USER_VERSION_FULL=no
36 838d26ef Klaus Aehlig
    fi
37 838d26ef Klaus Aehlig
  ]],
38 838d26ef Klaus Aehlig
  [USE_VERSION_FULL=no
39 838d26ef Klaus Aehlig
  ])
40 838d26ef Klaus Aehlig
AC_SUBST(USE_VERSION_FULL, $USE_VERSION_FULL)
41 838d26ef Klaus Aehlig
AM_CONDITIONAL([USE_VERSION_FULL], [test "$USE_VERSION_FULL" = yes])
42 838d26ef Klaus Aehlig
43 9cf292af Klaus Aehlig
# --enable-symlinks
44 9cf292af Klaus Aehlig
AC_ARG_ENABLE([symlinks],
45 9cf292af Klaus Aehlig
  [AS_HELP_STRING([--enable-symlinks],
46 c32dc51f Klaus Aehlig
                  m4_normalize([also install version-dependent symlinks under
47 46c33a2b Klaus Aehlig
                  $sysconfdir (default: disabled)]))],
48 46c33a2b Klaus Aehlig
  [[if test "$enableval" != yes; then
49 9cf292af Klaus Aehlig
      INSTALL_SYMLINKS=no
50 46c33a2b Klaus Aehlig
    else
51 46c33a2b Klaus Aehlig
      INSTALL_SYMLINKS=yes
52 9cf292af Klaus Aehlig
    fi
53 9cf292af Klaus Aehlig
  ]],
54 46c33a2b Klaus Aehlig
  [INSTALL_SYMLINKS=no
55 9cf292af Klaus Aehlig
  ])
56 9cf292af Klaus Aehlig
AC_SUBST(INSTALL_SYMLINKS, $INSTALL_SYMLINKS)
57 9cf292af Klaus Aehlig
AM_CONDITIONAL([INSTALL_SYMLINKS], [test "$INSTALL_SYMLINKS" = yes])
58 9cf292af Klaus Aehlig
59 c6b8baba Michael Hanselmann
# --with-ssh-initscript=...
60 c6b8baba Michael Hanselmann
AC_ARG_WITH([ssh-initscript],
61 8f106515 Guido Trotter
  [AS_HELP_STRING([--with-ssh-initscript=SCRIPT],
62 c6b8baba Michael Hanselmann
    [SSH init script to use (default is /etc/init.d/ssh)]
63 c6b8baba Michael Hanselmann
  )],
64 f491c3a8 Michael Hanselmann
  [ssh_initd_script="$withval"],
65 f491c3a8 Michael Hanselmann
  [ssh_initd_script="/etc/init.d/ssh"])
66 f491c3a8 Michael Hanselmann
AC_SUBST(SSH_INITD_SCRIPT, $ssh_initd_script)
67 c6b8baba Michael Hanselmann
68 68dccc07 Guido Trotter
# --with-export-dir=...
69 68dccc07 Guido Trotter
AC_ARG_WITH([export-dir],
70 68dccc07 Guido Trotter
  [AS_HELP_STRING([--with-export-dir=DIR],
71 f00b46bc Michael Hanselmann
    [directory to use by default for instance image]
72 f00b46bc Michael Hanselmann
    [ exports (default is /srv/ganeti/export)]
73 68dccc07 Guido Trotter
  )],
74 68dccc07 Guido Trotter
  [export_dir="$withval"],
75 68dccc07 Guido Trotter
  [export_dir="/srv/ganeti/export"])
76 68dccc07 Guido Trotter
AC_SUBST(EXPORT_DIR, $export_dir)
77 68dccc07 Guido Trotter
78 553bd93f Vitaly Kuznetsov
# --with-ssh-config-dir=...
79 553bd93f Vitaly Kuznetsov
AC_ARG_WITH([ssh-config-dir],
80 553bd93f Vitaly Kuznetsov
  [AS_HELP_STRING([--with-ssh-config-dir=DIR],
81 553bd93f Vitaly Kuznetsov
    [ directory with ssh host keys ]
82 553bd93f Vitaly Kuznetsov
    [ (default is /etc/ssh)]
83 553bd93f Vitaly Kuznetsov
  )],
84 553bd93f Vitaly Kuznetsov
  [ssh_config_dir="$withval"],
85 553bd93f Vitaly Kuznetsov
  [ssh_config_dir="/etc/ssh"])
86 553bd93f Vitaly Kuznetsov
AC_SUBST(SSH_CONFIG_DIR, $ssh_config_dir)
87 553bd93f Vitaly Kuznetsov
88 a8e8c0c6 Michael Hanselmann
# --with-xen-config-dir=...
89 a8e8c0c6 Michael Hanselmann
AC_ARG_WITH([xen-config-dir],
90 a8e8c0c6 Michael Hanselmann
  [AS_HELP_STRING([--with-xen-config-dir=DIR],
91 a8e8c0c6 Michael Hanselmann
                  m4_normalize([Xen configuration directory
92 a8e8c0c6 Michael Hanselmann
                                (default: /etc/xen)]))],
93 a8e8c0c6 Michael Hanselmann
  [xen_config_dir="$withval"],
94 a8e8c0c6 Michael Hanselmann
  [xen_config_dir=/etc/xen])
95 a8e8c0c6 Michael Hanselmann
AC_SUBST(XEN_CONFIG_DIR, $xen_config_dir)
96 a8e8c0c6 Michael Hanselmann
97 7c3d51d4 Guido Trotter
# --with-os-search-path=...
98 7c3d51d4 Guido Trotter
AC_ARG_WITH([os-search-path],
99 7c3d51d4 Guido Trotter
  [AS_HELP_STRING([--with-os-search-path=LIST],
100 f00b46bc Michael Hanselmann
    [comma separated list of directories to]
101 f00b46bc Michael Hanselmann
    [ search for OS images (default is /srv/ganeti/os)]
102 7c3d51d4 Guido Trotter
  )],
103 f1b816b7 Jose A. Lopes
  [os_search_path="$withval"],
104 3311e336 Jose A. Lopes
  [os_search_path="/srv/ganeti/os"])
105 7c3d51d4 Guido Trotter
AC_SUBST(OS_SEARCH_PATH, $os_search_path)
106 7c3d51d4 Guido Trotter
107 376631d1 Constantinos Venetsanopoulos
# --with-extstorage-search-path=...
108 376631d1 Constantinos Venetsanopoulos
AC_ARG_WITH([extstorage-search-path],
109 376631d1 Constantinos Venetsanopoulos
  [AS_HELP_STRING([--with-extstorage-search-path=LIST],
110 376631d1 Constantinos Venetsanopoulos
    [comma separated list of directories to]
111 376631d1 Constantinos Venetsanopoulos
    [ search for External Storage Providers]
112 376631d1 Constantinos Venetsanopoulos
    [ (default is /srv/ganeti/extstorage)]
113 376631d1 Constantinos Venetsanopoulos
  )],
114 f1b816b7 Jose A. Lopes
  [es_search_path="$withval"],
115 3311e336 Jose A. Lopes
  [es_search_path="/srv/ganeti/extstorage"])
116 376631d1 Constantinos Venetsanopoulos
AC_SUBST(ES_SEARCH_PATH, $es_search_path)
117 376631d1 Constantinos Venetsanopoulos
118 298fe380 Iustin Pop
# --with-iallocator-search-path=...
119 298fe380 Iustin Pop
AC_ARG_WITH([iallocator-search-path],
120 298fe380 Iustin Pop
  [AS_HELP_STRING([--with-iallocator-search-path=LIST],
121 298fe380 Iustin Pop
    [comma separated list of directories to]
122 298fe380 Iustin Pop
    [ search for instance allocators (default is $libdir/ganeti/iallocators)]
123 298fe380 Iustin Pop
  )],
124 f1b816b7 Jose A. Lopes
  [iallocator_search_path="$withval"],
125 3311e336 Jose A. Lopes
  [iallocator_search_path="$libdir/$PACKAGE_NAME/iallocators"])
126 298fe380 Iustin Pop
AC_SUBST(IALLOCATOR_SEARCH_PATH, $iallocator_search_path)
127 298fe380 Iustin Pop
128 2f2dbb4b Jun Futagawa
# --with-xen-bootloader=...
129 2f2dbb4b Jun Futagawa
AC_ARG_WITH([xen-bootloader],
130 2f2dbb4b Jun Futagawa
  [AS_HELP_STRING([--with-xen-bootloader=PATH],
131 2f2dbb4b Jun Futagawa
    [bootloader for Xen hypervisor (default is empty)]
132 2f2dbb4b Jun Futagawa
  )],
133 2f2dbb4b Jun Futagawa
  [xen_bootloader="$withval"],
134 2f2dbb4b Jun Futagawa
  [xen_bootloader=])
135 2f2dbb4b Jun Futagawa
AC_SUBST(XEN_BOOTLOADER, $xen_bootloader)
136 2f2dbb4b Jun Futagawa
137 f00b46bc Michael Hanselmann
# --with-xen-kernel=...
138 f00b46bc Michael Hanselmann
AC_ARG_WITH([xen-kernel],
139 f00b46bc Michael Hanselmann
  [AS_HELP_STRING([--with-xen-kernel=PATH],
140 b8203e1e Iustin Pop
    [DomU kernel image for Xen hypervisor (default is /boot/vmlinuz-3-xenU)]
141 f00b46bc Michael Hanselmann
  )],
142 f00b46bc Michael Hanselmann
  [xen_kernel="$withval"],
143 b8203e1e Iustin Pop
  [xen_kernel="/boot/vmlinuz-3-xenU"])
144 f00b46bc Michael Hanselmann
AC_SUBST(XEN_KERNEL, $xen_kernel)
145 f00b46bc Michael Hanselmann
146 f00b46bc Michael Hanselmann
# --with-xen-initrd=...
147 f00b46bc Michael Hanselmann
AC_ARG_WITH([xen-initrd],
148 f00b46bc Michael Hanselmann
  [AS_HELP_STRING([--with-xen-initrd=PATH],
149 b8203e1e Iustin Pop
    [DomU initrd image for Xen hypervisor (default is /boot/initrd-3-xenU)]
150 f00b46bc Michael Hanselmann
  )],
151 f00b46bc Michael Hanselmann
  [xen_initrd="$withval"],
152 b8203e1e Iustin Pop
  [xen_initrd="/boot/initrd-3-xenU"])
153 f00b46bc Michael Hanselmann
AC_SUBST(XEN_INITRD, $xen_initrd)
154 f00b46bc Michael Hanselmann
155 b8203e1e Iustin Pop
# --with-kvm-kernel=...
156 b8203e1e Iustin Pop
AC_ARG_WITH([kvm-kernel],
157 b8203e1e Iustin Pop
  [AS_HELP_STRING([--with-kvm-kernel=PATH],
158 b8203e1e Iustin Pop
    [Guest kernel image for KVM hypervisor (default is /boot/vmlinuz-3-kvmU)]
159 b8203e1e Iustin Pop
  )],
160 b8203e1e Iustin Pop
  [kvm_kernel="$withval"],
161 b8203e1e Iustin Pop
  [kvm_kernel="/boot/vmlinuz-3-kvmU"])
162 b8203e1e Iustin Pop
AC_SUBST(KVM_KERNEL, $kvm_kernel)
163 b8203e1e Iustin Pop
164 7e2c5b9e Guido Trotter
# --with-kvm-path=...
165 7e2c5b9e Guido Trotter
AC_ARG_WITH([kvm-path],
166 7e2c5b9e Guido Trotter
  [AS_HELP_STRING([--with-kvm-path=PATH],
167 7e2c5b9e Guido Trotter
    [absolute path to the kvm binary]
168 7e2c5b9e Guido Trotter
    [ (default is /usr/bin/kvm)]
169 7e2c5b9e Guido Trotter
  )],
170 7e2c5b9e Guido Trotter
  [kvm_path="$withval"],
171 7e2c5b9e Guido Trotter
  [kvm_path="/usr/bin/kvm"])
172 7e2c5b9e Guido Trotter
AC_SUBST(KVM_PATH, $kvm_path)
173 7e2c5b9e Guido Trotter
174 89b70f39 Iustin Pop
# --with-lvm-stripecount=...
175 3736cb6b Iustin Pop
AC_ARG_WITH([lvm-stripecount],
176 3736cb6b Iustin Pop
  [AS_HELP_STRING([--with-lvm-stripecount=NUM],
177 43e11798 Andrea Spadaccini
    [the default number of stripes to use for LVM volumes]
178 7b3ac94d Iustin Pop
    [ (default is 1)]
179 3736cb6b Iustin Pop
  )],
180 3736cb6b Iustin Pop
  [lvm_stripecount="$withval"],
181 52fca4ba Michael Hanselmann
  [lvm_stripecount=1])
182 3736cb6b Iustin Pop
AC_SUBST(LVM_STRIPECOUNT, $lvm_stripecount)
183 3736cb6b Iustin Pop
184 052783ff Michael Hanselmann
# --with-ssh-login-user=...
185 052783ff Michael Hanselmann
AC_ARG_WITH([ssh-login-user],
186 052783ff Michael Hanselmann
  [AS_HELP_STRING([--with-ssh-login-user=USERNAME],
187 052783ff Michael Hanselmann
    [user to use for SSH logins within the cluster (default is root)]
188 052783ff Michael Hanselmann
  )],
189 052783ff Michael Hanselmann
  [ssh_login_user="$withval"],
190 052783ff Michael Hanselmann
  [ssh_login_user=root])
191 052783ff Michael Hanselmann
AC_SUBST(SSH_LOGIN_USER, $ssh_login_user)
192 052783ff Michael Hanselmann
193 052783ff Michael Hanselmann
# --with-ssh-console-user=...
194 052783ff Michael Hanselmann
AC_ARG_WITH([ssh-console-user],
195 052783ff Michael Hanselmann
  [AS_HELP_STRING([--with-ssh-console-user=USERNAME],
196 052783ff Michael Hanselmann
    [user to use for SSH logins to access instance consoles (default is root)]
197 052783ff Michael Hanselmann
  )],
198 052783ff Michael Hanselmann
  [ssh_console_user="$withval"],
199 052783ff Michael Hanselmann
  [ssh_console_user=root])
200 052783ff Michael Hanselmann
AC_SUBST(SSH_CONSOLE_USER, $ssh_console_user)
201 052783ff Michael Hanselmann
202 a6798ce1 Michael Hanselmann
# --with-default-user=...
203 a6798ce1 Michael Hanselmann
AC_ARG_WITH([default-user],
204 a6798ce1 Michael Hanselmann
  [AS_HELP_STRING([--with-default-user=USERNAME],
205 a6798ce1 Michael Hanselmann
    [default user for daemons]
206 a6798ce1 Michael Hanselmann
    [ (default is to run all daemons as root)]
207 a6798ce1 Michael Hanselmann
  )],
208 a6798ce1 Michael Hanselmann
  [user_default="$withval"],
209 a6798ce1 Michael Hanselmann
  [user_default=root])
210 a6798ce1 Michael Hanselmann
211 a6798ce1 Michael Hanselmann
# --with-default-group=...
212 a6798ce1 Michael Hanselmann
AC_ARG_WITH([default-group],
213 a6798ce1 Michael Hanselmann
  [AS_HELP_STRING([--with-default-group=GROUPNAME],
214 a6798ce1 Michael Hanselmann
    [default group for daemons]
215 a6798ce1 Michael Hanselmann
    [ (default is to run all daemons under group root)]
216 a6798ce1 Michael Hanselmann
  )],
217 a6798ce1 Michael Hanselmann
  [group_default="$withval"],
218 a6798ce1 Michael Hanselmann
  [group_default=root])
219 a6798ce1 Michael Hanselmann
220 0d150c50 René Nussbaumer
# --with-user-prefix=...
221 0d150c50 René Nussbaumer
AC_ARG_WITH([user-prefix],
222 0d150c50 René Nussbaumer
  [AS_HELP_STRING([--with-user-prefix=PREFIX],
223 0d150c50 René Nussbaumer
    [prefix for daemon users]
224 a6798ce1 Michael Hanselmann
    [ (default is to run all daemons as root; use --with-default-user]
225 a6798ce1 Michael Hanselmann
    [ to change the default)]
226 0d150c50 René Nussbaumer
  )],
227 3794937c René Nussbaumer
  [user_masterd="${withval}masterd";
228 3af1359f Jose A. Lopes
   user_metad="${withval}metad";
229 0d150c50 René Nussbaumer
   user_rapi="${withval}rapi";
230 3794937c René Nussbaumer
   user_confd="${withval}confd";
231 fb0fa957 Petr Pudlak
   user_wconfd="${withval}wconfd";
232 4084d18f Jose A. Lopes
   user_kvmd="$user_default";
233 3695a4e0 Thomas Thrainer
   user_luxid="${withval}luxid";
234 14013e5d Michele Tartara
   user_noded="$user_default";
235 ebcbcfee Michele Tartara
   user_mond="$user_default"],
236 a6798ce1 Michael Hanselmann
  [user_masterd="$user_default";
237 3af1359f Jose A. Lopes
   user_metad="$user_default";
238 a6798ce1 Michael Hanselmann
   user_rapi="$user_default";
239 a6798ce1 Michael Hanselmann
   user_confd="$user_default";
240 fb0fa957 Petr Pudlak
   user_wconfd="$user_default";
241 4084d18f Jose A. Lopes
   user_kvmd="$user_default";
242 3695a4e0 Thomas Thrainer
   user_luxid="$user_default";
243 14013e5d Michele Tartara
   user_noded="$user_default";
244 14013e5d Michele Tartara
   user_mond="$user_default"])
245 0d150c50 René Nussbaumer
AC_SUBST(MASTERD_USER, $user_masterd)
246 3af1359f Jose A. Lopes
AC_SUBST(METAD_USER, $user_metad)
247 0d150c50 René Nussbaumer
AC_SUBST(RAPI_USER, $user_rapi)
248 0d150c50 René Nussbaumer
AC_SUBST(CONFD_USER, $user_confd)
249 fb0fa957 Petr Pudlak
AC_SUBST(WCONFD_USER, $user_wconfd)
250 4084d18f Jose A. Lopes
AC_SUBST(KVMD_USER, $user_kvmd)
251 3695a4e0 Thomas Thrainer
AC_SUBST(LUXID_USER, $user_luxid)
252 0d150c50 René Nussbaumer
AC_SUBST(NODED_USER, $user_noded)
253 14013e5d Michele Tartara
AC_SUBST(MOND_USER, $user_mond)
254 0d150c50 René Nussbaumer
255 0d150c50 René Nussbaumer
# --with-group-prefix=...
256 0d150c50 René Nussbaumer
AC_ARG_WITH([group-prefix],
257 0d150c50 René Nussbaumer
  [AS_HELP_STRING([--with-group-prefix=PREFIX],
258 0d150c50 René Nussbaumer
    [prefix for daemon POSIX groups]
259 a6798ce1 Michael Hanselmann
    [ (default is to run all daemons under group root; use]
260 a6798ce1 Michael Hanselmann
    [ --with-default-group to change the default)]
261 0d150c50 René Nussbaumer
  )],
262 3794937c René Nussbaumer
  [group_rapi="${withval}rapi";
263 3794937c René Nussbaumer
   group_admin="${withval}admin";
264 3794937c René Nussbaumer
   group_confd="${withval}confd";
265 fb0fa957 Petr Pudlak
   group_wconfd="${withval}wconfd";
266 4084d18f Jose A. Lopes
   group_kvmd="$group_default";
267 3695a4e0 Thomas Thrainer
   group_luxid="${withval}luxid";
268 3794937c René Nussbaumer
   group_masterd="${withval}masterd";
269 3af1359f Jose A. Lopes
   group_metad="${withval}metad";
270 a6798ce1 Michael Hanselmann
   group_noded="$group_default";
271 14013e5d Michele Tartara
   group_daemons="${withval}daemons";
272 ebcbcfee Michele Tartara
   group_mond="$group_default"],
273 a6798ce1 Michael Hanselmann
  [group_rapi="$group_default";
274 a6798ce1 Michael Hanselmann
   group_admin="$group_default";
275 a6798ce1 Michael Hanselmann
   group_confd="$group_default";
276 fb0fa957 Petr Pudlak
   group_wconfd="$group_default";
277 4084d18f Jose A. Lopes
   group_kvmd="$group_default";
278 3695a4e0 Thomas Thrainer
   group_luxid="$group_default";
279 a6798ce1 Michael Hanselmann
   group_masterd="$group_default";
280 3af1359f Jose A. Lopes
   group_metad="$group_default";
281 a6798ce1 Michael Hanselmann
   group_noded="$group_default";
282 14013e5d Michele Tartara
   group_daemons="$group_default";
283 14013e5d Michele Tartara
   group_mond="$group_default"])
284 0d150c50 René Nussbaumer
AC_SUBST(RAPI_GROUP, $group_rapi)
285 0d150c50 René Nussbaumer
AC_SUBST(ADMIN_GROUP, $group_admin)
286 0d150c50 René Nussbaumer
AC_SUBST(CONFD_GROUP, $group_confd)
287 fb0fa957 Petr Pudlak
AC_SUBST(WCONFD_GROUP, $group_wconfd)
288 4084d18f Jose A. Lopes
AC_SUBST(KVMD_GROUP, $group_kvmd)
289 3695a4e0 Thomas Thrainer
AC_SUBST(LUXID_GROUP, $group_luxid)
290 0d150c50 René Nussbaumer
AC_SUBST(MASTERD_GROUP, $group_masterd)
291 3af1359f Jose A. Lopes
AC_SUBST(METAD_GROUP, $group_metad)
292 03881cb0 René Nussbaumer
AC_SUBST(NODED_GROUP, $group_noded)
293 0d150c50 René Nussbaumer
AC_SUBST(DAEMONS_GROUP, $group_daemons)
294 14013e5d Michele Tartara
AC_SUBST(MOND_GROUP, $group_mond)
295 0d150c50 René Nussbaumer
296 0d150c50 René Nussbaumer
# Print the config to the user
297 0d150c50 René Nussbaumer
AC_MSG_NOTICE([Running ganeti-masterd as $group_masterd:$group_masterd])
298 3af1359f Jose A. Lopes
AC_MSG_NOTICE([Running ganeti-metad as $group_metad:$group_metad])
299 0d150c50 René Nussbaumer
AC_MSG_NOTICE([Running ganeti-rapi as $user_rapi:$group_rapi])
300 0d150c50 René Nussbaumer
AC_MSG_NOTICE([Running ganeti-confd as $user_confd:$group_confd])
301 fb0fa957 Petr Pudlak
AC_MSG_NOTICE([Running ganeti-wconfd as $user_wconfd:$group_wconfd])
302 3695a4e0 Thomas Thrainer
AC_MSG_NOTICE([Running ganeti-luxid as $user_luxid:$group_luxid])
303 0d150c50 René Nussbaumer
AC_MSG_NOTICE([Group for daemons is $group_daemons])
304 0d150c50 René Nussbaumer
AC_MSG_NOTICE([Group for clients is $group_admin])
305 0d150c50 René Nussbaumer
306 89b70f39 Iustin Pop
# --enable-drbd-barriers
307 89b70f39 Iustin Pop
AC_ARG_ENABLE([drbd-barriers],
308 89b70f39 Iustin Pop
  [AS_HELP_STRING([--enable-drbd-barriers],
309 52fca4ba Michael Hanselmann
                  m4_normalize([enable the DRBD barriers functionality by
310 52fca4ba Michael Hanselmann
                                default (>= 8.0.12) (default: enabled)]))],
311 89b70f39 Iustin Pop
  [[if test "$enableval" != no; then
312 8a69b3a8 Andrea Spadaccini
      DRBD_BARRIERS=n
313 8a69b3a8 Andrea Spadaccini
      DRBD_NO_META_FLUSH=False
314 89b70f39 Iustin Pop
    else
315 15618b63 Michael Hanselmann
      DRBD_BARRIERS=bf
316 8a69b3a8 Andrea Spadaccini
      DRBD_NO_META_FLUSH=True
317 89b70f39 Iustin Pop
    fi
318 89b70f39 Iustin Pop
  ]],
319 8a69b3a8 Andrea Spadaccini
  [DRBD_BARRIERS=n
320 8a69b3a8 Andrea Spadaccini
   DRBD_NO_META_FLUSH=False
321 8a69b3a8 Andrea Spadaccini
  ])
322 89b70f39 Iustin Pop
AC_SUBST(DRBD_BARRIERS, $DRBD_BARRIERS)
323 8a69b3a8 Andrea Spadaccini
AC_SUBST(DRBD_NO_META_FLUSH, $DRBD_NO_META_FLUSH)
324 89b70f39 Iustin Pop
325 551b6283 Iustin Pop
# --enable-syslog[=no/yes/only]
326 551b6283 Iustin Pop
AC_ARG_ENABLE([syslog],
327 551b6283 Iustin Pop
  [AS_HELP_STRING([--enable-syslog],
328 551b6283 Iustin Pop
    [enable use of syslog (default: disabled), one of no/yes/only])],
329 551b6283 Iustin Pop
  [[case "$enableval" in
330 551b6283 Iustin Pop
      no)
331 551b6283 Iustin Pop
        SYSLOG=no
332 551b6283 Iustin Pop
        ;;
333 551b6283 Iustin Pop
      yes)
334 551b6283 Iustin Pop
        SYSLOG=yes
335 551b6283 Iustin Pop
        ;;
336 551b6283 Iustin Pop
      only)
337 551b6283 Iustin Pop
        SYSLOG=only
338 551b6283 Iustin Pop
        ;;
339 551b6283 Iustin Pop
      *)
340 551b6283 Iustin Pop
        SYSLOG=
341 551b6283 Iustin Pop
        ;;
342 551b6283 Iustin Pop
    esac
343 551b6283 Iustin Pop
  ]],
344 551b6283 Iustin Pop
  [SYSLOG=no])
345 551b6283 Iustin Pop
346 551b6283 Iustin Pop
if test -z "$SYSLOG"
347 551b6283 Iustin Pop
then
348 551b6283 Iustin Pop
  AC_MSG_ERROR([invalid value for syslog, choose one of no/yes/only])
349 551b6283 Iustin Pop
fi
350 551b6283 Iustin Pop
AC_SUBST(SYSLOG_USAGE, $SYSLOG)
351 551b6283 Iustin Pop
352 ba0d1044 Jose A. Lopes
# --enable-restricted-commands[=no/yes]
353 1fdeb284 Michael Hanselmann
AC_ARG_ENABLE([restricted-commands],
354 1fdeb284 Michael Hanselmann
  [AS_HELP_STRING([--enable-restricted-commands],
355 1fdeb284 Michael Hanselmann
                  m4_normalize([enable restricted commands in the node daemon
356 9108958f Michael Hanselmann
                                (default: disabled)]))],
357 9108958f Michael Hanselmann
  [[if test "$enableval" = no; then
358 1fdeb284 Michael Hanselmann
      enable_restricted_commands=False
359 9108958f Michael Hanselmann
    else
360 1fdeb284 Michael Hanselmann
      enable_restricted_commands=True
361 9108958f Michael Hanselmann
    fi
362 9108958f Michael Hanselmann
  ]],
363 1fdeb284 Michael Hanselmann
  [enable_restricted_commands=False])
364 1fdeb284 Michael Hanselmann
AC_SUBST(ENABLE_RESTRICTED_COMMANDS, $enable_restricted_commands)
365 9108958f Michael Hanselmann
366 3536c792 Iustin Pop
# --with-disk-separator=...
367 3536c792 Iustin Pop
AC_ARG_WITH([disk-separator],
368 3536c792 Iustin Pop
  [AS_HELP_STRING([--with-disk-separator=STRING],
369 30841576 Michael Hanselmann
    [Disk index separator, useful if the default of ':' is handled]
370 30841576 Michael Hanselmann
    [ specially by the hypervisor]
371 3536c792 Iustin Pop
  )],
372 3536c792 Iustin Pop
  [disk_separator="$withval"],
373 3536c792 Iustin Pop
  [disk_separator=":"])
374 3536c792 Iustin Pop
AC_SUBST(DISK_SEPARATOR, $disk_separator)
375 3536c792 Iustin Pop
376 a5d17f9f Michael Hanselmann
# Check common programs
377 a8083063 Iustin Pop
AC_PROG_INSTALL
378 9ff7e35c Michael Hanselmann
AC_PROG_LN_S
379 a8083063 Iustin Pop
380 a849f598 Klaus Aehlig
# check if ln is the GNU version of ln (and hence supports -T)
381 a849f598 Klaus Aehlig
if ln --version 2> /dev/null | head -1 | grep -q GNU
382 a849f598 Klaus Aehlig
then
383 a849f598 Klaus Aehlig
  AC_SUBST(HAS_GNU_LN, True)
384 a849f598 Klaus Aehlig
else
385 a849f598 Klaus Aehlig
  AC_SUBST(HAS_GNU_LN, False)
386 a849f598 Klaus Aehlig
fi
387 a849f598 Klaus Aehlig
388 c4dfb0b6 Andrea Spadaccini
# Check for the ip command
389 c4dfb0b6 Andrea Spadaccini
AC_ARG_VAR(IP_PATH, [ip path])
390 c4dfb0b6 Andrea Spadaccini
AC_PATH_PROG(IP_PATH, [ip], [])
391 c4dfb0b6 Andrea Spadaccini
if test -z "$IP_PATH"
392 c4dfb0b6 Andrea Spadaccini
then
393 c4dfb0b6 Andrea Spadaccini
  AC_MSG_ERROR([ip command not found])
394 c4dfb0b6 Andrea Spadaccini
fi
395 c4dfb0b6 Andrea Spadaccini
396 18e2b6e4 Iustin Pop
# Check for pandoc
397 5208e732 Iustin Pop
AC_ARG_VAR(PANDOC, [pandoc path])
398 5208e732 Iustin Pop
AC_PATH_PROG(PANDOC, [pandoc], [])
399 5208e732 Iustin Pop
if test -z "$PANDOC"
400 5208e732 Iustin Pop
then
401 5208e732 Iustin Pop
  AC_MSG_WARN([pandoc not found, man pages rebuild will not be possible])
402 5208e732 Iustin Pop
fi
403 5208e732 Iustin Pop
404 d17e74b4 Iustin Pop
# Check for python-sphinx
405 d17e74b4 Iustin Pop
AC_ARG_VAR(SPHINX, [sphinx-build path])
406 d17e74b4 Iustin Pop
AC_PATH_PROG(SPHINX, [sphinx-build], [])
407 d17e74b4 Iustin Pop
if test -z "$SPHINX"
408 f05c99f3 Michael Hanselmann
then
409 30841576 Michael Hanselmann
  AC_MSG_WARN(m4_normalize([sphinx-build not found, documentation rebuild will
410 30841576 Michael Hanselmann
                            not be possible]))
411 96b28307 Michael Hanselmann
else
412 96b28307 Michael Hanselmann
  # Sphinx exits with code 1 when it prints its usage
413 96b28307 Michael Hanselmann
  sphinxver=`{ $SPHINX --version 2>&1 || :; } | head -n 3`
414 96b28307 Michael Hanselmann
415 96b28307 Michael Hanselmann
  if ! echo "$sphinxver" | grep -q -w -e '^Sphinx' -e '^Usage:'; then
416 96b28307 Michael Hanselmann
    AC_MSG_ERROR([Unable to determine Sphinx version])
417 96b28307 Michael Hanselmann
418 96b28307 Michael Hanselmann
  # Note: Character classes ([...]) need to be double quoted due to autoconf
419 96b28307 Michael Hanselmann
  # using m4
420 47387ccb Klaus Aehlig
  elif ! echo "$sphinxver" | grep -q -E \
421 47387ccb Klaus Aehlig
       '^Sphinx[[[:space:]]]+(\(sphinx-build\)[[[:space:]]]+|v)[[1-9]]\>'; then
422 96b28307 Michael Hanselmann
    AC_MSG_ERROR([Sphinx 1.0 or higher is required])
423 96b28307 Michael Hanselmann
  fi
424 f05c99f3 Michael Hanselmann
fi
425 d99dd9c7 Michele Tartara
AM_CONDITIONAL([HAS_SPHINX], [test -n "$SPHINX"])
426 f05c99f3 Michael Hanselmann
427 41806ef4 Michael Hanselmann
AC_ARG_ENABLE([manpages-in-doc],
428 41806ef4 Michael Hanselmann
  [AS_HELP_STRING([--enable-manpages-in-doc],
429 41806ef4 Michael Hanselmann
                  m4_normalize([include man pages in HTML documentation
430 41806ef4 Michael Hanselmann
                                (requires sphinx; default disabled)]))],
431 41806ef4 Michael Hanselmann
  [case "$enableval" in
432 41806ef4 Michael Hanselmann
      yes) manpages_in_doc=yes ;;
433 41806ef4 Michael Hanselmann
      no) manpages_in_doc= ;;
434 41806ef4 Michael Hanselmann
      *)
435 41806ef4 Michael Hanselmann
        AC_MSG_ERROR([Bad value $enableval for --enable-manpages-in-doc])
436 41806ef4 Michael Hanselmann
        ;;
437 41806ef4 Michael Hanselmann
    esac
438 41806ef4 Michael Hanselmann
  ],
439 41806ef4 Michael Hanselmann
  [manpages_in_doc=])
440 41806ef4 Michael Hanselmann
AM_CONDITIONAL([MANPAGES_IN_DOC], [test -n "$manpages_in_doc"])
441 41806ef4 Michael Hanselmann
AC_SUBST(MANPAGES_IN_DOC, $manpages_in_doc)
442 41806ef4 Michael Hanselmann
443 41806ef4 Michael Hanselmann
if test -z "$SPHINX" -a -n "$manpages_in_doc"; then
444 41806ef4 Michael Hanselmann
  AC_MSG_ERROR([Including man pages in HTML documentation requires sphinx])
445 41806ef4 Michael Hanselmann
fi
446 41806ef4 Michael Hanselmann
447 f86e82ef Iustin Pop
# Check for graphviz (dot)
448 f86e82ef Iustin Pop
AC_ARG_VAR(DOT, [dot path])
449 f86e82ef Iustin Pop
AC_PATH_PROG(DOT, [dot], [])
450 f86e82ef Iustin Pop
if test -z "$DOT"
451 f86e82ef Iustin Pop
then
452 30841576 Michael Hanselmann
  AC_MSG_WARN(m4_normalize([dot (from the graphviz suite) not found,
453 30841576 Michael Hanselmann
                            documentation rebuild not possible]))
454 f86e82ef Iustin Pop
fi
455 f86e82ef Iustin Pop
456 6d7cc5ff Michael Hanselmann
# Check for pylint
457 6d7cc5ff Michael Hanselmann
AC_ARG_VAR(PYLINT, [pylint path])
458 6d7cc5ff Michael Hanselmann
AC_PATH_PROG(PYLINT, [pylint], [])
459 6d7cc5ff Michael Hanselmann
if test -z "$PYLINT"
460 6d7cc5ff Michael Hanselmann
then
461 6d7cc5ff Michael Hanselmann
  AC_MSG_WARN([pylint not found, checking code will not be possible])
462 6d7cc5ff Michael Hanselmann
fi
463 6d7cc5ff Michael Hanselmann
464 08366664 Michael Hanselmann
# Check for pep8
465 08366664 Michael Hanselmann
AC_ARG_VAR(PEP8, [pep8 path])
466 08366664 Michael Hanselmann
AC_PATH_PROG(PEP8, [pep8], [])
467 08366664 Michael Hanselmann
if test -z "$PEP8"
468 08366664 Michael Hanselmann
then
469 08366664 Michael Hanselmann
  AC_MSG_WARN([pep8 not found, checking code will not be complete])
470 08366664 Michael Hanselmann
fi
471 141c8421 Michael Hanselmann
AM_CONDITIONAL([HAS_PEP8], [test -n "$PEP8"])
472 141c8421 Michael Hanselmann
473 141c8421 Michael Hanselmann
# Check for python-coverage
474 141c8421 Michael Hanselmann
AC_ARG_VAR(PYCOVERAGE, [python-coverage path])
475 141c8421 Michael Hanselmann
AC_PATH_PROGS(PYCOVERAGE, [python-coverage coverage], [])
476 141c8421 Michael Hanselmann
if test -z "$PYCOVERAGE"
477 141c8421 Michael Hanselmann
then
478 141c8421 Michael Hanselmann
  AC_MSG_WARN(m4_normalize([python-coverage or coverage not found, evaluating
479 141c8421 Michael Hanselmann
                            Python test coverage will not be possible]))
480 141c8421 Michael Hanselmann
fi
481 08366664 Michael Hanselmann
482 fe5b0c42 Michael Hanselmann
# Check for socat
483 fe5b0c42 Michael Hanselmann
AC_ARG_VAR(SOCAT, [socat path])
484 fe5b0c42 Michael Hanselmann
AC_PATH_PROG(SOCAT, [socat], [])
485 87c1d0c7 Guido Trotter
if test -z "$SOCAT"
486 87c1d0c7 Guido Trotter
then
487 fe5b0c42 Michael Hanselmann
  AC_MSG_ERROR([socat not found])
488 87c1d0c7 Guido Trotter
fi
489 87c1d0c7 Guido Trotter
490 a002ed79 Agata Murawska
# Check for qemu-img
491 a002ed79 Agata Murawska
AC_ARG_VAR(QEMUIMG_PATH, [qemu-img path])
492 a002ed79 Agata Murawska
AC_PATH_PROG(QEMUIMG_PATH, [qemu-img], [])
493 a002ed79 Agata Murawska
if test -z "$QEMUIMG_PATH"
494 a002ed79 Agata Murawska
then
495 a002ed79 Agata Murawska
  AC_MSG_WARN([qemu-img not found, using ovfconverter will not be possible])
496 a002ed79 Agata Murawska
fi
497 a002ed79 Agata Murawska
498 21a5e56c Iustin Pop
# --enable-confd
499 21a5e56c Iustin Pop
ENABLE_CONFD=
500 21a5e56c Iustin Pop
AC_ARG_ENABLE([confd],
501 21a5e56c Iustin Pop
  [AS_HELP_STRING([--enable-confd],
502 21a5e56c Iustin Pop
  [enable the ganeti-confd daemon (default: check)])],
503 21a5e56c Iustin Pop
  [],
504 21a5e56c Iustin Pop
  [enable_confd=check])
505 acf70442 Iustin Pop
506 14013e5d Michele Tartara
ENABLE_MOND=
507 35c6e63d Michele Tartara
AC_ARG_ENABLE([monitoring],
508 35c6e63d Michele Tartara
  [AS_HELP_STRING([--enable-monitoring],
509 13cc7b84 Michele Tartara
  [enable the ganeti monitoring daemon (default: check)])],
510 35c6e63d Michele Tartara
  [],
511 35c6e63d Michele Tartara
  [enable_monitoring=check])
512 35c6e63d Michele Tartara
513 e5bd9de5 Iustin Pop
# Check for ghc
514 e5bd9de5 Iustin Pop
AC_ARG_VAR(GHC, [ghc path])
515 e5bd9de5 Iustin Pop
AC_PATH_PROG(GHC, [ghc], [])
516 e5bd9de5 Iustin Pop
if test -z "$GHC"; then
517 21a5e56c Iustin Pop
  AC_MSG_FAILURE([ghc not found, compilation will not possible])
518 e5bd9de5 Iustin Pop
fi
519 e5bd9de5 Iustin Pop
520 39f0eea5 Iustin Pop
AC_MSG_CHECKING([checking for extra GHC flags])
521 52fca4ba Michael Hanselmann
GHC_BYVERSION_FLAGS=
522 39f0eea5 Iustin Pop
# check for GHC supported flags that vary accross versions
523 39f0eea5 Iustin Pop
for flag in -fwarn-incomplete-uni-patterns; do
524 52fca4ba Michael Hanselmann
  if $GHC -e '0' $flag >/dev/null 2>/dev/null; then
525 39f0eea5 Iustin Pop
   GHC_BYVERSION_FLAGS="$GHC_BYVERSION_FLAGS $flag"
526 39f0eea5 Iustin Pop
  fi
527 39f0eea5 Iustin Pop
done
528 39f0eea5 Iustin Pop
AC_MSG_RESULT($GHC_BYVERSION_FLAGS)
529 39f0eea5 Iustin Pop
AC_SUBST(GHC_BYVERSION_FLAGS)
530 39f0eea5 Iustin Pop
531 e5bd9de5 Iustin Pop
# Check for ghc-pkg
532 e5bd9de5 Iustin Pop
AC_ARG_VAR(GHC_PKG, [ghc-pkg path])
533 e5bd9de5 Iustin Pop
AC_PATH_PROG(GHC_PKG, [ghc-pkg], [])
534 e5bd9de5 Iustin Pop
if test -z "$GHC_PKG"; then
535 21a5e56c Iustin Pop
  AC_MSG_FAILURE([ghc-pkg not found, compilation will not be possible])
536 21a5e56c Iustin Pop
fi
537 21a5e56c Iustin Pop
538 21a5e56c Iustin Pop
# check for modules, first custom/special checks
539 21a5e56c Iustin Pop
AC_MSG_NOTICE([checking for required haskell modules])
540 d9a900dc Iustin Pop
HS_PARALLEL3=
541 d9a900dc Iustin Pop
AC_GHC_PKG_CHECK([parallel-3.*], [HS_PARALLEL3=-DPARALLEL3],
542 21a5e56c Iustin Pop
                 [AC_GHC_PKG_REQUIRE(parallel)], t)
543 d9a900dc Iustin Pop
AC_SUBST(HS_PARALLEL3)
544 21a5e56c Iustin Pop
545 21a5e56c Iustin Pop
# and now standard modules
546 1ca709c1 Iustin Pop
AC_GHC_PKG_REQUIRE(curl)
547 21a5e56c Iustin Pop
AC_GHC_PKG_REQUIRE(json)
548 21a5e56c Iustin Pop
AC_GHC_PKG_REQUIRE(network)
549 21a5e56c Iustin Pop
AC_GHC_PKG_REQUIRE(mtl)
550 21a5e56c Iustin Pop
AC_GHC_PKG_REQUIRE(bytestring)
551 6b95cc5e Klaus Aehlig
AC_GHC_PKG_REQUIRE(base64-bytestring-1.*, t)
552 21a5e56c Iustin Pop
AC_GHC_PKG_REQUIRE(utf8-string)
553 7afed8fe Klaus Aehlig
AC_GHC_PKG_REQUIRE(zlib)
554 6c60b266 Klaus Aehlig
AC_GHC_PKG_REQUIRE(hslogger)
555 636e66d1 Petr Pudlak
AC_GHC_PKG_REQUIRE(process)
556 636e66d1 Petr Pudlak
AC_GHC_PKG_REQUIRE(attoparsec)
557 636e66d1 Petr Pudlak
AC_GHC_PKG_REQUIRE(vector)
558 636e66d1 Petr Pudlak
AC_GHC_PKG_REQUIRE(text)
559 636e66d1 Petr Pudlak
AC_GHC_PKG_REQUIRE(hinotify)
560 636e66d1 Petr Pudlak
AC_GHC_PKG_REQUIRE(Crypto)
561 fb1a5271 Petr Pudlak
AC_GHC_PKG_REQUIRE(lifted-base)
562 21a5e56c Iustin Pop
563 0e627824 Klaus Aehlig
# extra modules for confd functionality; also needed for tests
564 0e627824 Klaus Aehlig
HS_NODEV=
565 0e627824 Klaus Aehlig
CONFD_PKG=
566 636e66d1 Petr Pudlak
# if a new confd dependency is needed, add it here like:
567 636e66d1 Petr Pudlak
# AC_GHC_PKG_CHECK([somepkg], [], [HS_NODEV=1; CONFD_PKG="$CONFD_PKG somepkg"])
568 d9a900dc Iustin Pop
HS_REGEX_PCRE=-DNO_REGEX_PCRE
569 0e627824 Klaus Aehlig
AC_GHC_PKG_CHECK([regex-pcre], [HS_REGEX_PCRE=],
570 0e627824 Klaus Aehlig
                 [HS_NODEV=1; CONFD_PKG="$CONFD_PKG regex-pcre"])
571 0e627824 Klaus Aehlig
572 21a5e56c Iustin Pop
has_confd=False
573 52fca4ba Michael Hanselmann
if test "$enable_confd" != no; then
574 21a5e56c Iustin Pop
  if test -z "$CONFD_PKG"; then
575 21a5e56c Iustin Pop
    has_confd=True
576 52fca4ba Michael Hanselmann
  elif test "$enable_confd" = check; then
577 52fca4ba Michael Hanselmann
    AC_MSG_WARN(m4_normalize([The required extra libraries for confd were
578 52fca4ba Michael Hanselmann
                              not found ($CONFD_PKG), confd disabled]))
579 e5bd9de5 Iustin Pop
  else
580 52fca4ba Michael Hanselmann
    AC_MSG_FAILURE(m4_normalize([The confd functionality was requested, but
581 52fca4ba Michael Hanselmann
                                 required libraries were not found:
582 52fca4ba Michael Hanselmann
                                 $CONFD_PKG]))
583 e5bd9de5 Iustin Pop
  fi
584 e5bd9de5 Iustin Pop
fi
585 d9a900dc Iustin Pop
AC_SUBST(HS_REGEX_PCRE)
586 52fca4ba Michael Hanselmann
if test "$has_confd" = True; then
587 21a5e56c Iustin Pop
  AC_MSG_NOTICE([Enabling confd usage])
588 21a5e56c Iustin Pop
fi
589 21a5e56c Iustin Pop
AC_SUBST(ENABLE_CONFD, $has_confd)
590 21a5e56c Iustin Pop
AM_CONDITIONAL([ENABLE_CONFD], [test x$has_confd = xTrue])
591 21a5e56c Iustin Pop
592 0e627824 Klaus Aehlig
#extra modules for monitoring daemon functionality; also needed for tests
593 0e627824 Klaus Aehlig
MONITORING_PKG=
594 0e627824 Klaus Aehlig
AC_GHC_PKG_CHECK([snap-server], [],
595 0e627824 Klaus Aehlig
                 [NS_NODEV=1; MONITORING_PKG="$MONITORING_PKG snap-server"])
596 0e627824 Klaus Aehlig
597 35c6e63d Michele Tartara
has_monitoring=False
598 52fca4ba Michael Hanselmann
if test "$enable_monitoring" != no; then
599 5d453688 Michele Tartara
  MONITORING_DEP=
600 5d453688 Michele Tartara
  if test "$has_confd" = False; then
601 5d453688 Michele Tartara
    MONITORING_DEP="$MONITORING_DEP confd"
602 5d453688 Michele Tartara
  fi
603 5d453688 Michele Tartara
  has_monitoring_pkg=False
604 35c6e63d Michele Tartara
  if test -z "$MONITORING_PKG"; then
605 5d453688 Michele Tartara
    has_monitoring_pkg=True
606 52fca4ba Michael Hanselmann
  elif test "$enable_monitoring" = check; then
607 52fca4ba Michael Hanselmann
    AC_MSG_WARN(m4_normalize([The required extra libraries for the monitoring
608 13cc7b84 Michele Tartara
                              daemon were not found ($MONITORING_PKG),
609 52fca4ba Michael Hanselmann
                              monitoring disabled]))
610 35c6e63d Michele Tartara
  else
611 52fca4ba Michael Hanselmann
    AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but
612 52fca4ba Michael Hanselmann
                                 required libraries were not found:
613 52fca4ba Michael Hanselmann
                                 $MONITORING_PKG]))
614 35c6e63d Michele Tartara
  fi
615 5d453688 Michele Tartara
  has_monitoring_dep=False
616 5d453688 Michele Tartara
  if test -z "$MONITORING_DEP"; then
617 5d453688 Michele Tartara
    has_monitoring_dep=True
618 5d453688 Michele Tartara
  elif test "$enable_monitoring" = check; then
619 5d453688 Michele Tartara
    AC_MSG_WARN(m4_normalize([The optional Ganeti components required for the
620 5d453688 Michele Tartara
                              monitoring agent were not enabled
621 5d453688 Michele Tartara
                              ($MONITORING_DEP), monitoring disabled]))
622 5d453688 Michele Tartara
  else
623 5d453688 Michele Tartara
    AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but
624 5d453688 Michele Tartara
                                 required optional Ganeti components were not
625 5d453688 Michele Tartara
                                 found: $MONITORING_DEP]))
626 5d453688 Michele Tartara
  fi
627 5d453688 Michele Tartara
628 35c6e63d Michele Tartara
fi
629 5d453688 Michele Tartara
if test "$has_monitoring_pkg" = True -a "$has_monitoring_dep" = True; then
630 5d453688 Michele Tartara
  has_monitoring=True
631 35c6e63d Michele Tartara
  AC_MSG_NOTICE([Enabling the monitoring agent usage])
632 35c6e63d Michele Tartara
fi
633 14013e5d Michele Tartara
AC_SUBST(ENABLE_MOND, $has_monitoring)
634 14013e5d Michele Tartara
AM_CONDITIONAL([ENABLE_MOND], [test "$has_monitoring" = True])
635 35c6e63d Michele Tartara
636 21a5e56c Iustin Pop
# development modules
637 d9a900dc Iustin Pop
AC_GHC_PKG_CHECK([QuickCheck-2.*], [], [HS_NODEV=1], t)
638 d9a900dc Iustin Pop
AC_GHC_PKG_CHECK([test-framework-0.6*], [], [HS_NODEV=1], t)
639 d9a900dc Iustin Pop
AC_GHC_PKG_CHECK([test-framework-hunit], [], [HS_NODEV=1])
640 d9a900dc Iustin Pop
AC_GHC_PKG_CHECK([test-framework-quickcheck2], [], [HS_NODEV=1])
641 d9a900dc Iustin Pop
AC_GHC_PKG_CHECK([temporary], [], [HS_NODEV=1])
642 d9a900dc Iustin Pop
if test -n "$HS_NODEV"; then
643 21a5e56c Iustin Pop
   AC_MSG_WARN(m4_normalize([Required development modules were not found,
644 21a5e56c Iustin Pop
                             you won't be able to run Haskell unittests]))
645 21a5e56c Iustin Pop
else
646 21a5e56c Iustin Pop
   AC_MSG_NOTICE([Haskell development modules found, unittests enabled])
647 21a5e56c Iustin Pop
fi
648 d9a900dc Iustin Pop
AC_SUBST(HS_NODEV)
649 eb84bb80 Petr Pudlak
AM_CONDITIONAL([HS_UNIT], [test -n $HS_NODEV])
650 e5bd9de5 Iustin Pop
651 e5bd9de5 Iustin Pop
# Check for HsColour
652 d9a900dc Iustin Pop
HS_APIDOC=no
653 e5bd9de5 Iustin Pop
AC_ARG_VAR(HSCOLOUR, [HsColour path])
654 e5bd9de5 Iustin Pop
AC_PATH_PROG(HSCOLOUR, [HsColour], [])
655 e5bd9de5 Iustin Pop
if test -z "$HSCOLOUR"; then
656 30841576 Michael Hanselmann
  AC_MSG_WARN(m4_normalize([HsColour not found, htools API documentation will
657 30841576 Michael Hanselmann
                            not be generated]))
658 e5bd9de5 Iustin Pop
fi
659 e5bd9de5 Iustin Pop
660 e5bd9de5 Iustin Pop
# Check for haddock
661 e5bd9de5 Iustin Pop
AC_ARG_VAR(HADDOCK, [haddock path])
662 e5bd9de5 Iustin Pop
AC_PATH_PROG(HADDOCK, [haddock], [])
663 e5bd9de5 Iustin Pop
if test -z "$HADDOCK"; then
664 30841576 Michael Hanselmann
  AC_MSG_WARN(m4_normalize([haddock not found, htools API documentation will
665 30841576 Michael Hanselmann
                            not be generated]))
666 e5bd9de5 Iustin Pop
fi
667 52fca4ba Michael Hanselmann
if test -n "$HADDOCK" && test -n "$HSCOLOUR"; then
668 d9a900dc Iustin Pop
  HS_APIDOC=yes
669 e5bd9de5 Iustin Pop
fi
670 d9a900dc Iustin Pop
AC_SUBST(HS_APIDOC)
671 e5bd9de5 Iustin Pop
672 6e4c8f68 Iustin Pop
# Check for hlint
673 6e4c8f68 Iustin Pop
AC_ARG_VAR(HLINT, [hlint path])
674 6e4c8f68 Iustin Pop
AC_PATH_PROG(HLINT, [hlint], [])
675 6e4c8f68 Iustin Pop
if test -z "$HLINT"; then
676 6e4c8f68 Iustin Pop
  AC_MSG_WARN([hlint not found, checking code will not be possible])
677 6e4c8f68 Iustin Pop
fi
678 6e4c8f68 Iustin Pop
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