From 7e962090a074f298e021ef2d8f6c1e303c022eaf Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Fri, 21 Apr 2017 19:11:24 +0200 Subject: build: ensure autoconf template expansions resolve variables Make sure the following autotools managed variables: GLUSTERFS_LIBEXECDIR GLUSTERD_MISCDIR GLUSTERD_VOLFILE LOCALSTATEDIR get expanded to literal paths when the configure script generates the installed versions of certain text files from *.in templates. This change is partly implemented by restoring some of the "eval echo $variable" style forced expansions in configure that were removed in mainline BUG: 1444228 master https://review.gluster.org/17096 Change-Id: I3b31b1259c5101252bbc37861683894e6eae29e6 BUG: 1450947 Signed-off-by: Kaleb S. KEITHLEY Signed-off-by: Csaba Henk Reviewed-on: https://review.gluster.org/17298 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- configure.ac | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index c9742e2560e..0eebcda7b6b 100644 --- a/configure.ac +++ b/configure.ac @@ -1056,24 +1056,28 @@ old_prefix=$prefix if test "x$prefix" = xNONE; then prefix=$ac_default_prefix fi -GLUSTERFS_LIBEXECDIR="$libexecdir/glusterfs" -GLUSTERFSD_MISCDIR="$prefix/var/lib/misc/glusterfsd" +old_exec_prefix=$exec_prefix +if test "x$exec_prefix" = xNONE; then + exec_prefix="$(eval echo $prefix)" +fi +GLUSTERFS_LIBEXECDIR="$(eval echo $libexecdir)/glusterfs" +GLUSTERFSD_MISCDIR="$(eval echo $prefix)/var/lib/misc/glusterfsd" prefix=$old_prefix +exec_prefix=$old_exec_prefix ### Dirty hacky stuff to make LOCALSTATEDIR work if test "x$prefix" = xNONE; then - test $localstatedir = '$prefix/var' && localstatedir=$ac_default_prefix/var + test $localstatedir = '${prefix}/var' && localstatedir=$ac_default_prefix/var localstatedir=/var - LOCALSTATEDIR=$localstatedir -else - LOCALSTATEDIR=$localstatedir fi +localstatedir="$(eval echo ${localstatedir})" +LOCALSTATEDIR=$localstatedir old_prefix=$prefix if test "x$prefix" = xNONE; then prefix=$ac_default_prefix fi -GLUSTERD_VOLFILE="$sysconfdir/glusterfs/glusterd.vol" +GLUSTERD_VOLFILE="$(eval echo ${sysconfdir})/glusterfs/glusterd.vol" prefix=$old_prefix -- cgit