From 0dbf4b88d449c26e983093113c1745692ac0e5d6 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Mon, 7 Jul 2008 08:54:00 +0000 Subject: [PATCH] Allow customization of installation directory 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 --- Makefile.am | 2 +- configure.ac | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index 1b6050f..aed3fc2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ osname=$(subst ganeti-instance-,,$(PACKAGE)) -osdir=$(datadir)/ganeti/os/$(osname) +osdir=$(OS_DIR)/$(osname) os_SCRIPTS = create dist_os_SCRIPTS = import export rename diff --git a/configure.ac b/configure.ac index 570deb0..56f9fbb 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,16 @@ AC_CONFIG_SRCDIR(configure) 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 -- 1.7.2.5