openocd-0001-fix-cross-compilation-host-libsub-was-used-before.patch 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. From 3728c4af7f6303ccedab56ec220797f8f290580e Mon Sep 17 00:00:00 2001
  2. From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
  3. Date: Wed, 10 Aug 2011 00:17:29 +0800
  4. Subject: [PATCH] fix cross compilation: host libsub was used before
  5. tested in buildroot
  6. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
  7. ---
  8. configure.in | 7 +++++--
  9. 1 files changed, 5 insertions(+), 2 deletions(-)
  10. diff --git a/configure.in b/configure.in
  11. index dfa1e8f..cfe2218 100644
  12. --- a/configure.in
  13. +++ b/configure.in
  14. @@ -1046,8 +1046,11 @@ build_usb=no
  15. if test $build_jlink = yes -o $build_vsllink = yes -o $build_usbprog = yes -o \
  16. $build_rlink = yes -o $build_ulink = yes -o $build_armjtagew = yes
  17. then
  18. - AC_CHECK_HEADERS([usb.h],[],
  19. - [AC_MSG_ERROR([usb.h is required to build some OpenOCD driver(s)])])
  20. + dnl check for libusb
  21. + PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.11)
  22. + CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
  23. + LDFLAGS="$LDFLAGS $LIBUSB_LDFLAGS"
  24. + LIBS="$LIBS $LIBUSB_LIBS"
  25. build_usb=yes
  26. fi
  27. --
  28. 1.7.5.4