root / snf-image-host / configure.ac @ fb391215
History | View | Annotate | Download (4.6 kB)
1 |
AC_PREREQ(2.59) |
---|---|
2 |
AC_INIT(snf-image, 0.3.3, synnefo@lists.grnet.gr) |
3 |
|
4 |
AC_CONFIG_AUX_DIR(autotools) |
5 |
AC_CONFIG_SRCDIR(configure) |
6 |
|
7 |
AM_INIT_AUTOMAKE([1.9 foreign tar-ustar -Wall -Wno-portability]) |
8 |
AM_INIT_AUTOMAKE([subdir-objects]) |
9 |
|
10 |
AC_ARG_ENABLE([pithos_backend], |
11 |
AS_HELP_STRING([--enable-pithos-backend], |
12 |
[enable support for pithos-hosted images]) |
13 |
) |
14 |
AS_IF([test "x$enable_pithos_backend" = "xyes"],, |
15 |
[AC_MSG_NOTICE(pithos backend support not enabled)]) |
16 |
AM_CONDITIONAL(PITHOSIMGSUPPORT, [test "x$enable_pithos_backend" = "xyes"]) |
17 |
|
18 |
AC_ARG_ENABLE([network_backend], |
19 |
AS_HELP_STRING([--enable-network-backend], |
20 |
[enable support for network-hosted images |
21 |
(this depends on cURL)]) |
22 |
) |
23 |
AS_IF([test "x$enable_network_backend" = "xyes"],, |
24 |
[AC_MSG_NOTICE(network backend support not enabled)]) |
25 |
AM_CONDITIONAL(NETWORKIMGSUPPORT, [test "x$enable_network_backend" = "xyes"]) |
26 |
|
27 |
# --with-progress-monitor |
28 |
AC_ARG_WITH([progress-monitor], |
29 |
[AS_HELP_STRING([--with-progress-monitor=PRGRM_PATH], |
30 |
[path to progress-monitor program] |
31 |
[[snf-progress-monitor]])], |
32 |
[if test "$withval" = "yes" ; then |
33 |
AC_PATH_PROG(PROGRESS_MONITOR, [snf-progress-monitor], [], [$PATH:/usr/sbin:/sbin]) |
34 |
if test -z "$PROGRESS_MONITOR" ; then |
35 |
AC_MSG_FAILURE([Could not find snf-progress-monitor.]) |
36 |
fi |
37 |
else |
38 |
PROGRESS_MONITOR="$withval" |
39 |
fi], |
40 |
[AC_MSG_NOTICE(progress-monitor support not enabled)] |
41 |
) |
42 |
|
43 |
AM_CONDITIONAL(PROGMONSUPPORT, [test -n "$PROGRESS_MONITOR"]) |
44 |
|
45 |
# --with-helper-dir |
46 |
AC_ARG_WITH([helper-dir], |
47 |
[AS_HELP_STRING([--with-helper-dir=DIR], |
48 |
[top-level directory to host the helper VM |
49 |
[LOCALSTATEDIR/lib/snf-image/helper]] |
50 |
)], |
51 |
[helper_dir="$withval"], |
52 |
[helper_dir="$localstatedir/lib/snf-image/helper"]) |
53 |
AC_SUBST(HELPER_DIR, $helper_dir) |
54 |
|
55 |
# --with-helper-img |
56 |
AC_ARG_WITH([helper-img], |
57 |
[AS_HELP_STRING([--with-helper-img=IMG_PATH], |
58 |
[Path to helper VM image [HELPERDIR/image]] |
59 |
)], |
60 |
[helper_img="$withval"], |
61 |
[helper_img="$helper_dir/image"]) |
62 |
AC_SUBST(HELPER_IMG, $helper_img) |
63 |
|
64 |
# --with-helper-kernel |
65 |
AC_ARG_WITH([helper-kernel], |
66 |
[AS_HELP_STRING([--with-helper-kernel=KERNEL_PATH], |
67 |
[Path to the helper VM kernel [HELPERDIR/kernel]] |
68 |
)], |
69 |
[helper_ernel="$withval"], |
70 |
[helper_kernel="$helper_dir/kernel"]) |
71 |
AC_SUBST(HELPER_KERNEL, ${helper_kernel}) |
72 |
|
73 |
# --with-helper-initrd.. |
74 |
AC_ARG_WITH([helper-initrd], |
75 |
[AS_HELP_STRING([--with-helper-initrd=INITRD_PATH], |
76 |
[Path to the helper VM initial ramdist [HELPERDIR/initrd]] |
77 |
)], |
78 |
[helper_initrd="$withval"], |
79 |
[helper_initrd="$helper_dir/initrd"]) |
80 |
AC_SUBST(HELPER_INITRD, ${helper_initrd}) |
81 |
|
82 |
# --with-os-dir=... |
83 |
AC_ARG_WITH([os-dir], |
84 |
[AS_HELP_STRING([--with-os-dir=DIR], |
85 |
[top-level OS directory under which to install [DATADIR/ganeti/os]] |
86 |
)], |
87 |
[os_dir="$withval"], |
88 |
[os_dir="$datadir/ganeti/os"]) |
89 |
AC_SUBST(OS_DIR, $os_dir) |
90 |
|
91 |
# --with-default-dir=... |
92 |
AC_ARG_WITH([default-dir], |
93 |
[AS_HELP_STRING([--with-default-dir=DIR], |
94 |
[top-level default config directory under which to install] |
95 |
[ [SYSCONFDIR/default]] |
96 |
)], |
97 |
[default_dir="$withval"], |
98 |
[default_dir="$sysconfdir/default"]) |
99 |
AC_SUBST(DEFAULT_DIR, $default_dir) |
100 |
|
101 |
# Check common programs |
102 |
AC_PROG_INSTALL |
103 |
AC_PROG_LN_S |
104 |
AC_PROG_AWK |
105 |
AC_PROG_MKDIR_P |
106 |
|
107 |
AC_PATH_PROG(LOSETUP, [losetup], [], [$PATH:/usr/sbin:/sbin]) |
108 |
if test -z "$LOSETUP" ; then |
109 |
AC_MSG_ERROR([losetup not found in $PATH:/usr/sbin:/sbin]) |
110 |
fi |
111 |
|
112 |
AC_PATH_PROG(KPARTX, [kpartx], [], [$PATH:/usr/sbin:/sbin]) |
113 |
if test -z "$KPARTX" ; then |
114 |
AC_MSG_ERROR([kpartx not found in $PATH:/usr/sbin:/sbin]) |
115 |
fi |
116 |
|
117 |
AC_PATH_PROG(SFDISK, [sfdisk], [], [$PATH:/usr/sbin:/sbin]) |
118 |
if test -z "$SFDISK" ; then |
119 |
AC_MSG_ERROR([sfdisk not found in $PATH:/usr/sbin:/sbin]) |
120 |
fi |
121 |
|
122 |
AC_PATH_PROG(QEMU_IMG, [qemu-img], [], [$PATH:/usr/sbin:/sbin]) |
123 |
if test -z "$QEMU_IMG" ; then |
124 |
AC_MSG_ERROR([qemu-img not found in $PATH:/usr/sbin:/sbin]) |
125 |
fi |
126 |
|
127 |
AC_PATH_PROG(INSTALL_MBR, [install-mbr], [], [$PATH:/usr/sbin:/sbin]) |
128 |
if test -z "$INSTALL_MBR" ; then |
129 |
AC_MSG_ERROR([install-mbr not found in $PATH:/usr/sbin:/sbin]) |
130 |
fi |
131 |
|
132 |
AC_PATH_PROG(TIMELIMIT, [timelimit], [], [$PATH:/usr/sbin:/sbin]) |
133 |
if test -z "$TIMELIMIT" ; then |
134 |
AC_MSG_ERROR([timelimit not found in $PATH:/usr/sbin:/sbin]) |
135 |
fi |
136 |
|
137 |
if test "x$enable_network_backend" = "xyes" ; then |
138 |
AC_PATH_PROG(CURL, [curl], [], [$PATH:/usr/sbin:/sbin]) |
139 |
if test -z "$CURL" ; then |
140 |
AC_MSG_ERROR([curl is needed for network backend support but was not \ |
141 |
found in $PATH:/usr/sbin:/sbin] |
142 |
[To disable network backend support ommit --enable-network-backend]) |
143 |
fi |
144 |
fi |
145 |
|
146 |
AC_CONFIG_FILES([ |
147 |
Makefile |
148 |
]) |
149 |
|
150 |
AC_OUTPUT |
151 |
|
152 |
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : |
153 |
|