diff -uNr cheesetracker-0.9.9/SConstruct cheesetracker-0.9.9-patched/SConstruct
--- cheesetracker-0.9.9/SConstruct	Fri Apr 23 01:51:57 2004
+++ cheesetracker-0.9.9-patched/SConstruct	Mon May  3 20:05:42 2004
@@ -54,7 +54,8 @@
 env.detect = detect.Detect()
 
 if os.environ.has_key('DISTCC_HOSTS'):
-	env['CXX'] = os.environ['CXX']
+	if os.environ.has_key('CXX'):
+		env['CXX'] = os.environ['CXX']
 	env['ENV']['DISTCC_HOSTS'] = os.environ['DISTCC_HOSTS']
 	env['ENV']['HOME'] = os.environ['HOME']
 
@@ -104,7 +105,8 @@
 
 if (env.detect.os_is_macosx):
 	env.Append(CXXFLAGS=['-DMACOSX_ENABLED']);
-	env.Append(LINKFLAGS=['-framework','CoreAudio'])
+	env.Append(CXXFLAGS=['-DRTAUDIO_ENABLED']);
+	env.Append(LINKFLAGS=['-framework','CoreAudio','-lz.1.1.3'])
 	env.Append(CPPFLAGS=['-I/sw/include']);
 
 if (env.detect.is_oss_installed):
