diff --git a/configure.pri b/configure.pri
index 46fec536a94ea47ed24d006380849653aafe7dc1..8db31ddd3dec6915a556ad19baa58aa12f15f37f 100644
--- a/configure.pri
+++ b/configure.pri
@@ -314,6 +314,6 @@ defineTest(qtConfTest_hasThumbFlag) {
 }
 
 defineTest(qtConfTest_hasGcc6OrNewer) {
-    greaterThan(QT_GCC_MAJOR_VERSION, 5):return(true)
+    greaterThan(QMAKE_GCC_MAJOR_VERSION, 5):return(true)
     return(false)
 }