On Tue, Apr 09, 2019 at 05:52:30PM +0200, Stefan Sperling wrote:
> You are right, this looks like a problem in Subversion's configure script.
> It assumes that APR uses "d", "ld" or "lld" for this format string which
> is now a wrong assumption.

Pierre, could you please try this patch against Subversion and let
me know if it helps?

Index: build/ac-macros/swig.m4
===================================================================
--- build/ac-macros/swig.m4     (revision 1857217)
+++ build/ac-macros/swig.m4     (working copy)
@@ -132,6 +132,10 @@ AC_DEFUN(SVN_FIND_SWIG,
     dnl Sun Forte adds an extra space before substituting APR_INT64_T_FMT
     dnl gcc-2.95 adds an extra space after substituting APR_INT64_T_FMT
     dnl thus the egrep patterns have a + in them.
+    dnl
+    dnl APR >= 1.7.0 uses PRId64 from inttypes.h on many platforms, so if
+    dnl we fail to match APR_INT64_T_FMT to a known format string, try to
+    dnl deduce the format string from inttypes.h instead of apr.h.
     SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS"
     CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES"
     AC_CACHE_CHECK([for apr_int64_t Python/C API format string],
@@ -154,6 +158,24 @@ AC_DEFUN(SVN_FIND_SWIG,
                       MaTcHtHiS APR_INT64_T_FMT EnDeNd],
                      [svn_cv_pycfmt_apr_int64_t="i"])
       fi
+      if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then
+        AC_EGREP_CPP([MaTcHtHiS +\"lld\" +EnDeNd],
+                     [#include <inttypes.h>
+                      MaTcHtHiS PRId64 EnDeNd],
+                     [svn_cv_pycfmt_apr_int64_t="L"])
+      fi
+      if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then
+        AC_EGREP_CPP([MaTcHtHiS +\"ld\" +EnDeNd],r
+                     [#include <inttypes.h>
+                      MaTcHtHiS PRId64 EnDeNd],
+                     [svn_cv_pycfmt_apr_int64_t="l"])
+      fi
+      if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then
+        AC_EGREP_CPP([MaTcHtHiS +\"d\" +EnDeNd],
+                     [#include <inttypes.h>
+                      MaTcHtHiS PRId64 EnDeNd],
+                     [svn_cv_pycfmt_apr_int64_t="i"])
+      fi
     ])
     CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS"
     if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then

Reply via email to