Statistics
| Branch: | Tag: | Revision:

root / snf-image-host / configure.ac @ edf5dd1a

History | View | Annotate | Download (3.1 kB)

1
AC_PREREQ(2.59)
2
AC_INIT(snf-image, 0.1, 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
# --with-progress-monitor
11
AC_ARG_WITH([progress-monitor],
12
  [AS_HELP_STRING([--with-progress-monitor=PRGRM_PATH],
13
    [path to progress-monitor program]
14
    [[snf-progress-monitor]])],
15
    [if test "$withval" = "yes" ; then
16
    AC_PATH_PROG(PROGRESS_MONITOR, [snf-progress-monitor], [], [$PATH:/usr/sbin:/sbin])
17
    if test -z "$PROGRESS_MONITOR" ; then
18
        AC_MSG_FAILURE([Could not find snf-progress-monitor.])
19
    fi
20
   else
21
       PROGRESS_MONITOR="$withval"
22
   fi],
23
   [AC_MSG_NOTICE(progress-monitor support not enabled)]
24
)
25

    
26
AM_CONDITIONAL(PROGMONSUPPORT, [test -n "$PROGRESS_MONITOR"])
27

    
28
# --with-helper..
29
AC_ARG_WITH([helper],
30
    [AS_HELP_STRING([--with-helper=IMG_PATH],
31
        [Path to helper VM image [LOCALSTATEDIR/lib/snf-image/helper.img]]
32
    )],
33
    [helper="$withval"],
34
    [helper="$localstatedir/lib/snf-image/helper.img"])
35
AC_SUBST(HELPER, $helper)
36

    
37
# --with-helper-kernel
38
AC_ARG_WITH([helper_kernel],
39
    [AS_HELP_STRING([--with-helper-kernel=KERNEL_PATH],
40
        [Path to a kernel to use to boot the helper VM image 
41
        [LOCALSTATEDIR/lib/snf-image/helper-kernel]]
42
    )],
43
    [helper_ernel="$withval"],
44
    [helper_kernel="$localstatedir/lib/snf-image/helper-kernel"])
45
AC_SUBST(HELPER_KERNEL, ${helper_kernel})
46

    
47
# --with-helper-initrd..
48
AC_ARG_WITH([helper_initrd],
49
    [AS_HELP_STRING([--with-helper-initrd=INITRD_PATH],
50
        [Path to an initial ramdisk to use to boot the helper VM image
51
        [LOCALSTATEDIR/lib/snf-image/helper-initrd]]
52
    )],
53
    [helper_initrd="$withval"],
54
    [helper_initrd="$localstatedir/lib/snf-image/helper-initrd"])
55
AC_SUBST(HELPER_INITRD, ${helper_initrd})
56

    
57
# --with-os-dir=...
58
AC_ARG_WITH([os-dir],
59
    [AS_HELP_STRING([--with-os-dir=DIR],
60
        [top-level OS directory under which to install [DATADIR/ganeti/os]]
61
    )],
62
    [os_dir="$withval"],
63
    [os_dir="$datadir/ganeti/os"])
64
AC_SUBST(OS_DIR, $os_dir)
65

    
66
# --with-default-dir=...
67
AC_ARG_WITH([default-dir],
68
    [AS_HELP_STRING([--with-default-dir=DIR],
69
        [top-level default config directory under which to install]
70
        [ [SYSCONFDIR/default]]
71
    )],
72
    [default_dir="$withval"],
73
    [default_dir="$sysconfdir/default"])
74
AC_SUBST(DEFAULT_DIR, $default_dir)
75

    
76
# Check common programs
77
AC_PROG_INSTALL
78
AC_PROG_LN_S
79
AC_PROG_AWK
80
AC_PROG_MKDIR_P
81

    
82
AC_PATH_PROG(LOSETUP, [losetup], [], [$PATH:/usr/sbin:/sbin])
83
if test -z "$LOSETUP" ; then
84
  AC_MSG_ERROR([losetup not found in $PATH:/usr/sbin:/sbin])
85
fi
86

    
87
AC_PATH_PROG(KPARTX, [kpartx], [], [$PATH:/usr/sbin:/sbin])
88
if test -z "$KPARTX" ; then
89
  AC_MSG_ERROR([kpartx not found in $PATH:/usr/sbin:/sbin])
90
fi
91

    
92
AC_PATH_PROG(SFDISK, [sfdisk], [], [$PATH:/usr/sbin:/sbin])
93
if test -z "$SFDISK" ; then
94
  AC_MSG_ERROR([sfdisk not found in $PATH:/usr/sbin:/sbin])
95
fi
96

    
97
AC_PATH_PROG(TIMELIMIT, [timelimit], [], [$PATH:/usr/sbin:/sbin])
98
if test -z "$TIMELIMIT" ; then
99
  AC_MSG_ERROR([timelimit not found in $PATH:/usr/sbin:/sbin])
100
fi
101

    
102
AC_CONFIG_FILES([
103
    Makefile
104
])
105

    
106
AC_OUTPUT
107

    
108
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
109