Commit Graph

156 Commits (62f608eb805822dbc166d579a54dda9ec2e2288a)

Author SHA1 Message Date
Sébastien Villemot 12008bc6eb
Windows package: statically link libssp inside MEX files
Since 3244340e7a, the MEX files are built with
-fstack-protector. But this added a dynamic link to libssp-0.dll on some MEX
files, making them unusable.
2023-03-15 17:02:49 +01:00
Sébastien Villemot a8f5bdd525
Build system: no longer need to pass -pthread or -mthreads for C++11 threads as of GCC 10 2023-01-05 17:58:42 +01:00
Sébastien Villemot c1922c3ad0
Stop building and shipping the Dynare++ executable
Incidentally, no longer run Dynare++ unit tests, since they are intricated in
the Dynare++ build system. If we finally decide not to drop the Dynare++
codebase for our MEX files, then we should probably find a way to build and run
them again.

Ref. #1825
2023-01-03 14:51:07 +01:00
Sébastien Villemot 36a7b019fc
Provisions for MATLAB R2022b 2022-09-15 15:59:32 +02:00
Sébastien Villemot cc8b2fd920
Bump to C++20 standard (with GNU extensions)
In practice, for the time being, we limit ourselves to C++20 features available
in GCC 10.
2022-05-04 18:33:07 +02:00
Sébastien Villemot b31fe76dfd
Provisions for MATLAB R2022a 2022-03-24 17:43:40 +01:00
Sébastien Villemot f1a0bdb8e5
Build system: fix several warnings with Autoconf 2.70 2021-09-28 18:21:17 +02:00
Sébastien Villemot 6669e55b97
Provisions for MATLAB R2021b 2021-09-24 16:43:30 +02:00
Sébastien Villemot 3d6f86c234
Build system: fix detection of SLICOT for MATLAB on RHEL
The MATLAB_CFLAGS variable was not injected when testing for the presence of
libslicot64_pic. In particular, on GNU/Linux system, this means that the -fPIC
flag was not injected when doing the test. This was not a problem on Debian,
where GCC now enables -fPIC by default. But this would fail on RHEL, where
-fPIC is not enabled by default.

By the way:
— rename ac_save_* variables to my_save_*, to avoid conflicts with internal
  autoconf variables;
— do not inject “$(mkoctfile -p LFLAGS)” into LDFLAGS when testing for SLICOT
  under Octave; this is no longer necessary, since those flags are already
  injected at the beginning of mex/build/octave/configure.ac.
2021-09-02 17:14:01 +02:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Sébastien Villemot 3bdb07d11e
Build system: remove -lstdc++ when linking MEX for MATLAB under macOS
It is unneeded.
2021-05-25 18:57:40 +02:00
Sébastien Villemot fb31842856
Build system: remove -lstdc++ when linking MEX for MATLAB under GNU/Linux
It is not needed, and it prevents the -static-libstdc++ flag from work
correctly if supplied by the user.
2021-05-11 22:57:16 +02:00
Sébastien Villemot 8475dfe26d
Build system: update m4 macros from autoconf-archive 2021-05-10 14:55:34 +02:00
Sébastien Villemot 0741963ca5
Build system: streamline handling of compilation flags for MEX
— allow the user to override compilation flags for MATLAB MEX (it was already
  working for the preprocessor, the MEX for Octave and Dynare++)
— increase the symmetry of MEX build infrastructure between MATLAB and Octave
— when linking MEX for Octave, do not add the output of “mkoctfile -p FLIBS”.
  It is unneeded, and it can create a conflict between the system compiler and
  a user-supplied compiler

By the way:
— restore optimization on macOS for C/C++ MEX (it had been removed in
  5df2392a09)
— remove -fno-omit-frame-pointer on MATLAB/Linux, since it would be cancelled
  by subsequent -O2 and should not be needed anyways
