diff -ru OpenFOAM-2.2.0.orig/applications/utilities/mesh/manipulation/setSet/Allwmake OpenFOAM-2.2.0/applications/utilities/mesh/manipulation/setSet/Allwmake
--- OpenFOAM-2.2.0.orig/applications/utilities/mesh/manipulation/setSet/Allwmake	2013-01-11 18:26:25.000000000 +0100
+++ OpenFOAM-2.2.0/applications/utilities/mesh/manipulation/setSet/Allwmake	2013-05-23 09:35:42.604738000 +0200
@@ -10,11 +10,11 @@
 # eg,  ./Allwmake NO_READLINE
 #
 
-if [ -f /usr/include/readline/readline.h -a "${1%NO_READLINE}" = "$1" ]
+if [ -f $EBROOTLIBREADLINE/include/readline/readline.h -a "${1%NO_READLINE}" = "$1" ]
 then
     echo "Found <readline/readline.h>  --  enabling readline support."
     export COMP_FLAGS="-DHAS_READLINE"
-    export LINK_FLAGS="-lreadline"
+    export LINK_FLAGS="-L$EBROOTLIBREADLINE/lib -lreadline -L$EBROOTNCURSES -lncurses"
 fi
 
 wmake
