summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2021-11-24 14:37:01 +0100
committerGravatar Nikias Bassen2021-11-24 14:37:01 +0100
commita1a89d10e5da77e4ac71fcf1cc645c1822fedd97 (patch)
tree99187e8150a79b9a08a31dbbf5e9c16aea0d81cd /configure.ac
parent7377e50e6c05c25fc4d2edfa21f201f6b800d8f1 (diff)
downloadidevicerestore-a1a89d10e5da77e4ac71fcf1cc645c1822fedd97.tar.gz
idevicerestore-a1a89d10e5da77e4ac71fcf1cc645c1822fedd97.tar.bz2
restore: Use new reverse proxy implementation from latest libimobiledevice
with fallback to the legacy code with a compile time warning. The legacy code will be removed in the future once a newer libimobiledevice has been officially released.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index e748924..ed81dde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,11 +113,23 @@ AC_CACHE_CHECK(for enum idevice_connection_type, ac_cv_enum_idevice_connection_t
]], [[
enum idevice_connection_type conn_type = CONNECTION_USBMUXD;
]])],[ac_cv_enum_idevice_connection_type=yes],[ac_cv_enum_idevice_connection_type=no]))
-
-if (test "$ac_cv_enum_idevice_connection_type" = "yes"); then
+if test "$ac_cv_enum_idevice_connection_type" = "yes"; then
AC_DEFINE(HAVE_ENUM_IDEVICE_CONNECTION_TYPE, 1, [Define if enum idevice_connection_type is available])
fi
+# check if libimobiledevice has reverse proxy support
+AC_CACHE_CHECK(for reverse proxy support in libimobiledevice, ac_cv_reverse_proxy,
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <libimobiledevice/reverse_proxy.h>
+ #include <stdlib.h>
+ ]], [[
+ reverse_proxy_client_t rp = NULL;
+ reverse_proxy_client_create_with_port(NULL, &rp, REVERSE_PROXY_DEFAULT_PORT);
+ ]])],[ac_cv_reverse_proxy=yes],[ac_cv_reverse_proxy=no]))
+if test "$ac_cv_reverse_proxy" = "yes"; then
+ AC_DEFINE(HAVE_REVERSE_PROXY, 1, [Define if libimobiledevice has a reverse proxy implementation])
+fi
+
CFLAGS="$CACHED_CFLAGS"
AC_ARG_WITH([openssl],