Author: svn-role
Date: Mon Nov  7 04:00:09 2022
New Revision: 1905112

URL: http://svn.apache.org/viewvc?rev=1905112&view=rev
Log:
Merge the r1878379 group from trunk:

 * r1878379, r1883719, r1883722, r1884610
   Distinguish configure scripts on release mode and non release mode.
   Justification:
     Building process should not be prevented by swig installed in users'
     environment when users use release tar balls.
   Votes:
     +1: futatuki, stsp, jamessan

Added:
    subversion/branches/1.14.x/aclocal.m4.in
      - copied unchanged from r1884610, subversion/trunk/aclocal.m4.in
Removed:
    subversion/branches/1.14.x/aclocal.m4
Modified:
    subversion/branches/1.14.x/   (props changed)
    subversion/branches/1.14.x/Makefile.in
    subversion/branches/1.14.x/STATUS
    subversion/branches/1.14.x/autogen.sh
    subversion/branches/1.14.x/build/ac-macros/swig.m4
    subversion/branches/1.14.x/configure.ac
    subversion/branches/1.14.x/subversion/bindings/swig/INSTALL

Propchange: subversion/branches/1.14.x/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Nov  7 04:00:09 2022
@@ -14,6 +14,7 @@ TAGS
 tags
 neon
 build-outputs.mk
+aclocal.m4
 autogen-standalone.mk
 autom4te.cache
 gen-make.opts

Propchange: subversion/branches/1.14.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1878379,1883719,1883722,1884610

Modified: subversion/branches/1.14.x/Makefile.in
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/Makefile.in?rev=1905112&r1=1905111&r2=1905112&view=diff
==============================================================================
--- subversion/branches/1.14.x/Makefile.in (original)
+++ subversion/branches/1.14.x/Makefile.in Mon Nov  7 04:00:09 2022
@@ -356,7 +356,7 @@ INSTALL_EXTRA_SWIG_PY=\
       $(INSTALL_DATA) "$$i" $(DESTDIR)$(swig_pydir); \
     done; \
   fi; \
-  $(PYTHON) -c 'import compileall; \
+  $(SWIG_PY_PYTHON) -c 'import compileall; \
     compileall.compile_dir("$(DESTDIR)$(swig_pydir)", 1, "$(swig_pydir)"); \
     compileall.compile_dir("$(DESTDIR)$(swig_pydir_extra)", 1, \
     "$(swig_pydir_extra)");'
@@ -396,7 +396,8 @@ HTTPD_VERSION = @HTTPD_VERSION@
 HTTPD_WHITELIST = @HTTPD_WHITELIST@
 
 PYTHON = @PYTHON@
-PERL = @PERL@
+SWIG_PY_PYTHON = @SWIG_PY_PYTHON@
+SWIG_PL_PERL = @SWIG_PL_PERL@
 
 JDK = @JDK@
 JAVA = @JAVA@
