summaryrefslogtreecommitdiff
path: root/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch
blob: ad07d4fc2ddf558dce8160dcfe403af17a7a2cb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

The libwebp package is outside of openembedded-core, so make it
explicitly configurable. Make it deterministic, so that if libwebp 
dependencies are missing, autoconf throws a fatal error.

Upstream-Status: Pending

Index: weston-1.5.0/configure.ac
===================================================================
--- weston-1.5.0.orig/configure.ac
+++ weston-1.5.0/configure.ac
@@ -268,9 +268,22 @@ fi
 
 PKG_CHECK_MODULES(PIXMAN, [pixman-1])
 PKG_CHECK_MODULES(PNG, [libpng])
-PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])
-AS_IF([test "x$have_webp" = "xyes"],
-      [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
+AC_ARG_ENABLE(webp,
+              AS_HELP_STRING([--disable-webp],
+                             [Disable libwebp support]),,
+              enable_webp=auto)
+AM_CONDITIONAL(HAVE_WEBP, [test "x$enable_webp" = xyes])
+AS_IF([test "x$enable_webp" != "xno"],
+    PKG_CHECK_MODULES(WEBP,
+                     [libwebp],
+                     [have_webp=yes],
+                     [have_webp=no])
+    AS_IF([test "x$have_webp" = "xno" -a "x$enable_webp" = "xyes"],
+        AC_MSG_ERROR([libwebp support explicitly request, but lipwebp could not be found]))
+    AS_IF([test "x$have_webp" = "xyes"],
+        [enable_webp=yes]
+        [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
+)
 
 AC_ARG_ENABLE(vaapi-recorder, [  --enable-vaapi-recorder],,
 	      enable_vaapi_recorder=auto)