0009-configure.ac-also-use-AC_PATH_PROG-to-check-for-wayl.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 27635f902831fac898586f1f3dc98369f12582c9 Mon Sep 17 00:00:00 2001
  2. From: Bernd Kuhls <bernd.kuhls@t-online.de>
  3. Date: Sun, 26 Aug 2018 12:51:04 +0200
  4. Subject: [PATCH] configure.ac: also use AC_PATH_PROG to check for
  5. wayland-scanner
  6. When cross-compiling the .pc file might point to the wrong
  7. wayland-scanner binary (target rather than host) resulting in a
  8. non-executable and wrong scanner.
  9. Try searching the PATH first, and if that fails fall back into
  10. pkg-config.
  11. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  12. ---
  13. configure.ac | 19 +++++++++++--------
  14. 1 file changed, 11 insertions(+), 8 deletions(-)
  15. diff --git a/configure.ac b/configure.ac
  16. index 4808b8becf..a18641ed23 100644
  17. --- a/configure.ac
  18. +++ b/configure.ac
  19. @@ -3140,14 +3140,17 @@ AS_IF([test "${enable_wayland}" != "no"], [
  20. AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors 'wayland-protocols >= 1.4')])
  21. ])
  22. - AC_MSG_CHECKING([for the Wayland scanner])
  23. - PKG_CHECK_EXISTS([wayland-scanner], [
  24. - WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)"
  25. - AC_MSG_RESULT([${WAYLAND_SCANNER}])
  26. - ], [
  27. - AC_MSG_RESULT([not found])
  28. - AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors wayland-scanner)])
  29. - ])
  30. + AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
  31. + if test "x$WAYLAND_SCANNER" = x; then
  32. + AC_MSG_CHECKING([for the Wayland scanner])
  33. + PKG_CHECK_EXISTS([wayland-scanner], [
  34. + WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)"
  35. + AC_MSG_RESULT([${WAYLAND_SCANNER}])
  36. + ], [
  37. + AC_MSG_RESULT([not found])
  38. + AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors wayland-scanner)])
  39. + ])
  40. + fi
  41. have_wayland="yes"
  42. --
  43. 2.18.0