— remove FFLAGS under Octave, unused
2021-05-10 14:39:41 +02:00
Sébastien Villemot bd287ca5fa
Build system: remove 32-bit MATLAB stuff, since we no longer support that configuration 2021-05-09 17:51:38 +02:00
Sébastien Villemot baa6c8dbbd
Provisions for MATLAB R2021a 2021-03-17 17:47:27 +01:00
Sébastien Villemot 29bb140297
macOS: drop -mmacosx-version-min compilation flag
Currently it is not applied consistently to all binaries we produce.

Moreover we do not really have a way to test support for older macOS versions.

If there are problems, we might reintroduce this flag later, but we will have
to it consistently across all binaries.
2021-01-13 15:42:44 +01:00
Sébastien Villemot 0275686589
macOS: drop -arch x86_64 compilation flag, in preparation for ARM support 2021-01-13 15:42:44 +01:00
Sébastien Villemot 93a8e60265
Build system: various macOS cleanups
– remove clang support
– we no longer support 32-bit
– simplify Darwin specific hacks for Octave MEX files
2020-12-18 15:40:48 +01:00
Sébastien Villemot c3947dd94e
Build system: fix treatment of LDFLAGS when detecting slicot for MATLAB
Since the user-provided value will be also used at link time, so it makes sense
to add it here.
2020-12-18 15:40:48 +01:00
Sébastien Villemot bd97fdc1d5
Build system: add --with-octave configure option to specify non-default install path 2020-12-02 18:26:49 +01:00
Sébastien Villemot a69d598b5f
Add the ability to automatically detect MATLAB version at configure time
It is thus no longer needed to pass the MATLAB_VERSION option to the configure
script when compiling from source.
2020-09-30 19:08:52 +02:00
Sébastien Villemot fa12e5abfc
Provisions for MATLAB R2020b 2020-09-24 15:43:06 +02:00
Sébastien Villemot 6e0f104d7e
Bump minimal MATLAB version to R2014a
Ref. #1713
2020-04-07 16:32:32 +02:00
Stéphane Adjemian (Charybdis) 166865149e
Updated build for matlab R2020a. 2020-03-26 11:20:24 +01:00
Sébastien Villemot ef417dab00
Remove unused m4 file 2020-01-22 18:03:47 +01:00
Sébastien Villemot 47e4649026
Add support for Fortran 2008 in MEX files
By the same token, remove unused support for Fortran 77.
2020-01-06 18:29:47 +01:00
Stéphane Adjemian (Charybdis) e2d90a949f Use nodisplay option when performing tests (linux only). 2019-11-18 21:49:20 +01:00
Houtan Bastani 0bdb04bac8
macOS snapshot: statically link to `libmatio` and dependencies, `gsl`, and `gcc` libraries
* The macOS snapshot until this point did not work unless the user had already installed `libmatio`, `gsl`, and `gcc` via Homebrew.
* We are not modifying `m4/ax_matio.m4` as we want to still be able to compile against shared libraries in development
2019-10-17 15:29:34 +02:00
Sébastien Villemot 5dffae1b63
ax_mexext.m4: remove obsolete test on ancient MATLAB version 2019-09-16 18:34:02 +02:00
Sébastien Villemot 36d530358b
Fix detection of MATLAB MEX extension under Windows/MSYS2
This check recently broke under my MSYS2 installation. I’m unsure why, but I
guess it’s related to some Windows 10 update.

The solution is to stop calling it through “cmd”, and to call it directly as an
executable.
2019-09-16 18:34:02 +02:00
Houtan Bastani a1a4168c3e
build support for Matlab R2019b 2019-09-12 12:23:14 +02:00
Sébastien Villemot 0d0a0a9bbb
Bump to C++17
This means we now require GCC 8.

Boost filesystem library is no longer needed.

Ref preprocessor#16
2019-09-11 15:06:12 +02:00
Sébastien Villemot 8b0d5f4b86
Windows: ensure that libgomp is statically linked 2019-09-10 15:17:15 +02:00
Sébastien Villemot bae1fa255a
Add scripts and CI job for building Windows package
The scripts are based the former “dynare-build” project. They have been
overhauled and simplified.

