From: Bryce D. <bd...@us...> - 2002-11-21 19:26:10
|
Update of /cvsroot/bochs/bochs In directory sc8-pr-cvs1:/tmp/cvs-serv10737 Modified Files: Makefile.in config.h.in configure configure.in main.cc plugin.h Log Message: - A new GUI is born! add SVGALIB display library by Igor Popik <ig...@ws...> While it's running, you can press F12 to escape into the runtime config menu, and then you can change disks or quit or whatever. Better not try it with the bochs debugger...you could get stuck. Modified Files: Makefile.in config.h.in configure configure.in main.cc plugin.h gui/Makefile.in Added Files: gui/svga.cc Removed Files: patches/patch.svgalib-gui patches/patch.svgalib-gui-f12 Index: Makefile.in =================================================================== RCS file: /cvsroot/bochs/bochs/Makefile.in,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -r1.114 -r1.115 --- Makefile.in 21 Nov 2002 17:52:59 -0000 1.114 +++ Makefile.in 21 Nov 2002 19:25:57 -0000 1.115 @@ -99,6 +99,7 @@ X_PRE_LIBS = @X_PRE_LIBS@ GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS) -lX11 GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs` +GUI_LINK_OPTS_SVGA = -lvga -lvgagl GUI_LINK_OPTS_BEOS = -lbe GUI_LINK_OPTS_RFB = @RFB_LIBS@ GUI_LINK_OPTS_AMIGAOS = Index: config.h.in =================================================================== RCS file: /cvsroot/bochs/bochs/config.h.in,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- config.h.in 18 Nov 2002 02:32:53 -0000 1.96 +++ config.h.in 21 Nov 2002 19:25:58 -0000 1.97 @@ -370,6 +370,7 @@ #define BX_WITH_RFB 0 #define BX_WITH_AMIGAOS 0 #define BX_WITH_SDL 0 +#define BX_WITH_SVGA 0 #define BX_WITH_WX 0 // add special export symbols for win32 DLL building. The main code must Index: configure =================================================================== RCS file: /cvsroot/bochs/bochs/configure,v retrieving revision 1.176 retrieving revision 1.177 diff -u -d -r1.176 -r1.177 --- configure 21 Nov 2002 17:40:17 -0000 1.176 +++ configure 21 Nov 2002 19:25:58 -0000 1.177 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in,v 1.174 2002/11/21 03:50:59 bdenney Exp . +# From configure.in Id: configure.in,v 1.175 2002/11/21 17:40:14 bdenney Exp . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # @@ -1066,6 +1066,7 @@ --with-rfb use RFB protocol, works with VNC viewer --with-amigaos use MorphOS (Amiga) --with-sdl use SDL libraries + --with-svga use SVGALib libraries --with-wx use wxWindows libraries --with-all-libs compile all guis that Bochs supports @@ -1618,6 +1619,7 @@ echo "${ECHO_T}$ADD_FLAGS" >&6 if (test "$with_sdl" != yes) && \ + (test "$with_svga" != yes) && \ (test "$with_x11" != yes) && \ (test "$with_beos" != yes) && \ (test "$with_win32" != yes) && \ @@ -4202,7 +4204,7 @@ case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4205 "configure"' > conftest.$ac_ext + echo '#line 4207 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4752,7 +4754,7 @@ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6583,7 +6585,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 6586 "configure" +#line 6588 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -6681,7 +6683,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 6684 "configure" +#line 6686 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -8723,7 +8725,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 8726 "configure" +#line 8728 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16490,6 +16492,229 @@ fi fi + if test "$with_svga" != yes; then + can_compile_svga=1 + if test "${ac_cv_header_vga_h+set}" = set; then + echo "$as_me:$LINENO: checking for vga.h" >&5 +echo $ECHO_N "checking for vga.h... $ECHO_C" >&6 +if test "${ac_cv_header_vga_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_vga_h" >&5 +echo "${ECHO_T}$ac_cv_header_vga_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking vga.h usability" >&5 +echo $ECHO_N "checking vga.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <vga.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking vga.h presence" >&5 +echo $ECHO_N "checking vga.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <vga.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: vga.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: vga.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: vga.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: vga.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: vga.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: vga.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: vga.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: vga.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: vga.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: vga.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for vga.h" >&5 +echo $ECHO_N "checking for vga.h... $ECHO_C" >&6 +if test "${ac_cv_header_vga_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_vga_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_vga_h" >&5 +echo "${ECHO_T}$ac_cv_header_vga_h" >&6 + +fi +if test $ac_cv_header_vga_h = yes; then + : +else + can_compile_svga=0 +fi + + + if test "${ac_cv_header_vgagl_h+set}" = set; then + echo "$as_me:$LINENO: checking for vgagl.h" >&5 +echo $ECHO_N "checking for vgagl.h... $ECHO_C" >&6 +if test "${ac_cv_header_vgagl_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_vgagl_h" >&5 +echo "${ECHO_T}$ac_cv_header_vgagl_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking vgagl.h usability" >&5 +echo $ECHO_N "checking vgagl.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <vgagl.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking vgagl.h presence" >&5 +echo $ECHO_N "checking vgagl.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <vgagl.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: vgagl.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: vgagl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: vgagl.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: vgagl.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: vgagl.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: vgagl.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: vgagl.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: vgagl.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: vgagl.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: vgagl.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for vgagl.h" >&5 +echo $ECHO_N "checking for vgagl.h... $ECHO_C" >&6 +if test "${ac_cv_header_vgagl_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_vgagl_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_vgagl_h" >&5 +echo "${ECHO_T}$ac_cv_header_vgagl_h" >&6 + +fi +if test $ac_cv_header_vgagl_h = yes; then + : +else + can_compile_svga=0 +fi + + + if test $can_compile_svga = 1; then + with_svga=yes + fi + fi + if test "$with_x11" != yes; then can_compile_x11=1 if test "${ac_cv_header_X11_Xlib_h+set}" = set; then @@ -20400,6 +20625,13 @@ fi; +# Check whether --with-svga or --without-svga was given. +if test "${with_svga+set}" = set; then + withval="$with_svga" + +fi; + + # Check whether --with-wx or --without-wx was given. if test "${with_wx+set}" = set; then withval="$with_wx" @@ -20558,6 +20790,20 @@ GUI_CFLAGS="$GUI_CFLAGS \`sdl-config --cflags\`" GUI_CXXFLAGS="$GUI_CXXFLAGS \`sdl-config --cflags\`" GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SDL)" +fi + +if test "$with_svga" = yes; then + display_libs="$display_libs svga" + cat >>confdefs.h <<\_ACEOF +#define BX_WITH_SVGA 1 +_ACEOF + + SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SVGA)" + # GUI_*FLAGS are added to the compilation of every bochs file, not just + # the files in gui/*.cc. + GUI_CFLAGS="$GUI_CFLAGS" + GUI_CXXFLAGS="$GUI_CXXFLAGS" + GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SVGA)" fi if test "$with_rfb" = yes; then Index: configure.in =================================================================== RCS file: /cvsroot/bochs/bochs/configure.in,v retrieving revision 1.175 retrieving revision 1.176 diff -u -d -r1.175 -r1.176 --- configure.in 21 Nov 2002 17:40:14 -0000 1.175 +++ configure.in 21 Nov 2002 19:26:06 -0000 1.176 @@ -84,6 +84,7 @@ dnl // make sure X Windows is default if no other chosen if (test "$with_sdl" != yes) && \ + (test "$with_svga" != yes) && \ (test "$with_x11" != yes) && \ (test "$with_beos" != yes) && \ (test "$with_win32" != yes) && \ @@ -269,6 +270,15 @@ fi fi + if test "$with_svga" != yes; then + can_compile_svga=1 + AC_CHECK_HEADER([vga.h], [], [ can_compile_svga=0 ]) + AC_CHECK_HEADER([vgagl.h], [], [ can_compile_svga=0 ]) + if test $can_compile_svga = 1; then + with_svga=yes + fi + fi + if test "$with_x11" != yes; then can_compile_x11=1 AC_CHECK_HEADER([X11/Xlib.h], [], [ can_compile_x11=0 ]) @@ -1548,6 +1558,10 @@ [ --with-sdl use SDL libraries], ) +AC_ARG_WITH(svga, + [ --with-svga use SVGALib libraries], + ) + AC_ARG_WITH(wx, [ --with-wx use wxWindows libraries], ) @@ -1658,6 +1672,17 @@ GUI_CFLAGS="$GUI_CFLAGS \`sdl-config --cflags\`" GUI_CXXFLAGS="$GUI_CXXFLAGS \`sdl-config --cflags\`" GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SDL)" +fi + +if test "$with_svga" = yes; then + display_libs="$display_libs svga" + AC_DEFINE(BX_WITH_SVGA, 1) + SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SVGA)" + # GUI_*FLAGS are added to the compilation of every bochs file, not just + # the files in gui/*.cc. + GUI_CFLAGS="$GUI_CFLAGS" + GUI_CXXFLAGS="$GUI_CXXFLAGS" + GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SVGA)" fi if test "$with_rfb" = yes; then Index: main.cc =================================================================== RCS file: /cvsroot/bochs/bochs/main.cc,v retrieving revision 1.188 retrieving revision 1.189 diff -u -d -r1.188 -r1.189 --- main.cc 20 Nov 2002 19:34:50 -0000 1.188 +++ main.cc 21 Nov 2002 19:26:06 -0000 1.189 @@ -966,6 +966,9 @@ #if BX_WITH_SDL "sdl", #endif +#if BX_WITH_SVGA + "svga", +#endif #if BX_WITH_TERM "term", #endif @@ -1820,6 +1823,10 @@ #if BX_WITH_SDL if (!strcmp (gui_name, "sdl")) PLUG_load_plugin (sdl, PLUGTYPE_OPTIONAL); +#endif +#if BX_WITH_SVGA + if (!strcmp (gui_name, "svga")) + PLUG_load_plugin (svga, PLUGTYPE_OPTIONAL); #endif #if BX_WITH_TERM if (!strcmp (gui_name, "term")) Index: plugin.h =================================================================== RCS file: /cvsroot/bochs/bochs/plugin.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- plugin.h 20 Nov 2002 19:44:05 -0000 1.9 +++ plugin.h 21 Nov 2002 19:26:06 -0000 1.10 @@ -305,6 +305,7 @@ DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(nogui) DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(rfb) DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(sdl) +DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(svga) DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(term) DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(win32) DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(wx) |