configure.ac: make use of wayland-scanner.pc

Currently we use the wayland-scanner executable as found with
AC_PATH_PROG, and then check the presence of wayland-scanner.pc

Currently the latter is unused even if AC_PATH_PROG fails to find the
binary. Rework things to use the pkg-config variable as a fall-back.

Cc: Andrew Oakley <aoakley@espial.com>
Cc: Bill Spitzak <spitzak@gmail.com>
Cc: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Andrew Oakley <aoakley@espial.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Quentin Glidic <sardemff7+wayland@sardemff7.net>
dev
Emil Velikov 10 years ago committed by Bryce Harrington
parent 01193aeb12
commit 32318a52c0
  1. 5
      configure.ac

@ -503,11 +503,10 @@ AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
AC_PATH_PROG([wayland_scanner], [wayland-scanner]) AC_PATH_PROG([wayland_scanner], [wayland-scanner])
if test x$wayland_scanner = x; then if test x$wayland_scanner = x; then
AC_MSG_ERROR([wayland-scanner is needed to compile weston]) PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
fi fi
PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner)
AC_CONFIG_FILES([Makefile src/version.h src/weston.pc]) AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD]) AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])

Loading…
Cancel
Save