Statistics
| Branch: | Revision:

root / configure.ac @ 5293052e

History | View | Annotate | Download (1.8 kB)

1
AC_PREREQ(2.59)
2
AC_INIT(ganeti-instance-image, 0.5.1, 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
    [ [DATADIR/ganeti/os]]
14
  )],
15
  [os_dir="$withval"],
16
  [os_dir="$datadir/ganeti/os"])
17
AC_SUBST(osdir, $os_dir)
18

    
19
# --with-os-name=...
20
AC_ARG_WITH([os-name],
21
  [AS_HELP_STRING([--with-os-name=OSNAME],
22
    [the name of the OS provider which will be the directory to install its files]
23
    [ [image]]
24
  )],
25
  [os_name="$withval"],
26
  [os_name="image"])
27
AC_SUBST(osname, $os_name)
28

    
29
# --with-default-dir=...
30
AC_ARG_WITH([default-dir],
31
  [AS_HELP_STRING([--with-default-dir=DIR],
32
    [top-level default config directory under which to install]
33
    [ [SYSCONFDIR/default]]
34
  )],
35
  [default_dir="$withval"],
36
  [default_dir="$sysconfdir/default"])
37
AC_SUBST(DEFAULT_DIR, $default_dir)
38

    
39
# Check common programs
40
AC_PROG_INSTALL
41
AC_PROG_LN_S
42
AC_PROG_AWK
43
AC_PROG_MKDIR_P
44

    
45
AC_PATH_PROG(DUMP, [dump], [], [$PATH:/usr/sbin:/sbin])
46
if test -z "$DUMP" ; then
47
  AC_MSG_ERROR([dump not found in $PATH])
48
fi
49

    
50
AC_PATH_PROG(LOSETUP, [losetup], [], [$PATH:/usr/sbin:/sbin])
51
if test -z "$LOSETUP" ; then
52
  AC_MSG_ERROR([losetup not found in $PATH])
53
fi
54

    
55
AC_PATH_PROG(KPARTX, [kpartx], [], [$PATH:/usr/sbin:/sbin])
56
if test -z "$KPARTX" ; then
57
  AC_MSG_ERROR([kpartx not found in $PATH])
58
fi
59

    
60
AC_PATH_PROG(SFDISK, [sfdisk], [], [$PATH:/usr/sbin:/sbin])
61
if test -z "$SFDISK" ; then
62
  AC_MSG_ERROR([sfdisk not found in $PATH])
63
fi
64

    
65
AC_PATH_PROG(QEMU_IMG, [qemu-img], [], [$PATH:/usr/sbin:/sbin])
66
if test -z "$QEMU_IMG" ; then
67
  AC_MSG_ERROR([qemu-img not found in $PATH])
68
fi
69

    
70
AC_CONFIG_FILES([
71
    Makefile
72
])
73

    
74
AC_OUTPUT