[PATCH wayland 3/3] scanner: check for wayland-scanner.pc before using variables

Peter Hutterer peter.hutterer at who-t.net
Tue Aug 6 18:05:59 PDT 2013


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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/wayland-scanner.m4 b/wayland-scanner.m4
index 2b87c5f..4e4222a 100644
--- a/wayland-scanner.m4
+++ b/wayland-scanner.m4
@@ -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])
 
-- 
1.8.2.1



More information about the wayland-devel mailing list