Building a Windows package (both installer and zip archive) is as easy as
running “make -C windows” (provided the right Debian packages are installed,
use the “windows/install-packages.sh” script for that purpose).

The layout of MEX files for Octave in the package has been
changed (mex/octave/win32/ and mex/octave/win64/ instead of mex/octave32/ and
mex/octave/), for consistency with MATLAB MEX.
2019-09-03 21:36:47 +02:00
Sébastien Villemot cb44d96121
Revert "MATLAB testsuite: don’t use -batch for the time being on Linux and macOS"
It actually does not prevent crashes, see for example:
https://git.dynare.org/Dynare/dynare/-/jobs/4314

This reverts commit 3cf650a2dd.
2019-06-20 17:44:23 +02:00
Sébastien Villemot 11be47103b
Avoid dynamic linking against libwinpthread when using POSIX-threads MinGW 2019-06-12 18:01:42 +02:00
Sébastien Villemot 3cf650a2dd
MATLAB testsuite: don’t use -batch for the time being on Linux and macOS
This apparently fixes random testsuite crashes in Gitlab CI.
2019-05-10 18:41:37 +02:00
Sébastien Villemot f953374dba
More Unicode copyright symbol 2019-04-16 14:34:05 +02:00
Sébastien Villemot ab6cdd0d33
Add -noFigureWindows to MATLAB ≥ R2019a batch options 2019-04-10 13:01:01 +02:00
Sébastien Villemot 0f1fdde166
Update m4 macros from autoconf-archive
By the way, drop ax_boost_base.m4 which is no longer used.
2019-04-04 16:40:31 +02:00
Houtan Bastani 7e46d8267c
mac: make build system work with clang and gcc 2019-04-01 17:38:42 +02:00
Sébastien Villemot 37d7dc65ae
Compatibility fix with MATLAB ≤ R2011a 2019-03-26 15:42:18 +01:00
Sébastien Villemot fb4d14c0a2
Fix build failure with MATLAB ≤ R2011a with recent GCC 2019-03-25 18:47:50 +01:00
Sébastien Villemot 230cfe5f33
Fail at configuration if MATLAB version can't be put in X.Y.Z form 2019-03-25 18:47:49 +01:00
Sébastien Villemot c46023ad56
POSIX shell stylistic improvements 2019-03-25 18:47:49 +01:00
Sébastien Villemot 0f28974c2c
Provisions for MATLAB R2019a
In particular, use the new "-batch" option for running the testsuite.
2019-03-22 16:43:40 +01:00
Sébastien Villemot 752a02a36c
Dynare++: use C++11 threads (instead of POSIX threads API)
On Windows, this means that a POSIX threads implementation is no longer needed,
since C++11 threads are implemented using native Windows threads.

On GNU/Linux and macOS, POSIX threads are still used under the hood.

A new m4 macro (AX_CXX11_THREAD) is used to add the proper compilation
flags (instead of AX_PTHREAD).
2019-01-28 18:44:24 +01:00
Sébastien Villemot 18faa9733c
Further updates related to minimal MATLAB version bump 2018-11-13 18:29:20 +01:00
Sébastien Villemot 671fe4bcd4
Build system improvements on Windows (MinGW / MSYS2)
- Use the -static flag when linking Dynare++, so that shipping libquadmath and
  libgcc DLL in the installer is no longer needed.

- Use AM_CXXFLAGS and AM_LDFLAGS variables for changing flags, since CXXFLAGS
  and LDFLAGS are user variables. Also, this avoids passing these flags down to
  configure scripts in subdirectories.

- Check for the SZIP library in the configure test for the MatIO, this is
  needed under MSYS2.

- Statically link MatIO and GSL in MEX files for MATLAB, this is needed under
  MSYS2.
2018-11-06 12:17:56 +01:00