[vlc-devel] [PATCH v2 12/13] configure: use the protobuf compiler from the contribs if possible

Steve Lhomme robux4 at ycbcr.xyz
Tue Mar 24 15:46:30 CET 2020


Similar to how we use $host-luac that we build natively.
---
 configure.ac | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 7ae5cdaf31..5d840a896b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -502,6 +502,12 @@ AS_IF([test -n "${CONTRIB_DIR}"], [
     ])
   ])
 
+  AS_IF([test -z "$PROTOC"], [
+    AS_IF([test -x "${CONTRIB_DIR}/../bin/${host_alias}-protoc${BUILDEXEEXT}"], [
+      PROTOC="${CONTRIB_DIR}/../bin/${host_alias}-protoc${BUILDEXEEXT}"
+    ])
+  ])
+
   AS_IF([test "${SYS}" = "darwin"], [
     export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
     export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
@@ -3870,7 +3876,9 @@ dnl  Chromecast streaming support
 dnl
 m4_pushdef([protobuf_lite_version], 2.5.0)
 AC_ARG_VAR(PROTOC, [protobuf compiler])
-AC_CHECK_PROGS(PROTOC, protoc, no)
+AS_IF([test -z "$PROTOC"], [
+   AC_CHECK_PROGS(PROTOC, protoc, no)
+])
 PKG_WITH_MODULES([CHROMECAST],[protobuf-lite >= protobuf_lite_version], [
     AS_IF([test "x${PROTOC}" != "xno"], [
         build_chromecast="yes"
-- 
2.17.1



More information about the vlc-devel mailing list