From: Olaf Hering Subject: [PATCH 30/46] Use configure --localstatedir=BASEDIR to set path to /var Date: Mon, 22 Sep 2014 15:00:19 +0200 Message-ID: <1411390835-7348-31-git-send-email-olaf@aepfle.de> References: <1411390835-7348-1-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411390835-7348-1-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Olaf Hering , Keir Fraser , David Scott , Stefano Stabellini , George Dunlap , Tim Deegan , Ian Jackson , Jan Beulich , Samuel Thibault , Ian Campbell List-Id: xen-devel@lists.xenproject.org This is helpful to test make uninstall with --prefix=/private/dir as unprivileged user. No change in behaviour is expected by this change. Signed-off-by: Olaf Hering --- m4/paths.m4 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/m4/paths.m4 b/m4/paths.m4 index d21850b..deb9196 100644 --- a/m4/paths.m4 +++ b/m4/paths.m4 @@ -2,6 +2,9 @@ AC_DEFUN([AX_XEN_EXPAND_CONFIG], [ dnl expand these early so we can use this for substitutions test "x$prefix" = "xNONE" && prefix=$ac_default_prefix test "x$exec_prefix" = "xNONE" && exec_prefix=${prefix} +if test "x$localstatedir" = 'x${prefix}/var' ; then + localstatedir=/var +fi dnl if test "x$sysconfdir" = 'x${prefix}/etc' ; then @@ -71,13 +74,13 @@ AC_SUBST(LIBEXEC_INC) LIBDIR=`eval echo $libdir` AC_SUBST(LIBDIR) -XEN_RUN_DIR=/var/run/xen +XEN_RUN_DIR=$localstatedir/run/xen AC_SUBST(XEN_RUN_DIR) -XEN_LOG_DIR=/var/log/xen +XEN_LOG_DIR=$localstatedir/log/xen AC_SUBST(XEN_LOG_DIR) -XEN_LIB_STORED=/var/lib/xenstored +XEN_LIB_STORED=$localstatedir/lib/xenstored AC_SUBST(XEN_LIB_STORED) SHAREDIR=$prefix/share @@ -107,15 +110,15 @@ XEN_SCRIPT_DIR=$XEN_CONFIG_DIR/scripts AC_SUBST(XEN_SCRIPT_DIR) case "$host_os" in -*freebsd*) XEN_LOCK_DIR=/var/lib ;; -*netbsd*) XEN_LOCK_DIR=/var/lib ;; -*) XEN_LOCK_DIR=/var/lock ;; +*freebsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*netbsd*) XEN_LOCK_DIR=$localstatedir/lib ;; +*) XEN_LOCK_DIR=$localstatedir/lock ;; esac AC_SUBST(XEN_LOCK_DIR) -XEN_RUN_DIR=/var/run/xen +XEN_RUN_DIR=$localstatedir/run/xen AC_SUBST(XEN_RUN_DIR) -XEN_PAGING_DIR=/var/lib/xen/xenpaging +XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging AC_SUBST(XEN_PAGING_DIR) ])