Hi,
Peter Hutterer <[email protected]> writes:
> AC_DEFUN([WAYLAND_SCANNER_RULES], [
> PKG_PROG_PKG_CONFIG
>
> + PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner])
> +
With this change, configure will abort if wayland-scanner.pc is not
found. However, the current WAYLAND_SCANNER_RULES cannot be invoked
conditionally, because the make rules are expanded using AC_SUBST_FILE:
wayland_scanner_rules=`$PKG_CONFIG --variable=pkgdatadir
wayland-scanner`/wayland-scanner.mk
AC_SUBST_FILE([wayland_scanner_rules])
and in Makefile.am:
@wayland_scanner_rules@
which will be left unexpanded and cause a syntax error if
WAYLAND_SCANNER_RULES is not invoked. Note that Automake conditionals
don't work for the multiline substitution variables.
Perhaps an idea is changing the substitution to:
wayland_scanner_rules=`$PKG_CONFIG --variable=pkgdatadir
wayland-scanner`/wayland-scanner.mk
AC_SUBST_FILE([wayland_scanner_rules])
AC_SUBST([wayland_scanner_makefile], [$wayland_scanner_rules])
and in Makefile.am, include the rule instead of embedding:
-include $(wayland_scanner_makefile)
By the way,
> 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.
Did you actually get any errors? I didn't get any, when compiling the
Wayland support for IBus, without Wayland installation.
Regards,
--
Daiki Ueno
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel