Skip to content

Commit

Permalink
BBB libusb libusb_1_0
Browse files Browse the repository at this point in the history
  • Loading branch information
ndim committed Nov 27, 2024
1 parent bd5be06 commit 3aad70d
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ AC_SUBST([LIBELF])

AC_SEARCH_LIBS([gethostent], [nsl])
AC_SEARCH_LIBS([setsockopt], [socket])


AH_TEMPLATE([HAVE_LIBUSB],
[Define if USB support is enabled via libusb])
AC_CHECK_LIB([usb], [usb_get_string_simple], [have_libusb=yes])
Expand All @@ -229,6 +231,9 @@ if test "x$have_libusb" = xyes; then
AC_DEFINE([HAVE_LIBUSB])
AC_CHECK_HEADERS([usb.h])
AC_CHECK_HEADERS([lusb0_usb.h])
BUILDINFO_ITEM([libusb], [yes])
else
BUILDINFO_ITEM([libusb], [no])
fi
AC_SUBST([LIBUSB])

Expand Down Expand Up @@ -283,6 +288,17 @@ if test "x$have_libusb_1_0" = xyes && test "x$enabled_libusb_1_0" = xyes; then
fi
AC_SUBST([LIBUSB_1_0])

AS_VAR_IF([have_libusb_1_0], [yes], [dnl
AS_VAR_IF([enabled_libusb_1_0], [yes], [dnl
BUILDINFO_ITEM([libusb_1_0], [yes])
], [dnl
BUILDINFO_ITEM([libusb_1_0], [disabled])
])
], [dnl
BUILDINFO_ITEM([libusb_1_0], [no])
])


AH_TEMPLATE([HAVE_LIBHIDAPI],
[Define if HID support is enabled via libhidapi])
AC_SEARCH_LIBS([hid_init], [hidapi hidapi-libusb hidapi-hidraw],
Expand Down Expand Up @@ -737,22 +753,6 @@ echo ""
echo "Configuration summary:"
echo "----------------------"

if test "x$have_libusb" = xyes; then
echo "DO HAVE libusb"
else
echo "DON'T HAVE libusb"
fi

if test "x$have_libusb_1_0" = xyes; then
if test "x$enabled_libusb_1_0" = xyes; then
echo "DO HAVE libusb_1_0"
else
echo "DISABLED libusb_1_0"
fi
else
echo "DON'T HAVE libusb_1_0"
fi

if test "x$have_libftdi1" = xyes; then
echo "DO HAVE libftdi1"
else
Expand Down

0 comments on commit 3aad70d

Please sign in to comment.