scanner: check for wayland-scanner.pc before using variables
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 7 Aug 2013 01:05:59 +0000 (11:05 +1000)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 7 Aug 2013 23:25:10 +0000 (16:25 -0700)
If wayland-scanner.pc can't be found the variables end up being set
irrespectively, leaving the user with odd compiler errors about missing
headers, etc.

wayland-scanner.m4

index 2b87c5f..4e4222a 100644 (file)
@@ -1,6 +1,8 @@
 AC_DEFUN([WAYLAND_SCANNER_RULES], [
     PKG_PROG_PKG_CONFIG
 
+    PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner])
+
     wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
     AC_SUBST([wayland_scanner])