Author: svn-role
Date: Sat Jun 27 04:00:12 2020
New Revision: 1879245

URL: http://svn.apache.org/viewvc?rev=1879245&view=rev
Log:
Merge r1876662 from trunk:

 * r1876662
   Avoid check for SWIG version for Python bindings when --without-swig is
   passed.
   Justification:
     SWIG python bindings should be able to be built without SWIG when we use
     the release tarball
   Votes:
     +1: futatuki, stsp, rhuijben

Modified:
    subversion/branches/1.14.x/   (props changed)
    subversion/branches/1.14.x/STATUS
    subversion/branches/1.14.x/build/ac-macros/swig.m4

Propchange: subversion/branches/1.14.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1876662

Modified: subversion/branches/1.14.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/STATUS?rev=1879245&r1=1879244&r2=1879245&view=diff
==============================================================================
--- subversion/branches/1.14.x/STATUS (original)
+++ subversion/branches/1.14.x/STATUS Sat Jun 27 04:00:12 2020
@@ -63,15 +63,6 @@ Approved changes:
    Votes:
      +1: futatuki, stsp, rhuijben
 
- * r1876662
-   Avoid check for SWIG version for Python bindings when --without-swig is
-   passed.
-   Justification:
-     SWIG python bindings should be able to be built without SWIG when we use
-     the release tarball
-   Votes:
-     +1: futatuki, stsp, rhuijben
-
  * r1876906
    Make gen-make.py --debug work with Python 3
    Justification:

Modified: subversion/branches/1.14.x/build/ac-macros/swig.m4
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/build/ac-macros/swig.m4?rev=1879245&r1=1879244&r2=1879245&view=diff
==============================================================================
--- subversion/branches/1.14.x/build/ac-macros/swig.m4 (original)
+++ subversion/branches/1.14.x/build/ac-macros/swig.m4 Sat Jun 27 04:00:12 2020
@@ -151,38 +151,44 @@ AC_DEFUN(SVN_FIND_SWIG,
           ])
           SWIG_PY_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_python_libs)`"
 
-          AC_CACHE_CHECK([for Python >= 3], [ac_cv_python_is_py3],[
-            ac_cv_python_is_py3="no"
-            $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \
-               ac_cv_python_is_py3="yes"
-          ])
-
-          if test "$ac_cv_python_is_py3" = "yes"; then
-            if test "$SWIG_VERSION" -ge "300010"; then
-              dnl SWIG Python bindings successfully configured, clear the 
error message dnl
-              SWIG_PY_ERRMSG=""
-            else
-              SWIG_PY_ERRMSG="SWIG version is not suitable"
-              AC_MSG_WARN([Subversion Python bindings for Python 3 require 
SWIG 3.0.10 or newer])
-            fi
-            if test "$SWIG_VERSION" -lt "400000"; then
-              SWIG_PY_OPTS="-python -py3 -nofastunpack -modern"
-            else
-              SWIG_PY_OPTS="-python -py3 -nofastunpack"
-            fi
+          if test "$SWIG" = "none"; then
+            SWIG_PY_ERRMSG=""
           else
-            if test "$SWIG_VERSION" -lt "400000"; then
-              SWIG_PY_OPTS="-python -classic"
-              dnl SWIG Python bindings successfully configured, clear the 
error message dnl
-              SWIG_PY_ERRMSG=""
+            # Look more closely at the SWIG and Python versions to
+            # determine SWIG_PY_OPTS. We can skip this if we already
+            # have the SWIG-generated files.
+            AC_CACHE_CHECK([for Python >= 3], [ac_cv_python_is_py3],[
+              ac_cv_python_is_py3="no"
+              $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && 
\
+                 ac_cv_python_is_py3="yes"
+            ])
+  
+            if test "$ac_cv_python_is_py3" = "yes"; then
+              if test "$SWIG_VERSION" -ge "300010"; then
+                dnl SWIG Python bindings successfully configured, clear the 
error message dnl
+                SWIG_PY_ERRMSG=""
+              else
+                SWIG_PY_ERRMSG="SWIG version is not suitable"
+                AC_MSG_WARN([Subversion Python bindings for Python 3 require 
SWIG 3.0.10 or newer])
+              fi
+              if test "$SWIG_VERSION" -lt "400000"; then
+                SWIG_PY_OPTS="-python -py3 -nofastunpack -modern"
+              else
+                SWIG_PY_OPTS="-python -py3 -nofastunpack"
+              fi
             else
-              SWIG_PY_OPTS="-python -nofastunpack"
-              SWIG_PY_ERRMSG="SWIG version is not suitable"
-              AC_MSG_WARN([Subversion Python bindings for Python 2 require 
1.3.24 <= SWIG < 4.0.0])
+              if test "$SWIG_VERSION" -lt "400000"; then
+                SWIG_PY_OPTS="-python -classic"
+                dnl SWIG Python bindings successfully configured, clear the 
error message dnl
+                SWIG_PY_ERRMSG=""
+              else
+                SWIG_PY_OPTS="-python -nofastunpack"
+                SWIG_PY_ERRMSG="SWIG version is not suitable"
+                AC_MSG_WARN([Subversion Python bindings for Python 2 require 
1.3.24 <= SWIG < 4.0.0])
+              fi
             fi
           fi
         fi
-            
       fi
     fi
 


Reply via email to