diff -ruN mpgtx-1.1/common.hh mpgtx-1.1-patched/common.hh
--- mpgtx-1.1/common.hh	2001-10-02 03:51:47.000000000 -0400
+++ mpgtx-1.1-patched/common.hh	2004-12-25 15:17:24.000000000 -0500
@@ -200,8 +200,13 @@
 
 
 #ifdef _LARGEFILE_SOURCE
+#ifdef _MACOSX
+	#define   _OFF_d   "%qd"
+	#define   _OFF_x   "%qx"
+#else
 	#define   _OFF_d   "%lld"
-	#define   _OFF_x   "%llx"	
+        #define   _OFF_x   "%llx"
+#endif
 	#define   FSEEK    fseeko
 	#define   FTELL    ftello
 #else
diff -ruN mpgtx-1.1/configure mpgtx-1.1-patched/configure
--- mpgtx-1.1/configure	2001-10-02 03:51:47.000000000 -0400
+++ mpgtx-1.1-patched/configure	2004-12-25 15:17:46.000000000 -0500
@@ -7,14 +7,13 @@
 #################################################
 
 prefix="/usr/local"
-
 #compiler flags
-
+CC="g++-3.3"
 common_cflags="-pedantic -Wall"
 devel_cflags="-g -Werror -fno-builtin"
 optimization_cflags="-O3"
 release_cflags=$optimization_cflags
-
+OFLAGS="-ansi"
 cflags=$common_cflags
 
 #linker flags
@@ -28,7 +27,35 @@
 static="no"
 LFS="yes"
 
+# cp flags
+cpflags="d"
+
+# some stuff for MacOSX -----------------------------
+HOSTNAME=$(./config.guess)
+
+case "${HOSTNAME}" in
+  powerpc-apple-darwin*)
+#compiler flags
+CC="g++-3.3"
+common_cflags="-pedantic -Wall"
+devel_cflags="-g -Werror -fno-builtin"
+optimization_cflags="-O3"
+release_cflags=$optimization_cflags
+cflags=$common_cflags
+OFLAGS="-D_MACOSX"
+#linker flags
+lflags="-x"
+#state vars
+debug="no"
+devel="no"
+parachute="no"
+static="no"
+LFS="yes"
+
+#cp flags macosx does not know about cp -d !
+cpflags="" ;;
 
+esac
 
 #################################################
 #                                               #
@@ -106,7 +133,7 @@
 # gcc 3 does not seem to like -O3 with mpgtx very much 
 
 # next line is from Chris Danis
-gcc_major=`gcc --version | cut -b 1`
+gcc_major=`cc --version | cut -b 1`
 
 if test $gcc_major = "3"; then
 	optimization_cflags="-O2";
@@ -122,7 +149,7 @@
 		return (int)(fseeko(stdin,0,SEEK_SET));
 		}
 EOF
-	g++ __LFStest.cpp -o __LFStestPASSED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 1>__LFSout 2>__LFSerror
+	$CC __LFStest.cpp -o __LFStestPASSED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 1>__LFSout 2>__LFSerror
 	if test -f __LFStestPASSED; then
 		echo "PASSED";
 		cflags="$cflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE";
@@ -197,11 +224,12 @@
 EOF
 
 echo "PREFIX=$prefix" >> $makefilename
+echo "OFLAGS=$OFLAGS" >> $makefilename
+echo "cpflags=$cpflags" >> $makefilename
 
 cat << EOF >>$makefilename
 INSTALLDIR=\$(PREFIX)/bin
-MANDIR=\$(PREFIX)/man/man1
-
+MANDIR=\$(PREFIX)/share/man/man1
 # Compilation and linker flags
 
 EOF
@@ -246,15 +274,15 @@
 	@echo ""
 
 mpgtx : commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o common.hh
-	g++ \$(CFLAGS) -ansi -o mpgtx commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o \$(LFLAGS)
+	$CC \$(CFLAGS) \$(OFLAGS) -o mpgtx commandline.cxx mpegOut.o mpeg.o chunkTab.o id3command.o \$(LFLAGS)
 mpegOut.o : mpegOut.cxx mpegOut.hh mpeg.hh common.hh
