+SR_ARG_OPT_PKG([libgio], [LIBGIO], , [gio-2.0 >= 2.24.0])
+
+# See if any of the (potentially platform specific) libs are available
+# which provide some means of Bluetooth communication.
+AS_IF([test "x$sr_have_libbluez" = xyes],
+ sr_have_bluetooth=yes, sr_have_bluetooth=no)
+AS_IF([test "x$sr_have_bluetooth" = xyes],
+ [AC_DEFINE([HAVE_BLUETOOTH], [1], [Specifies whether Bluetooth communication is supported.])])
+AS_IF([test "x$sr_have_bluetooth" = xyes],
+ [SR_APPEND([sr_deps_avail], [bluetooth_comm])])
+
+AS_IF([test "x$sr_have_libserialport" = xyes -o "x$sr_have_libhidapi" = xyes -o "x$sr_have_bluetooth" = xyes],
+ sr_have_serial_comm=yes, sr_have_serial_comm=no)
+AS_IF([test "x$sr_have_serial_comm" = xyes],
+ [AC_DEFINE([HAVE_SERIAL_COMM], [1], [Specifies whether serial communication is supported.])])
+AS_IF([test "x$sr_have_serial_comm" = xyes],
+ [SR_APPEND([sr_deps_avail], [serial_comm])])
+AM_CONDITIONAL([NEED_SERIAL], [test "x$sr_have_serial_comm" = xyes])
+