diff --git a/BasiliskII/ChangeLog b/BasiliskII/ChangeLog index 8116253f..55833f26 100644 --- a/BasiliskII/ChangeLog +++ b/BasiliskII/ChangeLog @@ -3,12 +3,16 @@ V0.8 - - removed Windows sources from the source archive; a version of these that actually compiles and works can be downloaded from Lauri Pesonen's site + - fixed one possible source of "unimplemented trap" errors on MacOS + bootup - medium removal is allowed in CDROMExit() - Unix: added support for ESD audio output; merged with OSS audio and put in a new "audio_oss_esd.cpp" file which is also used under FreeBSD 3.x - Unix: added mkinstalldirs to "make install" target - Unix: cleaned up the configure script + - Unix: ROM breakpoint can be specified with "-break" command line + argument - Unix/audio_oss_esd.cpp: AudioStatus is re-set after determining audio device capabilities (actual sample rate is also determined) [Alexander R. Pruss] diff --git a/BasiliskII/src/Unix/BasiliskII.1 b/BasiliskII/src/Unix/BasiliskII.1 index f07b2b76..84f607b3 100644 --- a/BasiliskII/src/Unix/BasiliskII.1 +++ b/BasiliskII/src/Unix/BasiliskII.1 @@ -5,6 +5,8 @@ Basilisk II \- a free, portable Mac II emulator .B BasiliskII [\-display .IR display-name ] +[\-break +.IR offset ] .SH DESCRIPTION .B Basilisk II is an attempt at creating a free, portable 68k Mac emulator. @@ -14,6 +16,9 @@ For more information, see the included "README" file. .BI "\-display " display-name specifies the display to use; see .BR X (1) +.TP +.BI "\-break " offset +specifies a ROM offset where a breakpoint will be placed .SH FILES .TP .I /usr/share/BasiliskII/keycodes diff --git a/BasiliskII/src/Unix/config.h.in b/BasiliskII/src/Unix/config.h.in index 4046a809..31cc74fd 100644 --- a/BasiliskII/src/Unix/config.h.in +++ b/BasiliskII/src/Unix/config.h.in @@ -67,6 +67,12 @@ /* Define if you have the header file. */ #undef HAVE_FCNTL_H +/* Define if you have the header file. */ +#undef HAVE_READLINE_HISTORY_H + +/* Define if you have the header file. */ +#undef HAVE_READLINE_READLINE_H + /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H @@ -78,3 +84,6 @@ /* Define if you have the pthread library (-lpthread). */ #undef HAVE_LIBPTHREAD + +/* Define if you have the readline library (-lreadline). */ +#undef HAVE_LIBREADLINE diff --git a/BasiliskII/src/Unix/configure b/BasiliskII/src/Unix/configure index b593bb6f..0ba30fa4 100755 --- a/BasiliskII/src/Unix/configure +++ b/BasiliskII/src/Unix/configure @@ -16,9 +16,11 @@ ac_help="$ac_help ac_help="$ac_help --enable-fbdev-dga use direct frame buffer access via /dev/fb [default=yes]" ac_help="$ac_help - --enable-esd Enlightened Sound Daemon support [default=yes]" + --with-esd support ESD for sound under Linux/FreeBSD [default=yes]" ac_help="$ac_help - --enable-ui use GTK user interface [default=yes]" + --with-gtk use GTK user interface [default=yes]" +ac_help="$ac_help + --with-mon use mon as debugger [default=yes]" ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help @@ -562,27 +564,35 @@ else WANT_FBDEV_DGA=yes fi -# Check whether --enable-esd or --disable-esd was given. -if test "${enable_esd+set}" = set; then - enableval="$enable_esd" - WANT_ESD=$enableval +# Check whether --with-esd or --without-esd was given. +if test "${with_esd+set}" = set; then + withval="$with_esd" + WANT_ESD=$withval else WANT_ESD=yes fi -# Check whether --enable-ui or --disable-ui was given. -if test "${enable_ui+set}" = set; then - enableval="$enable_ui" - WANT_UI=$enableval +# Check whether --with-gtk or --without-gtk was given. +if test "${with_gtk+set}" = set; then + withval="$with_gtk" + WANT_GTK=$withval else - WANT_UI=yes + WANT_GTK=yes +fi + +# Check whether --with-mon or --without-mon was given. +if test "${with_mon+set}" = set; then + withval="$with_mon" + WANT_MON=$withval +else + WANT_MON=yes fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:586: checking for $ac_word" >&5 +echo "configure:596: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -612,7 +622,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:616: checking for $ac_word" >&5 +echo "configure:626: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -663,7 +673,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:667: checking for $ac_word" >&5 +echo "configure:677: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -695,7 +705,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:699: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:709: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -706,12 +716,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 710 "configure" +#line 720 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -737,12 +747,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:741: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:751: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:746: checking whether we are using GNU C" >&5 +echo "configure:756: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -751,7 +761,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -770,7 +780,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:774: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:784: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -802,7 +812,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:806: checking how to run the C preprocessor" >&5 +echo "configure:816: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -817,13 +827,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -834,13 +844,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -851,13 +861,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -886,7 +896,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:890: checking for $ac_word" >&5 +echo "configure:900: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -918,7 +928,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:922: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:932: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -929,12 +939,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 933 "configure" +#line 943 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -960,12 +970,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:964: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:974: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:969: checking whether we are using GNU C++" >&5 +echo "configure:979: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -974,7 +984,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -993,7 +1003,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:997: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1007: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1025,7 +1035,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1029: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1039: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1082,7 +1092,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1086: checking for a BSD compatible install" >&5 +echo "configure:1096: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1137,13 +1147,100 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' MONSRCS= echo $ac_n "checking for mon""... $ac_c" 1>&6 -echo "configure:1141: checking for mon" >&5 +echo "configure:1151: checking for mon" >&5 if grep mon_init ../../../mon/src/mon.h >/dev/null 2>/dev/null; then echo "$ac_t""yes" 1>&6 WANT_MON=yes DEFINES="$DEFINES -DENABLE_MON=1" MONSRCS="../../../mon/src/mon.cpp ../../../mon/src/mon_6502.cpp ../../../mon/src/mon_68k.cpp ../../../mon/src/mon_8080.cpp ../../../mon/src/mon_cmd.cpp ../../../mon/src/mon_ppc.cpp ../../../mon/src/mon_x86.cpp" CXXFLAGS="$CXXFLAGS -I../../../mon/src" + echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +echo "configure:1159: checking for readline in -lreadline" >&5 +ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lreadline $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + for ac_hdr in readline/readline.h readline/history.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1209: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + else echo "$ac_t""no" 1>&6 WANT_MON=no @@ -1151,7 +1248,7 @@ else fi echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6 -echo "configure:1155: checking for sem_init in -lposix4" >&5 +echo "configure:1252: checking for sem_init in -lposix4" >&5 ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1159,7 +1256,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1203,7 +1300,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1207: checking for X" >&5 +echo "configure:1304: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1265,12 +1362,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1339,14 +1436,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1452,17 +1549,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:1456: checking whether -R must be followed by a space" >&5 +echo "configure:1553: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -1478,14 +1575,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -1517,7 +1614,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:1521: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:1618: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1525,7 +1622,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1558,7 +1655,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:1562: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:1659: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1566,7 +1663,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1606,12 +1703,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1610: checking for gethostbyname" >&5 +echo "configure:1707: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -1655,7 +1752,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1659: checking for gethostbyname in -lnsl" >&5 +echo "configure:1756: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1663,7 +1760,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1704,12 +1801,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:1708: checking for connect" >&5 +echo "configure:1805: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -1753,7 +1850,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1757: checking for connect in -lsocket" >&5 +echo "configure:1854: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1761,7 +1858,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1796,12 +1893,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:1800: checking for remove" >&5 +echo "configure:1897: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -1845,7 +1942,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:1849: checking for remove in -lposix" >&5 +echo "configure:1946: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1853,7 +1950,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1888,12 +1985,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:1892: checking for shmat" >&5 +echo "configure:1989: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -1937,7 +2034,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:1941: checking for shmat in -lipc" >&5 +echo "configure:2038: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1945,7 +2042,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1989,7 +2086,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:1993: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2090: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1997,7 +2094,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2040,7 +2137,7 @@ CXXFLAGS="$CXXFLAGS $X_CFLAGS" LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2044: checking for pthread_create in -lpthread" >&5 +echo "configure:2141: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2048,7 +2145,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2086,7 +2183,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:2090: checking for pthread_create in -lc_r" >&5 +echo "configure:2187: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2094,7 +2191,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2132,7 +2229,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lPTL""... $ac_c" 1>&6 -echo "configure:2136: checking for pthread_create in -lPTL" >&5 +echo "configure:2233: checking for pthread_create in -lPTL" >&5 ac_lib_var=`echo PTL'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2140,7 +2237,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lPTL $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2192,12 +2289,12 @@ SEMSRCS= for ac_func in sem_init do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2196: checking for $ac_func" >&5 +echo "configure:2293: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2249,7 +2346,7 @@ done if [ "x$WANT_XF86_DGA" = "xyes" ]; then echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6 -echo "configure:2253: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 +echo "configure:2350: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2257,7 +2354,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXxf86dga $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2310,7 +2407,7 @@ else fi UISRCS=../dummy/prefs_editor_dummy.cpp -if [ "x$WANT_UI" = "xyes" ]; then +if [ "x$WANT_GTK" = "xyes" ]; then # Check whether --with-gtk-prefix or --without-gtk-prefix was given. if test "${with_gtk_prefix+set}" = set; then withval="$with_gtk_prefix" @@ -2352,7 +2449,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2356: checking for $ac_word" >&5 +echo "configure:2453: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2387,7 +2484,7 @@ fi min_gtk_version=1.2.0 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:2391: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:2488: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -2410,7 +2507,7 @@ echo "configure:2391: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -2473,7 +2570,7 @@ main () } EOF -if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2513,7 +2610,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -2523,7 +2620,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:2527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" @@ -2557,7 +2654,7 @@ rm -f conftest* GTK_LIBS="" echo "configure: warning: Could not find GTK+, disabling user interface." 1>&2 - WANT_UI=no + WANT_GTK=no fi @@ -2608,7 +2705,7 @@ fi # Extract the first word of "esd-config", so it can be a program name with args. set dummy esd-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2612: checking for $ac_word" >&5 +echo "configure:2709: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2643,7 +2740,7 @@ fi min_esd_version=0.2.8 echo $ac_n "checking for ESD - version >= $min_esd_version""... $ac_c" 1>&6 -echo "configure:2647: checking for ESD - version >= $min_esd_version" >&5 +echo "configure:2744: checking for ESD - version >= $min_esd_version" >&5 no_esd="" if test "$ESD_CONFIG" = "no" ; then no_esd=yes @@ -2667,7 +2764,7 @@ echo "configure:2647: checking for ESD - version >= $min_esd_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -2725,7 +2822,7 @@ int main () EOF -if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2764,7 +2861,7 @@ fi CFLAGS="$CFLAGS $ESD_CFLAGS" LIBS="$LIBS $ESD_LIBS" cat > conftest.$ac_ext < @@ -2774,7 +2871,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding ESD or finding the wrong" @@ -2813,12 +2910,12 @@ rm -f conftest* fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2817: checking for ANSI C header files" >&5 +echo "configure:2914: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2826,7 +2923,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2843,7 +2940,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2861,7 +2958,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2882,7 +2979,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2893,7 +2990,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2920,17 +3017,17 @@ for ac_hdr in unistd.h fcntl.h sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2924: checking for $ac_hdr" >&5 +echo "configure:3021: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2958,14 +3055,14 @@ done echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2962: checking whether byte ordering is bigendian" >&5 +echo "configure:3059: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -2976,11 +3073,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -2991,7 +3088,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3011,7 +3108,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3048,12 +3145,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3052: checking for working const" >&5 +echo "configure:3149: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3123,21 +3220,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3127: checking for inline" >&5 +echo "configure:3224: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3163,7 +3260,7 @@ EOF esac echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:3167: checking size of short" >&5 +echo "configure:3264: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3171,7 +3268,7 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < main() @@ -3182,7 +3279,7 @@ main() exit(0); } EOF -if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -3202,7 +3299,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:3206: checking size of int" >&5 +echo "configure:3303: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3210,7 +3307,7 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < main() @@ -3221,7 +3318,7 @@ main() exit(0); } EOF -if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -3241,7 +3338,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:3245: checking size of long" >&5 +echo "configure:3342: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3249,7 +3346,7 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -3260,7 +3357,7 @@ main() exit(0); } EOF -if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -3280,7 +3377,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:3284: checking size of long long" >&5 +echo "configure:3381: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3288,7 +3385,7 @@ else ac_cv_sizeof_long_long=8 else cat > conftest.$ac_ext < main() @@ -3299,7 +3396,7 @@ main() exit(0); } EOF -if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -3319,12 +3416,12 @@ EOF echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3323: checking for off_t" >&5 +echo "configure:3420: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3352,12 +3449,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3356: checking for loff_t" >&5 +echo "configure:3453: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3385,12 +3482,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3389: checking for size_t" >&5 +echo "configure:3486: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3418,12 +3515,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3422: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3519: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3432,7 +3529,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3453,12 +3550,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:3457: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3554: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3466,7 +3563,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3490,12 +3587,12 @@ fi for ac_func in strdup cfmakeraw do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3494: checking for $ac_func" >&5 +echo "configure:3591: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3545,12 +3642,12 @@ done for ac_func in nanosleep clock_gettime timer_create do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3549: checking for $ac_func" >&5 +echo "configure:3646: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3600,12 +3697,12 @@ done for ac_func in pthread_cancel do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3604: checking for $ac_func" >&5 +echo "configure:3701: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3661,7 +3758,7 @@ if MACHINE=`uname -a 2>/dev/null`; then ;; FreeBSD*3.*) echo $ac_n "checking for cam_open_btl in -lcam""... $ac_c" 1>&6 -echo "configure:3665: checking for cam_open_btl in -lcam" >&5 +echo "configure:3762: checking for cam_open_btl in -lcam" >&5 ac_lib_var=`echo cam'_'cam_open_btl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3669,7 +3766,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3706,17 +3803,17 @@ fi else ac_safe=`echo "/sys/cam/cam.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for /sys/cam/cam.h""... $ac_c" 1>&6 -echo "configure:3710: checking for /sys/cam/cam.h" >&5 +echo "configure:3807: checking for /sys/cam/cam.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3749,7 +3846,7 @@ fi ;; FreeBSD*) echo $ac_n "checking for scsi_open in -lscsi""... $ac_c" 1>&6 -echo "configure:3753: checking for scsi_open in -lscsi" >&5 +echo "configure:3850: checking for scsi_open in -lscsi" >&5 ac_lib_var=`echo scsi'_'scsi_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3757,7 +3854,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lscsi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3794,17 +3891,17 @@ fi else ac_safe=`echo "scsi.h sys/scsiio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for scsi.h sys/scsiio.h""... $ac_c" 1>&6 -echo "configure:3798: checking for scsi.h sys/scsiio.h" >&5 +echo "configure:3895: checking for scsi.h sys/scsiio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3848,9 +3945,9 @@ SYSSRCS="$SYSSRCS $SEMSRCS $UISRCS $MONSRCS" HAVE_I386=no echo $ac_n "checking for x86 target CPU""... $ac_c" 1>&6 -echo "configure:3852: checking for x86 target CPU" >&5 +echo "configure:3949: checking for x86 target CPU" >&5 cat > conftest.$ac_ext <&6 -echo "configure:3875: checking for SPARC target CPU" >&5 +echo "configure:3972: checking for SPARC target CPU" >&5 cat > conftest.$ac_ext <&6 -echo "configure:3898: checking for GAS .p2align feature" >&5 +echo "configure:3995: checking for GAS .p2align feature" >&5 cat >conftest.S << EOF .text .p2align 5 @@ -3904,9 +4001,9 @@ echo "$ac_t""$HAVE_GAS" 1>&6 HAVE_GCC27=no echo $ac_n "checking for GCC 2.7 or higher""... $ac_c" 1>&6 -echo "configure:3908: checking for GCC 2.7 or higher" >&5 +echo "configure:4005: checking for GCC 2.7 or higher" >&5 cat > conftest.$ac_ext < 1 || __GNUC_MINOR__ - 1 > 5 yes @@ -3944,7 +4041,7 @@ elif [ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xye case "$MACHINE" in SunOS*) echo $ac_n "checking SPARC CPU architecture""... $ac_c" 1>&6 -echo "configure:3948: checking SPARC CPU architecture" >&5 +echo "configure:4045: checking SPARC CPU architecture" >&5 SPARC_TYPE=`Solaris/which_sparc` echo "$ac_t""$SPARC_TYPE" 1>&6 case "$SPARC_TYPE" in @@ -4352,7 +4449,7 @@ echo echo XFree86 DGA support .............. : $WANT_XF86_DGA echo fbdev DGA support ................ : $WANT_FBDEV_DGA echo ESD sound support ................ : $WANT_ESD -echo GTK user interface ............... : $WANT_UI +echo GTK user interface ............... : $WANT_GTK echo mon debugger support ............. : $WANT_MON echo i386 assembly optimizations ...... : $WANT_X86_ASSEMBLY echo SPARC V8 assembly optimizations .. : $WANT_SPARC_V8_ASSEMBLY diff --git a/BasiliskII/src/Unix/configure.in b/BasiliskII/src/Unix/configure.in index 053802bb..dc6ba394 100644 --- a/BasiliskII/src/Unix/configure.in +++ b/BasiliskII/src/Unix/configure.in @@ -8,8 +8,9 @@ AC_CONFIG_HEADER(config.h) dnl Options. AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes]) AC_ARG_ENABLE(fbdev-dga, [ --enable-fbdev-dga use direct frame buffer access via /dev/fb [default=yes]], [WANT_FBDEV_DGA=$enableval], [WANT_FBDEV_DGA=yes]) -AC_ARG_ENABLE(esd, [ --enable-esd Enlightened Sound Daemon support [default=yes]], [WANT_ESD=$enableval], [WANT_ESD=yes]) -AC_ARG_ENABLE(ui, [ --enable-ui use GTK user interface [default=yes]], [WANT_UI=$enableval], [WANT_UI=yes]) +AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes]) +AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes]) +AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes]) dnl Checks for programs. AC_PROG_CC @@ -27,6 +28,8 @@ if grep mon_init ../../../mon/src/mon.h >/dev/null 2>/dev/null; then DEFINES="$DEFINES -DENABLE_MON=1" MONSRCS="../../../mon/src/mon.cpp ../../../mon/src/mon_6502.cpp ../../../mon/src/mon_68k.cpp ../../../mon/src/mon_8080.cpp ../../../mon/src/mon_cmd.cpp ../../../mon/src/mon_ppc.cpp ../../../mon/src/mon_x86.cpp" CXXFLAGS="$CXXFLAGS -I../../../mon/src" + AC_CHECK_LIB(readline, readline) + AC_CHECK_HEADERS(readline/readline.h readline/history.h) else AC_MSG_RESULT(no) WANT_MON=no @@ -85,7 +88,7 @@ fi dnl We use GTK+ if possible. UISRCS=../dummy/prefs_editor_dummy.cpp -if [[ "x$WANT_UI" = "xyes" ]]; then +if [[ "x$WANT_GTK" = "xyes" ]]; then AM_PATH_GTK(1.2.0, [ DEFINES="$DEFINES -DENABLE_GTK=1" CFLAGS="$CFLAGS $GTK_CFLAGS" @@ -94,7 +97,7 @@ if [[ "x$WANT_UI" = "xyes" ]]; then UISRCS=prefs_editor_gtk.cpp ], [ AC_MSG_WARN([Could not find GTK+, disabling user interface.]) - WANT_UI=no + WANT_GTK=no ]) fi @@ -291,7 +294,7 @@ echo echo XFree86 DGA support .............. : $WANT_XF86_DGA echo fbdev DGA support ................ : $WANT_FBDEV_DGA echo ESD sound support ................ : $WANT_ESD -echo GTK user interface ............... : $WANT_UI +echo GTK user interface ............... : $WANT_GTK echo mon debugger support ............. : $WANT_MON echo i386 assembly optimizations ...... : $WANT_X86_ASSEMBLY echo SPARC V8 assembly optimizations .. : $WANT_SPARC_V8_ASSEMBLY diff --git a/BasiliskII/src/Unix/main_unix.cpp b/BasiliskII/src/Unix/main_unix.cpp index dba4a99a..c7996c30 100644 --- a/BasiliskII/src/Unix/main_unix.cpp +++ b/BasiliskII/src/Unix/main_unix.cpp @@ -54,6 +54,10 @@ #include #endif +#if ENABLE_MON +#include "mon.h" +#endif + // Constants const char ROM_FILE_NAME[] = "ROM"; @@ -87,6 +91,11 @@ static struct sigaction timer_sa; // sigaction used for timer static timer_t timer; // 60Hz timer #endif +#if ENABLE_MON +static struct sigaction sigint_sa; // sigaction for SIGINT handler +static void sigint_handler(...); +#endif + // Prototypes static void *xpram_func(void *arg); @@ -132,6 +141,8 @@ int main(int argc, char **argv) for (int i=1; ia[0], r->a[1], r->a[2], r->a[3], r->a[4], r->a[5], r->a[6], r->a[7], r->sr); #if ENABLE_MON - char *arg[2]; - arg[0] = "rmon"; - arg[1] = NULL; + char *arg[2] = {"rmon", NULL}; mon(1, arg); #endif QuitEmulator(); @@ -432,7 +430,7 @@ void EmulOp(uint16 opcode, M68kRegisters *r) r->d[0] = 0; break; default: - printf("FATAL: MemoryDispatch(%d): illegal selector\n", sel); + printf("FATAL: MemoryDispatch(%d): unimplemented selector\n", sel); r->d[0] = (uint32)-502; break; } @@ -527,6 +525,10 @@ void EmulOp(uint16 opcode, M68kRegisters *r) r->d[0], r->d[1], r->d[2], r->d[3], r->d[4], r->d[5], r->d[6], r->d[7], r->a[0], r->a[1], r->a[2], r->a[3], r->a[4], r->a[5], r->a[6], r->a[7], r->sr); +#if ENABLE_MON + char *arg[2] = {"rmon", NULL}; + mon(1, arg); +#endif QuitEmulator(); break; } diff --git a/BasiliskII/src/include/rom_patches.h b/BasiliskII/src/include/rom_patches.h index 918582ae..266b7c9b 100644 --- a/BasiliskII/src/include/rom_patches.h +++ b/BasiliskII/src/include/rom_patches.h @@ -32,6 +32,9 @@ enum { extern uint16 ROMVersion; +// ROM offset of breakpoint +extern uint32 ROMBreakpoint; + // ROM offset of UniversalInfo, set by PatchROM() extern uint32 UniversalInfo; diff --git a/BasiliskII/src/rom_patches.cpp b/BasiliskII/src/rom_patches.cpp index 79a9cb80..d5cba82c 100644 --- a/BasiliskII/src/rom_patches.cpp +++ b/BasiliskII/src/rom_patches.cpp @@ -38,9 +38,8 @@ #include "debug.h" -// Breakpoint -//#define M68K_BREAKPOINT 0x2310 // CritError -//#define M68K_BREAKPOINT 0x1d10 // BootMe +// Breakpoint (offset into ROM) +uint32 ROMBreakpoint = 0; // 0 = disabled, 0x2310 = CritError // Global variables uint32 UniversalInfo; // ROM offset of UniversalInfo @@ -547,6 +546,11 @@ void InstallDrivers(uint32 pb) r.d[0] = 0xa093; Execute68kTrap(0xa247, &r); // SetOSTrapAddress() + // Install MemoryDispatch() replacement routine + r.a[0] = ROMBaseMac + memory_dispatch_offset; + r.d[0] = 0xa05c; + Execute68kTrap(0xa247, &r); // SetOSTrapAddress() + // Install disk driver r.a[0] = ROMBaseMac + sony_offset + 0x100; r.d[0] = (uint32)DiskRefNum; @@ -642,12 +646,6 @@ void InstallSERD(void) void PatchAfterStartup(void) { - // Install MemoryDispatch() replacement routine - M68kRegisters r; - r.a[0] = ROMBaseMac + memory_dispatch_offset; - r.d[0] = 0xa05c; - Execute68kTrap(0xa247, &r); // SetOSTrapAddress() - #if SUPPORTS_EXTFS // Install external file system InstallExtFS(); @@ -1303,6 +1301,15 @@ static bool patch_rom_32(void) } } + // Don't set MemoryDispatch() to unimplemented trap + static const uint8 memdisp_dat[] = {0x30, 0x3c, 0xa8, 0x9f, 0xa7, 0x46, 0x30, 0x3c, 0xa0, 0x5c, 0xa2, 0x47}; + base = find_rom_data(0x4f100, 0x4f180, memdisp_dat, sizeof(memdisp_dat)); + D(bug("memdisp %08lx\n", base)); + if (base) { // ROM15/32 + wp = (uint16 *)(ROMBaseHost + base + 10); + *wp = htons(M68K_NOP); + } + // Patch .EDisk driver (don't scan for EDisks in the area ROMBase..0xe00000) uint32 edisk_offset = find_rom_resource('DRVR', 51); if (edisk_offset) { @@ -1455,11 +1462,11 @@ bool PatchROM(void) return false; } -#ifdef M68K_BREAKPOINT // Install breakpoint - uint16 *wp = (uint16 *)(ROMBaseHost + M68K_BREAKPOINT); - *wp = htons(M68K_EMUL_BREAK); -#endif + if (ROMBreakpoint) { + uint16 *wp = (uint16 *)(ROMBaseHost + ROMBreakpoint); + *wp = htons(M68K_EMUL_BREAK); + } // Clear caches as we loaded and patched code FlushCodeCache(ROMBaseHost, ROMSize);