Commit 75f5b88f authored by Houtan Bastani's avatar Houtan Bastani
Browse files

SWZ: integrate ms-sbvar in build system

parent 6cdbf51a
......@@ -4,6 +4,10 @@ ACLOCAL_AMFLAGS = -I ../../../m4
if DO_SOMETHING
SUBDIRS = mjdgges kronecker bytecode libdynare++ gensylv k_order_perturbation dynare_simul_ estimation
if HAVE_GSL
SUBDIRS += ms_sbvar
endif
# libslicot must come before kalman_steady_state
if HAVE_FORT
SUBDIRS += libslicot kalman_steady_state
......
......@@ -73,7 +73,7 @@ AC_LANG_POP([C++])
# Check for dlopen(), needed by k_order_perturbation DLL
AC_CHECK_LIB([dl], [dlopen], [LIBADD_DLOPEN="-ldl"], [])
AC_SUBST([LIBADD_DLOPEN])
# Check for GSL, needed by SWZ
# Check for GSL, needed by MS-SBVAR
AX_GSL
AM_CONDITIONAL([HAVE_GSL], [test "x$has_gsl" = "xyes"])
......@@ -95,6 +95,12 @@ else
BUILD_KALMAN_STEADY_STATE_MATLAB="no (missing Fortran Compiler for compilation of libslicot)"
fi
if test "x$ax_enable_matlab" = "xyes" -a "x$ax_matlab_version_ok" = "xyes" -a "x$ax_mexopts_ok" = "xyes" -a "x$has_gsl" = "xyes"; then
BUILD_MS_SBVAR_MEX_MATLAB="yes"
else
BUILD_MS_SBVAR_MEX_MATLAB="no (missing GSL)"
fi
AC_ARG_ENABLE([openmp], AS_HELP_STRING([--enable-openmp], [use OpenMP for parallelization of some MEX files]), [
if test "x$enable_openmp" = "xyes"; then
CPPFLAGS="$CPPFLAGS -DUSE_OMP"
......@@ -118,9 +124,10 @@ AC_MSG_NOTICE([
Dynare is now configured for building the following components...
Binaries (with "make"):
MEX files for MATLAB (except Kalman Steady State): $BUILD_MEX_MATLAB
Kalman Steady State MEX file for MATLAB: $BUILD_KALMAN_STEADY_STATE_MATLAB
M2HTML documentation: $BUILD_M2HTML
MEX files for MATLAB (except MS-SBVAR and Kalman Steady State): $BUILD_MEX_MATLAB
MS-SBVAR MEX files for MATLAB: $BUILD_MS_SBVAR_MEX_MATLAB
Kalman Steady State MEX file for MATLAB: $BUILD_KALMAN_STEADY_STATE_MATLAB
M2HTML documentation: $BUILD_M2HTML
])
......@@ -134,6 +141,7 @@ AC_CONFIG_FILES([Makefile
dynare_simul_/Makefile
estimation/Makefile
libslicot/Makefile
kalman_steady_state/Makefile])
kalman_steady_state/Makefile
ms_sbvar/Makefile])
AC_OUTPUT
include ../mex.am
include ../../ms_sbvar.am
noinst_PROGRAMS = ms_create_init_file ms_command_line
DWSWITCHDIR = $(top_srcdir)/../../../ms-sbvar/switch_dw
DWUTILITIESDIR = $(top_srcdir)/../../../ms-sbvar/utilities_dw
DYNMEXSRCDIR = $(top_srcdir)/../../sources
MSMEXSRCDIR = $(DYNMEXSRCDIR)/ms-sbvar
CPPFLAGS += -DSTRUCTURED_COLUMN_MAJOR -I$(DYNMEXSRCDIR) -I$(MSMEXSRCDIR) -I$(DWUTILITIESDIR)/include -I$(DWSWITCHDIR)/switching -I$(DWSWITCHDIR)/state_space -I$(DWSWITCHDIR)/state_space/sbvar
LIBS += $(GSL_LIBS)
LDFLAGS += $(GSL_LDFLAGS)
DWUTILS = \
$(DWUTILITIESDIR)/arrays/dw_array.c \
$(DWUTILITIESDIR)/arrays/dw_matrix_array.c \
$(DWUTILITIESDIR)/ascii/dw_ascii.c \
$(DWUTILITIESDIR)/ascii/dw_parse_cmd.c \
$(DWUTILITIESDIR)/elliptical/dw_elliptical.c \
$(DWUTILITIESDIR)/error/dw_error.c \
$(DWUTILITIESDIR)/histogram/dw_histogram.c \
$(DWUTILITIESDIR)/math/dw_math.c \
$(DWUTILITIESDIR)/matrix/dw_matrix.c \
$(DWUTILITIESDIR)/matrix/bmatrix.c \
$(DWUTILITIESDIR)/sort/dw_matrix_sort.c \
$(DWUTILITIESDIR)/stat/dw_rand_gsl.c \
$(DWUTILITIESDIR)/stat/dw_matrix_rand.c
MSMEXSRC = \
$(MSMEXSRCDIR)/mex_top_level.cc \
$(MSMEXSRCDIR)/modify_for_mex.cc
nodist_ms_create_init_file_SOURCES = \
$(DWSWITCHDIR)/switching/dw_switch.c \
$(DWSWITCHDIR)/switching/dw_switchio.c \
$(DWSWITCHDIR)/switching/dw_dirichlet_restrictions.c \
$(DWSWITCHDIR)/switching/dw_metropolis_theta.c \
$(DWSWITCHDIR)/state_space/sbvar/create_init_file.c \
$(DWSWITCHDIR)/state_space/sbvar/VARbase.c \
$(DWSWITCHDIR)/state_space/sbvar/VARio.c \
$(DWSWITCHDIR)/state_space/sbvar/VARio_matlab.c \
$(DWUTILS) \
$(MSMEXSRC)
nodist_ms_command_line_SOURCES = \
$(DWSWITCHDIR)/switching/dw_switch.c \
$(DWSWITCHDIR)/switching/dw_switchio.c \
$(DWSWITCHDIR)/switching/dw_dirichlet_restrictions.c \
$(DWSWITCHDIR)/switching/dw_metropolis_theta.c \
$(DWSWITCHDIR)/switching/dw_switch_opt.c \
$(DWSWITCHDIR)/switching/dw_mdd_switch.c \
$(DWSWITCHDIR)/state_space/sbvar/VARbase.c \
$(DWSWITCHDIR)/state_space/sbvar/VARio.c \
$(DWSWITCHDIR)/state_space/sbvar/dw_sbvar_command_line.c \
$(DWSWITCHDIR)/state_space/sbvar/sbvar_estimate.c \
$(DWSWITCHDIR)/state_space/sbvar/sbvar_simulate.c \
$(DWSWITCHDIR)/state_space/sbvar/sbvar_probabilities.c \
$(DWSWITCHDIR)/state_space/sbvar/sbvar_mdd.c \
$(DWSWITCHDIR)/state_space/sbvar/dw_csminwel.c \
$(DWUTILS) \
$(MSMEXSRC)
......@@ -4,6 +4,10 @@ ACLOCAL_AMFLAGS = -I ../../../m4
if DO_SOMETHING
SUBDIRS = mjdgges kronecker bytecode libdynare++ gensylv k_order_perturbation dynare_simul_ qzcomplex ordschur
if HAVE_GSL
SUBDIRS += ms_sbvar
endif
# libslicot must come before kalman_steady_state
if HAVE_FORT
SUBDIRS += libslicot kalman_steady_state
......
......@@ -56,7 +56,7 @@ AC_LANG_POP([C++])
# Check for dlopen(), needed by k_order_perturbation DLL
AC_CHECK_LIB([dl], [dlopen], [LIBADD_DLOPEN="-ldl"], [])
AC_SUBST([LIBADD_DLOPEN])
# Check for GSL, needed by SWZ
# Check for GSL, needed by MS-SBVAR
AX_GSL
AM_CONDITIONAL([HAVE_GSL], [test "x$has_gsl" = "xyes"])
......@@ -90,6 +90,12 @@ else
BUILD_KALMAN_STEADY_STATE_OCTAVE="no (missing Fortran Compiler for compilation of libslicot)"
fi
if test "x$MKOCTFILE" != "x" -a "x$has_gsl" = "xyes"; then
BUILD_MS_SBVAR_MEX_OCTAVE="yes"
else
BUILD_MS_SBVAR_MEX_OCTAVE="no (missing GSL)"
fi
AC_ARG_ENABLE([openmp], AS_HELP_STRING([--enable-openmp], [use OpenMP for parallelization of some MEX files]), [
if test "x$enable_openmp" = "xyes"; then
CPPFLAGS="$CPPFLAGS -DUSE_OMP"
......@@ -103,9 +109,10 @@ AC_MSG_NOTICE([
Dynare is now configured for building the following components...
Binaries (with "make"):
MEX files for Octave (except Kalman Steady State): $BUILD_MEX_OCTAVE
Kalman Steady State MEX file for Octave: $BUILD_KALMAN_STEADY_STATE_OCTAVE
Estimation MEX for Octave: $BUILD_ESTIMATION_MEX_OCTAVE
MEX files for Octave (except MS-SBVAR and Kalman Steady State): $BUILD_MEX_OCTAVE
MS-SBVAR MEX files for Octave: $BUILD_MS_SBVAR_MEX_OCTAVE
Kalman Steady State MEX file for Octave: $BUILD_KALMAN_STEADY_STATE_OCTAVE
Estimation MEX for Octave: $BUILD_ESTIMATION_MEX_OCTAVE
])
......@@ -121,6 +128,7 @@ AC_CONFIG_FILES([Makefile
qzcomplex/Makefile
ordschur/Makefile
libslicot/Makefile
kalman_steady_state/Makefile])
kalman_steady_state/Makefile
ms_sbvar/Makefile])
AC_OUTPUT
EXEEXT = .mex
include ../mex.am
include ../../ms_sbvar.am
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment