From ad127052d8808179d3ac9b5093624c250f1fc29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 18 Aug 2010 16:21:23 +0200 Subject: [PATCH] Build system: display a warning when compiling for the Cygwin target --- configure.ac | 3 +++ mex/build/matlab/configure.ac | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index d89817233..6de5cee6c 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,9 @@ case ${host_os} in LDFLAGS="$LDFLAGS -static-libgcc" # On mingw32, we don't want dynamic libgcc ;; *cygwin*) + AC_MSG_WARN([You are compiling for the Cygwin target. This means that the preprocessor will]) + AC_MSG_WARN([not run from MATLAB unless you add the Cygwin DLL to the path.]) + AC_MSG_WARN([This is probably not what you want. Consider using a MinGW cross-compiler.]) 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) diff --git a/mex/build/matlab/configure.ac b/mex/build/matlab/configure.ac index 66f3a7ba2..55aad164c 100644 --- a/mex/build/matlab/configure.ac +++ b/mex/build/matlab/configure.ac @@ -42,11 +42,9 @@ fi 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="$CXXFLAGS -mno-cygwin" + AC_MSG_WARN([You are compiling for the Cygwin target. This means that the MEX files will]) + AC_MSG_WARN([not run from MATLAB, because it cannot load the Cygwin DLL.]) + AC_MSG_WARN([This is probably not what you want. Consider using a MinGW cross-compiler.]) ;; esac