- add configure variable $cross_configure, which gets set if you are

configuring for a different machine.  This is used to short-circuit
  certain sanity checks, such as existence of certain required libraries.
- in --with-wx configuration, when $cross_configure=1, do not abort
  configure if library is not found.
- if wxWindows version not found, print "not_found" instead of nothing
This commit is contained in:
Bryce Denney 2002-09-24 21:35:04 +00:00
parent d21ffad632
commit d3802b9013
2 changed files with 46 additions and 17 deletions

34
bochs/configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Id: configure.in,v 1.125 2002/09/24 18:00:21 bdenney Exp .
# From configure.in Id: configure.in,v 1.126 2002/09/24 20:01:59 kevinlawton Exp .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53.
#
@ -1384,6 +1384,18 @@ if test "$with_win32_vcpp"; then
with_win32=yes
fi
echo "$as_me:$LINENO: checking if you are configuring for another platform" >&5
echo $ECHO_N "checking if you are configuring for another platform... $ECHO_C" >&6
if test "$target" = "$build"; then
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
cross_configure=0
else
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cross_configure=1
fi
# this case statement defines the compile flags which are needed to
# compile bochs on a platform. Don't put things like optimization settings
# into the configure.in file, since people will want to be able to change
@ -10394,7 +10406,7 @@ do
done
done
test -z "$ac_cv_prog_WX_CONFIG" && ac_cv_prog_WX_CONFIG="notfound"
test -z "$ac_cv_prog_WX_CONFIG" && ac_cv_prog_WX_CONFIG="not_found"
fi
fi
WX_CONFIG=$ac_cv_prog_WX_CONFIG
@ -10409,10 +10421,8 @@ fi
ok_wx_version=0
echo "$as_me:$LINENO: checking for wxWindows library version" >&5
echo $ECHO_N "checking for wxWindows library version... $ECHO_C" >&6
if test x$WX_CONFIG != xnotfound; then
if test x$WX_CONFIG != xnot_found; then
WX_VERSION=`$WX_CONFIG --version`
echo "$as_me:$LINENO: result: $WX_VERSION" >&5
echo "${ECHO_T}$WX_VERSION" >&6
# test that version >= 2.3.2. Anybody have a better way to do this? Yuck.
case x$WX_VERSION in
@ -10426,6 +10436,8 @@ echo "${ECHO_T}$WX_VERSION" >&6
esac
fi
echo "$as_me:$LINENO: result: $WX_VERSION" >&5
echo "${ECHO_T}$WX_VERSION" >&6
echo "$as_me:$LINENO: checking for default gui on this platform" >&5
echo $ECHO_N "checking for default gui on this platform... $ECHO_C" >&6
@ -10539,10 +10551,14 @@ _ACEOF
elif test "$with_wx" = yes; then
echo "$as_me:$LINENO: result: wxWindows" >&5
echo "${ECHO_T}wxWindows" >&6
if test x$ok_wx_version != x1; then
echo ERROR: A usable version of wxWindows was not found.
echo Upgrade the library or choose another gui.
exit 1
if test "$cross_configure" = 1; then
true # do not insist, if configuring for another machine
else
if test x$ok_wx_version != x1; then
echo ERROR: A usable version of wxWindows was not found.
echo Upgrade the library or choose another gui.
exit 1
fi
fi
cat >>confdefs.h <<\_ACEOF
#define BX_WITH_WX 1

View File

@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
AC_PREREQ(2.5)
AC_INIT(bochs.h)
AC_REVISION([[$Id: configure.in,v 1.126 2002-09-24 20:01:59 kevinlawton Exp $]])
AC_REVISION([[$Id: configure.in,v 1.127 2002-09-24 21:35:04 bdenney Exp $]])
AC_CONFIG_HEADER(config.h)
dnl // Put Bochs version information right here so that it gets substituted
@ -25,6 +25,15 @@ if test "$with_win32_vcpp"; then
with_win32=yes
fi
AC_MSG_CHECKING(if you are configuring for another platform)
if test "$target" = "$build"; then
AC_MSG_RESULT(no)
cross_configure=0
else
AC_MSG_RESULT(yes)
cross_configure=1
fi
# this case statement defines the compile flags which are needed to
# compile bochs on a platform. Don't put things like optimization settings
# into the configure.in file, since people will want to be able to change
@ -1268,12 +1277,11 @@ INSTALL_LIST_FOR_PLATFORM=
# check for existence of and usable version of wxWindows. This comes
# early so that it could affect which one gets chosen.
AC_CHECK_PROG(WX_CONFIG, [ wx-config --version ], wx-config, notfound)
AC_CHECK_PROG(WX_CONFIG, [ wx-config --version ], wx-config, not_found)
ok_wx_version=0
AC_MSG_CHECKING(for wxWindows library version)
if test x$WX_CONFIG != xnotfound; then
if test x$WX_CONFIG != xnot_found; then
WX_VERSION=`$WX_CONFIG --version`
AC_MSG_RESULT($WX_VERSION)
[
# test that version >= 2.3.2. Anybody have a better way to do this? Yuck.
case x$WX_VERSION in
@ -1287,6 +1295,7 @@ if test x$WX_CONFIG != xnotfound; then
esac
]
fi
AC_MSG_RESULT($WX_VERSION)
AC_MSG_CHECKING(for default gui on this platform)
AC_MSG_RESULT($DEFAULT_GUI)
@ -1360,10 +1369,14 @@ elif test "$with_term" = yes; then
use_curses=yes
elif test "$with_wx" = yes; then
AC_MSG_RESULT(wxWindows)
if test x$ok_wx_version != x1; then
echo ERROR: A usable version of wxWindows was not found.
echo Upgrade the library or choose another gui.
exit 1
if test "$cross_configure" = 1; then
true # do not insist, if configuring for another machine
else
if test x$ok_wx_version != x1; then
echo ERROR: A usable version of wxWindows was not found.
echo Upgrade the library or choose another gui.
exit 1
fi
fi
AC_DEFINE(BX_WITH_WX, 1)
WX_CFLAGS="\`$WX_CONFIG --cflags\`"