I am trying to improve support for mingw (and, as a side effect,
cygwin) in the configure script. Specifically, there are some
#define's that are needed by the older version of cygwin, but are
included in the newer snapshots and upcoming net release.
Currently, these defines are in s/cygwin32.h and s/mingw32.h as
#ifndef xxx
#define xxx yyy
#endif
The problem with this is that the s/cygwin32.h or s/mingw32.h file gets
included before the system headers. This causes a lot of "xxx being
redefined ... previously defined here" messages.
Below is a preliminary patch to configure.in and src/config.h.in to
check for one of these defines and add it to config.h if it is not
defined int the system headers.
I am interested to know if anyone knows a better way to check for this
or if there is a better position in the configuration process to do
this checking.
Craig
-----
Index: configure.in
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/configure.in,v
retrieving revision 1.111.2.97
diff -u -r1.111.2.97 configure.in
--- configure.in 2000/04/03 06:28:54 1.111.2.97
+++ configure.in 2000/04/06 14:56:32
@@ -2798,6 +2798,19 @@
test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
esac
+if test "$with_msw" = "yes"; then
+ AC_CHECKING(MS-Windows specific DEFINEs)
+ AC_CHECKING(for WM_MOUSEWHEEL)
+ AC_TRY_RUN([#include <windows.h>
+ int main() {
+#ifdef WM_MOUSEWHEEL
+ return 1;
+#else
+ return 0;
+#endif
+}],[AC_DEFINE(WM_MOUSEWHEEL,0x20A)])
+fi
+
dnl Enable or disable proper handling of WM_COMMAND
AC_CHECKING(for WM_COMMAND option);
dnl if test "$with_wmcommand" = "yes"; then
cvs server: Diffing src
Index: src/config.h.in
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/config.h.in,v
retrieving revision 1.49.2.34
diff -u -r1.49.2.34 config.h.in
--- config.h.in 2000/03/27 19:54:49 1.49.2.34
+++ config.h.in 2000/04/06 14:56:42
@@ -162,6 +162,19 @@
/* Compile in support for MS windows? */
#undef HAVE_MS_WINDOWS
+/* defines that are needed by older versions of the cygwin/mingw system */
+#undef SPI_GETWHEELSCROLLLINES
+#undef WHEEL_PAGESCROLL
+#undef WHEEL_DELTA
+#undef WM_MOUSEWHEEL
+#undef TCS_BOTTOM
+#undef TCS_VERTICAL
+#undef PHYSICALWIDTH
+#undef PHYSICALHEIGHT
+#undef PHYSICALOFFSETX
+#undef PHYSICALOFFSETY
+#undef PBS_SMOOTH
+
/* special cygwin process handling? */
#undef HAVE_MSG_SELECT