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

Pekka Paalanen ppaalanen at gmail.com
Wed May 14 04:55:45 PDT 2014


On Wed, 14 May 2014 16:01:14 +0530
Srivardhan Hebbar <sri.hebbar at samsung.com> wrote:

> This is a fix to the bug https://bugs.freedesktop.org/show_bug.cgi?id=78688.
> 
> Signed-off-by: Srivardhan Hebbar <sri.hebbar at samsung.com>
> ---
>  configure.ac |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 031a26f..89965e2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -498,7 +498,9 @@ if test "x$have_lcms" = xyes; then
>  fi
>  AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
>  
> -AC_PATH_PROG([wayland_scanner], [wayland-scanner])
> +WAYLAND_SCANNER_PREFIX=`$PKG_CONFIG --variable=prefix wayland-scanner`

If you look at src/wayland-scanner.pc.in in Wayland, you'll see:
prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@
pkgdatadir=@datadir@/@PACKAGE@
wayland_scanner=@bindir@/wayland-scanner

Where @bindir@ is customizable via ./configure.

Therefore using @prefix@/bin is not quite correct, even though it
usually works.

> +AC_PATH_PROG([wayland_scanner], [wayland-scanner],,
> +		[${WAYLAND_SCANNER_PREFIX}/bin$PATH_SEPARATOR$PATH])

I wonder if we could give AC_PATH_PROG the absolute path from
'pkg-config --variable=wayland_scanner wayland-scanner'...

All we need is to check it exists and is executable, and offer an
override possibility with AC_ARG_VAR. I think searching PATH is not
needed in any case.


Thanks,
pq

>  if test x$wayland_scanner = x; then
>  	AC_MSG_ERROR([wayland-scanner is needed to compile weston])
>  fi



More information about the wayland-devel mailing list