diff options
author | Csaba Henk <csaba@redhat.com> | 2017-04-21 19:11:24 +0200 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2017-04-27 15:18:59 +0000 |
commit | a94b7df7b9308a590ebcac15536d22a386561f10 (patch) | |
tree | 2d1ff012dcc580a7b3599e839ee08f0522684da1 | |
parent | c6b635d5b2326075549f74d1d81f408f2f7d2d4a (diff) |
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
If5219cadc51ae316f7ba2e2831d739235c77902d.
BUG: 1444228
Change-Id: I3b31b1259c5101252bbc37861683894e6eae29e6
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: https://review.gluster.org/17096
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
-rw-r--r-- | configure.ac | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index af3644f4350..960a43cbe3b 100644 --- a/configure.ac +++ b/configure.ac @@ -1108,24 +1108,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 |