Statistics
| Branch: | Revision:

root / configure.ac @ 5293052e

History | View | Annotate | Download (1.8 kB)

1 79224631 Lance Albertson
AC_PREREQ(2.59)
2 6fa4aeee Lance Albertson
AC_INIT(ganeti-instance-image, 0.5.1, lance@osuosl.org)
3 79224631 Lance Albertson
4 79224631 Lance Albertson
AC_CONFIG_AUX_DIR(autotools)
5 79224631 Lance Albertson
AC_CONFIG_SRCDIR(configure)
6 79224631 Lance Albertson
7 79224631 Lance Albertson
AM_INIT_AUTOMAKE([1.9 foreign tar-ustar -Wall -Wno-portability])
8 79224631 Lance Albertson
9 79224631 Lance Albertson
# --with-os-dir=...
10 79224631 Lance Albertson
AC_ARG_WITH([os-dir],
11 79224631 Lance Albertson
  [AS_HELP_STRING([--with-os-dir=DIR],
12 79224631 Lance Albertson
    [top-level OS directory under which to install]
13 5293052e Nikos Skalkotos
    [ [DATADIR/ganeti/os]]
14 79224631 Lance Albertson
  )],
15 79224631 Lance Albertson
  [os_dir="$withval"],
16 79224631 Lance Albertson
  [os_dir="$datadir/ganeti/os"])
17 5293052e Nikos Skalkotos
AC_SUBST(osdir, $os_dir)
18 79224631 Lance Albertson
19 ab462591 Constantinos Venetsanopoulos
# --with-os-name=...
20 ab462591 Constantinos Venetsanopoulos
AC_ARG_WITH([os-name],
21 ab462591 Constantinos Venetsanopoulos
  [AS_HELP_STRING([--with-os-name=OSNAME],
22 ab462591 Constantinos Venetsanopoulos
    [the name of the OS provider which will be the directory to install its files]
23 5293052e Nikos Skalkotos
    [ [image]]
24 ab462591 Constantinos Venetsanopoulos
  )],
25 ab462591 Constantinos Venetsanopoulos
  [os_name="$withval"],
26 ab462591 Constantinos Venetsanopoulos
  [os_name="image"])
27 5293052e Nikos Skalkotos
AC_SUBST(osname, $os_name)
28 ab462591 Constantinos Venetsanopoulos
29 9cdb305c Lance Albertson
# --with-default-dir=...
30 9cdb305c Lance Albertson
AC_ARG_WITH([default-dir],
31 9cdb305c Lance Albertson
  [AS_HELP_STRING([--with-default-dir=DIR],
32 9cdb305c Lance Albertson
    [top-level default config directory under which to install]
33 5293052e Nikos Skalkotos
    [ [SYSCONFDIR/default]]
34 c4661256 Lance Albertson
  )],
35 9cdb305c Lance Albertson
  [default_dir="$withval"],
36 9cdb305c Lance Albertson
  [default_dir="$sysconfdir/default"])
37 9cdb305c Lance Albertson
AC_SUBST(DEFAULT_DIR, $default_dir)
38 c4661256 Lance Albertson
39 79224631 Lance Albertson
# Check common programs
40 79224631 Lance Albertson
AC_PROG_INSTALL
41 79224631 Lance Albertson
AC_PROG_LN_S
42 8d0132dc Lance Albertson
AC_PROG_AWK
43 8d0132dc Lance Albertson
AC_PROG_MKDIR_P
44 79224631 Lance Albertson
45 6bea612e Lance Albertson
AC_PATH_PROG(DUMP, [dump], [], [$PATH:/usr/sbin:/sbin])
46 8d0132dc Lance Albertson
if test -z "$DUMP" ; then
47 8d0132dc Lance Albertson
  AC_MSG_ERROR([dump not found in $PATH])
48 8d0132dc Lance Albertson
fi
49 8d0132dc Lance Albertson
50 6bea612e Lance Albertson
AC_PATH_PROG(LOSETUP, [losetup], [], [$PATH:/usr/sbin:/sbin])
51 8d0132dc Lance Albertson
if test -z "$LOSETUP" ; then
52 8d0132dc Lance Albertson
  AC_MSG_ERROR([losetup not found in $PATH])
53 8d0132dc Lance Albertson
fi
54 8d0132dc Lance Albertson
55 6bea612e Lance Albertson
AC_PATH_PROG(KPARTX, [kpartx], [], [$PATH:/usr/sbin:/sbin])
56 8d0132dc Lance Albertson
if test -z "$KPARTX" ; then
57 8d0132dc Lance Albertson
  AC_MSG_ERROR([kpartx not found in $PATH])
58 8d0132dc Lance Albertson
fi
59 8d0132dc Lance Albertson
60 6bea612e Lance Albertson
AC_PATH_PROG(SFDISK, [sfdisk], [], [$PATH:/usr/sbin:/sbin])
61 8d0132dc Lance Albertson
if test -z "$SFDISK" ; then
62 8d0132dc Lance Albertson
  AC_MSG_ERROR([sfdisk not found in $PATH])
63 8d0132dc Lance Albertson
fi
64 8d0132dc Lance Albertson
65 6bea612e Lance Albertson
AC_PATH_PROG(QEMU_IMG, [qemu-img], [], [$PATH:/usr/sbin:/sbin])
66 ab712029 Lance Albertson
if test -z "$QEMU_IMG" ; then
67 ab712029 Lance Albertson
  AC_MSG_ERROR([qemu-img not found in $PATH])
68 ab712029 Lance Albertson
fi
69 ab712029 Lance Albertson
70 8d0132dc Lance Albertson
AC_CONFIG_FILES([
71 8d0132dc Lance Albertson
    Makefile
72 8d0132dc Lance Albertson
])
73 79224631 Lance Albertson
74 79224631 Lance Albertson
AC_OUTPUT