Skip to content

Commit f8f8f24

Browse files
committed
Move messages for libusb libusb_1_0
1 parent 24dcf8b commit f8f8f24

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,15 +411,15 @@ else()
411411
endif()
412412

413413
if(HAVE_LIBUSB)
414-
message(STATUS "DO HAVE libusb")
414+
buildinfo_item("libusb" "DO HAVE")
415415
else()
416-
message(STATUS "DON'T HAVE libusb")
416+
buildinfo_item("libusb" "DON'T HAVE")
417417
endif()
418418

419419
if(HAVE_LIBUSB_1_0)
420-
message(STATUS "DO HAVE libusb_1_0")
420+
buildinfo_item("libusb_1_0" "DO HAVE")
421421
else()
422-
message(STATUS "DON'T HAVE libusb_1_0")
422+
buildinfo_item("libusb_1_0" "DON'T HAVE")
423423
endif()
424424

425425
if(HAVE_LIBHIDAPI)

src/configure.ac

Lines changed: 19 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])
@@ -232,6 +234,12 @@ if test "x$have_libusb" = xyes; then
232234
fi
233235
AC_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+
235243
AC_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
283291
fi
284292
AC_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+
286305
AH_TEMPLATE([HAVE_LIBHIDAPI],
287306
[Define if HID support is enabled via libhidapi])
288307
AC_SEARCH_LIBS([hid_init], [hidapi hidapi-libusb hidapi-hidraw],
@@ -737,22 +756,6 @@ echo ""
737756
echo "Configuration summary:"
738757
echo "----------------------"
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-
756759
if test "x$have_libftdi1" = xyes; then
757760
echo "DO HAVE libftdi1"
758761
else

0 commit comments

Comments
 (0)