[Bugfix] Fix MinGW-based Windows builds.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4207 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/configure.ac b/configure.ac
index 1909e33..46a6986 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,11 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ([2.57])
+
+dnl Modify also RCVERSION variable when modifying release
 AC_INIT([tigervnc], [1.0.90], [http://www.tigervnc.org])
+RCVERSION="1,0,90,0"
+AC_SUBST([RCVERSION])
+
 BUILD=`date +%Y%m%d`
 AC_CONFIG_AUX_DIR([.])
 AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
@@ -35,12 +40,15 @@
 
 BUILD_WIN=
 case "$host_os" in
-mingw*)
+mingw32*)
 	CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_IE=0x0500"
 	CXXFLAGS="$CXXFLAGS -mthreads"
 	BUILD_WIN=yes
 	AC_CHECK_TOOL([WINDRES], windres, [AC_MSG_ERROR(windres not found)])
 	;;
+mingw*)
+	AC_MSG_ERROR(["Only 32bit MinGW builds are supported"])
+	;;
 esac
 AM_CONDITIONAL([BUILD_WIN], [test "x$BUILD_WIN" = xyes])
 if test "x$BUILD_WIN" = xyes; then
@@ -224,5 +232,6 @@
 win/rfb_win32/Makefile
 win/vncconfig/Makefile
 win/winvnc/Makefile
+win/resdefs.h
 po/Makefile.in
 ])
diff --git a/win/resdefs.h.in b/win/resdefs.h.in
index b61db53..e86a92d 100644
--- a/win/resdefs.h.in
+++ b/win/resdefs.h.in
@@ -1,4 +1,3 @@
 #define __VERSIONSTR "@VERSION@\0"
 #define __RCVERSION @RCVERSION@
 #define __RCVERSIONSTR "@RCVERSION@\0"
-#cmakedefine WIN64
diff --git a/win/vncconfig/Makefile.am b/win/vncconfig/Makefile.am
index a392386..5665ac4 100644
--- a/win/vncconfig/Makefile.am
+++ b/win/vncconfig/Makefile.am
@@ -18,4 +18,4 @@
 	vncconfig.exe.manifest64 CMakeLists.txt
 
 resources.o: vncconfig.rc
-	$(WINDRES) $^ -o $@
+	$(WINDRES) -I$(top_builddir)/win $^ -o $@
diff --git a/win/vncviewer/Makefile.am b/win/vncviewer/Makefile.am
index d19634e..d618738 100644
--- a/win/vncviewer/Makefile.am
+++ b/win/vncviewer/Makefile.am
@@ -45,4 +45,4 @@
 	vncviewer.exe.manifest64 vncviewer.bmp toolbar.bmp CMakeLists.txt
 
 resources.o: vncviewer.rc
-	$(WINDRES) $^ -o $@
+	$(WINDRES) -I$(top_builddir)/win $^ -o $@
diff --git a/win/winvnc/Makefile.am b/win/winvnc/Makefile.am
index dabfde2..736a7a9 100644
--- a/win/winvnc/Makefile.am
+++ b/win/winvnc/Makefile.am
@@ -24,4 +24,4 @@
 	CMakeLists.txt
 
 resources.o: winvnc.rc
-	$(WINDRES) $^ -o $@
+	$(WINDRES) -I$(top_builddir)/win $^ -o $@