diff -uNbr qt-2.3.2/Makefile qt-patched/Makefile
--- qt-2.3.2/Makefile	Mon Oct 29 09:24:08 2001
+++ qt-patched/Makefile	Sat May 11 00:50:15 2002
@@ -4,11 +4,32 @@
 # Read PORTING for instructions how to port Qt to a new platform.
 
 SHELL=/bin/sh
+PREFIX=@PREFIX@/lib/qt2
+INSTALLPREFIX=
+INSTALL=install
+FINAL_LIB_DIR=@PREFIX@/lib/qt2/lib
 
 init: FORCE
 	@$(MAKE) QTDIR=`pwd` all
 
-all: symlinks  src-moc src-mt sub-src sub-tools sub-tutorial sub-examples
+install: all
+	$(INSTALL) -m 755 -d $(INSTALLPREFIX)/$(PREFIX)/bin
+	$(INSTALL) -m 755 bin/* $(INSTALLPREFIX)/$(PREFIX)/bin/
+	$(INSTALL) -m 755 -d $(INSTALLPREFIX)/$(PREFIX)/include
+	$(INSTALL) -m 644 include/* $(INSTALLPREFIX)/$(PREFIX)/include/
+	$(INSTALL) -m 755 -d $(INSTALLPREFIX)/$(FINAL_LIB_DIR)
+	$(INSTALL) -m 755 lib/libqt.2.3.2.dylib $(INSTALLPREFIX)/$(FINAL_LIB_DIR)/
+	$(INSTALL) -m 755 lib/libqutil.1.0.0.dylib $(INSTALLPREFIX)/$(FINAL_LIB_DIR)/
+	pushd $(INSTALLPREFIX)/$(PREFIX)/lib; \
+		ln -s libqt.2.3.2.dylib libqt.2.dylib; \
+		ln -s libqt.2.3.2.dylib libqt.dylib; \
+		ln -s libqutil.1.0.0.dylib libqutil.1.dylib; \
+		ln -s libqutil.1.0.0.dylib libqutil.dylib; \
+		popd
+	$(INSTALL) -m 755 -d $(INSTALLPREFIX)/$(PREFIX)/share/man/man3
+	$(INSTALL) -m 644 doc/man/man3/* $(INSTALLPREFIX)/$(PREFIX)/share/man/man3/
+
+all: symlinks  src-moc src-mt sub-src sub-tools
 	@echo
 	@echo "The Qt library is now built in ./lib"
 	@echo "The Qt examples are built in the directories in ./examples"
diff -uNbr qt-2.3.2/configs/darwin-c++-shared qt-patched/configs/darwin-c++-shared
--- qt-2.3.2/configs/darwin-c++-shared	Wed Dec 31 19:00:00 1969
+++ qt-patched/configs/darwin-c++-shared	Sat May 11 00:13:57 2002
@@ -0,0 +1,97 @@
+# Compiling
+INTERFACE_DECL_PATH 	= .
+SYSCONF_CXX		= g++2
+SYSCONF_CC		= gcc2
+DASHCROSS		= 
+
+# Compiling with support libraries
+SYSCONF_CXXFLAGS_X11	= -I/usr/X11R6/include
+SYSCONF_CXXFLAGS_QT	= -I$(QTDIR)/include 
+SYSCONF_CXXFLAGS_OPENGL	= -I/usr/X11R6/include
+
+# Compiling YACC output
+SYSCONF_CXXFLAGS_YACC     = -Wno-unused -Wno-parentheses
+
+# Linking with support libraries
+SYSCONF_RPATH_X11	= 
+SYSCONF_RPATH_QT	= 
+SYSCONF_RPATH_OPENGL	= 
+
+# Linking with support libraries
+# X11
+SYSCONF_LFLAGS_X11	= -L/usr/X11R6/lib
+SYSCONF_LIBS_X11	= -lXext -lX11 
+# Qt, Qt+OpenGL
+SYSCONF_LFLAGS_QT	= -L$(QTDIR)/lib
+SYSCONF_LIBS_QT		= -lqt$(QT_THREAD_SUFFIX)
+SYSCONF_LIBS_QT_OPENGL	= 
+# OpenGL
+SYSCONF_LFLAGS_OPENGL	= -L/usr/X11R6/lib
+SYSCONF_LIBS_OPENGL	= -lGLU -lGL -lXmu
+# Yacc
+SYSCONF_LIBS_YACC	= 
+
+# Linking applications
+SYSCONF_LINK		= g++2
+SYSCONF_LFLAGS		= 
+SYSCONF_LIBS		= 
+
+# Link flags for shared objects
+SYSCONF_LFLAGS_SHOBJ	= 
+
+# Flags for threading
+SYSCONF_CFLAGS_THREAD	= -pthread -D_THREAD_SAFE
+SYSCONF_CXXFLAGS_THREAD	= -pthread -D_THREAD_SAFE
+SYSCONF_LFLAGS_THREAD	= -pthread
+SYSCONF_LIBS_THREAD	= 
+
+# Meta-object compiler
+SYSCONF_MOC		= $(QTDIR)/bin/moc
+
+# UI compiler
+SYSCONF_UIC		= $(QTDIR)/bin/uic
+
+# Linking shared libraries
+#   - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
+#   - Place target in $(DESTDIR) - which has a trailing /
+#   - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
+#
+SYSCONF_LINK_SHLIB	= g++2
+SYSCONF_LINK_TARGET_SHARED	= lib$(TARGET).$(VER_MAJ).$(VER_MIN).$(VER_PATCH).dylib
+SYSCONF_LINK_LIB_SHARED	=  $(SYSCONF_LINK_SHLIB) -dynamiclib -compatibility_version $(VER_MAJ).$(VER_MIN) \
+				     -current_version $(VER_MAJ).$(VER_MIN).$(VER_PATCH) \
+				     -install_name $(PREFIX)/lib/lib$(TARGET).$(VER_MAJ).dylib \
+				     $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
+				     $(OBJECTS) $(OBJMOC) $(LIBS) && \
+				 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
+				 cd $(DESTDIR) && \
+				 rm -f lib$(TARGET).dylib lib$(TARGET).$(VER_MAJ).dylib; \
+				 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).dylib; \
+				 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).$(VER_MAJ).dylib
+
+# Linking static libraries
+#   - Build the $(TARGET) library, eg. lib$(TARGET).a
+#   - Place target in $(DESTDIR) - which has a trailing /
+#
+SYSCONF_AR		= ar cq
+SYSCONF_RANLIB		= ranlib 
+SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
+SYSCONF_LINK_LIB_STATIC	= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
+				 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) ; \
+				 $(SYSCONF_RANLIB) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) \
+# Compiling application source
+SYSCONF_CXXFLAGS	= -pipe -fno-exceptions -O2 
+SYSCONF_CFLAGS		= -pipe -fno-exceptions -O2 
+# Default link type (static linking is still be used where required)
+SYSCONF_LINK_LIB	= $(SYSCONF_LINK_LIB_SHARED)
+SYSCONF_LINK_TARGET	= $(SYSCONF_LINK_TARGET_SHARED)
+# Compiling library source
+SYSCONF_CXXFLAGS_LIB	= -fno-common
+SYSCONF_CFLAGS_LIB	= -fno-common
+# Compiling shared-object source
+SYSCONF_CXXFLAGS_SHOBJ	= -dynamic
+SYSCONF_CFLAGS_SHOBJ	= -dynamic
+# Linking Qt
+SYSCONF_LIBS_QTLIB	= $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
+# Linking Qt applications
+SYSCONF_LIBS_QTAPP	= $(SYSCONF_LFLAGS_X11) $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) $(SYSCONF_LIBS_X11)
diff -uNbr qt-2.3.2/configs/darwin-c++-static qt-patched/configs/darwin-c++-static
--- qt-2.3.2/configs/darwin-c++-static	Wed Dec 31 19:00:00 1969
+++ qt-patched/configs/darwin-c++-static	Fri May 10 20:57:46 2002
@@ -0,0 +1,95 @@
+# Compiling
+INTERFACE_DECL_PATH 	= .
+SYSCONF_CXX		= g++2
+SYSCONF_CC		= gcc2
+DASHCROSS		= 
+
+# Compiling with support libraries
+SYSCONF_CXXFLAGS_X11	= -I/usr/X11R6/include
+SYSCONF_CXXFLAGS_QT	= -I$(QTDIR)/include 
+SYSCONF_CXXFLAGS_OPENGL	= -I/usr/X11R6/include
+
+# Compiling YACC output
+SYSCONF_CXXFLAGS_YACC     = -Wno-unused -Wno-parentheses
+
+# Linking with support libraries
+SYSCONF_RPATH_X11	= 
+SYSCONF_RPATH_QT	= 
+SYSCONF_RPATH_OPENGL	= 
+
+# Linking with support libraries
+# X11
+SYSCONF_LFLAGS_X11	= -L/usr/X11R6/lib
+SYSCONF_LIBS_X11	= -lXext -lX11 
+# Qt, Qt+OpenGL
+SYSCONF_LFLAGS_QT	= -L$(QTDIR)/lib
+SYSCONF_LIBS_QT		= -lqt$(QT_THREAD_SUFFIX)
+SYSCONF_LIBS_QT_OPENGL	= 
+# OpenGL
+SYSCONF_LFLAGS_OPENGL	= -L/usr/X11R6/lib
+SYSCONF_LIBS_OPENGL	= -lGLU -lGL -lXmu
+# Yacc
+SYSCONF_LIBS_YACC	= 
+
+# Linking applications
+SYSCONF_LINK		= g++2
+SYSCONF_LFLAGS		= 
+SYSCONF_LIBS		= 
+
+# Link flags for shared objects
+SYSCONF_LFLAGS_SHOBJ	= -shared
+
+# Flags for threading
+SYSCONF_CFLAGS_THREAD	= -pthread -D_THREAD_SAFE
+SYSCONF_CXXFLAGS_THREAD	= -pthread -D_THREAD_SAFE
+SYSCONF_LFLAGS_THREAD	= -pthread
+SYSCONF_LIBS_THREAD	= 
+
+# Meta-object compiler
+SYSCONF_MOC		= $(QTDIR)/bin/moc
+
+# UI compiler
+SYSCONF_UIC		= $(QTDIR)/bin/uic
+
+# Linking shared libraries
+#   - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
+#   - Place target in $(DESTDIR) - which has a trailing /
+#   - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
+#
+SYSCONF_LINK_SHLIB	= g++2
+SYSCONF_LINK_TARGET_SHARED	= lib$(TARGET).dylib.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
+SYSCONF_LINK_LIB_SHARED	=  $(SYSCONF_LINK_SHLIB) -shared  \
+				     $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
+				     $(OBJECTS) $(OBJMOC) $(LIBS) && \
+				 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
+				 cd $(DESTDIR) && \
+				 rm -f lib$(TARGET).dylib lib$(TARGET).dylib.$(VER_MAJ) lib$(TARGET).dylib.$(VER_MAJ).$(VER_MIN); \
+				 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).dylib; \
+				 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).dylib.$(VER_MAJ); \
+				 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).dylib.$(VER_MAJ).$(VER_MIN)
+
+# Linking static libraries
+#   - Build the $(TARGET) library, eg. lib$(TARGET).a
+#   - Place target in $(DESTDIR) - which has a trailing /
+#
+SYSCONF_AR		= ar cq
+SYSCONF_RANLIB		= ranlib 
+SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
+SYSCONF_LINK_LIB_STATIC	= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
+				 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) ; \
+				 $(SYSCONF_RANLIB) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) \
+# Compiling application source
+SYSCONF_CXXFLAGS	= -pipe -fno-exceptions -O2 
+SYSCONF_CFLAGS		= -pipe -fno-exceptions -O2 
+SYSCONF_LINK_LIB	= $(SYSCONF_LINK_LIB_STATIC)
+SYSCONF_LINK_TARGET	= $(SYSCONF_LINK_TARGET_STATIC)
+# Compiling library source
+SYSCONF_CXXFLAGS_LIB	=
+SYSCONF_CFLAGS_LIB	=
+# Compiling shared-object source
+SYSCONF_CXXFLAGS_SHOBJ	= -fPIC
+SYSCONF_CFLAGS_SHOBJ	= -fPIC
+# Linking Qt
+SYSCONF_LIBS_QTLIB	= $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
+# Linking Qt applications
+SYSCONF_LIBS_QTAPP	= $(SYSCONF_LFLAGS_X11) $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) $(SYSCONF_LIBS_X11)
diff -uNbr qt-2.3.2/configure qt-patched/configure
--- qt-2.3.2/configure	Mon Oct 29 09:24:18 2001
+++ qt-patched/configure	Fri May 10 20:57:46 2002
@@ -6,7 +6,7 @@
 #
 
 # To remove the need for the first test, do this:
-# QTDIR=`pwd` export QTDIR
+QTDIR=`pwd` export QTDIR
 
 relpath=`dirname $0`
 relpath=`(cd $relpath; pwd)`
@@ -1317,7 +1317,7 @@
 fi
 
 [ "x$SM" = "xyes" ] && QT_LIBS="${QT_LIBS} -lSM -lICE"
-[ "x$XFT" = "xyes" ] && QT_LIBS="${QT_LIBS} -lXft"
+[ "x$XFT" = "xyes" ] && QT_LIBS="${QT_LIBS} -lXft -lXrender"
 if [ -z "$EMB" -o "$SHARED" = no ]
 then
     [ "x$LIBPNG" = "xyes" ] && QT_MODOBJ=$QT_MODOBJ' $(PNG_OBJECTS)'
diff -uNbr qt-2.3.2/include/qglobal.h qt-patched/include/qglobal.h
--- qt-2.3.2/include/qglobal.h	Mon Oct 29 09:21:15 2001
+++ qt-patched/include/qglobal.h	Fri May 10 20:57:46 2002
@@ -73,6 +73,8 @@
 
 #if defined(macintosh)
 #define _OS_MAC_
+#elif defined(__APPLE__)
+#define _OS_DARWIN_
 #elif defined(MSDOS) || defined(_MSDOS) || defined(__MSDOS__)
 #define _OS_MSDOS_
 #elif defined(OS2) || defined(_OS2) || defined(__OS2__)
diff -uNbr qt-2.3.2/src/network/qsocketdevice_unix.cpp qt-patched/src/network/qsocketdevice_unix.cpp
--- qt-2.3.2/src/network/qsocketdevice_unix.cpp	Mon Oct 29 09:21:14 2001
+++ qt-patched/src/network/qsocketdevice_unix.cpp	Fri May 10 20:57:46 2002
@@ -114,7 +114,7 @@
 #  define SOCKLEN_T socklen_t
 #elif defined(BSD4_4)
 // BSD 4.4
-#  if defined(_OS_FREEBSD_) && __FreeBSD_version < 400000
+#  if (defined(_OS_FREEBSD_) && __FreeBSD_version < 400000) || defined(_OS_DARWIN_)
 // FreeBSD 4.0 and higher
 #    define SOCKLEN_T int
 #  else
diff -uNbr qt-2.3.2/src/tools/qglobal.h qt-patched/src/tools/qglobal.h
--- qt-2.3.2/src/tools/qglobal.h	Mon Oct 29 09:21:15 2001
+++ qt-patched/src/tools/qglobal.h	Fri May 10 20:57:46 2002
@@ -73,6 +73,8 @@
 
 #if defined(macintosh)
 #define _OS_MAC_
+#elif defined(__APPLE__)
+#define _OS_DARWIN_
 #elif defined(MSDOS) || defined(_MSDOS) || defined(__MSDOS__)
 #define _OS_MSDOS_
 #elif defined(OS2) || defined(_OS2) || defined(__OS2__)
