Fixes for Cygwin 1.7 (which has gcc/g++ version 4 by default)

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3320 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
sebastien 2010-01-08 12:15:16 +00:00
parent 46e144ad80
commit 34012243d5
3 changed files with 21 additions and 11 deletions

View File

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
dnl Copyright (C) 2009 Dynare Team
dnl Copyright (C) 2009-2010 Dynare Team
dnl
dnl This file is part of Dynare.
dnl
@ -30,6 +30,13 @@ case ${host_os} in
*mingw32*)
LDFLAGS="$LDFLAGS -static-libgcc" # On mingw32, we don't want dynamic libgcc
;;
*cygwin*)
if test "x$F77" = "x"; then
# On Cygwin 1.7, g77 comes has version 3, and is not compatible with default gcc/g++ which has version 4
# And by default, the AC_PROG_F77 will pick up g77 if it is present (even if gfortran is also here)
F77=gfortran
fi
;;
esac
# Use C++ for testing headers

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 2009 Dynare Team
dnl Copyright (C) 2009-2010 Dynare Team
dnl
dnl This file is part of Dynare.
dnl
@ -20,7 +20,6 @@ AC_DEFUN([AX_MEXOPTS],
AC_REQUIRE([AX_MEXEXT])
AC_REQUIRE([AX_MATLAB_ARCH])
AC_REQUIRE([AX_MATLAB_VERSION])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_SED])
AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [6.5], [AC_MSG_ERROR([Your MATLAB is too old, please upgrade to 6.5 (R13) at least.])])
@ -66,13 +65,6 @@ case ${MATLAB_ARCH} in
MATLAB_LIBS="$LIBLOC/libmex.lib $LIBLOC/libmx.lib $LIBLOC/libmwlapack.lib -lstdc++"
# Starting from MATLAB 7.5, BLAS and LAPACK are in distinct libraries
AX_COMPARE_VERSION([$MATLAB_VERSION], [ge], [7.5], [MATLAB_LIBS="${MATLAB_LIBS} $LIBLOC/libmwblas.lib"])
case ${host_os} in
*cygwin*)
# MATLAB can't use native Cygwin DLLs
MATLAB_CFLAGS="$MATLAB_CFLAGS -mno-cygwin"
MATLAB_CXXFLAGS="$MATLAB_CXXFLAGS -mno-cygwin"
;;
esac
ax_mexopts_ok="yes"
;;
maci | maci64)

View File

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
dnl Copyright (C) 2009 Dynare Team
dnl Copyright (C) 2009-2010 Dynare Team
dnl
dnl This file is part of Dynare.
dnl
@ -37,6 +37,17 @@ if test "x$ax_enable_matlab" = "xyes"; then
CXXFLAGS="$MATLAB_CXXFLAGS"
fi
AC_CANONICAL_HOST
case ${host_os} in
*cygwin*)
# MATLAB can't use native Cygwin DLL, so using MinGW 3 shipped with Cygwin
CC=gcc-3
CXX=g++-3
CFLAGS="$CFLAGS -mno-cygwin"
CXXFLAGS="$CFLAGS -mno-cygwin"
;;
esac
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB