Currently the OS definition is installed always under
$datadir/ganeti/os, but this doesn't work if ganeti was configure with a
different OS dir.
This patch allows customization of the os dir at configure time, via a
new '--with-os-dir=...' variable. This allows for example:
./configure --with-os-dir=/srv/ganeti/os ...
Reviewed-by: imsnah
osname=$(subst ganeti-instance-,,$(PACKAGE))
-osdir=$(datadir)/ganeti/os/$(osname)
+osdir=$(OS_DIR)/$(osname)
os_SCRIPTS = create
dist_os_SCRIPTS = import export rename
AM_INIT_AUTOMAKE([1.9 foreign tar-ustar -Wall -Wno-portability])
+# --with-os-dir=...
+AC_ARG_WITH([os-dir],
+ [AS_HELP_STRING([--with-os-dir=DIR],
+ [top-level OS directory under which to install]
+ [ (default is $datadir/ganeti/os)]
+ )],
+ [os_dir="$withval"],
+ [os_dir="$datadir/ganeti/os"])
+AC_SUBST(OS_DIR, $os_dir)
+
# Check common programs
AC_PROG_INSTALL
AC_PROG_LN_S