diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-25T15·51+0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-25T15·52+0000 |
commit | 8f08046606c147004642a7569f78bc61ab450419 (patch) | |
tree | 11332e6423752b3fe2f92a6378516d759cf19385 | |
parent | 7ce0e05ad875657a0fec10e192454b837146e190 (diff) |
Expand configure variables before writing config.status
This way, we can use config.status for generating scripts/* (without ending up with lines like "#! /usr/bin/perl -I${libexecdir}/...").
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | mk/install.mk | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 57c294d9eb0e..c6bb204aef8b 100644 --- a/configure.ac +++ b/configure.ac @@ -180,7 +180,7 @@ AC_MSG_RESULT(yes) AC_MSG_CHECKING([for the Perl installation prefix]) perlversion=$($perl -e 'use Config; print $Config{version};') perlarchname=$($perl -e 'use Config; print $Config{archname};') -AC_SUBST(perllibdir, [$\(libdir\)/perl5/site_perl/$perlversion/$perlarchname]) +AC_SUBST(perllibdir, [${libdir}/perl5/site_perl/$perlversion/$perlarchname]) AC_MSG_RESULT($perllibdir) @@ -331,6 +331,15 @@ fi AC_SUBST(tarFlags) +# Expand all variables in config.status. +test "$prefix" = NONE && prefix=$ac_default_prefix +test "$exec_prefix" = NONE && exec_prefix='${prefix}' +for name in $ac_subst_vars; do + declare $name="$(eval echo "${!name}")" + declare $name="$(eval echo "${!name}")" + declare $name="$(eval echo "${!name}")" +done + AC_CONFIG_HEADER([config.h]) AC_CONFIG_FILES([]) AC_OUTPUT diff --git a/mk/install.mk b/mk/install.mk index 633c432a8cfc..c5eb8eb37743 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -51,5 +51,3 @@ define install-symlink = $(QUIET) ln -sfn $(1) $(2) endef - - |