summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2020-04-30 04:19:45 +0200
committerGravatar Nikias Bassen2020-04-30 04:19:45 +0200
commit8bd8250336694b0a68546fa01417ef40748c84a4 (patch)
tree9d6a94562805af2852f431195c235fa4d1097d75
parentbc559ab22aa8c146a35dc6bd503ba1a3c02ff186 (diff)
downloadlibimobiledevice-8bd8250336694b0a68546fa01417ef40748c84a4.tar.gz
libimobiledevice-8bd8250336694b0a68546fa01417ef40748c84a4.tar.bz2
configure: Make sure libusbmuxd is correctly found for AC_TRY_COMPILE checks when installed in non-standard prefix
-rw-r--r--configure.ac10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7041667..3d2b255 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,6 +81,12 @@ case ${host_os} in
esac
AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
+AC_SUBST(libusbmuxd_CFLAGS)
+AC_SUBST(libusbmuxd_LIBS)
+
+CACHED_CFLAGS="$CFLAGS"
+CFLAGS+=" $libusbmuxd_CFLAGS"
+
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>
@@ -94,6 +100,8 @@ AC_TRY_COMPILE([
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]]))
+CFLAGS="$CACHED_CFLAGS"
+
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
@@ -182,7 +190,7 @@ else
building_debug_code=yes
fi
-AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char -fvisibility=hidden")
+AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char -fvisibility=hidden -fsanitize=address")
AC_SUBST(GLOBAL_CFLAGS)
case "$GLOBAL_CFLAGS" in