From e59890c3e89646f6ca9a826c6491e9ff2d9e027a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 13 Mar 2000 09:45:00 +0000 Subject: [PATCH] fixed cross-compilation for Windows with mingw git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 6 +++--- configure.in | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure b/configure index a26b75769c..09962b0168 100755 --- a/configure +++ b/configure @@ -5986,7 +5986,7 @@ fi rm -f confcache -if test "$cross_compiling" = "yes" ; then +if test "$build" != "$host" ; then CC=$host_alias-gcc CXX=$host_alias-c++ AR=$host_alias-ar @@ -7022,7 +7022,7 @@ WXWINE= if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then if test "$cross_compiling" = "yes" ; then - echo "configure: warning: Cross compiling --- skipping windows.h check" 1>&2 + echo "configure: warning: skipping windows.h check for cross-compilation" 1>&2 else echo $ac_n "checking for Windows headers""... $ac_c" 1>&6 echo "configure:7029: checking for Windows headers" >&5 @@ -8857,7 +8857,7 @@ fi done -if test "$wxUSE_GUI" = "yes"; then +if test "$wxUSE_GUI" = "yes" -a test "$wxUSE_UNIX" = "yes"; then for ac_hdr in X11/XKBlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` diff --git a/configure.in b/configure.in index 70d3647412..2faf1c9ea6 100644 --- a/configure.in +++ b/configure.in @@ -442,6 +442,7 @@ dnl --------------------------------------------------------------------------- dnl the file passed to AC_INIT should be specific to our package AC_INIT(wx-config.in) +dnl sets build, host, target variables and the same with _alias AC_CANONICAL_SYSTEM dnl When making releases do: @@ -1312,7 +1313,7 @@ AC_CACHE_SAVE dnl cross-compiling support: we're cross compiling if the build system is dnl different from the target one (assume host and target be always the same) -if test "$cross_compiling" = "yes" ; then +if test "$build" != "$host" ; then CC=$host_alias-gcc CXX=$host_alias-c++ AR=$host_alias-ar @@ -1536,7 +1537,8 @@ WXWINE= if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then if test "$cross_compiling" = "yes" ; then - AC_MSG_WARN(Cross compiling --- skipping windows.h check) + dnl mingw32 will find them even if they're not in one of standard paths + AC_MSG_WARN(skipping windows.h check for cross-compilation) else AC_MSG_CHECKING(for Windows headers) WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h) @@ -2142,7 +2144,7 @@ AC_CHECK_HEADERS(wcstr.h) dnl defines HAVE_FNMATCH_H AC_CHECK_HEADERS(fnmatch.h) -if test "$wxUSE_GUI" = "yes"; then +if test "$wxUSE_GUI" = "yes" -a test "$wxUSE_UNIX" = "yes"; then dnl defines HAVE_X11_XKBLIB_H AC_CHECK_HEADERS(X11/XKBlib.h) fi -- 2.45.2