]> sigrok.org Git - libsigrok.git/blobdiff - configure.ac
zip: Provide fallback if zip_discard() is unavailable
[libsigrok.git] / configure.ac
index 1f75be785942f09cf1fbdc13142cf7eccc5f99d4..2f9b06f097c006a10891b62450f9a2b1eb7817cc 100644 (file)
@@ -449,11 +449,16 @@ AM_COND_IF([BINDINGS_CXX], [
 # Check for specific libusb features, now that we know the CFLAGS.
 AC_LANG([C])
 sr_save_cflags=$CFLAGS
+sr_save_libs=$LIBS
 CFLAGS="$LIBSIGROK_CFLAGS $CFLAGS"
+LIBS="$LIBSIGROK_LIBS $LIBS"
 AC_CHECK_TYPES([libusb_os_handle],
        [sr_have_libusb_os_handle=yes], [sr_have_libusb_os_handle=no],
        [[#include <libusb.h>]])
+AC_CHECK_FUNCS([zip_discard])
+LIBS=$sr_save_libs
 CFLAGS=$sr_save_cflags
+
 AM_COND_IF([NEED_USB], [AS_CASE([$sr_have_libusb_os_handle:$host_os], [no:mingw*],
        [AC_MSG_ERROR([Windows builds require the event-abstraction branch of libusb])])])