[vlc-devel] [PATCH] configure.ac: use absolute path for protoc
Alexandre Janniaux
ajanni at videolabs.io
Mon Jul 13 12:57:54 CEST 2020
When compiling for iOS, protoc is usually found in PATH but PATH is
defined by the build script, which mean only `protoc` will be stored in
the PROTOC variable. When recompiling using `make`, the PATH is not
defined anymore and it will fail running the command.
There's two solutions for this issue:
- add extra/tools in the look-up path when calling AC_CHECK_PROGS
instead of exporting it in PATH
- use absolute path
The first option doesn't work because extra/tools is always in path in
the configure script or in the compile script, but is not when using
make directly.
The second option will work for this, and additionally will prevent
using the extra/tools one in a project that has been configured with the
system one for example.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 77397617831..ed613960eee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3952,7 +3952,7 @@ 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)
+AC_PATH_PROGS(PROTOC, protoc, no)
PKG_WITH_MODULES([CHROMECAST],[protobuf-lite >= protobuf_lite_version], [
AS_IF([test "x${PROTOC}" != "xno"], [
build_chromecast="yes"
--
2.27.0
More information about the vlc-devel
mailing list