diff -ru WindowMaker-0.92.0/WINGs/Examples/Makefile.in WindowMaker-0.92.0-patched/WINGs/Examples/Makefile.in
--- WindowMaker-0.92.0/WINGs/Examples/Makefile.in	2005-06-19 05:23:00.000000000 +0200
+++ WindowMaker-0.92.0-patched/WINGs/Examples/Makefile.in	2010-08-06 01:02:07.000000000 +0200
@@ -127,12 +127,12 @@
 
 connect_DEPENDENCIES = $(top_builddir)/WINGs/libWUtil.a
 
-connect_LDADD = $(top_builddir)/WINGs/libWUtil.a @LIBRARY_SEARCH_PATH@ 	@NETLIBS@ @INTLIBS@
+connect_LDADD = $(top_builddir)/WINGs/libWUtil.a @LIBRARY_SEARCH_PATH@ 	@NETLIBS@ @INTLIBS@ @XLIBS@
 
 
 server_DEPENDENCIES = $(top_builddir)/WINGs/libWUtil.a
 
-server_LDADD = $(top_builddir)/WINGs/libWUtil.a @LIBRARY_SEARCH_PATH@ 	@NETLIBS@ @INTLIBS@
+server_LDADD = $(top_builddir)/WINGs/libWUtil.a @LIBRARY_SEARCH_PATH@ 	@NETLIBS@ @INTLIBS@ @XLIBS@
 
 
 INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src 	-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
diff -ru WindowMaker-0.92.0/WINGs/wapplication.c WindowMaker-0.92.0-patched/WINGs/wapplication.c
--- WindowMaker-0.92.0/WINGs/wapplication.c	2004-10-24 05:13:29.000000000 +0200
+++ WindowMaker-0.92.0-patched/WINGs/wapplication.c	2010-08-06 00:24:49.000000000 +0200
@@ -175,12 +175,6 @@
         }
     }
 
-    path = checkFile("/usr/local/GNUstep", appdir, ext, resource);
-    if (path) {
-        wfree(appdir);
-        return path;
-    }
-
 
     if (getenv("GNUSTEP_SYSTEM_ROOT")) {
         path = checkFile(getenv("GNUSTEP_SYSTEM_ROOT"), appdir, ext, resource);
@@ -190,7 +184,7 @@
         }
     }
 
-    path = checkFile("/usr/GNUstep", appdir, ext, resource);
+    path = checkFile("@PREFIX@/lib/GNUstep", appdir, ext, resource);
     if (path) {
         wfree(appdir);
         return path;
diff -ru WindowMaker-0.92.0/WPrefs.app/Menu.c WindowMaker-0.92.0-patched/WPrefs.app/Menu.c
--- WindowMaker-0.92.0/WPrefs.app/Menu.c	2004-10-26 04:23:39.000000000 +0200
+++ WindowMaker-0.92.0-patched/WPrefs.app/Menu.c	2010-08-06 00:24:49.000000000 +0200
@@ -577,7 +577,7 @@
         data->param.exec.command = "xv";
 
         data = putNewItem(panel, pad, ExecInfo, _("Acrobat Reader"));
-        data->param.exec.command = "acroread || /usr/local/Acrobat4/bin/acroread";
+        data->param.exec.command = "open -b com.adobe.Reader";
 
         data = putNewItem(panel, pad, ExecInfo, _("ghostview"));
         data->param.exec.command = "gv";
@@ -616,17 +616,17 @@
 
         data = putNewItem(panel, pad, DirectoryInfo, _("Themes"));
         data->param.directory.command = "setstyle";
-        data->param.directory.directory = "/usr/share/WindowMaker/Themes /usr/local/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes";
+        data->param.directory.directory = "@PREFIX@/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes";
         data->param.directory.stripExt = 1;
 
         data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)"));
         data->param.directory.command = "wmsetbg -u -s";
-        data->param.directory.directory = "/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
+        data->param.directory.directory = "@PREFIX@/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
         data->param.directory.stripExt = 1;
 
         data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (tile)"));
         data->param.directory.command = "wmsetbg -u -t";
-        data->param.directory.directory = "/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
+        data->param.directory.directory = "@PREFIX@/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
         data->param.directory.stripExt = 1;
 
         smenu = putNewSubmenu(pad, _("Assorted XTerms"));
diff -ru WindowMaker-0.92.0/WPrefs.app/Paths.c WindowMaker-0.92.0-patched/WPrefs.app/Paths.c
--- WindowMaker-0.92.0/WPrefs.app/Paths.c	2004-10-12 22:18:33.000000000 +0200
+++ WindowMaker-0.92.0-patched/WPrefs.app/Paths.c	2010-08-06 00:24:49.000000000 +0200
@@ -86,9 +86,7 @@
         addPathToList(panel->icoL, -1, "~/pixmaps");
         addPathToList(panel->icoL, -1, "~/GNUstep/Library/Icons");
         addPathToList(panel->icoL, -1, "/usr/include/X11/pixmaps");
