another try to get sshpty.c compiling on bsd
|Description: fixes configure script generation on some systems. |Author: Giulio Paci <giuliopaci@gmail.com>
move NSAutoReleasePool_wrap() into its own file
[Geoffrey Brown] For my work on digital preservation it's important to have "golden" disk images that are not corrupted by user action. In order to enable this, I've added support for VHD virtual disks (especially snapshots !) to the Linux and OS X versions of BasiliskII and SheepShaver. The support uses the open source libvhd library which is part of xen, available here: http://www.xen.org/products/xen_source.html The piece that's needed is libvhd which is in tools/blktap2 and it can be separately compiled. The vhd-util enables creation of vhd disks and snapshots. Compiling libvhd for OS X is non-trivial and required 1) a new config and 2) a number of small changes to the include files and c files. Compiling for linux is a snap. I use this as follows. 1) create my "golden image" gold.dsk in the usual way 2) create a snapshot: vhd-util snapshot -n gold.vhd -p gold.dsk -m 3) use the snapshot in my prefs file In my work the golden images are in an AFS system which means the golden images can reside at "universal" addresses. The snapshots are initially tiny, so a complete virtual machine configuration -- prefs + snapshot is quick to download for the end user. The snapshots are copy on write which has the pleasant side effect of letting the end user keep any changes.
[Geoffrey Brown] Add bin/cue support. The following should work: 1) Basilisk and SheepShaver with sdl-audio and bincue on linux and os x 2) SheepShaver with bincue and core audio on os x
Some messy changes got into last commit that weren't supposed to be there.
Do the right thing if host-triplet is a i386-i686, but gcc compiles by default as x86_64. Fixes configure on Snow Leopard.
Fixing sigsegv on Mach x86_64 - possibly a hack; I'm not sure why the address returned doesn't have that bit set already.
[Amadeusz Slawinski] These patches fix the issues with using newer versions of autoconf, which led to generating broken configure script.
[patch by Mike Sliczniak] Here is a patch to allow compiling of SS and B2 with an SDL Framework. You can get this by downloading from: http://www.libsdl.org/release/SDL-1.2.13.dmg Here is how I tested on an intel 32-bit mac with Mac OS X 10.5.6: SS ./autogen.sh --disable-standalone-gui --enable-vosf --enable-sdl-framework --enable-sdl-framework-prefix=/Users/mzs/Library/Frameworks --enable-sdl-video --disable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --without-x SS /autogen.sh --disable-standalone-gui --enable-vosf --disable-sdl-framework --disable-sdl-video --disable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --with-x B2 ./autogen.sh --disable-standalone-gui --enable-vosf --enable-sdl-framework --enable-sdl-framework-prefix=/Users/mzs/Library/Frameworks --enable-sdl-video --enable-sdl-audio --enable-addressing=real --without-esd --without-gtk --without-mon --without-x --enable-jit-compiler B2 ./autogen.sh --disable-standalone-gui --enable-vosf --disable-sdl-framework --disable-sdl-video --disable-sdl-audio --enable-addressing=real --with-esd --without-gtk --without-mon --with-x --enable-jit-compiler (esound does not really work on mac, it needs some better coreaudio patches.) configure.ac for SS has two little additional fixes so that the Cocoa prefs gui does not get built if you are building for X11 and so that you can use esd, sdl, or coreaudio for sound.
some changes to make Basillisk build better on Leopard
Rewrite ExtFS support for MacOS X. This implementation uses xattrs (metadata) on Tiger+ to store FInfo and FXInfo. Otherwise, plain old .finfo/ helpers are used. "Safe" flags and fields are always synchronized to/from MacOS X. BTW, CFString leak was fixed at the same time.
Add MIPS files from cxmon.
Remove the 33-bit addressing hack as it's overly complex for not much gain. Rather, use an address override prefix (0x67) though Intel Core optimization reference guide says to avoid LCP prefixes. In practise, impact on performance is measurably marginal on e.g. Speedometer tests.
Fix 33-bit addressing mode check when compiling with icc 9.1
Don't build a built-in GUI if --enable-standalone-gui was requested. The following configurations were tested: ./configure --without-mon --with-gtk=gtk1 --enable-jit-compiler [B.GTK1] ./configure --without-mon [B.GTK2] ./configure --without-mon --enable-standalone-gui --without-gtk [no GUI] ./configure --without-mon --enable-standalone-gui --with-gtk=gtk1 [S.GTK1] ./configure --enable-jit-compiler --enable-standalone-gui [S.GTK2]
Always build the STANDALONE_GUI hooks into Basilisk II.
Make Basilisk II main application not use GTK libraries when compiling with STANDALONE_GUI. This is the second step towards a more interesting GUI alike to VMware. Communication from/to the GUI is held by some lightweight RPC. Note: The step should be enough to provide a tiny GTK GUI for MacOS X.
Enable build of a standalone GUI (first step).
- add Linux/PPC linker script - always relocate Basilisk II binary to 0x78048000 on MacOS X (including x86, to be tested later)
Add linker script for FreeBSD 5.3 (and probably newer). Verified to allocate up to 1 GB of Mac RAM in both REAL_ADDRESSING and DIRECT_ADDRESSING modes. NetBSD 2.0 can use the Linux linker script. However, I could not verify 1G support since my installation does not permit this.
Link with AppKit framework on MacOS X. This should enable X11 builds when there is no SDL available (suggested by Dara Hazeghi)
Relocate MacOS X executable to 0x78048000 akin to linker scripts on Linux arches. This probably already worked in the past but I have just verified that Basilisk II works with up to 1 GB of Mac RAM in DIRECT_ADDRESSING or REAL_ADDRESSING mode. BTW, a quick Speedometer 4 CPU performance test showed a +15% speed increase in real addressing mode vs. direct addressing. x86 arches don't benefit much from that mode since they support complex address modes already (beyond plain load/store). TODO: check on MacOS X for Intel so that to reduce the test to darwin*:*)
Add linker scripts for correct REAL_ADDRESSING support
fix logic
Check whether compiler supports byte bit-fields. If so, we can enable slirp emulation code since it pure C+sockets code.
Use the most portable POSIX-style non-blocking I/O (O_NONBLOCK) instead of BSD-style through FIONBIO. It turns out Tru64 and probably IRIX don't support the latter when fd is a pipe (slirp case).
fix framework detection on OSX/intel (thanks toshi for the remote access ;-)
Link with math library (-lm) on IRIX so that to get support for long double arithmetic. Also make sure to only use -IPA with MIPSPro Compilers.
Fix Serial build on IRIX, remove the STDC_HEADERS manually defined macro since it now works (egrep was missing previously, IIRC)
don't grab in -mdynamic-no-pic with icc, note that you need icc >= 9.0.25 to have a working build
Fix detection of GCC versions (J.P. Larocque)
- Check for <stdint.h> ourselves if AC_HEADER_STDC didn't do that - Build with -mdynamic-no-pic on MacOS X, this brings up to 20% performance improvement in the CPU core.
minor cleanups
Add system-specific implementations of idle_{wait,resume} functions.
gtk2 gui support
Check for CoreFoundation framework (Darwin 8.0.1). Likewise for IOKit/storage/IOBlockStorageDevice.h which is not available there on x86
Restrict mandatory SLIRP_CFLAGS to minimum, i.e. -fno-strict-aliasing.
Fix and factor out ether_exit(). Pitifully, MacOS X 10.2 does not make select() a cancellation point when it is passed a NULL timeout. Workarounded in receive_func() with a full inline of poll_fd() + pthread_testcancel().
Enable ethernet on MacOS X even though slirp seems to have some small problems on big endian systems. IOW, Basilisk II can hang there. I also noticed that on Linux/ppc so that's probably not MacOS X specific, assuming the same problem. ==> A packet arrives but Basilisk II can't seem to trigger an interrupt (need to try sheep_net/tun in linux to make sure)
ethernet/slirp works on netbsd too
detect slirp at configure time, aka fix build when ether_dummy.cpp is used
Use a custom poll_fd() function implemented as select() on platforms that don't support poll() natively, e.g. MacOS X and some older BSDs.
Fix build on MacOS X: dedicated extfs_macosx.mm & static SDL libs
fix CFLAGS preservation
Recognize Intel Compilers. Add user mode network stack with slirp from qemu. Simply use "ether slirp" in the prefs file, no kernel module required. I could perform up to 450 KB/sec on my DSL line.
Use Windows clipboard code with SDL graphics only. X11 output will use the X server glue anyway
Add Lauri's icon for Basilisk II builds on Windows
Check for egrep early, as AC_EGREP_CPP wouldn't work correctly otherwise (e.g. GCC version not detected, likewise for ANSI C headers). Add check for Windows exceptions support. Some cosmetics for Cygwin.
fix detection of <linux/if.h> (thanks Bob Deblier)
Enable 33-bit memory addressing on 64-bit JIT capable platforms (e.g. x86-64). This is useful to get rid of address offset sign extensions. It uses POSIX shared memory to create aliased regions, fallback to usual sign-extension way if shm_open et al. don't work (e.g. no /dev/shm mounted)
disable store motion on gcc >= 3.3-hammer (and normal 3.4), where the option is available actually
enable JIT on x86_64
SDL audio support
Add configure macros to check for -framework Carbon & -framework IOKit so that we choose to include ../MacOSX/clip_macosx.cpp, sys_darwin.cpp or not.
Handle SDL scancode -> Mac keycode map files
Check for the "true" command better with AC_PATH_PROG. aka fix BLESS command checking on MacOS X.
Use clip_unix.cpp only with X11 targets. Otherwise, default to clip_dummy.cpp
Initial SDL/video support. Fix VOSF code could lead to a crash on run-time resolution/depth switching. Rearrange blitter lookup code, aka make it cleaner.
TUN/TAP support
fix loff_t & caddr_t type checks
Merge in __PAGEZERO hack from Michael Z. Sliczniak so that REAL_ADDRESSING mode can work under Darwin.
Really make sure VERSION & PACKAGE macros are defined when generating a configure script with autoconf 2.52.
Mach bad access recovery support from Michael Z. Sliczniak
Check for readline headers in the headers check section as otherwise, and I don't exactly know why, AC_HEADER_STDC would fail with newer autoconf versions.
Aliases for PACKAGE and VERSION used for localisation if compiling cxmon now that we check for AM_GNU_GETTEXT. Yes, life sucks sometimes.
AM_GNU_GETTEXT for gnome stuff
fixed the test for GCC [Brian J. Johnson]
modernized the autoconf stuff
Fix check for mmap()'able low mem globals
Add changes from Brian Johnson: - Update MIPSpro compiler flags - Only define static variables if they are to be used - Try to lock the pthreads mutex prior to unlocking/destroying it
Add configury for x86-64
Get rid of CPU_* defines as nobody actually used them and are useless
- CAN_JIT=yes has to be moved into the actual block containing JITSRCS. - Optimistically reenable gas/x86 assembly optimizations and JIT for FreeBSD as it used to work in the past there. If not, beat me.
Huh, am I still asleep? Actually use the cpuemuX_nf.cpp pattern rather than the *.s variant.
Drop cpuopti on x86 now that we have a fast JIT. I don't want to bother fixing cpuopti or workarounding code for any known and unknown gcc bug.
Ensure the IEEE fpu core is used when building the JIT compiler
Move -DSAHF_SETO_PROFITABLE down in x86 & gas specific block. Also ensure SAHF_SETO_PROFITABLE is defined when compiling the JIT. Aka I don't want to support obsolete and probably bogus code nowadays.
Define SAHF_SETO_PROFITABLE on x86, aka restore full performance of the JIT compiler. ;-) BTW, also fixes some valgrind warnings.
Additions for the JIT compiler (--enable-jit-compiler, --enable-jit-debug)
Check for for C99 math functions in the form *l()
Conditionalize use of pthread_mutexattr_setpshared() as this is an optional POSIX feature from _POSIX_THREAD_PROCESS_SHARED group. Besides, Ulrich Drepper mentions "the kernel support for this option wasn't available until 2.5.7. Future versions of the thread library will support this option." <http://people.redhat.com/drepper/posix-option-groups.html> BTW, this nukes a warning when build on FreeBSD 4.6
Portability fixes: use a switch to test for ac_cv_c_float_format
Now use autoconf 2.52+ as it provides nice AC_SYS_LARGEFILE check and a fixed check for exit() prototype.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.