0002-configure.ac-invert-order-for-wayland-scanner-check.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From ef96bac7cbbb11b98606864ead0f731dd5b71d5a Mon Sep 17 00:00:00 2001
  2. From: Gustavo Zacarias <gustavo@zacarias.com.ar>
  3. Date: Thu, 17 Nov 2016 15:36:54 -0300
  4. Subject: [PATCH] configure.ac: invert order for wayland-scanner check
  5. When cross-compiling the .pc file might point to the wrong
  6. wayland-scanner binary (target rather than host) resulting in a
  7. non-executable and wrong scanner.
  8. Try searching the PATH first, and if that fails fall back into
  9. pkg-config.
  10. [Vincent: tweak patch for 17.1.1 version]
  11. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  12. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  13. [Romain: rebase on 18.1]
  14. Signed-off-by: Romain Naour <romain.naour@gmail.com>
  15. [Bernd rebase on 18.3]
  16. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  17. ---
  18. configure.ac | 8 ++++----
  19. 1 file changed, 4 insertions(+), 4 deletions(-)
  20. diff --git a/configure.ac b/configure.ac
  21. index f1fbdcc6c7..dcf87e7dd6 100644
  22. --- a/configure.ac
  23. +++ b/configure.ac
  24. @@ -1841,17 +1841,16 @@
  25. fi
  26. WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
  27. - PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
  28. + AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
  29. + if test "x$WAYLAND_SCANNER" = x; then
  30. + PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
  31. WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
  32. WAYLAND_SCANNER='')
  33. + fi
  34. PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
  35. AC_SUBST(SCANNER_ARG, 'private-code'),
  36. AC_SUBST(SCANNER_ARG, 'code'))
  37. - if test "x$WAYLAND_SCANNER" = x; then
  38. - AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
  39. - fi
  40. -
  41. if test "x$WAYLAND_SCANNER" = "x:"; then
  42. AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
  43. fi
  44. --
  45. 2.14.3