Skip to content

Commit 3aad70d

Browse files
committed
BBB libusb libusb_1_0
1 parent bd5be06 commit 3aad70d

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/configure.ac

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ AC_SUBST([LIBELF])
213213

214214
AC_SEARCH_LIBS([gethostent], [nsl])
215215
AC_SEARCH_LIBS([setsockopt], [socket])
216+
217+
216218
AH_TEMPLATE([HAVE_LIBUSB],
217219
[Define if USB support is enabled via libusb])
218220
AC_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])
232237
fi
233238
AC_SUBST([LIBUSB])
234239

@@ -283,6 +288,17 @@ if test "x$have_libusb_1_0" = xyes && test "x$enabled_libusb_1_0" = xyes; then
283288
fi
284289
AC_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+
286302
AH_TEMPLATE([HAVE_LIBHIDAPI],
287303
[Define if HID support is enabled via libhidapi])
288304
AC_SEARCH_LIBS([hid_init], [hidapi hidapi-libusb hidapi-hidraw],
@@ -737,22 +753,6 @@ echo ""
737753
echo "Configuration summary:"
738754
echo "----------------------"
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-
756756
if test "x$have_libftdi1" = xyes; then
757757
echo "DO HAVE libftdi1"
758758
else

0 commit comments

Comments
 (0)