summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2020-06-14 15:53:56 +0200
committerGravatar Martin Szulecki2020-06-14 23:36:23 +0200
commit66f5936ed0a72e137e646afbc9c799fefb15c346 (patch)
treee1e64fa9578e1094415959008be13298db16c268
parentfa9aa6e8cbdcb6121bd625d00543a450687177c4 (diff)
downloadlibimobiledevice-66f5936ed0a72e137e646afbc9c799fefb15c346.tar.gz
libimobiledevice-66f5936ed0a72e137e646afbc9c799fefb15c346.tar.bz2
Redo cython check logic and check for "no-cast-function" gcc 8+ compiler flag
-rw-r--r--configure.ac22
-rw-r--r--cython/Makefile.am2
2 files changed, 17 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index e33f1ab..7082ca9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,16 +87,26 @@ AC_CHECK_MEMBER(struct dirent.d_type, AC_DEFINE(HAVE_DIRENT_D_TYPE, 1, [define i
87AC_ARG_WITH([cython], 87AC_ARG_WITH([cython],
88 [AS_HELP_STRING([--without-cython], 88 [AS_HELP_STRING([--without-cython],
89 [build Python bindings using Cython (default is yes)])], 89 [build Python bindings using Cython (default is yes)])],
90 [build_cython=$withval], 90 [build_cython=false],
91 [build_cython=yes]) 91 [build_cython=true])
92if test "$build_cython" = "yes"; then 92if test "$build_cython" = "true"; then
93 AM_PATH_PYTHON(2.3) 93 AC_PROG_CYTHON([0.17.0])
94 AC_PROG_CYTHON(0.17.0) 94 if [test "x$CYTHON" != "xfalse"]; then
95 CYTHON_PYTHON 95 AM_PATH_PYTHON([2.3], [
96 CYTHON_PYTHON
97 AS_COMPILER_FLAG([-Wno-cast-function-type -Werror], [
98 CYTHON_CFLAGS+=" -Wno-cast-function-type"
99 AC_SUBST([CYTHON_CFLAGS])
100 ], [])
101 ])
102 else
103 AC_MSG_WARN([Use the "--without-cython" option to avoid this warning.])
104 fi
96else 105else
97 CYTHON=false 106 CYTHON=false
98fi 107fi
99if [test "x$CYTHON" != "xfalse"]; then 108if [test "x$CYTHON" != "xfalse"]; then
109 PKG_PROG_PKG_CONFIG
100 AC_MSG_CHECKING([for libplist Cython bindings]) 110 AC_MSG_CHECKING([for libplist Cython bindings])
101 CYTHON_PLIST_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir libplist-2.0)/plist/cython 111 CYTHON_PLIST_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir libplist-2.0)/plist/cython
102 if [test ! -d "$CYTHON_PLIST_INCLUDE_DIR"]; then 112 if [test ! -d "$CYTHON_PLIST_INCLUDE_DIR"]; then
diff --git a/cython/Makefile.am b/cython/Makefile.am
index 08ac363..3577c4e 100644
--- a/cython/Makefile.am
+++ b/cython/Makefile.am
@@ -68,7 +68,7 @@ imobiledevice_la_CFLAGS = \
68 -Wno-strict-aliasing \ 68 -Wno-strict-aliasing \
69 -Wno-implicit-function-declaration \ 69 -Wno-implicit-function-declaration \
70 -fvisibility=default \ 70 -fvisibility=default \
71 -Wno-cast-function-type 71 $(CYTHON_CFLAGS)
72 72
73imobiledevice_la_LDFLAGS = \ 73imobiledevice_la_LDFLAGS = \
74 -module \ 74 -module \