From 4d19d979165dfab92cccd656b9f75c2d516aa21b Mon Sep 17 00:00:00 2001 From: Harco de Hilster Date: Sat, 17 Jul 1999 16:23:35 +0000 Subject: [PATCH] added mingw32 host platform to configure.in, added WINVER define for windows builds, added USING_CONFIGURE define in acconfig.h and set wxUSE_UNIX default to 0 (needed for cross-compiling and building on non-Unix-ported bash shells) configure will of course set wxUSE_UNIX back to 1 by default. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- acconfig.h | 7 +++++-- configure.in | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/acconfig.h b/acconfig.h index 8d0f4db1f2..cefc7c90ff 100644 --- a/acconfig.h +++ b/acconfig.h @@ -5,6 +5,8 @@ #ifndef __GTKSETUPH__ #define __GTKSETUPH__ +#define USING_CONFIGURE + #ifdef __GNUG__ #pragma interface #endif @@ -31,7 +33,7 @@ /* * Define to 1 for Unix[-like] system */ -#define wxUSE_UNIX 1 +#define wxUSE_UNIX 0 #undef __UNIX__ #undef __LINUX__ @@ -56,6 +58,7 @@ #undef __WIN95__ #undef __WIN32__ #undef __GNUWIN32__ +#undef WINVER /* ------------------------------------------------------------------------ */ /* compiler options */ @@ -271,7 +274,7 @@ */ #define wxUSE_TOOLBAR 0 -#ifdef __WXWINE__ +#if defined(__WXWINE__) || defined(__GNUWIN32__) #if wxUSE_TOOLBAR #define wxUSE_BUTTONBAR 1 #endif diff --git a/configure.in b/configure.in index 53d7105e63..d2650c0f1d 100644 --- a/configure.in +++ b/configure.in @@ -80,7 +80,7 @@ USE_FREEBSD= USE_VMS= USE_ULTRIX= USE_CYGWIN= -USE_MINGW32= +USE_MINGW= USE_DATA_GENERAL= dnl the list of all available toolkits @@ -186,6 +186,16 @@ case "${host}" in AC_DEFINE(__WIN95__) AC_DEFINE(__WINDOWS__) AC_DEFINE(__GNUWIN32__) + AC_DEFINE(WINVER, 0x0400) + DEFAULT_DEFAULT_wxUSE_MSW=1 + ;; + *-*-mingw32* ) + USE_UNIX=0 + AC_DEFINE(__WIN32__) + AC_DEFINE(__WIN95__) + AC_DEFINE(__WINDOWS__) + AC_DEFINE(__GNUWIN32__) + AC_DEFINE(WINVER, 0x0400) DEFAULT_DEFAULT_wxUSE_MSW=1 ;; @@ -969,7 +979,7 @@ WXGTK12= WXWINE= -if test "$wxUSE_CYGWIN" = 1; then +if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then AC_MSG_CHECKING(for Windows headers) WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h) @@ -978,7 +988,9 @@ if test "$wxUSE_CYGWIN" = 1; then TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -I$ac_find_includes" else AC_MSG_RESULT(no) - AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h) + if test "$cross_compiling" != "yes" ; then + AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h) + fi fi TOOLKIT=MSW -- 2.45.2