configure: error out if building OMX w/o supported platform
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 7 Dec 2016 14:38:10 +0000 (14:38 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 19 May 2017 18:46:54 +0000 (19:46 +0100)
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
configure.ac

index 90b70a62a922cb34b11b2ab2072aad90bba162a1..e713a96ea004aa607eb30be1f049a89dcd4be0b2 100644 (file)
@@ -2062,6 +2062,12 @@ if test "x$enable_xa" = xyes; then
 fi
 AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
 
+if echo $platforms | grep -q "x11\|drm"; then
+    have_omx_platform=yes
+else
+    have_omx_platform=no
+fi
+
 if echo $platforms | grep -q "x11\|drm\|wayland"; then
     have_va_platform=yes
 else
@@ -2080,7 +2086,7 @@ if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then
        PKG_CHECK_EXISTS([vdpau >= $VDPAU_REQUIRED], [enable_vdpau=yes], [enable_vdpau=no])
     fi
 
-    if test "x$enable_omx" = xauto; then
+    if test "x$enable_omx" = xauto -a "x$have_omx_platform" = xyes; then
        PKG_CHECK_EXISTS([libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED], [enable_omx=yes], [enable_omx=no])
     fi
 
@@ -2121,6 +2127,9 @@ fi
 AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes)
 
 if test "x$enable_omx" = xyes; then
+    if test "x$have_omx_platform" != xyes; then
+        AC_MSG_ERROR([OMX requires at least one of the x11 or drm platforms])
+    fi
     PKG_CHECK_MODULES([OMX], [libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED])
     gallium_st="$gallium_st omx"
 fi