From f2fb641778fb0d1c8cc29bb84ed3589ca1881adb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Sat, 13 Jun 2020 17:42:49 +0200
Subject: [PATCH] macOS: fix handling LDFLAGS when building MEX for Octave

If something was already in LDFLAGS, it was concatenated without a whitespace,
leading to failure.

(cherry picked from commit 400979fd4442992968c79b0a662087889602463a)
---
 mex/build/octave/configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mex/build/octave/configure.ac b/mex/build/octave/configure.ac
index d31f4ba93c..21365a6ac8 100644
--- a/mex/build/octave/configure.ac
+++ b/mex/build/octave/configure.ac
@@ -36,7 +36,7 @@ AC_CANONICAL_HOST
 case ${host_os} in
   darwin*)
     CXXFLAGS="$($MKOCTFILE -p ALL_CXXFLAGS) -Wall -Wno-parentheses -Wold-style-cast -O2"
-    LDFLAGS+="$($MKOCTFILE -p OCTAVE_LIBS)"
+    LDFLAGS+=" $($MKOCTFILE -p OCTAVE_LIBS)"
     ;;
 esac
 
-- 
GitLab