Statistics
| Branch: | Tag: | Revision:

root / snf-image-host / configure.ac @ 5cbb15b9

History | View | Annotate | Download (3.6 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-dir
29
AC_ARG_WITH([helper-dir],
30
    [AS_HELP_STRING([--with-helper-dir=DIR],
31
        [top-level directory to host the helper VM
32
        [LOCALSTATEDIR/lib/snf-image/helper]]
33
    )],
34
    [helper_dir="$withval"],
35
    [helper_dir="$localstatedir/lib/snf-image/helper"])
36
AC_SUBST(HELPER_DIR, $helper_dir)
37

    
38
# --with-helper-img
39
AC_ARG_WITH([helper-img],
40
    [AS_HELP_STRING([--with-helper-img=IMG_PATH],
41
        [Path to helper VM image [HELPERDIR/image]]
42
    )],
43
    [helper_img="$withval"],
44
    [helper_img="$helper_dir/image"])
45
AC_SUBST(HELPER_IMG, $helper_img)
46

    
47
# --with-helper-kernel
48
AC_ARG_WITH([helper-kernel],
49
    [AS_HELP_STRING([--with-helper-kernel=KERNEL_PATH],
50
        [Path to the helper VM kernel [HELPERDIR/kernel]]
51
    )],
52
    [helper_ernel="$withval"],
53
    [helper_kernel="$helper_dir/kernel"])
54
AC_SUBST(HELPER_KERNEL, ${helper_kernel})
55

    
56
# --with-helper-initrd..
57
AC_ARG_WITH([helper-initrd],
58
    [AS_HELP_STRING([--with-helper-initrd=INITRD_PATH],
59
        [Path to the helper VM initial ramdist [HELPERDIR/initrd]]
60
    )],
61
    [helper_initrd="$withval"],
62
    [helper_initrd="$helper_dir/initrd"])
63
AC_SUBST(HELPER_INITRD, ${helper_initrd})
64

    
65
# --with-os-dir=...
66
AC_ARG_WITH([os-dir],
67
    [AS_HELP_STRING([--with-os-dir=DIR],
68
        [top-level OS directory under which to install [DATADIR/ganeti/os]]
69
    )],
70
    [os_dir="$withval"],
71
    [os_dir="$datadir/ganeti/os"])
72
AC_SUBST(OS_DIR, $os_dir)
73

    
74
# --with-default-dir=...
75
AC_ARG_WITH([default-dir],
76
    [AS_HELP_STRING([--with-default-dir=DIR],
77
        [top-level default config directory under which to install]
78
        [ [SYSCONFDIR/default]]
79
    )],
80
    [default_dir="$withval"],
81
    [default_dir="$sysconfdir/default"])
82
AC_SUBST(DEFAULT_DIR, $default_dir)
83

    
84
# Check common programs
85
AC_PROG_INSTALL
86
AC_PROG_LN_S
87
AC_PROG_AWK
88
AC_PROG_MKDIR_P
89

    
90
AC_PATH_PROG(LOSETUP, [losetup], [], [$PATH:/usr/sbin:/sbin])
91
if test -z "$LOSETUP" ; then
92
  AC_MSG_ERROR([losetup not found in $PATH:/usr/sbin:/sbin])
93
fi
94

    
95
AC_PATH_PROG(KPARTX, [kpartx], [], [$PATH:/usr/sbin:/sbin])
96
if test -z "$KPARTX" ; then
97
  AC_MSG_ERROR([kpartx not found in $PATH:/usr/sbin:/sbin])
98
fi
99

    
100
AC_PATH_PROG(SFDISK, [sfdisk], [], [$PATH:/usr/sbin:/sbin])
101
if test -z "$SFDISK" ; then
102
  AC_MSG_ERROR([sfdisk not found in $PATH:/usr/sbin:/sbin])
103
fi
104

    
105
AC_PATH_PROG(QEMU_IMG, [qemu-img], [], [$PATH:/usr/sbin:/sbin])
106
if test -z "$QEMU_IMG" ; then
107
  AC_MSG_ERROR([qemu-img not found in $PATH:/usr/sbin:/sbin])
108
fi
109

    
110
AC_PATH_PROG(INSTALL_MBR, [install-mbr], [], [$PATH:/usr/sbin:/sbin])
111
if test -z "$INSTALL_MBR" ; then
112
  AC_MSG_ERROR([install-mbr not found in $PATH:/usr/sbin:/sbin])
113
fi
114

    
115
AC_PATH_PROG(TIMELIMIT, [timelimit], [], [$PATH:/usr/sbin:/sbin])
116
if test -z "$TIMELIMIT" ; then
117
  AC_MSG_ERROR([timelimit not found in $PATH:/usr/sbin:/sbin])
118
fi
119

    
120
AC_CONFIG_FILES([
121
    Makefile
122
])
123

    
124
AC_OUTPUT
125

    
126
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
127