Merge branch 'master' of ssh://kirikou.dynare.org/srv/d_kirikou/git/dynare
commit
17db705f4a
|
@ -372,7 +372,7 @@ In order to run Dynare, you need one of the following:
|
|||
@itemize
|
||||
|
||||
@item
|
||||
MATLAB version 7.0 (R14) or above;
|
||||
MATLAB version 7.3 (R2006b) or above;
|
||||
|
||||
@item
|
||||
GNU Octave version 3.4.0 or above.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dnl Detect the GSL.
|
||||
dnl Detect GSL.
|
||||
dnl We don't use the official M4 macro since it relies on the script gsl-config,
|
||||
dnl which does not work when cross-compiling.
|
||||
dnl
|
||||
|
|
|
@ -22,7 +22,7 @@ AC_REQUIRE([AX_MATLAB_ARCH])
|
|||
AC_REQUIRE([AX_MATLAB_VERSION])
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
|
||||
AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [7.0], [AC_MSG_ERROR([Your MATLAB is too old, please upgrade to 7.0 (R14) at least.])])
|
||||
AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [7.3], [AC_MSG_ERROR([Your MATLAB is too old, please upgrade to 7.3 (R2006b) at least.])])
|
||||
|
||||
AC_MSG_CHECKING([for options to compile MEX for MATLAB])
|
||||
|
||||
|
@ -52,7 +52,6 @@ case ${MATLAB_ARCH} in
|
|||
MATLAB_CFLAGS="-fexceptions -g -O2"
|
||||
MATLAB_CXXFLAGS="-g -O2"
|
||||
MATLAB_FFLAGS="-fexceptions -g -O2 -fno-underscoring"
|
||||
AX_COMPARE_VERSION([$MATLAB_VERSION], [eq], [7.0.1], [AC_MSG_ERROR([MATLAB version 7.0.1 (R14SP1) is buggy (LAPACK library missing for MSVC), and can't be used for compiling MEX files])])
|
||||
MATLAB_DEFS="$MATLAB_DEFS -DNDEBUG"
|
||||
# Note that static-libstdc++ is only supported since GCC 4.5 (but generates no error on older versions)
|
||||
MATLAB_LDFLAGS="-static-libgcc -static-libstdc++ -shared \$(top_srcdir)/mex.def -L$MATLAB/bin/${MATLAB_ARCH}"
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
dnl Detect the SLICOT Library.
|
||||
dnl Called with an argument of either 'matlab' or 'octave', depending
|
||||
dnl on the configure script from which we're calling it
|
||||
dnl
|
||||
dnl AX_SLICOT([matlab])
|
||||
dnl AX_SLICOT([octave])
|
||||
dnl
|
||||
dnl Copyright (C) 2012 Dynare Team
|
||||
dnl
|
||||
dnl This file is part of Dynare.
|
||||
dnl
|
||||
dnl Dynare is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl Dynare is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([AX_SLICOT],
|
||||
[
|
||||
if test "x$1" != "xmatlab" && test "x$1" != "xoctave"; then
|
||||
AC_MSG_ERROR([Argument to autoconf slicot macro must be either 'matlab' or 'octave'])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(slicot, AC_HELP_STRING([--with-slicot=DIR], [prefix to SLICOT installation]),
|
||||
slicot_prefix="$withval", slicot_prefix="")
|
||||
has_slicot=yes
|
||||
|
||||
if test "x$slicot_prefix" != "x"; then
|
||||
LDFLAGS_SLICOT="-L$withval/lib"
|
||||
else
|
||||
LDFLAGS_SLICOT=""
|
||||
fi
|
||||
ac_save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
|
||||
AC_F77_FUNC(sb02od)
|
||||
|
||||
if test "x$1" = "xmatlab"; then
|
||||
case ${MATLAB_ARCH} in
|
||||
maci | maci64)
|
||||
# Work around for exported_symbols_list flag present in Mac MATLAB_LDFLAGS
|
||||
LDFLAGS="$MATLAB_LDFLAGS_NOMAP $LDFLAGS_SLICOT"
|
||||
;;
|
||||
*)
|
||||
LDFLAGS="$LDFLAGS $MATLAB_LDFLAGS $LDFLAGS_SLICOT"
|
||||
;;
|
||||
esac
|
||||
case ${MATLAB_ARCH} in
|
||||
glnxa64 | win64 | maci64)
|
||||
AX_COMPARE_VERSION([$MATLAB_VERSION], [ge], [7.8], [use_64_bit_indexing=yes], [use_64_bit_indexing=no])
|
||||
;;
|
||||
*)
|
||||
use_64_bit_indexing=no
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$use_64_bit_indexing" = "yes"; then
|
||||
AC_CHECK_LIB([slicot64_pic], [$sb02od], [LIBADD_SLICOT="-lslicot64_pic"], [has_slicot=no], [$MATLAB_LIBS])
|
||||
else
|
||||
AC_CHECK_LIB([slicot_pic], [$sb02od], [LIBADD_SLICOT="-lslicot_pic"], [has_slicot=no], [$MATLAB_LIBS])
|
||||
fi
|
||||
else
|
||||
LDFLAGS="$LDFLAGS $LDFLAGS_SLICOT"
|
||||
AC_CHECK_LIB([slicot], [$sb02od], [LIBADD_SLICOT="-lslicot"],
|
||||
[
|
||||
AC_CHECK_LIB([slicot_pic], [$sb02od], [LIBADD_SLICOT="-lslicot_pic"], [has_slicot=no], [`$MKOCTFILE -p BLAS_LIBS` `$MKOCTFILE -p LAPACK_LIBS`])
|
||||
], # Fallback on libslicot_pic if dynamic libslicot not found
|
||||
[`$MKOCTFILE -p BLAS_LIBS` `$MKOCTFILE -p LAPACK_LIBS`])
|
||||
fi
|
||||
|
||||
LDFLAGS="$ac_save_LDFLAGS"
|
||||
AC_SUBST(LDFLAGS_SLICOT)
|
||||
AC_SUBST(LIBADD_SLICOT)
|
||||
])
|
|
@ -51,8 +51,8 @@ if exist('OCTAVE_VERSION')
|
|||
warning('This version of Dynare has only been tested on Octave 3.4.0 and above. Since your Octave version is older than that, Dynare may fail to run, or give unexpected results. Consider upgrading your Octave installation.');
|
||||
end
|
||||
else
|
||||
if matlab_ver_less_than('7.0')
|
||||
warning('This version of Dynare has only been tested on MATLAB 7.0 (R14) and above. Since your MATLAB version is older than that, Dynare may fail to run, or give unexpected results. Consider upgrading your MATLAB installation, or switch to Octave.');
|
||||
if matlab_ver_less_than('7.3')
|
||||
warning('This version of Dynare has only been tested on MATLAB 7.3 (R2006b) and above. Since your MATLAB version is older than that, Dynare may fail to run, or give unexpected results. Consider upgrading your MATLAB installation, or switch to Octave.');
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -101,12 +101,6 @@ for i=2:nargin
|
|||
command = [command ' ' varargin{i-1}];
|
||||
end
|
||||
|
||||
% Workaround for bug in Octave 3.2
|
||||
% See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550823
|
||||
if exist('OCTAVE_VERSION') && octave_ver_less_than('3.4.0')
|
||||
sleep(2)
|
||||
end
|
||||
|
||||
[status, result] = system(command);
|
||||
disp(result)
|
||||
if status
|
||||
|
|
|
@ -77,8 +77,8 @@ if ~exist('OCTAVE_VERSION')
|
|||
end
|
||||
end
|
||||
|
||||
% ordeig() was introducted in MATLAB 7.0.1, and doesn't exist in Octave
|
||||
if exist('OCTAVE_VERSION') || matlab_ver_less_than('7.0.1')
|
||||
% ordeig() doesn't exist in Octave
|
||||
if exist('OCTAVE_VERSION')
|
||||
addpath([dynareroot '/missing/ordeig'])
|
||||
end
|
||||
|
||||
|
@ -100,12 +100,7 @@ if exist('OCTAVE_VERSION')
|
|||
else
|
||||
% Add win32 specific paths for Dynare Windows package
|
||||
if strcmp(computer, 'PCWIN')
|
||||
if matlab_ver_less_than('7.3')
|
||||
mexpath = [dynareroot '../mex/matlab/win32-7.0-7.2'];
|
||||
if exist(mexpath, 'dir')
|
||||
addpath(mexpath)
|
||||
end
|
||||
elseif matlab_ver_less_than('7.5')
|
||||
if matlab_ver_less_than('7.5')
|
||||
mexpath = [dynareroot '../mex/matlab/win32-7.3-7.4'];
|
||||
if exist(mexpath, 'dir')
|
||||
addpath(mexpath)
|
||||
|
@ -120,12 +115,7 @@ else
|
|||
|
||||
% Add win64 specific paths for Dynare Windows package
|
||||
if strcmp(computer, 'PCWIN64')
|
||||
if matlab_ver_less_than('7.3')
|
||||
mexpath = [dynareroot '../mex/matlab/win64-7.2'];
|
||||
if exist(mexpath, 'dir')
|
||||
addpath(mexpath)
|
||||
end
|
||||
elseif matlab_ver_less_than('7.5')
|
||||
if matlab_ver_less_than('7.5')
|
||||
mexpath = [dynareroot '../mex/matlab/win64-7.3-7.4'];
|
||||
if exist(mexpath, 'dir')
|
||||
addpath(mexpath)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
noinst_PROGRAMS = kalman_steady_state
|
||||
|
||||
kalman_steady_state_LDADD = $(LIBADD_SLICOT)
|
||||
kalman_steady_state_LDFLAGS = $(LDFLAGS_SLICOT)
|
||||
|
||||
nodist_kalman_steady_state_SOURCES = $(top_srcdir)/../../sources/kalman_steady_state/kalman_steady_state.cc
|
||||
|
|
|
@ -83,33 +83,8 @@ AC_SUBST([LIBADD_MATIO])
|
|||
AM_CONDITIONAL([HAVE_MATIO], [test "x$ac_cv_header_matio_h" = "xyes" -a "x$ac_cv_lib_matio_Mat_Open" = "xyes"])
|
||||
|
||||
# Check for libslicot, needed by kalman_steady_state
|
||||
AC_F77_FUNC(sb02od)
|
||||
LDFLAGS_SAVED=$LDFLAGS
|
||||
case ${MATLAB_ARCH} in
|
||||
maci | maci64)
|
||||
# Work around for exported_symbols_list flag present in Mac MATLAB_LDFLAGS
|
||||
LDFLAGS=$MATLAB_LDFLAGS_NOMAP
|
||||
;;
|
||||
*)
|
||||
LDFLAGS=$MATLAB_LDFLAGS
|
||||
;;
|
||||
esac
|
||||
case ${MATLAB_ARCH} in
|
||||
glnxa64 | win64 | maci64)
|
||||
AX_COMPARE_VERSION([$MATLAB_VERSION], [ge], [7.8], [use_64_bit_indexing=yes], [use_64_bit_indexing=no])
|
||||
;;
|
||||
*)
|
||||
use_64_bit_indexing=no
|
||||
;;
|
||||
esac
|
||||
if test "$use_64_bit_indexing" = "yes"; then
|
||||
AC_CHECK_LIB([slicot64_pic], [$sb02od], [LIBADD_SLICOT="-lslicot64_pic"], [], [$MATLAB_LIBS])
|
||||
else
|
||||
AC_CHECK_LIB([slicot_pic], [$sb02od], [LIBADD_SLICOT="-lslicot_pic"], [], [$MATLAB_LIBS])
|
||||
fi
|
||||
LDFLAGS=$LDFLAGS_SAVED
|
||||
AC_SUBST([LIBADD_SLICOT])
|
||||
AM_CONDITIONAL([HAVE_SLICOT], [test "x$LIBADD_SLICOT" != "x"])
|
||||
AX_SLICOT([matlab])
|
||||
AM_CONDITIONAL([HAVE_SLICOT], [test "x$has_slicot" = "xyes"])
|
||||
|
||||
AM_CONDITIONAL([DO_SOMETHING], [test "x$ax_enable_matlab" = "xyes" -a "x$ax_matlab_version_ok" = "xyes" -a "x$ax_mexopts_ok" = "xyes"])
|
||||
|
||||
|
@ -129,7 +104,7 @@ else
|
|||
BUILD_KORDER_DYNSIMUL_MEX_MATLAB="no (missing MatIO library)"
|
||||
fi
|
||||
|
||||
if test "x$ax_enable_matlab" = "xyes" -a "x$ax_matlab_version_ok" = "xyes" -a "x$ax_mexopts_ok" = "xyes" -a "x$LIBADD_SLICOT" != "x"; then
|
||||
if test "x$ax_enable_matlab" = "xyes" -a "x$ax_matlab_version_ok" = "xyes" -a "x$ax_mexopts_ok" = "xyes" -a "x$has_slicot" = "xyes"; then
|
||||
BUILD_KALMAN_STEADY_STATE_MATLAB="yes"
|
||||
else
|
||||
BUILD_KALMAN_STEADY_STATE_MATLAB="no (missing SLICOT)"
|
||||
|
|
|
@ -66,12 +66,8 @@ AC_SUBST([LIBADD_MATIO])
|
|||
AM_CONDITIONAL([HAVE_MATIO], [test "x$ac_cv_header_matio_h" = "xyes" -a "x$ac_cv_lib_matio_Mat_Open" = "xyes"])
|
||||
|
||||
# Check for libslicot, needed by kalman_steady_state
|
||||
AC_F77_FUNC(sb02od)
|
||||
AC_CHECK_LIB([slicot], [$sb02od], [LIBADD_SLICOT="-lslicot"],
|
||||
[AC_CHECK_LIB([slicot_pic], [$sb02od], [LIBADD_SLICOT="-lslicot_pic"], [], [`$MKOCTFILE -p BLAS_LIBS` `$MKOCTFILE -p LAPACK_LIBS`])], # Fallback on libslicot_pic if dynamic libslicot not found
|
||||
[`$MKOCTFILE -p BLAS_LIBS` `$MKOCTFILE -p LAPACK_LIBS`])
|
||||
AC_SUBST([LIBADD_SLICOT])
|
||||
AM_CONDITIONAL([HAVE_SLICOT], [test "x$LIBADD_SLICOT" != "x"])
|
||||
AX_SLICOT([octave])
|
||||
AM_CONDITIONAL([HAVE_SLICOT], [test "x$has_slicot" = "xyes"])
|
||||
|
||||
AM_CONDITIONAL([DO_SOMETHING], [test "x$MKOCTFILE" != "x"])
|
||||
|
||||
|
@ -91,7 +87,7 @@ else
|
|||
BUILD_ESTIMATION_KORDER_DYNSIMUL_MEX_OCTAVE="no (missing MatIO library)"
|
||||
fi
|
||||
|
||||
if test "x$MKOCTFILE" != "x" -a "x$LIBADD_SLICOT" != "x"; then
|
||||
if test "x$MKOCTFILE" != "x" -a "x$has_slicot" = "xyes"; then
|
||||
BUILD_KALMAN_STEADY_STATE_OCTAVE="yes"
|
||||
else
|
||||
BUILD_KALMAN_STEADY_STATE_OCTAVE="no (missing SLICOT)"
|
||||
|
|
|
@ -25,8 +25,8 @@ NOTE: Dynare comes with an automated uninstaller, which you can run from the
|
|||
Using Dynare with MATLAB (R)
|
||||
----------------------------
|
||||
|
||||
Dynare requires MATLAB (R) version 7.0 or above. With older versions of MATLAB (R),
|
||||
it may fail or give unexpected results.
|
||||
Dynare requires MATLAB (R) version 7.3 (R2006b) or above. With older versions
|
||||
of MATLAB (R), it may fail or give unexpected results.
|
||||
|
||||
To use Dynare, you just have to add the 'matlab' subdirectory of your Dynare
|
||||
installation to MATLAB (R) path. You have two options for doing that:
|
||||
|
|
|
@ -83,11 +83,6 @@ SectionEnd
|
|||
|
||||
SectionGroup "MEX files for MATLAB"
|
||||
|
||||
Section "MEX files for MATLAB 32-bit, version 7.0 to 7.2 (R14 to R2006a)"
|
||||
SetOutPath $INSTDIR\mex\matlab\win32-7.0-7.2
|
||||
File ..\mex\matlab\win32-7.0-7.2\*.dll
|
||||
SectionEnd
|
||||
|
||||
Section "MEX files for MATLAB 32-bit, version 7.3 to 7.4 (R2006b to R2007a)"
|
||||
SetOutPath $INSTDIR\mex\matlab\win32-7.3-7.4
|
||||
File ..\mex\matlab\win32-7.3-7.4\*.mexw32
|
||||
|
@ -98,11 +93,6 @@ Section "MEX files for MATLAB 32-bit, version 7.5 to 8.0 (R2007b to R2012b)"
|
|||
File ..\mex\matlab\win32-7.5-8.0\*.mexw32
|
||||
SectionEnd
|
||||
|
||||
Section "MEX files for MATLAB 64-bit, version 7.2 (R2006a)"
|
||||
SetOutPath $INSTDIR\mex\matlab\win64-7.2
|
||||
File ..\mex\matlab\win64-7.2\*.mexw64
|
||||
SectionEnd
|
||||
|
||||
Section "MEX files for MATLAB 64-bit, version 7.3 to 7.4 (R2006b to R2007a)"
|
||||
SetOutPath $INSTDIR\mex\matlab\win64-7.3-7.4
|
||||
File ..\mex\matlab\win64-7.3-7.4\*.mexw64
|
||||
|
|
Loading…
Reference in New Issue