diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 469aa789fd..f8e294076a 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -127,7 +127,8 @@ PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native"
 PACKAGECONFIG[ethosu] = ""
 PACKAGECONFIG[freedreno] = ""
 PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false"
-PACKAGECONFIG[intel] = ""
+intel_rt_enabled = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc gallium-llvm', '-Dintel-rt=enabled', '', d)}"
+PACKAGECONFIG[intel] = "${intel_rt_enabled},-Dintel-rt=disabled"
 PACKAGECONFIG[lima] = ""
 PACKAGECONFIG[nouveau] = ""
 PACKAGECONFIG[panfrost] = ""