-        addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Icons");
-        addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Pixmaps");
-        addPathToList(panel->icoL, -1, "/usr/share/WindowMaker/Icons");
+        addPathToList(panel->icoL, -1, "@PREFIX@/share/WindowMaker/Icons");
     } else {
         for (i=0; i<WMGetPropListItemCount(array); i++) {
             val = WMGetFromPLArray(array, i);
@@ -102,7 +100,7 @@
             wwarning(_("bad value in option PixmapPath. Using default path list"));
         addPathToList(panel->pixL, -1, "~/pixmaps");
         addPathToList(panel->pixL, -1, "~/GNUstep/Library/WindowMaker/Pixmaps");
-        addPathToList(panel->pixL, -1, "/usr/local/share/WindowMaker/Pixmaps");
+        addPathToList(panel->pixL, -1, "@PREFIX@/local/share/WindowMaker/Pixmaps");
     } else {
         for (i=0; i<WMGetPropListItemCount(array); i++) {
             val = WMGetFromPLArray(array, i);
diff -ru WindowMaker-0.92.0/WindowMaker/Defaults/WindowMaker.in WindowMaker-0.92.0-patched/WindowMaker/Defaults/WindowMaker.in
--- WindowMaker-0.92.0/WindowMaker/Defaults/WindowMaker.in	2004-10-27 05:01:38.000000000 +0200
+++ WindowMaker-0.92.0-patched/WindowMaker/Defaults/WindowMaker.in	2010-08-06 00:24:49.000000000 +0200
@@ -14,9 +14,9 @@
     "#pkgdatadir#/Pixmaps",
     "/usr/X11R6/include/X11/pixmaps",
     "~/GNUstep/Library/WindowMaker/Pixmaps",
-    "/usr/share/icons",
+    "@PREFIX@/share/icons",
     "/usr/local/share/pixmaps",
-    "/usr/share/pixmaps"
+    "@PREFIX@/share/pixmaps"
   );
   PixmapPath = (
     "~/GNUstep/Library/WindowMaker/Pixmaps",
@@ -25,7 +25,7 @@
     "#pkgdatadir#/Backgrounds",
     "/usr/X11R6/include/X11/pixmaps",
     "/usr/local/share/pixmaps",
-    "/usr/share/pixmaps"
+    "@PREFIX@/share/pixmaps"
   );
   WindowTitleBalloons = YES;
   IconSize = 64;
diff -ru WindowMaker-0.92.0/contrib/WindowMaker.spec.in WindowMaker-0.92.0-patched/contrib/WindowMaker.spec.in
--- WindowMaker-0.92.0/contrib/WindowMaker.spec.in	2004-10-24 05:14:42.000000000 +0200
+++ WindowMaker-0.92.0-patched/contrib/WindowMaker.spec.in	2010-08-06 00:24:49.000000000 +0200
@@ -44,7 +44,7 @@
 %build
 CFLAGS="$RPM_OPT_FLAGS";
 LINGUAS="@supported_locales@";
-NLSDIR="/usr/share/locale";
+NLSDIR="@PREFIX@/share/locale";
 GNUSTEP_LOCAL_ROOT='$(prefix)/X11R6/lib/GNUstep';
 export CFLAGS LINGUAS NLSDIR GNUSTEP_LOCAL_ROOT;
 
@@ -78,9 +78,9 @@
 /usr/X11R6/lib/lib*
 /usr/X11R6/lib/GNUstep/Applications/WPrefs.app
 /usr/include/*
-/usr/share/WindowMaker
-/usr/share/locale/*/LC_MESSAGES/*
-/usr/share/WINGs
+@PREFIX@/share/WindowMaker
+@PREFIX@/share/locale/*/LC_MESSAGES/*
+@PREFIX@/share/WINGs
 /usr/man/*/*
 /usr/man/*/*/*
 
diff -ru WindowMaker-0.92.0/util/Makefile.in WindowMaker-0.92.0-patched/util/Makefile.in
--- WindowMaker-0.92.0/util/Makefile.in	2005-06-19 05:23:00.000000000 +0200
+++ WindowMaker-0.92.0-patched/util/Makefile.in	2010-08-06 01:06:52.000000000 +0200
@@ -124,7 +124,7 @@
 INCLUDES = $(DFLAGS) -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib 	@HEADER_SEARCH_PATH@ 	-DETCDIR=\"sysconfdir\" -DDATADIR=\"pkgdatadir\"
 
 
-liblist = @LIBRARY_SEARCH_PATH@ @INTLIBS@
+liblist = @LIBRARY_SEARCH_PATH@ @INTLIBS@ @XLIBS@
 
 wdwrite_LDADD = $(top_builddir)/WINGs/libWUtil.a $(liblist)
 
diff -ru WindowMaker-0.92.0/util/wmaker.inst.in WindowMaker-0.92.0-patched/util/wmaker.inst.in
--- WindowMaker-0.92.0/util/wmaker.inst.in	2005-04-08 13:24:14.000000000 +0200
+++ WindowMaker-0.92.0-patched/util/wmaker.inst.in	2010-08-06 01:22:37.000000000 +0200
@@ -40,13 +40,14 @@
 	cat << EOF >> $ISCRIPT
 # Window Maker default X session startup script 
 
-PATH="\$PATH:$BINDIR"
+. @PREFIX@/bin/init.sh
 
 # If you login from xdm, uncomment this to make error messages appear
 # in the console window.
 #
 # tail -f $HOME/.xsession-errors > /dev/console &
 
+quartz-wm --only-proxy &
 exec wmaker
 
 EOF
diff -ru WindowMaker-0.92.0/wrlib/png.c WindowMaker-0.92.0-patched/wrlib/png.c
--- WindowMaker-0.92.0/wrlib/png.c	2004-10-12 14:22:04.000000000 -0400
+++ WindowMaker-0.92.0-patched/wrlib/png.c	2011-11-02 15:43:28.000000000 -0400
@@ -97,7 +97,7 @@
     }
 
     RErrorCode = RERR_INTERNAL;
-    if (setjmp(png->jmpbuf)) {
+    if (setjmp(png_jmpbuf(png))) {
         fclose(f);
         png_destroy_read_struct(&png, &pinfo, &einfo);
         if (image)
