Skip to content

Commit

Permalink
m4/nut_check_libmodbus.m4: make it visible when some libmodbus is fou…
Browse files Browse the repository at this point in the history
…nd, but does not support libusb while we want it (and will fail NUT configure later) [#2063]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
  • Loading branch information
jimklimov committed Mar 22, 2024
1 parent 9fae2f6 commit 9ef8727
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion m4/nut_check_libmodbus.m4
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ if test -z "${nut_have_libmodbus_seen}"; then
AC_CHECK_FUNCS(modbus_set_byte_timeout, [], [nut_have_libmodbus=no])
AC_CHECK_FUNCS(modbus_set_response_timeout, [], [nut_have_libmodbus=no])
AC_CHECK_FUNCS(modbus_new_rtu_usb, [nut_have_libmodbus_usb=yes], [nut_have_libmodbus_usb=no])
AC_CHECK_FUNCS(modbus_new_rtu_usb, [nut_have_libmodbus_usb=yes], [
AS_IF([test x"${nut_with_usb}" = xyes && test x"${nut_with_modbus}" = xyes && test x"${nut_have_libmodbus}" = xyes ], [
AC_MSG_WARN([Both --with-modbus and --with-usb were requested, and a libmodbus was found, but it seems to not support USB. You may require a custom build per https://github.com/networkupstools/nut/wiki/APC-UPS-with-Modbus-protocol])
])
nut_have_libmodbus_usb=no
])
dnl modbus_set_byte_timeout() and modbus_set_response_timeout()
dnl in 3.0.x and 3.1.x have different args (since ~2013): the
Expand Down

0 comments on commit 9ef8727

Please sign in to comment.