From 46d5f945af32ad1a09407cb0ff48b3d24487ad0c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Tue, 21 Sep 2021 15:19:49 +0200
Subject: [PATCH] Build system: no longer link MEX for Octave against liboctave
 and other libraries

Since Octave 5, mkoctfile no longer links MEX files against shared
libraries (other than libc/libstdc++/libgfortran), so we now mimick that
behaviour.

(cherry picked from commit c5120e12780220b14e27aeb71f9e4426b1a94895)
---
 mex/build/octave/mex.am | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/mex/build/octave/mex.am b/mex/build/octave/mex.am
index cb729355ea..f9d03cd4bf 100644
--- a/mex/build/octave/mex.am
+++ b/mex/build/octave/mex.am
@@ -10,12 +10,6 @@ AM_FCFLAGS = $(shell $(MKOCTFILE) -p FPICFLAG) -Wall -Wimplicit-interface
 AM_CXXFLAGS = $(shell $(MKOCTFILE) -p CXXPICFLAG) -Wall -Wno-parentheses -Wold-style-cast
 AM_LDFLAGS = $(shell $(MKOCTFILE) -p DL_LDFLAGS) -L"$(shell $(MKOCTFILE) -p OCTLIBDIR)"
 
-LIBS += $(shell $(MKOCTFILE) -p OCTAVE_LIBS)
-LIBS += $(shell $(MKOCTFILE) -p BLAS_LIBS)
-LIBS += $(shell $(MKOCTFILE) -p LAPACK_LIBS)
-LIBS += $(shell $(MKOCTFILE) -p FFTW_LIBS)
-LIBS += $(shell $(MKOCTFILE) -p LIBS)
-
 mexdir = $(libdir)/dynare/mex/octave
 
 all-local: $(PROGRAMS)
-- 
GitLab