@@ -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] )
@@ -232,6 +234,12 @@ if test "x$have_libusb" = xyes; then
232234fi
233235AC_SUBST ( [ LIBUSB] )
234236
237+ AS_VAR_IF ( [ have_libusb] , [ yes] , [ dnl
238+ BUILDINFO_ITEM([ libusb] , [ DO HAVE] )
239+ ] , [ dnl
240+ BUILDINFO_ITEM([ libusb] , [ DON'T HAVE] )
241+ ] )
242+
235243AC_ARG_ENABLE (
236244 [ libusb_1_0] ,
237245 AS_HELP_STRING ( [ --disable-libusb_1_0] ,
@@ -283,6 +291,17 @@ if test "x$have_libusb_1_0" = xyes && test "x$enabled_libusb_1_0" = xyes; then
283291fi
284292AC_SUBST ( [ LIBUSB_1_0] )
285293
294+ AS_VAR_IF ( [ have_libusb_1_0] , [ yes] , [ dnl
295+ AS_VAR_IF ( [ enabled_libusb_1_0] , [ yes] , [ dnl
296+ BUILDINFO_ITEM([ libusb_1_0] , [ DO HAVE] )
297+ ] , [ dnl
298+ BUILDINFO_ITEM([ libusb_1_0] , [ DISABLED] )
299+ ] )
300+ ] , [ dnl
301+ BUILDINFO_ITEM([ libusb_1_0] , [ DON'T HAVE] )
302+ ] )
303+
304+
286305AH_TEMPLATE ( [ HAVE_LIBHIDAPI] ,
287306 [ Define if HID support is enabled via libhidapi] )
288307AC_SEARCH_LIBS ( [ hid_init] , [ hidapi hidapi-libusb hidapi-hidraw] ,
@@ -737,22 +756,6 @@ echo ""
737756echo "Configuration summary:"
738757echo "----------------------"
739758
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-
756759if test "x$have_libftdi1" = xyes; then
757760 echo "DO HAVE libftdi1"
758761else
0 commit comments