2009-07-06 19:01:12 +02:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
dnl Copyright (C) 2009 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/>.
|
2009-04-23 17:52:00 +02:00
|
|
|
|
2009-09-09 19:07:49 +02:00
|
|
|
AC_PREREQ([2.61])
|
2009-06-08 18:43:24 +02:00
|
|
|
AC_INIT([dynare], [4.1-unstable])
|
2009-04-23 17:52:00 +02:00
|
|
|
AC_CONFIG_SRCDIR([preprocessor/DynareMain.cc])
|
2009-09-09 18:47:43 +02:00
|
|
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
|
2009-04-23 17:52:00 +02:00
|
|
|
|
|
|
|
AC_PROG_CXX
|
|
|
|
|
|
|
|
# Use C++ for testing headers
|
|
|
|
AC_LANG([C++])
|
|
|
|
|
|
|
|
CXXFLAGS="$CXXFLAGS -Wall"
|
|
|
|
|
2009-09-09 18:47:43 +02:00
|
|
|
AC_PROG_RANLIB
|
2009-09-17 14:06:44 +02:00
|
|
|
|
2009-09-16 15:49:47 +02:00
|
|
|
AC_PROG_LN_S
|
2009-09-17 14:06:44 +02:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
case ${host_os} in
|
|
|
|
*cygwin*)
|
|
|
|
LN_S="cp -p" # Cygwin symbolic links are not understood by MATLAB
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-09-17 10:14:44 +02:00
|
|
|
AC_PROG_MKDIR_P
|
2009-09-09 18:47:43 +02:00
|
|
|
|
|
|
|
AM_PROG_LEX
|
2009-04-23 17:52:00 +02:00
|
|
|
|
2009-09-17 17:05:25 +02:00
|
|
|
AC_CHECK_PROG([YACC], [bison], [bison])
|
|
|
|
if test "x$YACC" = "x"; then
|
|
|
|
unset YACC # AM_MISSING_PROG needs an unset variable: an empty variable won't do
|
|
|
|
AM_MISSING_PROG([YACC], [bison])
|
|
|
|
fi
|
2009-04-23 17:52:00 +02:00
|
|
|
|
2009-09-10 11:50:58 +02:00
|
|
|
AX_BOOST_BASE([1.34])
|
2009-09-16 15:08:02 +02:00
|
|
|
|
|
|
|
CPPFLAGS_SAVED="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
2009-04-23 17:52:00 +02:00
|
|
|
AC_CHECK_HEADERS([boost/graph/adjacency_list.hpp], [], [AC_MSG_ERROR([Can't find Boost Graph Library])])
|
2009-09-16 15:08:02 +02:00
|
|
|
CPPFLAGS="$CPPFLAGS_SAVED"
|
2009-04-23 17:52:00 +02:00
|
|
|
|
|
|
|
# Don't use deprecated hash structures
|
|
|
|
AC_DEFINE([BOOST_NO_HASH])
|
|
|
|
|
2009-09-11 19:34:15 +02:00
|
|
|
AC_CHECK_PROG([PDFTEX], [pdftex], [pdftex])
|
|
|
|
AM_CONDITIONAL([HAVE_PDFTEX], [test "x$PDFTEX" != "x"])
|
|
|
|
|
2009-04-27 15:37:50 +02:00
|
|
|
AC_CHECK_PROG([PDFLATEX], [pdflatex], [pdflatex])
|
2009-09-10 11:50:58 +02:00
|
|
|
AM_CONDITIONAL([HAVE_PDFLATEX], [test "x$PDFLATEX" != "x"])
|
|
|
|
|
2009-04-27 15:37:50 +02:00
|
|
|
AC_CHECK_PROG([BIBTEX], [bibtex], [bibtex])
|
2009-09-10 11:50:58 +02:00
|
|
|
AM_CONDITIONAL([HAVE_BIBTEX], [test "x$BIBTEX" != "x"])
|
|
|
|
|
2009-04-27 15:37:50 +02:00
|
|
|
AC_CHECK_PROG([DBLATEX], [dblatex], [dblatex])
|
2009-09-10 11:50:58 +02:00
|
|
|
AM_CONDITIONAL([HAVE_DBLATEX], [test "x$DBLATEX" != "x"])
|
2009-04-27 15:37:50 +02:00
|
|
|
|
2009-09-10 11:50:58 +02:00
|
|
|
AX_PROG_XSLTPROC
|
2009-09-15 19:02:21 +02:00
|
|
|
AX_CHECK_DOCBOOK_XSLT_MIN(1.69.0)
|
2009-09-15 18:50:23 +02:00
|
|
|
AM_CONDITIONAL([HAVE_XSLT], [test "x$XSLTPROC" != "x" -a "x$DOCBOOK_XSLT_CURRENT_VERSION" != "xno"])
|
|
|
|
|
|
|
|
AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
|
|
|
|
AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x"])
|
2009-04-27 15:37:50 +02:00
|
|
|
|
2009-06-11 16:58:43 +02:00
|
|
|
AC_CHECK_PROG([OCTAVE], [octave], [octave])
|
2009-09-10 11:50:58 +02:00
|
|
|
AM_CONDITIONAL([HAVE_OCTAVE], [test "x$OCTAVE" != "x"])
|
2009-06-11 16:58:43 +02:00
|
|
|
|
2009-09-16 15:49:47 +02:00
|
|
|
AC_CHECK_PROG([MKOCTFILE], [mkoctfile], [mkoctfile])
|
|
|
|
AM_CONDITIONAL([HAVE_MKOCTFILE], [test "x$MKOCTFILE" != "x"])
|
|
|
|
|
2009-09-11 19:34:15 +02:00
|
|
|
AC_CHECK_PROG([CTANGLE], [ctangle], [ctangle])
|
|
|
|
AM_CONDITIONAL([HAVE_CTANGLE], [test "x$CTANGLE" != "x"])
|
2009-09-17 17:05:25 +02:00
|
|
|
if test "x$CTANGLE" = "x"; then
|
|
|
|
unset CTANGLE # AM_MISSING_PROG needs an unset variable: an empty variable won't do
|
|
|
|
AM_MISSING_PROG([CTANGLE], [ctangle])
|
|
|
|
fi
|
2009-09-11 19:34:15 +02:00
|
|
|
|
|
|
|
AC_CHECK_PROG([CWEAVE], [cweave], [cweave])
|
|
|
|
AM_CONDITIONAL([HAVE_CWEAVE], [test "x$CWEAVE" != "x"])
|
|
|
|
|
|
|
|
AX_BLAS
|
|
|
|
AM_CONDITIONAL([HAVE_BLAS], [test x"$ax_blas_ok" = "xyes"])
|
|
|
|
|
|
|
|
AX_LAPACK
|
|
|
|
AM_CONDITIONAL([HAVE_LAPACK], [test x"$ax_lapack_ok" = "xyes"])
|
|
|
|
|
|
|
|
AX_PTHREAD
|
|
|
|
AM_CONDITIONAL([HAVE_PTHREAD], [test x"$ax_pthread_ok" = "xyes"])
|
|
|
|
|
2009-07-06 19:01:12 +02:00
|
|
|
AX_MATLAB
|
|
|
|
|
2009-09-17 10:14:44 +02:00
|
|
|
if test "x$ax_enable_matlab" = "xyes"; then
|
2009-09-16 18:52:22 +02:00
|
|
|
AX_DOT_MEXEXT
|
2009-07-06 19:01:12 +02:00
|
|
|
AX_MATLAB_ARCH
|
2009-09-16 18:52:22 +02:00
|
|
|
AX_MATLAB_VERSION
|
|
|
|
|
|
|
|
if test "x$ax_matlab_version_ok" = "xyes"; then
|
|
|
|
AX_MEXOPTS
|
2009-09-17 10:14:44 +02:00
|
|
|
|
|
|
|
# Determine subdirectory of mex/ to be used for storing MATLAB MEX binaries
|
|
|
|
AX_COMPARE_VERSION([$MATLAB_VERSION], [le], [7.4], [DYNARE_MEXDIR="2007a"], [
|
|
|
|
DYNARE_MEXDIR="2007b"
|
|
|
|
if test ${MATLAB_ARCH%64} != ${MATLAB_ARCH}; then
|
|
|
|
AX_COMPARE_VERSION([$MATLAB_VERSION], [ge], [7.8], [DYNARE_MEXDIR="2009a-64bit"])
|
|
|
|
fi])
|
|
|
|
AC_SUBST([DYNARE_MEXDIR])
|
2009-09-16 18:52:22 +02:00
|
|
|
fi
|
2009-07-06 19:01:12 +02:00
|
|
|
fi
|
2009-09-17 10:14:44 +02:00
|
|
|
AM_CONDITIONAL([HAVE_MEXOPTS], [test "x$ax_enable_matlab" = "xyes" -a "x$ax_matlab_version_ok" = "xyes" -a "x$ax_mexopts_ok" = "xyes" ])
|
|
|
|
|
2009-07-06 19:01:12 +02:00
|
|
|
|
2009-06-08 18:43:24 +02:00
|
|
|
AC_CONFIG_FILES([Makefile
|
2009-09-09 18:47:43 +02:00
|
|
|
preprocessor/macro/Makefile
|
2009-06-08 18:43:24 +02:00
|
|
|
preprocessor/Makefile
|
|
|
|
doc/Makefile
|
|
|
|
doc/preprocessor/Makefile
|
|
|
|
doc/macroprocessor/Makefile
|
|
|
|
doc/userguide/Makefile
|
2009-06-11 16:58:43 +02:00
|
|
|
tests/Makefile
|
2009-06-08 18:43:24 +02:00
|
|
|
matlab/dynare_version.m
|
2009-09-09 18:47:43 +02:00
|
|
|
windows/dynare-version.nsi
|
2009-09-11 19:34:15 +02:00
|
|
|
dynare++/Makefile
|
|
|
|
dynare++/parser/cc/Makefile
|
|
|
|
dynare++/sylv/Makefile
|
|
|
|
dynare++/sylv/cc/Makefile
|
|
|
|
dynare++/sylv/testing/Makefile
|
|
|
|
dynare++/tl/Makefile
|
|
|
|
dynare++/tl/cc/Makefile
|
|
|
|
dynare++/tl/testing/Makefile
|
|
|
|
dynare++/doc/Makefile
|
|
|
|
dynare++/utils/cc/Makefile
|
|
|
|
dynare++/integ/Makefile
|
|
|
|
dynare++/integ/cc/Makefile
|
|
|
|
dynare++/integ/src/Makefile
|
|
|
|
dynare++/integ/testing/Makefile
|
|
|
|
dynare++/kord/Makefile
|
|
|
|
dynare++/src/Makefile
|
2009-09-16 15:49:47 +02:00
|
|
|
mex/build/Makefile
|
|
|
|
mex/build/mjdgges/octave/Makefile
|
2009-09-16 18:52:22 +02:00
|
|
|
mex/build/mjdgges/matlab/Makefile
|
2009-09-16 15:49:47 +02:00
|
|
|
mex/build/kronecker/octave/Makefile
|
2009-09-16 18:52:22 +02:00
|
|
|
mex/build/kronecker/matlab/Makefile
|
2009-09-16 15:49:47 +02:00
|
|
|
mex/build/gensylv/octave/Makefile
|
2009-09-16 18:52:22 +02:00
|
|
|
mex/build/gensylv/matlab/Makefile
|
2009-09-16 15:49:47 +02:00
|
|
|
mex/build/bytecode/octave/Makefile
|
2009-09-16 18:52:22 +02:00
|
|
|
mex/build/bytecode/matlab/Makefile
|
2009-09-09 18:47:43 +02:00
|
|
|
])
|
2009-04-23 17:52:00 +02:00
|
|
|
|
2009-09-15 18:50:23 +02:00
|
|
|
# Construct final output message
|
|
|
|
|
|
|
|
BUILD_PREPROCESSOR="yes"
|
|
|
|
|
2009-09-17 17:05:25 +02:00
|
|
|
if test "x$ax_blas_ok" = "xyes" -a "x$ax_lapack_ok" = "xyes" -a "x$ax_pthread_ok" = "xyes"; then
|
2009-09-15 18:50:23 +02:00
|
|
|
BUILD_DYNAREPLUSPLUS="yes"
|
|
|
|
else
|
2009-09-17 17:05:25 +02:00
|
|
|
BUILD_DYNAREPLUSPLUS="no (missing one of: BLAS, LAPACK, POSIX Threads)"
|
2009-09-15 18:50:23 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$CWEAVE" != "x" -a x"$PDFTEX" != "x"; then
|
|
|
|
BUILD_DYNAREPLUSPLUS_SRCDOC="yes"
|
|
|
|
else
|
|
|
|
BUILD_DYNAREPLUSPLUS_SRCDOC="no (missing one of: cweave, pdftex)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$XSLTPROC" != "x" -a "x$DOCBOOK_XSLT_CURRENT_VERSION" != "xno"; then
|
|
|
|
BUILD_DYNARE_HTML_MANUAL="yes"
|
|
|
|
else
|
|
|
|
BUILD_DYNARE_HTML_MANUAL="no (missing one of: xsltproc, DocBook stylesheets)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$PDFLATEX" != "x" -a "x$DBLATEX" != "x"; then
|
|
|
|
BUILD_DYNARE_PDF_MANUAL="yes"
|
|
|
|
else
|
|
|
|
BUILD_DYNARE_PDF_MANUAL="no (missing one of: pdflatex, dblatex)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$PDFLATEX" != "x" -a "x$BIBTEX" != "x"; then
|
|
|
|
BUILD_DYNARE_USERGUIDE="yes"
|
|
|
|
else
|
|
|
|
BUILD_DYNARE_USERGUIDE="no (missing one of: pdflatex, bibtex)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$PDFLATEX" != "x"; then
|
|
|
|
BUILD_OTHER_PDF_DOC="yes"
|
|
|
|
else
|
|
|
|
BUILD_OTHER_PDF_DOC="no (missing pdflatex)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$DOXYGEN" != "x"; then
|
|
|
|
BUILD_DYNARE_PREPROC_DOC="yes"
|
|
|
|
else
|
|
|
|
BUILD_DYNARE_PREPROC_DOC="no (missing doxygen)"
|
|
|
|
fi
|
|
|
|
|
2009-09-16 15:49:47 +02:00
|
|
|
if test "x$MKOCTFILE" != "x"; then
|
|
|
|
BUILD_MEX_OCTAVE="yes"
|
|
|
|
else
|
|
|
|
BUILD_MEX_OCTAVE="no (missing mkoctfile)"
|
|
|
|
fi
|
|
|
|
|
2009-09-17 10:14:44 +02:00
|
|
|
if test "x$ax_enable_matlab" = "xyes" -a "x$ax_matlab_version_ok" = "xyes" -a "x$ax_mexopts_ok" = "xyes"; then
|
2009-09-16 18:52:22 +02:00
|
|
|
BUILD_MEX_MATLAB="yes"
|
|
|
|
else
|
2009-09-16 19:04:52 +02:00
|
|
|
BUILD_MEX_MATLAB="no (missing MATLAB, or unknown version, or unknown architecture)"
|
2009-09-16 18:52:22 +02:00
|
|
|
fi
|
|
|
|
|
2009-09-15 18:50:23 +02:00
|
|
|
if test "x$OCTAVE" != "x"; then
|
|
|
|
TESTSUITE_OCTAVE="yes"
|
|
|
|
else
|
|
|
|
TESTSUITE_OCTAVE="no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$BUILD_DYNAREPLUSPLUS" = "yes"; then
|
|
|
|
TESTSUITE_DYNAREPLUSPLUS="yes"
|
|
|
|
else
|
2009-09-16 19:04:52 +02:00
|
|
|
TESTSUITE_DYNAREPLUSPLUS="no"
|
2009-09-15 18:50:23 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_NOTICE([
|
|
|
|
|
|
|
|
Dynare is now configured for building the following components...
|
|
|
|
|
|
|
|
Binaries (with "make"):
|
|
|
|
Dynare preprocessor: $BUILD_PREPROCESSOR
|
2009-09-16 15:49:47 +02:00
|
|
|
MEX files for Octave: $BUILD_MEX_OCTAVE
|
2009-09-16 18:52:22 +02:00
|
|
|
MEX files for MATLAB: $BUILD_MEX_MATLAB
|
2009-09-15 18:50:23 +02:00
|
|
|
Dynare++: $BUILD_DYNAREPLUSPLUS
|
|
|
|
|
|
|
|
PDF documentation (with "make pdf"):
|
|
|
|
Dynare reference manual: $BUILD_DYNARE_PDF_MANUAL
|
|
|
|
Dynare user guide: $BUILD_DYNARE_USERGUIDE
|
|
|
|
Dynare++ developer documentation: $BUILD_DYNAREPLUSPLUS_SRCDOC
|
|
|
|
Various other documents: $BUILD_OTHER_PDF_DOC
|
|
|
|
|
|
|
|
HTML documentation (with "make html"):
|
|
|
|
Dynare reference manual: $BUILD_DYNARE_HTML_MANUAL
|
|
|
|
Dynare preprocessor developer doc: $BUILD_DYNARE_PREPROC_DOC
|
|
|
|
|
|
|
|
Testsuites (run with "make check"):
|
|
|
|
Dynare for Octave: $TESTSUITE_OCTAVE
|
|
|
|
Dynare++: $TESTSUITE_DYNAREPLUSPLUS
|
|
|
|
])
|
|
|
|
|
2009-04-23 17:52:00 +02:00
|
|
|
AC_OUTPUT
|