@@ -412,7 +413,7 @@ javahl_compat_CLASSPATH=$(JAVA_CLASSPATH
 javahl_tests_CLASSPATH=$(JAVA_CLASSPATH)
 javahl_compat_tests_CLASSPATH=$(JAVA_CLASSPATH)
 
-RUBY = @RUBY@
+SWIG_RB_RUBY = @SWIG_RB_RUBY@
 RUBY_MAJOR = @RUBY_MAJOR@
 RUBY_MINOR = @RUBY_MINOR@
 RDOC = @RDOC@
@@ -474,6 +475,7 @@ local-distclean: local-clean
 local-extraclean: extraclean-bindings local-distclean
        rm -f $(top_srcdir)/build-outputs.mk \
               $(top_srcdir)/subversion/svn_private_config.h.in \
+              $(top_srcdir)/aclocal.m4 \
               $(top_srcdir)/configure \
               $(top_srcdir)/gen-make.opts \
               $(top_srcdir)/build/config.guess \
@@ -881,13 +883,13 @@ $(SWIG_PL_DIR)/native/Makefile.PL: $(SWI
        ./config.status subversion/bindings/swig/perl/native/Makefile.PL
 
 $(SWIG_PL_DIR)/native/Makefile: libsvn_swig_perl 
$(SWIG_PL_DIR)/native/Makefile.PL
-       cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL PREFIX=$(prefix)
+       cd $(SWIG_PL_DIR)/native; $(SWIG_PL_PERL) Makefile.PL PREFIX=$(prefix)
 
 # There is a "readlink -f" command on some systems for the same purpose,
 # but it's not as portable (e.g. Mac OS X doesn't have it).  These should
 # only be used where Python/Perl are known to be available.
 READLINK_PY=$(PYTHON) -c 'import sys,os; print(os.path.realpath(sys.argv[1]))'
-READLINK_PL=$(PERL) -e 'use Cwd; print Cwd::realpath(shift)'
+READLINK_PL=$(SWIG_PL_PERL) -e 'use Cwd; print Cwd::realpath(shift)'
 
 swig-pl: autogen-swig-pl $(SWIG_PL_DIR)/native/Makefile
        if test "`$(READLINK_PL) $(SWIG_PL_DIR)`" != "`$(READLINK_PL) 
$(SWIG_PL_SRC_DIR)`"; then \
@@ -943,7 +945,7 @@ copy-swig-py: autogen-swig-py swig-py $(
 check-swig-py: swig-py copy-swig-py
        $(TEST_SHLIB_VAR_SWIG_PY) \
        cd $(SWIG_PY_DIR); \
-         $(PYTHON) $(SWIG_PY_SRC_DIR)/tests/run_all.py
+         $(SWIG_PY_PYTHON) $(SWIG_PY_SRC_DIR)/tests/run_all.py
 
 EXTRACLEAN_SWIG_PY=rm -rf $(SWIG_PY_DIR)/svn_*.c $(SWIG_PY_DIR)/core.c \
                           $(SWIG_PY_DIR)/[a-z]*.py
@@ -968,7 +970,7 @@ check-swig-rb: swig-rb svnserve
        $(TEST_SHLIB_VAR_SWIG_RB) \
        cd $(SWIG_RB_DIR); \
          check_rb() { \
-           $(RUBY) -I $(SWIG_RB_SRC_DIR) $(SWIG_RB_SRC_DIR)/test/run-test.rb 
"$$@"; \
+           $(SWIG_RB_RUBY) -I $(SWIG_RB_SRC_DIR) 
$(SWIG_RB_SRC_DIR)/test/run-test.rb "$$@"; \
          }; \
          if check_rb --help 2>&1 | grep -q -- --collector; then \
            check_rb --collector=dir --verbose=$(SWIG_RB_TEST_VERBOSE); \

Modified: subversion/branches/1.14.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/STATUS?rev=1905112&r1=1905111&r2=1905112&view=diff
==============================================================================
--- subversion/branches/1.14.x/STATUS (original)
+++ subversion/branches/1.14.x/STATUS Mon Nov  7 04:00:09 2022
@@ -63,11 +63,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1878379, r1883719, r1883722, r1884610
-   Distinguish configure scripts on release mode and non release mode.
-   Justification:
-     Building process should not be prevented by swig installed in users'
-     environment when users use release tar balls.
-   Votes:
-     +1: futatuki, stsp, jamessan

Modified: subversion/branches/1.14.x/autogen.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/autogen.sh?rev=1905112&r1=1905111&r2=1905112&view=diff
==============================================================================
--- subversion/branches/1.14.x/autogen.sh (original)
+++ subversion/branches/1.14.x/autogen.sh Mon Nov  7 04:00:09 2022
@@ -51,6 +51,17 @@ while test $# != 0; do
       ;;
   esac
 done
+
+# Generate aclocal.m4
+cp -f aclocal.m4.in aclocal.m4
+if test -n "$RELEASE_MODE"; then
+  cat <<EOF >>aclocal.m4
+
+# Generated by 'autogen.sh --release'
+AC_DEFUN([SVN_RELEASE_MODE],[1])
+EOF
+fi
+
 # ### The order of parameters is important; buildcheck.sh depends on it and
 # ### we don't want to copy the fancy option parsing loop there. For the
 # ### same reason, all parameters should be quoted, so that buildcheck.sh

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=1905112&r1=1905111&r2=1905112&view=diff
==============================================================================
--- subversion/branches/1.14.x/build/ac-macros/swig.m4 (original)
+++ subversion/branches/1.14.x/build/ac-macros/swig.m4 Mon Nov  7 04:00:09 2022
@@ -21,33 +21,40 @@ dnl check to see if SWIG is current enou
 dnl
 dnl if it is, then check to see if we have the correct version of python.
 dnl
-dnl if we do, then set up the appropriate SWIG_ variables to build the 
-dnl python bindings.
+dnl if we do, then set up the appropriate SWIG_ variables to build the
+dnl Python, Perl, and Ruby bindings.
 
 AC_DEFUN(SVN_CHECK_SWIG,
 [
-  AC_ARG_WITH(swig,
-              AS_HELP_STRING([--with-swig=PATH],
-                             [Try to use 'PATH/bin/swig' to build the
-                              swig bindings.  If PATH is not specified,
-                              look for a 'swig' binary in your PATH.]),
+  m4_ifndef([SVN_RELEASE_MODE],
   [
-    case "$withval" in
-      "no")
-        SWIG_SUITABLE=no
-        SVN_FIND_SWIG(no)
-      ;;
-      "yes")
-        SVN_FIND_SWIG(required)
+    AC_ARG_WITH(swig,
+                AS_HELP_STRING([--with-swig=PATH],
+                               [Try to use 'PATH/bin/swig' to build the
+                                swig bindings.  If PATH is not specified,
+                                look for a 'swig' binary in your PATH.]),
+    [
+      case "$withval" in
+      yes)
+        svn_find_swig_arg=required
       ;;
       *)
-        SVN_FIND_SWIG($withval)
+        svn_find_swig_arg=$withval
       ;;
-    esac
-  ],
-  [
-    SVN_FIND_SWIG(check)
+      esac
+    ],
+    [
+      if    test "$SWIG_PY_PYTHON" != "none" \
+         || test "$SWIG_PL_PERL"   != "none" \
+         || test "$SWIG_RB_RUBY"   != "none" ; then
+        svn_find_swig_arg=check
+      else
+        svn_find_swig_arg=no
+      fi
+    ])
+    SVN_FIND_SWIG($svn_find_swig_arg)
   ])
+  SVN_DETERMINE_SWIG_OPTS
 ])
 
 AC_DEFUN(SVN_FIND_SWIG,
@@ -69,7 +76,7 @@ AC_DEFUN(SVN_FIND_SWIG,
     fi
     if test ! -f "$SWIG" || test ! -x "$SWIG"; then
       AC_MSG_ERROR([Could not find swig binary at $SWIG])
-    fi 
+    fi
   fi
 
   if test "$SWIG" != "none"; then
@@ -78,7 +85,7 @@ AC_DEFUN(SVN_FIND_SWIG,
                        $SED -ne 's/^.*Version \(.*\)$/\1/p'`"
     # We want the version as an integer so we can test against
     # which version we're using.  SWIG doesn't provide this
-    # to us so we have to come up with it on our own. 
+    # to us so we have to come up with it on our own.
     # The major is passed straight through,
     # the minor is zero padded to two places,
     # and the patch level is zero padded to three places.
@@ -91,100 +98,109 @@ AC_DEFUN(SVN_FIND_SWIG,
     AC_MSG_RESULT([$SWIG_VERSION_RAW])
     # If you change the required swig version number, don't forget to update:
     #   subversion/bindings/swig/INSTALL
-    if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024"; then
-      SWIG_SUITABLE=yes
-    else
-      SWIG_SUITABLE=no
+    if test ! -n "$SWIG_VERSION" || test "$SWIG_VERSION" -lt "103024"; then
       AC_MSG_WARN([Detected SWIG version $SWIG_VERSION_RAW])
       AC_MSG_WARN([Subversion requires SWIG >= 1.3.24])
     fi
   fi
- 
-  SWIG_PY_COMPILE="none"
-  SWIG_PY_LINK="none"
-  SWIG_PY_OPTS="none"
-  SWIG_PY_ERRMSG="check config.log for details"
-  if test "$PYTHON" != "none"; then
-    AC_MSG_NOTICE([Configuring python swig binding])
+])
 
-    AC_CACHE_CHECK([for Python includes], [ac_cv_python_includes],[
-      ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py 
--includes`"
-    ])
-    SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes"
 
-    if test "$ac_cv_python_includes" = "none"; then
-      SWIG_PY_ERRMSG="no distutils found"
-      AC_MSG_WARN([python bindings cannot be built without distutils module])
+AC_DEFUN(SVN_DETERMINE_SWIG_OPTS,
+[
+  m4_ifndef([SVN_RELEASE_MODE],
+  [
+    # not in release mode  
+    SWIG_PY_COMPILE="none"
+    SWIG_PY_LINK="none"
+    SWIG_PY_OPTS="none"
+    SWIG_PY_ERRMSG="check config.log for details"
+    if test "$SWIG_PY_PYTHON" = "none"; then
+      SWIG_PY_ERRMSG="You specfied not to build Python bindings or \
+suitable Python interpreter is not found."
     else
-
-      python_header_found="no"
-
-      save_cppflags="$CPPFLAGS"
-      CPPFLAGS="$CPPFLAGS $ac_cv_python_includes"
-      AC_CHECK_HEADER(Python.h, [
-        python_header_found="yes"
-      ])
-      CPPFLAGS="$save_cppflags"
-
-      if test "$python_header_found" = "no"; then
-        SWIG_PY_ERRMSG="no Python.h found"
-        AC_MSG_WARN([Python.h not found; disabling python swig bindings])
+      if test "$SWIG" = "none"; then
+        AC_MSG_WARN([You specified to build SWIG Python bindings, but SWIG is 
not found.])
+        SWIG_PY_ERRMSG="SWIG is need to build SWIG Python bindings, but it is 
not found."
       else
-        SVN_PY3C()
+        AC_MSG_NOTICE([Configuring python swig binding])
 
-        if test "$py3c_found" = "no"; then
-          SWIG_PY_ERRMSG="py3c library not found"
-          AC_MSG_WARN([py3c library not found; disabling python swig bindings])
+        AC_CACHE_CHECK([for Python includes], [ac_cv_python_includes],[
+        ac_cv_python_includes="`$SWIG_PY_PYTHON 
${abs_srcdir}/build/get-py-info.py --includes`"
+        ])
+        SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes"
+
+        if test "$ac_cv_python_includes" = "none"; then
+          SWIG_PY_ERRMSG="no distutils found"
+          AC_MSG_WARN([python bindings cannot be built without distutils 
module])
         else
-          AC_CACHE_CHECK([for compiling Python extensions], 
[ac_cv_python_compile],[
-            ac_cv_python_compile="`$PYTHON ${abs_srcdir}/build/get-py-info.py 
--compile`"
-          ])
-          SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS"
-      
-          AC_CACHE_CHECK([for linking Python extensions], [ac_cv_python_link],[
-            ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py 
--link`"
-          ])
-          SWIG_PY_LINK="$ac_cv_python_link"
-      
-          AC_CACHE_CHECK([for linking Python libraries], [ac_cv_python_libs],[
-            ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py 
--libs`"
+
+          python_header_found="no"
+
+          save_cppflags="$CPPFLAGS"
+          CPPFLAGS="$CPPFLAGS $ac_cv_python_includes"
+          AC_CHECK_HEADER(Python.h, [
+            python_header_found="yes"
           ])
-          SWIG_PY_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_python_libs)`"
+          CPPFLAGS="$save_cppflags"
 
-          if test "$SWIG" = "none"; then
-            SWIG_PY_ERRMSG=""
+          if test "$python_header_found" = "no"; then
+            SWIG_PY_ERRMSG="no Python.h found"
+            AC_MSG_WARN([Python.h not found; disabling python swig bindings])
           else
-            # 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
+            SVN_PY3C()
+
+            if test "$py3c_found" = "no"; then
+              SWIG_PY_ERRMSG="py3c library not found"
+              AC_MSG_WARN([py3c library not found; disabling python swig 
bindings])
             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=""
+              AC_CACHE_CHECK([for compiling Python extensions], 
[ac_cv_python_compile],[
+                ac_cv_python_compile="`$SWIG_PY_PYTHON 
${abs_srcdir}/build/get-py-info.py --compile`"
+              ])
+              SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS"
+
+              AC_CACHE_CHECK([for linking Python extensions], 
[ac_cv_python_link],[
+                ac_cv_python_link="`$SWIG_PY_PYTHON 
${abs_srcdir}/build/get-py-info.py --link`"
+              ])
+              SWIG_PY_LINK="$ac_cv_python_link"
+
+              AC_CACHE_CHECK([for linking Python libraries], 
[ac_cv_python_libs],[
+                ac_cv_python_libs="`$SWIG_PY_PYTHON 
${abs_srcdir}/build/get-py-info.py --libs`"
+              ])
+              SWIG_PY_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_python_libs)`"
+
+              # 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"
+                $SWIG_PY_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
@@ -192,151 +208,373 @@ AC_DEFUN(SVN_FIND_SWIG,
       fi
     fi
 
-  fi
+    SWIG_PL_ERRMSG="check config.log for details"
+    if test "$SWIG_PL_PERL" = "none"; then
+      SWIG_PL_ERRMSG="You specfied not to build Perl bindings or \
+suitable Perl interpreter is not found."
+    else
+      if test "$SWIG" = "none"; then
+        AC_MSG_WARN([You specified to build SWIG Perl bindings, but SWIG is 
not found.])
+        SWIG_PL_ERRMSG="SWIG is need to build SWIG Perl bindings, but it is 
not found."
+      else
+        AC_MSG_CHECKING([perl version])
+        dnl Note that the q() bit is there to avoid unbalanced brackets
+        dnl which m4 really doesn't like.
+        PERL_VERSION="`$SWIG_PL_PERL -e 'q([[); print $]] * 1000000,$/;'`"
+        AC_MSG_RESULT([$PERL_VERSION])
+        if test "$PERL_VERSION" -ge "5008000"; then
+          SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$SWIG_PL_PERL -MExtUtils::Embed 
-e ccopts`"
+          SWIG_PL_LINK="`$SWIG_PL_PERL -MExtUtils::Embed -e ldopts`"
+          SWIG_PL_LINK="`SVN_REMOVE_STANDARD_LIB_DIRS($SWIG_PL_LINK)`"
 
-  SWIG_PL_ERRMSG="check config.log for details"
-  if test "$PERL" != "none"; then
-    AC_MSG_CHECKING([perl version])
-    dnl Note that the q() bit is there to avoid unbalanced brackets
-    dnl which m4 really doesn't like.
-    PERL_VERSION="`$PERL -e 'q([[); print $]] * 1000000,$/;'`"
-    AC_MSG_RESULT([$PERL_VERSION])
-    if test "$PERL_VERSION" -ge "5008000"; then
-      SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$PERL -MExtUtils::Embed -e ccopts`"
-      SWIG_PL_LINK="`$PERL -MExtUtils::Embed -e ldopts`"
-      SWIG_PL_LINK="`SVN_REMOVE_STANDARD_LIB_DIRS($SWIG_PL_LINK)`"
+          dnl SWIG Perl bindings successfully configured, clear the error 
message
+          SWIG_PL_ERRMSG=""
+        else
+          AC_MSG_WARN([perl bindings require perl 5.8.0 or newer.])
+        fi
+      fi
+    fi
 
-      dnl SWIG Perl bindings successfully configured, clear the error message
-      SWIG_PL_ERRMSG=""
+    SWIG_RB_COMPILE="none"
+    SWIG_RB_LINK="none"
+    SWIG_RB_ERRMSG="check config.log for details"
+    if test "$SWIG_RB_RUBY" = "none"; then
+      SWIG_RB_ERRMSG="You specfied not to build Ruby bindings or \
+suitable Ruby interpreter is not found."
     else
-      AC_MSG_WARN([perl bindings require perl 5.8.0 or newer.])
-    fi
-  fi
+      if test "$SWIG" = "none"; then
+        AC_MSG_WARN([You specified to build SWIG Ruby bindings, but SWIG is 
not found.])
+        SWIG_RB_ERRMSG="SWIG is need to build SWIG Ruby bindings, but it is 
not found."
+      else
+        if test x"$SWIG_VERSION" = x"3""00""008"; then
+          # Use a local variable to escape the '#' sign.
+          
ruby_swig_issue_602='https://subversion.apache.org/docs/release-notes/1.11#ruby-swig-issue-602'
+          AC_MSG_WARN([Ruby bindings are known not to support swig 3.0.8; see 
$ruby_swig_issue_602])
+        fi
+        rbconfig="$SWIG_RB_RUBY -rrbconfig -e "
+
+        for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \
+                        rubyhdrdir rubyarchhdrdir sitedir sitelibdir 
sitearchdir libdir
+        do
+          rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG@<:@'$var_name'@:>@"`
+          eval "rbconfig_$var_name=\"$rbconfig_tmp\""
+        done
+
+        AC_MSG_NOTICE([Configuring Ruby SWIG binding])
+
+        AC_CACHE_CHECK([for Ruby include path], [svn_cv_ruby_includes],[
+        if test -d "$rbconfig_rubyhdrdir"; then
+          dnl Ruby >=1.9
+          svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir"
+          if test -d "$rbconfig_rubyarchhdrdir"; then
+            dnl Ruby >=2.0
+            svn_cv_ruby_includes="$svn_cv_ruby_includes 
-I$rbconfig_rubyarchhdrdir"
+          else
+            svn_cv_ruby_includes="$svn_cv_ruby_includes 
-I$rbconfig_rubyhdrdir/$rbconfig_arch"
+          fi
+        else
+          dnl Ruby 1.8
+          svn_cv_ruby_includes="-I. -I$rbconfig_archdir"
+        fi
+        ])
+        SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes"
 
-  SWIG_RB_COMPILE="none"
-  SWIG_RB_LINK="none"
-  SWIG_RB_ERRMSG="check config.log for details"
-  if test "$RUBY" != "none"; then
-    if test x"$SWIG_VERSION" = x"3""00""008"; then
-      # Use a local variable to escape the '#' sign.
-      
ruby_swig_issue_602='https://subversion.apache.org/docs/release-notes/1.11#ruby-swig-issue-602'
-      AC_MSG_WARN([Ruby bindings are known not to support swig 3.0.8; see 
$ruby_swig_issue_602])
+        AC_CACHE_CHECK([how to compile Ruby extensions], 
[svn_cv_ruby_compile],[
+          svn_cv_ruby_compile="$rbconfig_CC $CFLAGS"
+        ])
+        SWIG_RB_COMPILE="$svn_cv_ruby_compile"
+        SVN_STRIP_FLAG([SWIG_RB_COMPILE], [-ansi])
+        SVN_STRIP_FLAG([SWIG_RB_COMPILE], [-std=c89])
+        SVN_STRIP_FLAG([SWIG_RB_COMPILE], [-std=c90])
+        dnl FIXME: Check that the compiler for Ruby actually supports this flag
+        SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast"
+
+        AC_CACHE_CHECK([how to link Ruby extensions], [svn_cv_ruby_link],[
+          svn_cv_ruby_link="`$SWIG_RB_RUBY -e 'ARGV.shift; print ARGV.join(%q( 
))' \
+                               $rbconfig_LDSHARED`"
+          svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link"
+          svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT"
+        ])
+        SWIG_RB_LINK="$svn_cv_ruby_link"
+
+        AC_CACHE_CHECK([how to link Ruby libraries], [ac_cv_ruby_libs], [
+          ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS"
+        ])
+        SWIG_RB_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_ruby_libs)`"
+
+        AC_MSG_CHECKING([for rb_errinfo])
+        old_CFLAGS="$CFLAGS"
+        old_LIBS="$LIBS"
+        CFLAGS="$CFLAGS $svn_cv_ruby_includes"
+        SVN_STRIP_FLAG([CFLAGS], [-ansi])
+        SVN_STRIP_FLAG([CFLAGS], [-std=c89])
+        SVN_STRIP_FLAG([CFLAGS], [-std=c90])
+        LIBS="$SWIG_RB_LIBS"
+        AC_LINK_IFELSE([AC_LANG_SOURCE([[
+#include <ruby.h>
+int main()
+{rb_errinfo();}]])], have_rb_errinfo="yes", have_rb_errinfo="no")
+        if test "$have_rb_errinfo" = "yes"; then
+          AC_MSG_RESULT([yes])
+          AC_DEFINE([HAVE_RB_ERRINFO], [1],
+                    [Define to 1 if you have the `rb_errinfo' function.])
+        else
+          AC_MSG_RESULT([no])
+        fi
+        CFLAGS="$old_CFLAGS"
+        LIBS="$old_LIBS"
+
+        AC_CACHE_VAL([svn_cv_ruby_sitedir],[
+          svn_cv_ruby_sitedir="$rbconfig_sitedir"
+        ])
+        AC_ARG_WITH([ruby-sitedir],
+        AS_HELP_STRING([--with-ruby-sitedir=SITEDIR],
+                                   [install Ruby bindings in SITEDIR
+                                    (default is same as ruby's one)]),
+        [svn_ruby_installdir="$withval"],
+        [svn_ruby_installdir="$svn_cv_ruby_sitedir"])
+
+        AC_MSG_CHECKING([where to install Ruby scripts])
+        AC_CACHE_VAL([svn_cv_ruby_sitedir_libsuffix],[
+          svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \
+                                            $SED -e "s,^$rbconfig_sitedir,,"`"
+        ])
+        
SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}"
+        AC_MSG_RESULT([$SWIG_RB_SITE_LIB_DIR])
+
+        AC_MSG_CHECKING([where to install Ruby extensions])
+        AC_CACHE_VAL([svn_cv_ruby_sitedir_archsuffix],[
+          svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \
+                                            $SED -e "s,^$rbconfig_sitedir,,"`"
+        ])
+        
SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}"
+        AC_MSG_RESULT([$SWIG_RB_SITE_ARCH_DIR])
+
+        AC_MSG_CHECKING([how to use output level for Ruby bindings tests])
+        AC_CACHE_VAL([svn_cv_ruby_test_verbose],[
+          svn_cv_ruby_test_verbose="normal"
+        ])
+        AC_ARG_WITH([ruby-test-verbose],
+        AS_HELP_STRING([--with-ruby-test-verbose=LEVEL],
+                                   [how to use output level for Ruby bindings 
tests
+                                    (default is normal)]),
+        [svn_ruby_test_verbose="$withval"],
+                      [svn_ruby_test_verbose="$svn_cv_ruby_test_verbose"])
+          SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose"
+          AC_MSG_RESULT([$SWIG_RB_TEST_VERBOSE])
+
+        dnl SWIG Ruby bindings successfully configured, clear the error message
+        SWIG_RB_ERRMSG=""
+      fi
     fi
-    rbconfig="$RUBY -rrbconfig -e "
+  ],
+  [
+    # in release mode  
+    SWIG_PY_COMPILE="none"
+    SWIG_PY_LINK="none"
+    SWIG_PY_OPTS="none"
+    SWIG_PY_ERRMSG="check config.log for details"
+    if test "$SWIG_PY_PYTHON" = "none"; then
+      SWIG_PY_ERRMSG="You specfied not to build Python bindings or \
+suitable Python interpreter is not found."
+    else
+      AC_MSG_NOTICE([Configuring python swig binding])
+
+      AC_CACHE_CHECK([for Python includes], [ac_cv_python_includes],[
+        ac_cv_python_includes="`$SWIG_PY_PYTHON 
${abs_srcdir}/build/get-py-info.py --includes`"
+      ])
+      SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes"
 
-    for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \
-                    rubyhdrdir rubyarchhdrdir sitedir sitelibdir sitearchdir 
libdir
-    do
-      rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG@<:@'$var_name'@:>@"`
-      eval "rbconfig_$var_name=\"$rbconfig_tmp\""
-    done
-
-    AC_MSG_NOTICE([Configuring Ruby SWIG binding])
-
-    AC_CACHE_CHECK([for Ruby include path], [svn_cv_ruby_includes],[
-    if test -d "$rbconfig_rubyhdrdir"; then
-      dnl Ruby >=1.9
-      svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir"
-      if test -d "$rbconfig_rubyarchhdrdir"; then
-        dnl Ruby >=2.0
-        svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir"
+      if test "$ac_cv_python_includes" = "none"; then
+        SWIG_PY_ERRMSG="no distutils found"
+        AC_MSG_WARN([python bindings cannot be built without distutils module])
       else
-        svn_cv_ruby_includes="$svn_cv_ruby_includes 
-I$rbconfig_rubyhdrdir/$rbconfig_arch"
+
+        python_header_found="no"
+
+        save_cppflags="$CPPFLAGS"
+        CPPFLAGS="$CPPFLAGS $ac_cv_python_includes"
+        AC_CHECK_HEADER(Python.h, [
+          python_header_found="yes"
+        ])
+        CPPFLAGS="$save_cppflags"
+
+        if test "$python_header_found" = "no"; then
+          SWIG_PY_ERRMSG="no Python.h found"
+          AC_MSG_WARN([Python.h not found; disabling python swig bindings])
+        else
+          SVN_PY3C()
+
+          if test "$py3c_found" = "no"; then
+            SWIG_PY_ERRMSG="py3c library not found"
+            AC_MSG_WARN([py3c library not found; disabling python swig 
bindings])
+          else
+            AC_CACHE_CHECK([for compiling Python extensions], 
[ac_cv_python_compile],[
+              ac_cv_python_compile="`$SWIG_PY_PYTHON 
${abs_srcdir}/build/get-py-info.py --compile`"
+            ])
+            SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS"
+
+            AC_CACHE_CHECK([for linking Python extensions], 
[ac_cv_python_link],[
+              ac_cv_python_link="`$SWIG_PY_PYTHON 
${abs_srcdir}/build/get-py-info.py --link`"
+            ])
+            SWIG_PY_LINK="$ac_cv_python_link"
+
+            AC_CACHE_CHECK([for linking Python libraries], 
[ac_cv_python_libs],[
+              ac_cv_python_libs="`$SWIG_PY_PYTHON 
${abs_srcdir}/build/get-py-info.py --libs`"
+            ])
+            SWIG_PY_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_python_libs)`"
+
+            SWIG_PY_ERRMSG=""
+          fi
+        fi
       fi
+    fi
+
+    SWIG_PL_ERRMSG="check config.log for details"
+    if test "$SWIG_PL_PERL" = "none"; then
+      SWIG_PL_ERRMSG="You specfied not to build Perl bindings or \
+suitable Perl interpreter is not found."
     else
-      dnl Ruby 1.8
-      svn_cv_ruby_includes="-I. -I$rbconfig_archdir"
+      AC_MSG_CHECKING([perl version])
+      dnl Note that the q() bit is there to avoid unbalanced brackets
+      dnl which m4 really doesn't like.
+      PERL_VERSION="`$SWIG_PL_PERL -e 'q([[); print $]] * 1000000,$/;'`"
+      AC_MSG_RESULT([$PERL_VERSION])
+      if test "$PERL_VERSION" -ge "5008000"; then
+        SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$SWIG_PL_PERL -MExtUtils::Embed 
-e ccopts`"
+        SWIG_PL_LINK="`$SWIG_PL_PERL -MExtUtils::Embed -e ldopts`"
+        SWIG_PL_LINK="`SVN_REMOVE_STANDARD_LIB_DIRS($SWIG_PL_LINK)`"
+
+        dnl SWIG Perl bindings successfully configured, clear the error message
+        SWIG_PL_ERRMSG=""
+      else
+        AC_MSG_WARN([perl bindings require perl 5.8.0 or newer.])
+      fi
     fi
-    ])
-    SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes"
 
-    AC_CACHE_CHECK([how to compile Ruby extensions], [svn_cv_ruby_compile],[
-      svn_cv_ruby_compile="$rbconfig_CC $CFLAGS"
-    ])
-    SWIG_RB_COMPILE="$svn_cv_ruby_compile"
-    SVN_STRIP_FLAG([SWIG_RB_COMPILE], [-ansi])
-    SVN_STRIP_FLAG([SWIG_RB_COMPILE], [-std=c89])
-    SVN_STRIP_FLAG([SWIG_RB_COMPILE], [-std=c90])
-    dnl FIXME: Check that the compiler for Ruby actually supports this flag
-    SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast"
-
-    AC_CACHE_CHECK([how to link Ruby extensions], [svn_cv_ruby_link],[
-      svn_cv_ruby_link="`$RUBY -e 'ARGV.shift; print ARGV.join(%q( ))' \
-                           $rbconfig_LDSHARED`"
-      svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link"
-      svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT"
-    ])
-    SWIG_RB_LINK="$svn_cv_ruby_link"
+    SWIG_RB_COMPILE="none"
+    SWIG_RB_LINK="none"
+    SWIG_RB_ERRMSG="check config.log for details"
+    if test "$SWIG_RB_RUBY" = "none"; then
+      SWIG_RB_ERRMSG="You specfied not to build Ruby bindings or \
+suitable Ruby interpreter is not found."
+    else
+      rbconfig="$SWIG_RB_RUBY -rrbconfig -e "
 
-    AC_CACHE_CHECK([how to link Ruby libraries], [ac_cv_ruby_libs], [
-      ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS"
-    ])
-    SWIG_RB_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_ruby_libs)`"
+      for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \
+                      rubyhdrdir rubyarchhdrdir sitedir sitelibdir sitearchdir 
libdir
+      do
+        rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG@<:@'$var_name'@:>@"`
+        eval "rbconfig_$var_name=\"$rbconfig_tmp\""
+      done
+
+      AC_MSG_NOTICE([Configuring Ruby SWIG binding])
+
+      AC_CACHE_CHECK([for Ruby include path], [svn_cv_ruby_includes],[
+      if test -d "$rbconfig_rubyhdrdir"; then
+        dnl Ruby >=1.9
+        svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir"
+        if test -d "$rbconfig_rubyarchhdrdir"; then
+          dnl Ruby >=2.0
+          svn_cv_ruby_includes="$svn_cv_ruby_includes 
-I$rbconfig_rubyarchhdrdir"
+        else
+          svn_cv_ruby_includes="$svn_cv_ruby_includes 
-I$rbconfig_rubyhdrdir/$rbconfig_arch"
+        fi
+      else
+        dnl Ruby 1.8
+        svn_cv_ruby_includes="-I. -I$rbconfig_archdir"
+      fi
+      ])
+      SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes"
 
-    AC_MSG_CHECKING([for rb_errinfo])
-    old_CFLAGS="$CFLAGS"
-    old_LIBS="$LIBS"
-    CFLAGS="$CFLAGS $svn_cv_ruby_includes"
-    SVN_STRIP_FLAG([CFLAGS], [-ansi])
-    SVN_STRIP_FLAG([CFLAGS], [-std=c89])
-    SVN_STRIP_FLAG([CFLAGS], [-std=c90])
-    LIBS="$SWIG_RB_LIBS"
-    AC_LINK_IFELSE([AC_LANG_SOURCE([[
+      AC_CACHE_CHECK([how to compile Ruby extensions], [svn_cv_ruby_compile],[
+        svn_cv_ruby_compile="$rbconfig_CC $CFLAGS"
+      ])
+      SWIG_RB_COMPILE="$svn_cv_ruby_compile"
+      SVN_STRIP_FLAG([SWIG_RB_COMPILE], [-ansi])
+      SVN_STRIP_FLAG([SWIG_RB_COMPILE], [-std=c89])
+      SVN_STRIP_FLAG([SWIG_RB_COMPILE], [-std=c90])
+      dnl FIXME: Check that the compiler for Ruby actually supports this flag
+      SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast"
+
+      AC_CACHE_CHECK([how to link Ruby extensions], [svn_cv_ruby_link],[
+        svn_cv_ruby_link="`$SWIG_RB_RUBY -e 'ARGV.shift; print ARGV.join(%q( 
))' \
+                             $rbconfig_LDSHARED`"
+        svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link"
+        svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT"
+      ])
+      SWIG_RB_LINK="$svn_cv_ruby_link"
+
+      AC_CACHE_CHECK([how to link Ruby libraries], [ac_cv_ruby_libs], [
+        ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS"
+      ])
+      SWIG_RB_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_ruby_libs)`"
+
+      AC_MSG_CHECKING([for rb_errinfo])
+      old_CFLAGS="$CFLAGS"
+      old_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $svn_cv_ruby_includes"
+      SVN_STRIP_FLAG([CFLAGS], [-ansi])
+      SVN_STRIP_FLAG([CFLAGS], [-std=c89])
+      SVN_STRIP_FLAG([CFLAGS], [-std=c90])
+      LIBS="$SWIG_RB_LIBS"
+      AC_LINK_IFELSE([AC_LANG_SOURCE([[
 #include <ruby.h>
 int main()
 {rb_errinfo();}]])], have_rb_errinfo="yes", have_rb_errinfo="no")
-    if test "$have_rb_errinfo" = "yes"; then
-      AC_MSG_RESULT([yes])
-      AC_DEFINE([HAVE_RB_ERRINFO], [1],
-                [Define to 1 if you have the `rb_errinfo' function.])
-    else
-      AC_MSG_RESULT([no])
-    fi
-    CFLAGS="$old_CFLAGS"
-    LIBS="$old_LIBS"
+      if test "$have_rb_errinfo" = "yes"; then
+        AC_MSG_RESULT([yes])
+        AC_DEFINE([HAVE_RB_ERRINFO], [1],
+                  [Define to 1 if you have the `rb_errinfo' function.])
+      else
+        AC_MSG_RESULT([no])
+      fi
+      CFLAGS="$old_CFLAGS"
+      LIBS="$old_LIBS"
 
-    AC_CACHE_VAL([svn_cv_ruby_sitedir],[
-      svn_cv_ruby_sitedir="$rbconfig_sitedir"
-    ])
-    AC_ARG_WITH([ruby-sitedir],
-    AS_HELP_STRING([--with-ruby-sitedir=SITEDIR],
-                               [install Ruby bindings in SITEDIR
-                                (default is same as ruby's one)]),
-    [svn_ruby_installdir="$withval"],
-    [svn_ruby_installdir="$svn_cv_ruby_sitedir"])
-
-    AC_MSG_CHECKING([where to install Ruby scripts])
-    AC_CACHE_VAL([svn_cv_ruby_sitedir_libsuffix],[
-      svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \
-                                        $SED -e "s,^$rbconfig_sitedir,,"`"
-    ])
-    
SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}"
-    AC_MSG_RESULT([$SWIG_RB_SITE_LIB_DIR])
+      AC_CACHE_VAL([svn_cv_ruby_sitedir],[
+        svn_cv_ruby_sitedir="$rbconfig_sitedir"
+      ])
+      AC_ARG_WITH([ruby-sitedir],
+      AS_HELP_STRING([--with-ruby-sitedir=SITEDIR],
+                                 [install Ruby bindings in SITEDIR
+                                  (default is same as ruby's one)]),
+      [svn_ruby_installdir="$withval"],
+      [svn_ruby_installdir="$svn_cv_ruby_sitedir"])
+
+      AC_MSG_CHECKING([where to install Ruby scripts])
+      AC_CACHE_VAL([svn_cv_ruby_sitedir_libsuffix],[
+        svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \
+                                          $SED -e "s,^$rbconfig_sitedir,,"`"
+      ])
+      
SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}"
+      AC_MSG_RESULT([$SWIG_RB_SITE_LIB_DIR])
 
-    AC_MSG_CHECKING([where to install Ruby extensions])
-    AC_CACHE_VAL([svn_cv_ruby_sitedir_archsuffix],[
-      svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \
-                                        $SED -e "s,^$rbconfig_sitedir,,"`"
-    ])
-    
SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}"
-    AC_MSG_RESULT([$SWIG_RB_SITE_ARCH_DIR])
+      AC_MSG_CHECKING([where to install Ruby extensions])
+      AC_CACHE_VAL([svn_cv_ruby_sitedir_archsuffix],[
+        svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \
+                                          $SED -e "s,^$rbconfig_sitedir,,"`"
+      ])
+      
SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}"
+      AC_MSG_RESULT([$SWIG_RB_SITE_ARCH_DIR])
 
-    AC_MSG_CHECKING([how to use output level for Ruby bindings tests])
-    AC_CACHE_VAL([svn_cv_ruby_test_verbose],[
-      svn_cv_ruby_test_verbose="normal"
-    ])
-    AC_ARG_WITH([ruby-test-verbose],
-    AS_HELP_STRING([--with-ruby-test-verbose=LEVEL],
-                               [how to use output level for Ruby bindings tests
-                                (default is normal)]),
-    [svn_ruby_test_verbose="$withval"],
-                  [svn_ruby_test_verbose="$svn_cv_ruby_test_verbose"])
-      SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose"
-      AC_MSG_RESULT([$SWIG_RB_TEST_VERBOSE])
+      AC_MSG_CHECKING([how to use output level for Ruby bindings tests])
+      AC_CACHE_VAL([svn_cv_ruby_test_verbose],[
+        svn_cv_ruby_test_verbose="normal"
+      ])
+      AC_ARG_WITH([ruby-test-verbose],
+      AS_HELP_STRING([--with-ruby-test-verbose=LEVEL],
+                                 [how to use output level for Ruby bindings 
tests
+                                  (default is normal)]),
+      [svn_ruby_test_verbose="$withval"],
+                    [svn_ruby_test_verbose="$svn_cv_ruby_test_verbose"])
+        SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose"
+        AC_MSG_RESULT([$SWIG_RB_TEST_VERBOSE])
 
-    dnl SWIG Ruby bindings successfully configured, clear the error message
-    SWIG_RB_ERRMSG=""
-  fi
+      dnl SWIG Ruby bindings successfully configured, clear the error message
+      SWIG_RB_ERRMSG=""
+    fi
+  ])
   AC_SUBST(SWIG)
   AC_SUBST(SWIG_PY_INCLUDES)
   AC_SUBST(SWIG_PY_COMPILE)

Modified: subversion/branches/1.14.x/configure.ac
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/configure.ac?rev=1905112&r1=1905111&r2=1905112&view=diff
==============================================================================
--- subversion/branches/1.14.x/configure.ac (original)
+++ subversion/branches/1.14.x/configure.ac Mon Nov  7 04:00:09 2022
@@ -1272,35 +1272,142 @@ AS_HELP_STRING([--enable-gprof],
 
 # Scripting and Bindings languages
 
-# Python: Used for testsuite, and bindings
+# Python: Used for testsuite
 AC_ARG_VAR([PYTHON], [Python interpreter command])
 
 PYTHON="`$abs_srcdir/build/find_python.sh`"
 if test -z "$PYTHON"; then
-  AC_MSG_WARN([Python 2.7 or later is required to run the testsuite])
-  AC_MSG_WARN([or to use the Subversion Python bindings])
+  AC_MSG_WARN([Python 2.7 or later is required to run the testsuite.])
   AC_MSG_WARN([])
   AC_MSG_WARN([If you have a suitable Python installed, but not on the])
   AC_MSG_WARN([PATH, set the environment variable PYTHON to the full path])
   AC_MSG_WARN([to the Python executable, and re-run configure])
+  PYTHON=none
 fi
-AC_PATH_PROGS(PYTHON, "$PYTHON", none)
+AC_SUBST(PYTHON)
 
 # The minimum version for the JVM runtime for our Java bytecode.
 JAVA_OLDEST_WORKING_VER='1.8'
 # SVN_CHECK_JDK sets $JAVA_CLASSPATH
 SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER)
 
-AC_PATH_PROG(PERL, perl, none)
-
+AC_ARG_WITH(swig_perl,
+[AS_HELP_STRING([[--with-swig-perl[=PATH|auto|no]|--without-swig-perl]],
+                [Specify path to SWIG bindings target Perl interpreter
+                 [default=auto]. If the option value is 'auto' or it is not
+                  specfied, search for the Perl program.]
+                m4_ifndef([SVN_RELEASE_MODE],
+                  [[Implies --with-swig=yes if PATH is specfied or Perl 
+                    is found on 'auto' detection.]]))
+],
+[],
+[
+if test -n "$PERL"; then
+  if test "$PERL" = "no" -o "$PERL" = "none"; then
+    with_swig_perl=no
+    AC_MSG_WARN([Disabling the SWIG Perl bindings' build by setting the PERL])
+    AC_MSG_WARN([environment variable to "none" is deprecated.])
+    AC_MSG_WARN([])
+    AC_MSG_WARN([Please use --without-swig-perl instead.])
+  else
+    with_swig_perl=auto
+    AC_MSG_WARN([Specfying the Perl path for SWIG Perl bindings' build])
+    AC_MSG_WARN([by setting the PERL environment variable is deprecated.])
+    AC_MSG_WARN([])
+    AC_MSG_WARN([Please use --with-swig-perl=PATH instead.])
+  fi
+else
+  with_swig_perl=auto
+fi
+])
+case $with_swig_perl in
+  yes|auto|"")
+    # honor PERL variable only if it is set and is full path. 
+    AC_PATH_PROG(PERL, perl, none)
+    SWIG_PL_PERL="$PERL"
+    ;;
+  no|none)
+    SWIG_PL_PERL=none
+    ;;
+  *)
+    SWIG_PL_PERL="$with_swig_perl"
+    ;;
+esac
+AC_SUBST(SWIG_PL_PERL)
+
+# Python: as a target of SWIG Python bindings
+AC_ARG_WITH(swig_python,
+[AS_HELP_STRING([[--with-swig-python[=PATH|auto|no]|--without-swig-python]],
+                [Specify path to SWIG bindings target Python interpreter
+                 [default=auto]. If the option value is 'auto' or it is not
+                 specfied, search for the Python program.]
+                m4_ifndef([SVN_RELEASE_MODE],
+                  [[Implies --with-swig=yes if PATH is specfied or Python
+                    is found on 'auto' detection.]]))
+],
+[],
+[
+  with_swig_python=auto
+])
+case $with_swig_python in
+  yes|auto|"")
+    SWIG_PY_PYTHON="$PYTHON"
+    ;;
+  no|none)
+    SWIG_PY_PYTHON=none
+    ;;
+  *)
+    SWIG_PY_PYTHON="$with_swig_python"
+    ;;
+esac
+AC_SUBST(SWIG_PY_PYTHON)
+
+AC_ARG_WITH(swig_ruby,
+[AS_HELP_STRING([[--with-swig-ruby[=PATH|auto|no]|--without-swig-ruby]],
+                [specify path to SWIG bindings target Ruby interpreter
+                 [default=auto]. If the option value is 'auto' or it is not
+                  specfied, search for the Ruby program.] 
+                m4_ifndef([SVN_RELEASE_MODE],
+                  [[Implies --with-swig=yes if PATH is specfied or Ruby
+                    is found on 'auto' detection.]]))
+],
+[],
+[
 if test -n "$RUBY"; then
-  AC_PATH_PROG(RUBY, "$RUBY", none)
+  if test "$RUBY" = "no" -o "$RUBY" = "none"; then
+    with_swig_ruby=no
+    AC_MSG_WARN([Disabling the SWIG Ruby bindings' build by setting the RUBY])
+    AC_MSG_WARN([environment variable to "none" is deprecated.])
+    AC_MSG_WARN([])
+    AC_MSG_WARN([Please use --without-swig-ruby instead.])
+  else
+    with_swig_ruby="$RUBY"
+    AC_MSG_WARN([Specfying the Ruby path for SWIG Ruby bindings' build])
+    AC_MSG_WARN([by setting the RUBY environment variable is deprecated.])
+    AC_MSG_WARN([])
+    AC_MSG_WARN([Please use --with-swig-ruby=PATH instead.])
+  fi
 else
-  AC_PATH_PROGS(RUBY, ruby ruby1 ruby1.8 ruby18 ruby1.9 ruby19 ruby1.9.3 
ruby193 ruby2 ruby2.0 ruby20 ruby2.1 ruby21 ruby2.2 ruby22 ruby2.3 ruby23 
ruby2.4 ruby24, none)
+  with_swig_ruby=auto
 fi
-if test "$RUBY" != "none"; then
+])
+case $with_swig_ruby in
+  yes|auto|"")
+    # honor RUBY variable only if it is set and is full path. 
+    AC_PATH_PROGS(RUBY, ruby ruby1 ruby1.8 ruby18 ruby1.9 ruby19 ruby1.9.3 
ruby193 ruby2 ruby2.0 ruby20 ruby2.1 ruby21 ruby2.2 ruby22 ruby2.3 ruby23 
ruby2.4 ruby24, none)
+    SWIG_RB_RUBY="$RUBY"
+    ;;
+  no|none)
+    SWIG_RB_RUBY=none
+    ;;
+  *)
+    SWIG_RB_RUBY="$with_swig_ruby"
+    ;;
+esac
+AC_SUBST(SWIG_RB_RUBY)
+if test "$SWIG_RB_RUBY" != "none"; then
   AC_MSG_CHECKING([rb_hash_foreach])
-  if "$RUBY" -r mkmf -e 'exit(have_func("rb_hash_foreach") ? 0 : 1)' 
>/dev/null; then
+  if "$SWIG_RB_RUBY" -r mkmf -e 'exit(have_func("rb_hash_foreach") ? 0 : 1)' 
>/dev/null; then
     AC_MSG_RESULT([yes])
     if test -n "$RDOC"; then
       AC_PATH_PROG(RDOC, "$RDOC", none)
@@ -1308,17 +1415,17 @@ if test "$RUBY" != "none"; then
       AC_PATH_PROGS(RDOC, rdoc rdoc1 rdoc1.8 rdoc18 rdoc1.9 rdoc19 rdoc1.9.3 
rdoc193 rdoc2 rdoc2.0 rdoc20 rdoc2.1 rdoc21 rdoc2.2 rdoc22 rdoc2.3 rdoc23 
rdoc2.4 rdoc24, none)
     fi
     AC_CACHE_CHECK([for Ruby major version], [svn_cv_ruby_major],[
-    svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print 
RbConfig::CONFIG.fetch(%q(MAJOR))'`"
+    svn_cv_ruby_major="`$SWIG_RB_RUBY -rrbconfig -e 'print 
RbConfig::CONFIG.fetch(%q(MAJOR))'`"
     ])
     RUBY_MAJOR="$svn_cv_ruby_major"
 
     AC_CACHE_CHECK([for Ruby minor version], [svn_cv_ruby_minor],[
-    svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print 
RbConfig::CONFIG.fetch(%q(MINOR))'`"
+    svn_cv_ruby_minor="`$SWIG_RB_RUBY -rrbconfig -e 'print 
RbConfig::CONFIG.fetch(%q(MINOR))'`"
     ])
     RUBY_MINOR="$svn_cv_ruby_minor"
 
     AC_CACHE_CHECK([for Ruby teeny version], [svn_cv_ruby_teeny],[
-    svn_cv_ruby_teeny="`$RUBY -rrbconfig -e 'major, minor, teeny = 
RUBY_VERSION.split("."); print teeny;'`"
+    svn_cv_ruby_teeny="`$SWIG_RB_RUBY -rrbconfig -e 'major, minor, teeny = 
RUBY_VERSION.split("."); print teeny;'`"
     ])
     RUBY_TEENY="$svn_cv_ruby_teeny"
     
@@ -1327,13 +1434,13 @@ if test "$RUBY" != "none"; then
     AC_SUBST(RUBY_TEENY)
     if test \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -gt "8" -a "$RUBY_TEENY" 
-lt "3" \); then
       # Disallow Ruby between 1.8.7 and 1.9.3
-      RUBY="none"
+      SWIG_RB_RUBY="none"
       AC_MSG_WARN([The detected Ruby is between 1.9 and 1.9.3])
       AC_MSG_WARN([Only 1.8.x and 1.9.3 or later are supported at this time])
     fi
   else
     AC_MSG_RESULT([no])
-    RUBY="none"
+    SWIG_RB_RUBY="none"
     AC_MSG_WARN([The detected Ruby is too old for Subversion to use])
     AC_MSG_WARN([A Ruby which has rb_hash_foreach is required to use the])
     AC_MSG_WARN([Subversion Ruby bindings])

Modified: subversion/branches/1.14.x/subversion/bindings/swig/INSTALL
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/bindings/swig/INSTALL?rev=1905112&r1=1905111&r2=1905112&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/bindings/swig/INSTALL (original)
+++ subversion/branches/1.14.x/subversion/bindings/swig/INSTALL Mon Nov  7 
04:00:09 2022
@@ -141,21 +141,31 @@ Step 2:  Build and Install Subversion.
 
   See Subversion's own INSTALL file for details.
 
-  Make sure that Subversion's ./configure script sees your installed SWIG!
+  If you are using a Subversion distribution tarball and want to rebuild
+  the SWIG language bindings C source files with your installed SWIG, 
+  you need to execute autogen.sh, because the bundled configure script 
+  and makefiles don't support it.
+
+  If you don't use SWIG bindings C source files already generated,
+  make sure that Subversion's ./configure script sees your installed SWIG!
   It tries to detect SWIG near the very end of its output.
   You can find it by running 'grep "^SWIG=" config.log'.
 
-  Also make sure that the configure script sees the paths to the perl and/or
-  python executable you used to configure SWIG as above.  If it does not then
-  you can specify the correct path by adding PYTHON=/path/to/python or
-  PERL=/path/to/perl onto the command line for configure.  For example:
-       ./configure PYTHON=/usr/bin/python3.7 PERL=/usr/bin/perl5.28.2
+  Also make sure that the configure script sees the paths to the perl,
+  ruby, and/or python executable you used to configure SWIG as above.
+  If it does not then you can specify the correct path by specifying
+  --with-swig-python=/path/to/python, --with-swig-perl=/path/to/perl,
+  and/or --with-swig-ruby=/path/to/ruby to the command line for configure.
+  For example:
+       ./configure --with-swig-python=/usr/bin/python3.7 \
+           --with-swig-perl=/usr/bin/perl5.28.2 \
+           --with-swig-ruby=/usr/bin/ruby2.7
 
   If Subversion's ./configure finds a SWIG that it's happy with, then
   it will build special glue libraries to link svn to the swig bindings:
-    libsvn_swig_py.so (for Python)
-    libsvn_swig_perl.so (for Perl)
-
+    libsvn_swig_py-1.so (for Python)
+    libsvn_swig_perl-1.so (for Perl)
+    libsvn_swig_ruby-1.so (for Ruby)
 
 Step 3:  Install Specific Language Bindings
 
@@ -209,10 +219,10 @@ Step 3:  Install Specific Language Bindi
 *  Perl
 
    Perl 5.8.0 is required.  You can specify the perl binary by passing
-   PERL=/path/to/perl as part of the configure command in the top level
-   of the Subversion source tree.  Make sure that the Perl version used
-   is the same one that you configured SWIG to run against during the
-   SWIG configure (see above).
+   --with-swig-perl=/path/to/perl as an option to the configure command
+   in the top level of the Subversion source tree.  Make sure that the
+   Perl version used is the same one that you configured SWIG to run
+   against during the SWIG configure (see above).
 
    1.  Run `make swig-pl' from the top of the Subversion build tree.
 
@@ -251,10 +261,11 @@ Step 3:  Install Specific Language Bindi
    3. To install, run `make install-swig-rb' from the top of the
       Subversion build tree.
 
-   You can specify the ruby binary by passing RUBY=/path/to/ruby as part
-   of the configure command in the top level of the Subversion source
-   tree. Make sure that the Ruby version used is the same one that you
-   configured SWIG to run against during the SWIG configure (see above).
+   You can specify the ruby binary by passing --with-swig-ruby=/path/to/ruby
+   as an option to the configure command in the top level of the
+   Subversion source tree. Make sure that the Ruby version used is
+   the same one that you configured SWIG to run against during the
+   SWIG configure (see above).
 
 
 BUILDING SWIG BINDINGS FOR SVN ON WINDOWS


Reply via email to