summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-09-26 04:49:54 +0200
committerGravatar Nikias Bassen2019-09-26 04:49:54 +0200
commitdbcab8bca5b061c90b81ba87955cdb6421ad751b (patch)
tree3936d4bc2b6024db97b262a512df3c438d27802b /configure.ac
parenta18ad835cb84268fa07118cf6abed01d1e93856a (diff)
downloadidevicerestore-dbcab8bca5b061c90b81ba87955cdb6421ad751b.tar.gz
idevicerestore-dbcab8bca5b061c90b81ba87955cdb6421ad751b.tar.bz2
restore: Only use timeout error if it is actually defined
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1d37315..73c3efd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,6 +84,16 @@ AC_CACHE_CHECK(for IDEVICE_E_TIMEOUT in enum idevice_error_t, ac_cv_idevice_erro
if test "$ac_cv_idevice_error_has_timeout" = "yes"; then
AC_DEFINE(HAVE_IDEVICE_E_TIMEOUT, 1, [Define if enum idevice_error_t defines IDEVICE_E_TIMEOUT])
fi
+AC_CACHE_CHECK(for RESTORE_E_RECEIVE_TIMEOUT in enum restored_error_t, ac_cv_restored_error_has_timeout,
+ AC_TRY_COMPILE([
+ #include <libimobiledevice/restore.h>
+ ], [
+ return RESTORE_E_RECEIVE_TIMEOUT;
+ ], ac_cv_restored_error_has_timeout=yes, ac_cv_restored_error_has_timeout=no))
+
+if test "$ac_cv_restored_error_has_timeout" = "yes"; then
+ AC_DEFINE(HAVE_RESTORE_E_RECEIVE_TIMEOUT, 1, [Define if enum restored_error_t defines RESTORE_E_RECEIVE_TIMEOUT])
+fi
AC_SUBST(GLOBAL_CFLAGS)
AC_SUBST(AC_LDFLAGS)