Skip to content

Commit

Permalink
Move messages for 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 24dcf8b commit f8f8f24
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,15 @@ else()
endif()

if(HAVE_LIBUSB)
message(STATUS "DO HAVE libusb")
buildinfo_item("libusb" "DO HAVE")
else()
message(STATUS "DON'T HAVE libusb")
buildinfo_item("libusb" "DON'T HAVE")
endif()

if(HAVE_LIBUSB_1_0)
message(STATUS "DO HAVE libusb_1_0")
buildinfo_item("libusb_1_0" "DO HAVE")
else()
message(STATUS "DON'T HAVE libusb_1_0")
buildinfo_item("libusb_1_0" "DON'T HAVE")
endif()

if(HAVE_LIBHIDAPI)
Expand Down
35 changes: 19 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 @@ -232,6 +234,12 @@ if test "x$have_libusb" = xyes; then
fi
AC_SUBST([LIBUSB])

AS_VAR_IF([have_libusb], [yes], [dnl
BUILDINFO_ITEM([libusb], [DO HAVE])
], [dnl
BUILDINFO_ITEM([libusb], [DON'T HAVE])
])

AC_ARG_ENABLE(
[libusb_1_0],
AS_HELP_STRING([--disable-libusb_1_0],
Expand Down Expand Up @@ -283,6 +291,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], [DO HAVE])
], [dnl
BUILDINFO_ITEM([libusb_1_0], [DISABLED])
])
], [dnl
BUILDINFO_ITEM([libusb_1_0], [DON'T HAVE])
])


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 +756,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 f8f8f24

Please sign in to comment.