Update ChangeLog and configure.ac for ver. 0.7.5
[snf-image] / snf-image-host / configure.ac
1 AC_PREREQ(2.59)
2 AC_INIT(snf-image-host, 0.7.5, 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 # --enable-version-consistency-ckeck
11 AC_ARG_ENABLE([version_consistency_check],
12    AS_HELP_STRING([--enable-version-consistency-check],
13     [Check if the host and the helper packages have the same version]),
14     version_check="$enableval", version_check="no"
15 )
16 if test ${version_check} = yes; then
17     AC_SUBST(VERSION_CHECK, yes)
18 fi
19
20 # --with-progress-monitor
21 AC_ARG_WITH([progress-monitor],
22   [AS_HELP_STRING([--with-progress-monitor=PRGRM],
23     [name of the progress-monitor program []])],
24     [if test "$withval" != "yes" -a "$withval" != "no"; then
25          AC_PATH_PROG(PROGRESS_MONITOR, ["$withval"], [], [$PATH:/usr/sbin:/sbin])
26          if test -z "$PROGRESS_MONITOR" ; then
27              AC_MSG_FAILURE([Could not find progress-monitor: $withval.])
28          fi
29      elif test "$withval" != "no"; then
30          AC_MSG_ERROR([you must specify a value for progress-monitor if --with-progress-monitor is specified])
31     fi]
32 )
33
34 # --with-unattend-file
35 AC_ARG_WITH([unattend-file],
36   [AS_HELP_STRING([--with-unattend-file=UNATTEND_PATH],
37     [path to unattend.xml windows setup file []])],
38     [if test "$withval" != "yes" -a "$withval" != "no"; then
39         AC_SUBST(UNATTEND, "$withval")
40         AC_MSG_NOTICE(using unattend file: $withval)
41      elif test "$withval" != "no"; then
42          AC_MSG_ERROR([you must specify an Unattend.xml file if --with-unattend-file is specified])
43     fi]
44 )
45
46 # --with-multistrap-config
47 AC_ARG_WITH([multistrap-config],
48   [AS_HELP_STRING([--with-multistrap-config=MULTISTRAP_CONFIG_PATH],
49       [path to a multistrap configuration file
50       [SYSCONFDIR/snf-image/multistrap.conf]]
51     )],
52     [if test "$withval" != "yes" -a "$withval" != "no"; then
53         multistrap_config="$withval"
54         AC_MSG_NOTICE(using multistrap configuration file: $withval)
55      elif test "$withval" != "no"; then
56          AC_MSG_ERROR([you must specify an configuration file if --with-multistrap-config is specified])
57     fi],
58     [multistrap_config="$sysconfdir/snf-image/multistrap.conf"]
59 )
60 AC_SUBST(MULTISTRAP_CONFIG, $multistrap_config)
61
62 # --with-multistrap-aptprefdir
63 AC_ARG_WITH([multistrap-aptprefdir],
64   [AS_HELP_STRING([--with-multistrap-aptprefdir=MULTISTRAP_APTPREFDIR],
65       [path to a directory where preferences files for apt are hosted. Those files will be used during multistrap
66       [SYSCONFDIR/snf-image/apt.pref.d]]
67     )],
68     [if test "$withval" != "yes" -a "$withval" != "no"; then
69         multistrap_aptprefdir="$withval"
70         AC_MSG_NOTICE(using apt preferences directory for multistrap: $withval)
71      elif test "$withval" != "no"; then
72          AC_MSG_ERROR([you must specify a directory if --with-multistrap-aptprefdir is specified])
73     fi],
74     [multistrap_aptprefdir="$sysconfdir/snf-image/apt.pref.d"]
75 )
76 AC_SUBST(MULTISTRAP_APTPREFDIR, $multistrap_aptprefdir)
77
78 # --with-helper-dir
79 AC_ARG_WITH([helper-dir],
80     [AS_HELP_STRING([--with-helper-dir=DIR],
81         [top-level directory to host the helper VM
82         [LOCALSTATEDIR/lib/snf-image/helper]]
83     )],
84     [helper_dir="$withval"],
85     [helper_dir="$localstatedir/lib/snf-image/helper"])
86 AC_SUBST(HELPER_DIR, $helper_dir)
87
88 # --with-os-dir=...
89 AC_ARG_WITH([os-dir],
90     [AS_HELP_STRING([--with-os-dir=DIR],
91         [top-level OS directory under which to install [DATADIR/ganeti/os]]
92     )],
93     [os_dir="$withval"],
94     [os_dir="$datadir/ganeti/os"])
95 AC_SUBST(OS_DIR, $os_dir)
96
97 # --with-default-dir=...
98 AC_ARG_WITH([default-dir],
99     [AS_HELP_STRING([--with-default-dir=DIR],
100         [top-level default config directory under which to install]
101         [ [SYSCONFDIR/default]]
102     )],
103     [default_dir="$withval"],
104     [default_dir="$sysconfdir/default"])
105 AC_SUBST(DEFAULT_DIR, $default_dir)
106
107 # Check common programs
108 AC_PROG_INSTALL
109 AC_PROG_LN_S
110 AC_PROG_AWK
111 AC_PROG_MKDIR_P
112
113 AC_PATH_PROG(LOSETUP, [losetup], [], [$PATH:/usr/sbin:/sbin])
114 if test -z "$LOSETUP" ; then
115   AC_MSG_ERROR([losetup not found in $PATH:/usr/sbin:/sbin])
116 fi
117
118 AC_PATH_PROG(KPARTX, [kpartx], [], [$PATH:/usr/sbin:/sbin])
119 if test -z "$KPARTX" ; then
120   AC_MSG_ERROR([kpartx not found in $PATH:/usr/sbin:/sbin])
121 fi
122
123 AC_PATH_PROG(SFDISK, [sfdisk], [], [$PATH:/usr/sbin:/sbin])
124 if test -z "$SFDISK" ; then
125   AC_MSG_ERROR([sfdisk not found in $PATH:/usr/sbin:/sbin])
126 fi
127
128 AC_PATH_PROG(QEMU_IMG, [qemu-img], [], [$PATH:/usr/sbin:/sbin])
129 if test -z "$QEMU_IMG" ; then
130   AC_MSG_ERROR([qemu-img not found in $PATH:/usr/sbin:/sbin])
131 fi
132
133 AC_PATH_PROG(INSTALL_MBR, [install-mbr], [], [$PATH:/usr/sbin:/sbin])
134 if test -z "$INSTALL_MBR" ; then
135   AC_MSG_ERROR([install-mbr not found in $PATH:/usr/sbin:/sbin])
136 fi
137
138 AC_PATH_PROG(TIMEOUT, [timeout], [], [$PATH:/usr/sbin:/sbin])
139 if test -z "$TIMEOUT" ; then
140   AC_MSG_ERROR([timeout not found in $PATH:/usr/sbin:/sbin])
141 fi
142
143 AC_PATH_PROG(CURL, [curl], [], [$PATH:/usr/sbin:/sbin])
144 if test -z "$CURL" ; then
145   AC_MSG_ERROR([curl not found in $PATH:/usr/sbin:/sbin])
146 fi
147
148 AC_CONFIG_FILES([
149     Makefile
150 ])
151
152 AC_OUTPUT
153
154 # vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
155