[vlc-commits] contrib: protobuf: add variable for the protobuf compiler
Rémi Denis-Courmont
git at videolan.org
Thu Jan 14 21:43:11 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 14 22:36:05 2016 +0200| [a3596601a874a0e1a9e6ae3bd1e0c5c8d753c95c] | committer: Rémi Denis-Courmont
contrib: protobuf: add variable for the protobuf compiler
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a3596601a874a0e1a9e6ae3bd1e0c5c8d753c95c
---
contrib/src/main.mak | 6 ++++++
contrib/src/protobuf/rules.mak | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index b591c3b..1417262 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -273,6 +273,12 @@ else
SHA512SUM = $(error SHA-512 checksumming not found!)
endif
+ifeq ($(shell protoc --version >/dev/null 2>&1 || echo FAIL),)
+PROTOC = protoc
+else
+PROTOC ?= $(error Protobuf compiler (protoc) not found!)
+endif
+
#
# Common helpers
#
diff --git a/contrib/src/protobuf/rules.mak b/contrib/src/protobuf/rules.mak
index d398855..9ea753c 100644
--- a/contrib/src/protobuf/rules.mak
+++ b/contrib/src/protobuf/rules.mak
@@ -23,6 +23,6 @@ endif
.protobuf: protobuf
$(RECONF)
- cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --with-protoc=protoc
+ cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --with-protoc="$(PROTOC)"
cd $< && $(MAKE) && $(MAKE) install
touch $@
More information about the vlc-commits
mailing list