-	g++ \$(CFLAGS) -ansi -c mpegOut.cxx 
+	$CC \$(CFLAGS) \$(OFLAGS) -c mpegOut.cxx 
 mpeg.o : mpeg.cxx mpegOut.hh common.hh
-	g++ \$(CFLAGS) -ansi -c mpeg.cxx 
+	$CC \$(CFLAGS) \$(OFLAGS) -c mpeg.cxx 
 chunkTab.o : chunkTab.cxx common.hh
-	g++ \$(CFLAGS) -ansi -c chunkTab.cxx
+	$CC \$(CFLAGS) \$(OFLAGS) -c chunkTab.cxx
 id3command.o : id3command.cxx common.hh
-	g++ \$(CFLAGS) -c id3command.cxx
+	$CC \$(CFLAGS) -c id3command.cxx
 
 
 
@@ -272,11 +300,11 @@
 	install -d -m 755  \$(INSTALLDIR)
 	install -d -m 755  \$(MANDIR)
 	install -s -m 755 mpgtx \$(INSTALLDIR)
-	cp -df mpgdemux mpgjoin mpgcat mpginfo mpgsplit tagmp3 \$(INSTALLDIR)
+	cp -\$(cpflags)f mpgdemux mpgjoin mpgcat mpginfo mpgsplit tagmp3 \$(INSTALLDIR)
 	install -m 644 man/mpgtx.1 man/tagmp3.1 \$(MANDIR) 
 	cd man ; make
 	cd ..
-	cp -df ./man/mpgdemux.1 ./man/mpgjoin.1 man/mpgsplit.1 man/mpgcat.1 man/mpginfo.1 \$(MANDIR)
+	cp -\$(cpflags)f ./man/mpgdemux.1 ./man/mpgjoin.1 man/mpgsplit.1 man/mpgcat.1 man/mpginfo.1 \$(MANDIR)
 
 
 uninstall:
diff -ruN mpgtx-1.1/mpeg.cxx mpgtx-1.1-patched/mpeg.cxx
--- mpgtx-1.1/mpeg.cxx	2001-10-02 03:51:47.000000000 -0400
+++ mpgtx-1.1-patched/mpeg.cxx	2004-12-25 15:17:24.000000000 -0500
@@ -308,8 +308,10 @@
 
 // map a buffer onto file for efficiency
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
 
 byte mpeg::GetByte(off_t offset) {
 	BTRACK;
@@ -356,8 +358,10 @@
 
 // same as above but improved for backward search
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
 
 byte mpeg::bdGetByte(off_t offset){
 	BTRACK;
@@ -392,8 +396,10 @@
 
 // make sure the sequence 0x00 00 01 mark
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
 
 bool mpeg::EnsureMPEG(off_t offset, marker mark){
 	BTRACK;
@@ -411,8 +417,10 @@
 
 // get a two byte size
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
 
 
 unsigned short int mpeg::GetSize(off_t offset ) {
@@ -1444,8 +1452,10 @@
 
 // find next 0x 00 00 01 xx sequence, returns offset or -1 on err
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
 
 off_t mpeg::FindNextMarker(off_t from){
 	BTRACK;
@@ -1473,8 +1483,10 @@
 // find next 0x 00 00 01 xx sequence, returns offset or -1 on err and
 // change mark to xx
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
 
 off_t mpeg::FindNextMarker(off_t from, marker* mark){
 	BTRACK;
@@ -1499,8 +1511,11 @@
 
 // find next 0X00 00 01 mark
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
+
 
 off_t mpeg::FindNextMarker(off_t from, marker mark){
 	BTRACK;
@@ -1531,8 +1546,10 @@
 
 // same as above but optimized for backward search
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
 
 off_t mpeg::bdFindNextMarker(off_t from, marker mark) {
 	BTRACK;
@@ -1554,8 +1571,10 @@
 }
 
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
 
 off_t mpeg::bdFindNextMarker(off_t from, marker* mark) { 
 	BTRACK;
@@ -1581,8 +1600,10 @@
 //       look at what we have to do to get a timestamp :/
 
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
 
 double mpeg::ReadTS(off_t offset) {
 	BTRACK;
@@ -1609,8 +1630,10 @@
 }
 
 #ifndef _WIN32
+#ifndef _MACOSX
 inline
 #endif
+#endif
 
 double mpeg::ReadTSMpeg2(off_t offset){
 	BTRACK;
