--- OpenFOAM-3.0.0/applications/utilities/mesh/manipulation/setSet/Allwmake.orig	2015-11-03 11:30:23.000000000 +0100
+++ OpenFOAM-3.0.0/applications/utilities/mesh/manipulation/setSet/Allwmake	2015-11-16 11:13:49.318760933 +0100
@@ -6,11 +6,11 @@
 #
 # use readline if available
 #
-if [ -f /usr/include/readline/readline.h ]
+if [ -f $EBROOTLIBREADLINE/include/readline/readline.h ]
 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
