summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2020-01-20 21:11:01 +0100
committerGravatar Nikias Bassen2020-01-20 21:11:01 +0100
commit61babf5f54e7734ebf3044af4c6294524d4b29b5 (patch)
treefbccb411c3d21cd30648064f5679ac81020ec0e5
parent297ae43f9159bd2220c337397a1c7809a8e8de68 (diff)
downloadlibimobiledevice-61babf5f54e7734ebf3044af4c6294524d4b29b5.tar.gz
libimobiledevice-61babf5f54e7734ebf3044af4c6294524d4b29b5.tar.bz2
configure.ac: Add checks to ensure libusbmuxd is up-to-date
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4342f5c..7041667 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,6 +81,19 @@ case ${host_os} in
esac
AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
+AC_CHECK_MEMBER(usbmuxd_device_info_t.conn_type,, AC_MSG_ERROR([libusbmuxd (usbmuxd.h) is not up-to-date; missing conn_type member in usbmuxd_device_info_t. Please update libusbmuxd to build $PACKAGE_NAME]), [#include <usbmuxd.h>])
+AC_TRY_COMPILE([
+ #include <usbmuxd.h>
+], [
+ enum usbmux_connection_type conntypeusb = CONNECTION_TYPE_USB;
+ enum usbmux_connection_type conntypenet = CONNECTION_TYPE_NETWORK;
+],, AC_MSG_ERROR([[libusbmuxd (usbmuxd.h) is not up-to-date; missing enum usbmux_connection_type with CONNECTION_TYPE_USB and CONNECTION_TYPE_NETWORK - Please update libusbmuxd to build $PACKAGE_NAME]]))
+AC_TRY_COMPILE([
+ #include <usbmuxd.h>
+], [
+ enum usbmux_lookup_options opts = DEVICE_LOOKUP_USBMUX | DEVICE_LOOKUP_NETWORK | DEVICE_LOOKUP_PREFER_NETWORK;
+],, AC_MSG_ERROR([[libusbmuxd (usbmuxd.h) is not up-to-date; missing enum usbmux_lookup_options with DEVICE_LOOKUP_USBMUX, DEVICE_LOOKUP_NETWORK, and DEVICE_LOOKUP_PREFER_NETWORK - Please update libusbmuxd to build $PACKAGE_NAME]]))
+
AC_CHECK_MEMBER(struct dirent.d_type, AC_DEFINE(HAVE_DIRENT_D_TYPE, 1, [define if struct dirent has member d_type]),, [#include <dirent.h>])
# Cython Python Bindings