diff -uNr cheesetracker-0.9.9/cheesetracker/interface__QT/interface.cpp cheesetracker-0.9.9-patched/cheesetracker/interface__QT/interface.cpp
--- cheesetracker-0.9.9/cheesetracker/interface__QT/interface.cpp	Thu Apr 22 23:21:30 2004
+++ cheesetracker-0.9.9-patched/cheesetracker/interface__QT/interface.cpp	Mon May  3 21:04:55 2004
@@ -481,33 +481,57 @@
 Interface::Interface(QWidget *p_widget) : QTabWidget(p_widget) {
 
 	pattern_editor = new  Pattern_Edit_Widget(this);
-	addTab(pattern_editor,QPixmap((const char**)icon_patterns_xpm) ,"Patterns");
+#ifdef __APPLE__
+	addTab(pattern_editor,"Patterns");
+#else
+	addTab(pattern_editor,QPixmap((const char**)icon_patterns_xpm),"Patterns");
+#endif
 	pattern_editor ->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
 	QObject::connect( pattern_editor, SIGNAL(instrument_changed(int)), this, SLOT(selected_instrument_in_pattern(int)) );
 
 
 	sample_editor = new Sample_Edit(this);
+#ifdef __APPLE__
+	addTab(sample_editor,"Samples");
+#else
 	addTab(sample_editor,QPixmap((const char**)icon_sample_xpm),"Samples");
+#endif
 	sample_editor->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
 	QObject::connect( sample_editor, SIGNAL(selected_sample_signal(int)), this, SLOT(selected_sample_in_editor(int)) );
 
 	instrument_editor = new Instrument_Edit(this);
+#ifdef __APPLE__
+	addTab(instrument_editor,"Instruments");
+#else
 	addTab(instrument_editor,QPixmap((const char**)icon_envelope_xpm),"Instruments");
+#endif
 	instrument_editor ->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
 
 	order_and_defaults_editor = new Order_And_Defaults_Editor(this);
+#ifdef __APPLE__
+	addTab(order_and_defaults_editor,"Order && Defaults");
+#else
 	addTab(order_and_defaults_editor,QPixmap((const char**)icon_variables_xpm),"Order && Defaults");
+#endif
 	order_and_defaults_editor->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
 
 
 	variables_editor = new Variables_Edit(this);
 
+#ifdef __APPLE__
+	addTab(variables_editor,"Variables");
+#else
 	addTab(variables_editor,QPixmap((const char**)icon_tempo_xpm),"Variables");
+#endif
 	variables_editor->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
 
         buffers_editor = new Mixer_Effects_Manager(this);
 	buffers_editor->set_mixer(&tracker.mixer);
+#ifdef __APPLE__
+	addTab(buffers_editor,"Buffers");
+#else
 	addTab(buffers_editor,QPixmap((const char**)icon_vumeter_xpm),"Buffers");
+#endif
 
 	timer=new QTimer(this);
 	QObject::connect( timer, SIGNAL(timeout()), this, SLOT(widget_update_timer()) );
diff -uNr cheesetracker-0.9.9/cheesetracker/interface__QT/pattern_edit.cpp cheesetracker-0.9.9-patched/cheesetracker/interface__QT/pattern_edit.cpp
--- cheesetracker-0.9.9/cheesetracker/interface__QT/pattern_edit.cpp	Thu Apr 22 23:21:31 2004
+++ cheesetracker-0.9.9-patched/cheesetracker/interface__QT/pattern_edit.cpp	Mon May  3 20:46:52 2004
@@ -101,7 +101,7 @@
 #if defined(MACOSX_ENABLED)
 	font.setFamily("Monaco CY");
 	font.setPointSize(11);
-#elseif defined(CYGWIN_ENABLED)
+#elif defined(CYGWIN_ENABLED)
 
 	font.setFamily("Terminal");
 	font.setPointSize(10);
diff -uNr cheesetracker-0.9.9/cheesetracker/interface__QT/settings_window.cpp cheesetracker-0.9.9-patched/cheesetracker/interface__QT/settings_window.cpp
--- cheesetracker-0.9.9/cheesetracker/interface__QT/settings_window.cpp	Thu Apr 22 23:21:31 2004
+++ cheesetracker-0.9.9-patched/cheesetracker/interface__QT/settings_window.cpp	Mon May  3 21:04:55 2004
@@ -143,7 +143,11 @@
 
 	QHBox *auxhbox = new QHBox(sections);
 
+#ifdef __APPLE__
+	sections->addTab(auxhbox,"Audio");
+#else
 	sections->addTab(auxhbox,QPixmap((const char**)icon_audio_config_xpm),"Audio");
+#endif
 
 	audio_config = new Audio_Config(auxhbox);
 	audio_config->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
@@ -154,12 +158,20 @@
 
 
 	color_list = new CColor_List(sections);
+#ifdef __APPLE__
+	sections->addTab(color_list,"Colors");
+#else
 	sections->addTab(color_list,QPixmap((const char**)icon_colors_xpm),"Colors");
+#endif
 	color_list->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
 
 	Tracker_Instance::init_keyboard();
         keyboard_config = new Keyboard_Input_Config(sections);
+#ifdef __APPLE__
+	sections->addTab(keyboard_config,"Keyboard");
+#else
 	sections->addTab(keyboard_config,QPixmap((const char**)icon_keys_xpm),"Keyboard");
+#endif
 	keyboard_config->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
 
 
@@ -294,7 +306,11 @@
 
 	interface_settings = new Interface_Settings(sections);
 	interface_settings->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
+#ifdef __APPLE__
+	sections->addTab(interface_settings,"Interface");
+#else
 	sections->addTab(interface_settings,QPixmap((const char**)icon_interface_xpm),"Interface");
+#endif
         QObject::connect(button_close,SIGNAL(clicked()),this,SLOT(hide()));
 
 
diff -uNr cheesetracker-0.9.9/cheesetracker/interface__QT/table_base.cpp cheesetracker-0.9.9-patched/cheesetracker/interface__QT/table_base.cpp
--- cheesetracker-0.9.9/cheesetracker/interface__QT/table_base.cpp	Thu Apr 22 23:21:31 2004
+++ cheesetracker-0.9.9-patched/cheesetracker/interface__QT/table_base.cpp	Mon May  3 20:46:52 2004
@@ -73,7 +73,7 @@
 #if defined(MACOSX_ENABLED)
 	font.setFamily("Monaco CYls");
 	font.setPointSize(11);
-#elseif defined(CYGWIN_ENABLED)
+#elif defined(CYGWIN_ENABLED)
 
 	font.setFamily("Terminal");
 	font.setPointSize(10);
diff -uNr cheesetracker-0.9.9/common/drivers/posix/tcp_client_posix.cpp cheesetracker-0.9.9-patched/common/drivers/posix/tcp_client_posix.cpp
--- cheesetracker-0.9.9/common/drivers/posix/tcp_client_posix.cpp	Thu Apr 22 23:21:26 2004
+++ cheesetracker-0.9.9-patched/common/drivers/posix/tcp_client_posix.cpp	Fri Apr 23 17:28:52 2004
@@ -2,6 +2,14 @@
 
 #include "tcp_client_posix.h"
 
+#ifndef socklen_t
+#define socklen_t unsigned int
+#endif
+
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL (socklen_t)0
+#endif
+
 #define INFO(a,b) WARN(a b)
 
 void TcpClientPosix::connect_to_host(string p_host,int p_port) {
diff -uNr cheesetracker-0.9.9/common/drivers/posix/tcp_server_posix.cpp cheesetracker-0.9.9-patched/common/drivers/posix/tcp_server_posix.cpp
--- cheesetracker-0.9.9/common/drivers/posix/tcp_server_posix.cpp	Thu Apr 22 23:21:26 2004
+++ cheesetracker-0.9.9-patched/common/drivers/posix/tcp_server_posix.cpp	Fri Apr 23 17:28:52 2004
@@ -2,6 +2,14 @@
 
 #include "tcp_server_posix.h"
 
+#ifndef socklen_t
+#define socklen_t unsigned int
+#endif
+
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL (socklen_t)0
+#endif
+
 bool TcpServerPosix::start_listening() {
 
 	int yes=1;
diff -uNr cheesetracker-0.9.9/common/drivers/rtaudio/rt_audio.h cheesetracker-0.9.9-patched/common/drivers/rtaudio/rt_audio.h
--- cheesetracker-0.9.9/common/drivers/rtaudio/rt_audio.h	Thu Apr 22 23:21:27 2004
+++ cheesetracker-0.9.9-patched/common/drivers/rtaudio/rt_audio.h	Mon May  3 21:11:17 2004
@@ -51,7 +51,10 @@
 # define RTAUDIO_ENABLED
 #endif
 
+#ifndef __APPLE__
+// disable for everything but Mac for now
 #undef RTAUDIO_ENABLED
+#endif
 
 #ifdef RTAUDIO_ENABLED
 
diff -uNr cheesetracker-0.9.9/common/property_server/mremotecmd.cpp cheesetracker-0.9.9-patched/common/property_server/mremotecmd.cpp
--- cheesetracker-0.9.9/common/property_server/mremotecmd.cpp	Thu Apr 22 23:21:25 2004
+++ cheesetracker-0.9.9-patched/common/property_server/mremotecmd.cpp	Mon May  3 21:10:12 2004
@@ -1,3 +1,5 @@
+#ifndef __APPLE__
+
 #include "mremotecmd.h"
 
 int fifo_open_read(char *fifoname) {
@@ -179,4 +181,4 @@
   return(res);
 }
                                                                                                                
-
+#endif
