root / configure.ac @ 564eaa79
History | View | Annotate | Download (1.4 kB)
1 |
AC_PREREQ(2.59) |
---|---|
2 |
AC_INIT(ganeti-instance-image, 0.4, lance@osuosl.org) |
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 |
|
9 |
# --with-os-dir=... |
10 |
AC_ARG_WITH([os-dir], |
11 |
[AS_HELP_STRING([--with-os-dir=DIR], |
12 |
[top-level OS directory under which to install] |
13 |
[ (default is $datadir/ganeti/os)] |
14 |
)], |
15 |
[os_dir="$withval"], |
16 |
[os_dir="$datadir/ganeti/os"]) |
17 |
AC_SUBST(OS_DIR, $os_dir) |
18 |
|
19 |
# --with-defaults-dir=... |
20 |
AC_ARG_WITH([defaults-dir], |
21 |
[AS_HELP_STRING([--with-defaults-dir=DIR], |
22 |
[top-level defaults config directory under which to install] |
23 |
[ (default is $sysconfdif/defaults)] |
24 |
)], |
25 |
[defaults_dir="$withval"], |
26 |
[defaults_dir="$sysconfdir/defaults"]) |
27 |
AC_SUBST(DEFAULTS_DIR, $defaults_dir) |
28 |
|
29 |
# Check common programs |
30 |
AC_PROG_INSTALL |
31 |
AC_PROG_LN_S |
32 |
AC_PROG_AWK |
33 |
AC_PROG_MKDIR_P |
34 |
|
35 |
AC_PATH_PROG(DUMP, [dump]) |
36 |
if test -z "$DUMP" ; then |
37 |
AC_MSG_ERROR([dump not found in $PATH]) |
38 |
fi |
39 |
|
40 |
AC_PATH_PROG(LOSETUP, [losetup]) |
41 |
if test -z "$LOSETUP" ; then |
42 |
AC_MSG_ERROR([losetup not found in $PATH]) |
43 |
fi |
44 |
|
45 |
AC_PATH_PROG(KPARTX, [kpartx]) |
46 |
if test -z "$KPARTX" ; then |
47 |
AC_MSG_ERROR([kpartx not found in $PATH]) |
48 |
fi |
49 |
|
50 |
AC_PATH_PROG(SFDISK, [sfdisk]) |
51 |
if test -z "$SFDISK" ; then |
52 |
AC_MSG_ERROR([sfdisk not found in $PATH]) |
53 |
fi |
54 |
|
55 |
AC_PATH_PROG(QEMU_IMG, [qemu-img]) |
56 |
if test -z "$QEMU_IMG" ; then |
57 |
AC_MSG_ERROR([qemu-img not found in $PATH]) |
58 |
fi |
59 |
|
60 |
AC_CONFIG_FILES([ |
61 |
Makefile |
62 |
common.sh |
63 |
]) |
64 |
|
65 |
AC_OUTPUT |