diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp
index 10df7cd6b8143e79b0d64cc6784df8ab3b423486..d1769e0697752e85d3f99da35df1d0341a4a936c 100644
--- a/Fltk/FlGui.cpp
+++ b/Fltk/FlGui.cpp
@@ -272,7 +272,7 @@ FlGui::FlGui(int argc, char **argv)
   geoContext = new geometryContextWindow(CTX::instance()->deltaFontSize);
   meshContext = new meshContextWindow(CTX::instance()->deltaFontSize);
   about = new aboutWindow();
-#if defined(HAVE_FL_TREE)
+#if defined(FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3)
   onelab = new onelabWindow();
 #endif
   for(int i = 0; i < NB_SOLVER_MAX; i++)
@@ -652,7 +652,7 @@ int FlGui::testGlobalShortcuts(int event)
     show = !show;
     status = 2;
   }
-#if defined(HAVE_FL_TREE)
+#if defined(FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3)
   else if(Fl::test_shortcut('@')) {
     onelab_cb(0, (void*)"check");
     status = 1;
diff --git a/Fltk/onelabWindow.cpp b/Fltk/onelabWindow.cpp
index b15c2d10aba939f990d1b390fdde7422208b02db..1e09bc62269116ee5b1317b4c162e46cdfc1b7c4 100644
--- a/Fltk/onelabWindow.cpp
+++ b/Fltk/onelabWindow.cpp
@@ -5,7 +5,7 @@
 
 #include "onelab.h"
 
-#if defined(HAVE_FL_TREE)
+#if defined(FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3)
 #include <FL/Fl_Value_Input.H>
 #include <FL/Fl_Box.H>
 #include "GmshMessage.h"
diff --git a/Fltk/onelabWindow.h b/Fltk/onelabWindow.h
index a0b94818c8e813218ff541c98bc7f0bb5ad03d2d..750a139a15dc7fb2cbb0d24df6e478359d4eaf87 100644
--- a/Fltk/onelabWindow.h
+++ b/Fltk/onelabWindow.h
@@ -7,7 +7,7 @@
 #define _ONELAB_WINDOW_H_
 
 #include "GmshConfig.h"
-#if defined(HAVE_FL_TREE)
+#if defined(FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3)
 #include <vector>
 #include <FL/Fl_Window.H>
 #include <FL/Fl_Tree.H>