[vlc-devel] [PATCH] configure.ac: use absolute path for protoc

Alexandre Janniaux ajanni at videolabs.io
Mon Jul 13 16:25:42 CEST 2020


Hi,

Actually, this is probably a good idea to keep executable as-is
when configuring with PATH externally because it makes no sense
to set the environment for configuration but change it for make.

The point of this patch, which is a bit confusing in my commit
message, is to have extra/tools be used if configured with extra
tools because configure.ac silently adds it to the PATH if built
so the support is supposed to be builtin too.

Otherwise, even without changing environment, you got make
failure, but ./compile would work typically.

Regards,
--
Alexandre Janniaux
Videolabs

On Mon, Jul 13, 2020 at 01:10:23PM +0200, Marvin Scholz wrote:
> LGTM, sounds like a good idea to consistently use the protoc that
> configure actually found…
>
> On 13 Jul 2020, at 12:57, Alexandre Janniaux wrote:
>
> > 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
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list