From fdbf94c90331b37b304735e43390e5fbc3ad7199 Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Thu, 7 Apr 2011 14:13:10 +0400 Subject: [PATCH] Use pkg-config to detect libusb-1.0. --- configure.ac | 9 +++------ jzboot | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index f1e6600..30dbf72 100644 --- a/configure.ac +++ b/configure.ac @@ -49,10 +49,7 @@ AC_CHECK_LIB([usb], [main], [], [ echo "Error! You need to have libusb-0.1. \n" echo "Maybe run 'sudo apt-get install libusb-dev' under debian" exit -1 ]) -AC_CHECK_LIB([usb-1.0], [main], [], [ -echo "Error! You need to have libusb-1.0. \n" -echo "Maybe run 'sudo apt-get install libusb1.0-0-dev' under debian" -exit -1 ]) +PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0]) AC_ARG_WITH([readline], [AS_HELP_STRING([--with-readline], @@ -73,8 +70,8 @@ AS_IF([test "x$with_readline" != xno], fi ], -lncurses)]) -LIBS="$LIBS $USB_LIBS $READLINE_LIBS" -CFLAGS="$CFLAGS $USB_CFLAGS" +LIBS="$LIBS $USB_LIBS $READLINE_LIBS $LIBUSB1_LIBS" +CFLAGS="$CFLAGS $USB_CFLAGS $LIBUSB1_CFLAGS" # Checks for header files. AC_HEADER_STDC diff --git a/jzboot b/jzboot index 8b4338f..04ed523 160000 --- a/jzboot +++ b/jzboot @@ -1 +1 @@ -Subproject commit 8b4338fc90376ed10d814f8ae2ca1a0a4436c049 +Subproject commit 04ed523633082c0bc49fd23f8424bdf1523b1ec4