diff --git a/conf/profile_mesonh.ihm b/conf/profile_mesonh.ihm
index 449577cfed578cbe15df431b55224c2ec994d44c..54f2d6f79452ba7315511be9ffb871a408f44819 100755
--- a/conf/profile_mesonh.ihm
+++ b/conf/profile_mesonh.ihm
@@ -186,8 +186,10 @@ echo 'WARNING : You chose VER_CDF=CDFPERSO, please set NETCDF_CONFIG environment
 fi
 fi
 #
+if [ -n "${VER_OASIS}" ] ; then
 if [ \${VER_OASIS} = 'OASISPERSO' ] ; then
 if [ -z \$OASISDIR ] ; then
 echo 'WARNING : You chose VER_OASIS=OASISPERSO, please set OASISDIR environment variable'
 fi
-fi 
+fi
+fi