changeset 31491:212e9ad58f69 stable

build: Fix building .mex files in build tree on macOS. * m4/acinclude.m4 (OCTAVE_DEFINE_MKOCTFILE_DYNAMIC_LINK_OPTIONS): Use ${abs_top_builddir} in path to bundle_loader and defer expansion to Makefile.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 20 Nov 2022 15:28:57 +0100
parents 45c9efbc5501
children 288a917d728e c05ef94a2bbc
files m4/acinclude.m4
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/m4/acinclude.m4	Sun Nov 20 11:07:36 2022 +0100
+++ b/m4/acinclude.m4	Sun Nov 20 15:28:57 2022 +0100
@@ -2726,7 +2726,6 @@
 dnl   GXX
 dnl   LDFLAGS
 dnl   ac_cv_f77_compiler_gnu
-dnl   ac_top_build_prefix
 dnl   canonical_host_type
 dnl   have_msvc
 dnl
@@ -2764,9 +2763,10 @@
       SH_LDFLAGS="-shared -Wl,-expect_unresolved -Wl,'*'"
     ;;
     *-*-darwin*)
-      DL_LDFLAGS="-bundle -undefined dynamic_lookup -bind_at_load -bundle_loader ${ac_top_build_prefix}src/octave${EXEEXT} ${LDFLAGS}"
-      dnl Contains variables that are defined and undefined at this point, so use
-      dnl appropriate quoting to defer expansion of ${bindir} and ${version}.
+      dnl Contains variables that are defined and undefined at this point,
+      dnl so use appropriate quoting to defer expansion of
+      dnl ${abs_top_builddir}, ${bindir}, and ${version}.
+      DL_LDFLAGS='-bundle -undefined dynamic_lookup -bind_at_load -bundle_loader ${abs_top_builddir}/src/octave'"${EXEEXT} ${LDFLAGS}"
       MKOCTFILE_DL_LDFLAGS='-bundle -undefined dynamic_lookup -bind_at_load -bundle_loader ${bindir}/octave-${version}'"${EXEEXT}"
       SH_LDFLAGS="-dynamiclib -single_module ${LDFLAGS}"
       case $canonical_host_type in