@@ -213,6 +213,8 @@ AC_SUBST([LIBELF])
213213
214214AC_SEARCH_LIBS ( [ gethostent] , [ nsl] )
215215AC_SEARCH_LIBS ( [ setsockopt] , [ socket] )
216+
217+
216218AH_TEMPLATE ( [ HAVE_LIBUSB] ,
217219 [ Define if USB support is enabled via libusb] )
218220AC_CHECK_LIB ( [ usb] , [ usb_get_string_simple] , [ have_libusb=yes] )
@@ -229,6 +231,9 @@ if test "x$have_libusb" = xyes; then
229231 AC_DEFINE ( [ HAVE_LIBUSB] )
230232 AC_CHECK_HEADERS ( [ usb.h] )
231233 AC_CHECK_HEADERS ( [ lusb0_usb.h] )
234+ BUILDINFO_ITEM([ libusb] , [ yes] )
235+ else
236+ BUILDINFO_ITEM([ libusb] , [ no] )
232237fi
233238AC_SUBST ( [ LIBUSB] )
234239
@@ -283,6 +288,17 @@ if test "x$have_libusb_1_0" = xyes && test "x$enabled_libusb_1_0" = xyes; then
283288fi
284289AC_SUBST ( [ LIBUSB_1_0] )
285290
291+ AS_VAR_IF ( [ have_libusb_1_0] , [ yes] , [ dnl
292+ AS_VAR_IF ( [ enabled_libusb_1_0] , [ yes] , [ dnl
293+ BUILDINFO_ITEM([ libusb_1_0] , [ yes] )
294+ ] , [ dnl
295+ BUILDINFO_ITEM([ libusb_1_0] , [ disabled] )
296+ ] )
297+ ] , [ dnl
298+ BUILDINFO_ITEM([ libusb_1_0] , [ no] )
299+ ] )
300+
301+
286302AH_TEMPLATE ( [ HAVE_LIBHIDAPI] ,
287303 [ Define if HID support is enabled via libhidapi] )
288304AC_SEARCH_LIBS ( [ hid_init] , [ hidapi hidapi-libusb hidapi-hidraw] ,
@@ -737,22 +753,6 @@ echo ""
737753echo "Configuration summary:"
738754echo "----------------------"
739755
740- if test "x$have_libusb" = xyes; then
741- echo "DO HAVE libusb"
742- else
743- echo "DON'T HAVE libusb"
744- fi
745-
746- if test "x$have_libusb_1_0" = xyes; then
747- if test "x$enabled_libusb_1_0" = xyes; then
748- echo "DO HAVE libusb_1_0"
749- else
750- echo "DISABLED libusb_1_0"
751- fi
752- else
753- echo "DON'T HAVE libusb_1_0"
754- fi
755-
756756if test "x$have_libftdi1" = xyes; then
757757 echo "DO HAVE libftdi1"
758758else
0 commit comments