[PATCH v2] configure.ac: Change in build system to use the path from pkg-config for wayland-scanner.

Srivardhan sri.hebbar at samsung.com
Fri May 16 02:37:28 PDT 2014



> -----Original Message-----
> From: wayland-devel [mailto:wayland-devel-
> bounces at lists.freedesktop.org] On Behalf Of Pekka Paalanen
> Sent: Friday, May 16, 2014 11:43 AM
> To: Neil Roberts
> Cc: Srivardhan Hebbar; wayland-devel at lists.freedesktop.org
> Subject: Re: [PATCH v2] configure.ac: Change in build system to use the
path
> from pkg-config for wayland-scanner.
> 
> On Thu, 15 May 2014 14:23:20 +0100
> Neil Roberts <neil at linux.intel.com> wrote:
> 
> > Hi,
> >
> > Srivardhan Hebbar <sri.hebbar at samsung.com> writes:
> >
> > > +AC_PATH_PROG([wayland_scanner], [wayland-scanner],,
> > > +		[${WAYLAND_SCANNER_PATH}])
> >
> > I don't think it makes much sense to search the path for
> > wayland-scanner when pkg-config already gives you the complete
> > filename. Instead of trying to derive a directory to search we could
> > just use the filename directly and check whether it is executable.
> > Then instead of AC_PATH_PROG it could do something like this:
> >
> > AC_MSG_CHECKING([for wayland-scanner])
> > AS_IF([AS_EXECUTABLE_P([${wayland_scanner}])],
> >       [AC_MSG_RESULT([${wayland_scanner}])
> >        AC_SUBST(wayland_scanner)],
> >       [AC_MSG_RESULT([not found])
> >        AC_MSG_ERROR([wayland-scanner was not found])])
> >
> > The --wayland-scanner-path option could also be replaced with
> > something that would just take the whole filename too.
> 
> Yeah, I agree.
> 
> Is it ok to use AC_SUBST inside a conditional? Should not be needed
anyway,
> if one goes with something like:
> 
> # implies AC_SUBST
> AC_ARG_VAR(WAYLAND_SCANNER, [bla bla use AC_HELP_STRING?]) if
> WAYLAND_SCANNER empty
> 	get it from pkg-config or fail (PKG_CHECK_VAR?) fi test for
> executable WAYLAND_SCANNER like Neil suggested
> 
> Note, that the name WAYLAND_SCANNER here conflicts with
> 	PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner) but
> since user settable variables are usually all-caps (right?),
> WAYLAND_SCANNER seems like the right name. The PKG_CHECK_MODULES
> result is actually unused, it only makes sure the .pc file is there. So we
could
> also drop the PKG_CHECK_MODULES line if "get it from pkg-config" fails
> appropriately if the .pc file is not there. That would clean up the
'./configure -
> -help' output a bit too, by removing
> 
>   WAYLAND_SCANNER_CFLAGS
>               C compiler flags for WAYLAND_SCANNER, overriding pkg-config
>   WAYLAND_SCANNER_LIBS
>               linker flags for WAYLAND_SCANNER, overriding pkg-config
> 
> which are totally useless anyway.
> 
Thanks Neil, Pq,

Will send the updated patch.

Thank-you,
Hebbar
> 
> Thanks,
> pq
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel



More information about the wayland-devel mailing list