configure: Make --with-usb-record-replay opt-in rather than opt-out

merge-requests/92/head
Povilas Kanapickas 2019-06-30 22:31:14 +03:00
rodzic baa4eb3048
commit f8f90f8b98
1 zmienionych plików z 11 dodań i 9 usunięć

Wyświetl plik

@ -434,16 +434,18 @@ dnl ******************************************************************
dnl Check for USB record/replay support
dnl ******************************************************************
AC_ARG_WITH(usb_record_replay,
[AS_HELP_STRING([--with-usb-record-replay],
[enable USB record and replay to XML files @<:@default=no@:>@])],
[],
[with_usb_record_replay=no])
AS_HELP_STRING([--with-usb-record-replay],
[enable USB record and replay to XML files @<:@default=yes@:>@]))
if test "$with_usb_record_replay" = "no"; then
echo "Not including USB record and replay support"
else
PKG_CHECK_MODULES([XML], [libxml-2.0],
[AC_DEFINE(WITH_USB_RECORD_REPLAY, 1, [define if USB record replay is enabled])])
if test "x$with_usb_record_replay" != "xno"; then
PKG_CHECK_MODULES([XML], [libxml-2.0], have_libxml=yes, have_libxml=no)
if test "x$have_libxml" = xyes; then
AC_DEFINE(WITH_USB_RECORD_REPLAY, 1, [define if USB record replay is enabled])
else
if test "x$with_usb_record_replay" = xyes; then
AC_MSG_ERROR([USB record and replay support was requested but libxml-2.0 was not found])
fi
fi
fi
dnl ************