- for term compile, search for a function called "color_set" and compile it
away if color_set doesn't exist on that platform. On Solaris this was the only thing keeping term from compiling. See this bug [ 613393 ] solaris: term compile missing color_set http://sourceforge.net/tracker/index.php?func=detail&aid=613393&group_id=12580&atid=112580
This commit is contained in:
parent
4be28bc5ed
commit
73681b3a53
@ -664,6 +664,7 @@ typedef
|
||||
#define BX_HAVE_STRTOUQ 0
|
||||
#define BX_HAVE_STRDUP 0
|
||||
#define BX_HAVE_STRUCT_TIMEVAL 0
|
||||
#define BX_HAVE_COLOR_SET 0 // used in term gui
|
||||
|
||||
// set if your compiler does not permit an empty struct
|
||||
#define BX_NO_EMPTY_STRUCTS 0
|
||||
|
87
bochs/configure
vendored
87
bochs/configure
vendored
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.in Id: configure.in,v 1.131 2002/09/26 02:15:20 bdenney Exp .
|
||||
# From configure.in Id: configure.in,v 1.132 2002/09/26 02:19:14 bdenney Exp .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.53.
|
||||
#
|
||||
@ -10922,6 +10922,91 @@ fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_term" = yes; then
|
||||
old_LIBS="$LIBS"
|
||||
LIBS="$LIBS $GUI_LINK_OPTS_TERM"
|
||||
|
||||
for ac_func in color_set
|
||||
do
|
||||
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
echo "$as_me:$LINENO: checking for $ac_func" >&5
|
||||
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
|
||||
if eval "test \"\${$as_ac_var+set}\" = set"; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func (); below. */
|
||||
#include <assert.h>
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char $ac_func ();
|
||||
char (*f) ();
|
||||
|
||||
#ifdef F77_DUMMY_MAIN
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int F77_DUMMY_MAIN() { return 1; }
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||||
choke me
|
||||
#else
|
||||
f = $ac_func;
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
eval "$as_ac_var=yes"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
eval "$as_ac_var=no"
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
|
||||
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
|
||||
if test `eval echo '${'$as_ac_var'}'` = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define BX_HAVE_COLOR_SET 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
|
||||
if test "$with_rfb" = yes -a "$cross_configure" = 0; then
|
||||
# we need the socket function. if cross configuring, don't bother.
|
||||
|
||||
|
@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(bochs.h)
|
||||
AC_REVISION([[$Id: configure.in,v 1.132 2002-09-26 02:19:14 bdenney Exp $]])
|
||||
AC_REVISION([[$Id: configure.in,v 1.133 2002-09-26 02:36:04 bdenney Exp $]])
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl // Put Bochs version information right here so that it gets substituted
|
||||
@ -1486,6 +1486,13 @@ if test "$use_curses" = yes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_term" = yes; then
|
||||
old_LIBS="$LIBS"
|
||||
LIBS="$LIBS $GUI_LINK_OPTS_TERM"
|
||||
AC_CHECK_FUNCS(color_set, AC_DEFINE(BX_HAVE_COLOR_SET, 1))
|
||||
LIBS="$old_LIBS"
|
||||
fi
|
||||
|
||||
if test "$with_rfb" = yes -a "$cross_configure" = 0; then
|
||||
# we need the socket function. if cross configuring, don't bother.
|
||||
AC_CHECK_FUNCS(socket, have_socket=yes)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: term.cc,v 1.18 2002-08-17 14:01:07 vruppert Exp $
|
||||
// $Id: term.cc,v 1.19 2002-09-26 02:36:04 bdenney Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2000 MandrakeSoft S.A.
|
||||
@ -497,9 +497,11 @@ bx_gui_c::text_update(Bit8u *old_text, Bit8u *new_text,
|
||||
for(int i=0;i<4001;i+=2) {
|
||||
if ((old_text[i] != new_text[i]) ||
|
||||
(old_text[i+1] != new_text[i+1])) {
|
||||
#if BX_HAVE_COLOR_SET
|
||||
if (has_colors()) {
|
||||
color_set(get_color_pair(new_text[i+1]), NULL);
|
||||
}
|
||||
#endif
|
||||
ch = get_term_char(&new_text[i]);
|
||||
if ((new_text[i+1] & 0x08) > 0) ch |= A_BOLD;
|
||||
if ((new_text[i+1] & 0x80) > 0) ch |= A_REVERSE;
|
||||
@ -513,9 +515,11 @@ bx_gui_c::text_update(Bit8u *old_text, Bit8u *new_text,
|
||||
cursor_x=79;
|
||||
cursor_y--;
|
||||
}
|
||||
#if BX_HAVE_COLOR_SET
|
||||
if (has_colors()) {
|
||||
color_set(get_color_pair(new_text[(cursor_y*80+cursor_x)*2+1]), NULL);
|
||||
}
|
||||
#endif
|
||||
ch = get_term_char(&new_text[(cursor_y*80+cursor_x)*2]);
|
||||
if ((new_text[(cursor_y*80+cursor_x)*2+1] & 0x08) > 0) ch |= A_BOLD;
|
||||
if ((new_text[(cursor_y*80+cursor_x)*2+1] & 0x80) > 0) ch |= A_REVERSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user