Mercurial > octave
changeset 21925:a53f46577e39
Fix variable expansion in dynamic linking flags for macOS (bug #48215)
* configure.ac (DL_LDFLAGS): Use ${ac_top_build_prefix} for correct value.
(MKOCTFILE_DL_LDFLAGS): Defer expansion of ${bindir} and ${version} until they
are fully defined.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 16 Jun 2016 08:42:29 -0700 |
parents | 43a5d019e6cc |
children | 24215a16f3b2 |
files | configure.ac |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Thu Jun 16 10:19:02 2016 -0700 +++ b/configure.ac Thu Jun 16 08:42:29 2016 -0700 @@ -2038,8 +2038,10 @@ SH_LDFLAGS="-shared -Wl,-expect_unresolved -Wl,'*'" ;; *-*-darwin*) - DL_LDFLAGS="-bundle -bundle_loader ${top_builddir}/libinterp/octave ${LDFLAGS}" - MKOCTFILE_DL_LDFLAGS="-bundle -bundle_loader ${bindir}/octave-${version}${EXEEXT}" + DL_LDFLAGS="-bundle -bundle_loader ${ac_top_build_prefix}libinterp/octave ${LDFLAGS}" + ## Contains variables that are defined and undefined at this point, so use + ## appropriate quoting to defer expansion of ${bindir} and ${version}. + MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader ${bindir}/octave-${version}'"${EXEEXT}" SH_LDFLAGS="-dynamiclib -single_module ${LDFLAGS}" case $canonical_host_type in powerpc-*) @@ -3308,6 +3310,11 @@ eval man1dir="\"$man1dir\"" eval man1ext="\"$man1ext\"" eval infofile="\"$infofile\"" + + ## Also expand MKOCTFILE_DL_LDFLAGS, because it may depend on the values + ## of variables expanded above. + + eval MKOCTFILE_DL_LDFLAGS="\"$MKOCTFILE_DL_LDFLAGS\"" ]) ### Do the substitutions in Makefiles and other scripts that