Author: julianfoad
Date: Mon Feb 12 17:06:07 2018
New Revision: 1824033

URL: http://svn.apache.org/viewvc?rev=1824033&view=rev
Log:
Update our copies of APR utility files to those in our recommended APR version.

Modified:
    subversion/trunk/build/PrintPath
    subversion/trunk/build/ac-macros/find_apr.m4
    subversion/trunk/build/ac-macros/find_apu.m4

Modified: subversion/trunk/build/PrintPath
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/PrintPath?rev=1824033&r1=1824032&r2=1824033&view=diff
==============================================================================
--- subversion/trunk/build/PrintPath (original)
+++ subversion/trunk/build/PrintPath Mon Feb 12 17:06:07 2018
@@ -1,22 +1,19 @@
 #!/bin/sh
 #
-#
-#   Licensed to the Apache Software Foundation (ASF) under one
-#   or more contributor license agreements.  See the NOTICE file
-#   distributed with this work for additional information
-#   regarding copyright ownership.  The ASF licenses this file
-#   to you under the Apache License, Version 2.0 (the
-#   "License"); you may not use this file except in compliance
-#   with the License.  You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
 #
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
-#   Unless required by applicable law or agreed to in writing,
-#   software distributed under the License is distributed on an
-#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#   KIND, either express or implied.  See the License for the
-#   specific language governing permissions and limitations
-#   under the License.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 #
 #
 # Look for program[s] somewhere in $PATH.
@@ -32,9 +29,6 @@
 #
 # Initially written by Jim Jagielski for the Apache configuration mechanism
 #  (with kudos to Kernighan/Pike)
-#
-# This script falls under the Apache License.
-# See http://www.apache.org/docs/LICENSE
 
 ##
 # Some "constants"
@@ -69,7 +63,7 @@ done
 # Finally, we try to determine the best flag to use for
 # test/[] to look for an executable file. OS/2 just has '-r'
 # but with other OSs, we do some funny stuff to check to see
-# if test/[] knows about -x, which is the preferred flag.
+# if test/[] knows about -x, which is the prefered flag.
 ##
 
 if [ "x$os" = "xOS/2" ]

Modified: subversion/trunk/build/ac-macros/find_apr.m4
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/find_apr.m4?rev=1824033&r1=1824032&r2=1824033&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/find_apr.m4 (original)
+++ subversion/trunk/build/ac-macros/find_apr.m4 Mon Feb 12 17:06:07 2018
@@ -1,21 +1,19 @@
-dnl ===================================================================
-dnl   Licensed to the Apache Software Foundation (ASF) under one
-dnl   or more contributor license agreements.  See the NOTICE file
-dnl   distributed with this work for additional information
-dnl   regarding copyright ownership.  The ASF licenses this file
-dnl   to you under the Apache License, Version 2.0 (the
-dnl   "License"); you may not use this file except in compliance
-dnl   with the License.  You may obtain a copy of the License at
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
 dnl
 dnl     http://www.apache.org/licenses/LICENSE-2.0
 dnl
-dnl   Unless required by applicable law or agreed to in writing,
-dnl   software distributed under the License is distributed on an
-dnl   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-dnl   KIND, either express or implied.  See the License for the
-dnl   specific language governing permissions and limitations
-dnl   under the License.
-dnl ===================================================================
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
 dnl
 dnl find_apr.m4 : locate the APR include files and libraries
 dnl
@@ -24,7 +22,8 @@ dnl library. It provides a standardized
 dnl embedding APR into the application source, or locating an installed
 dnl copy of APR.
 dnl
-dnl APR_FIND_APR(srcdir, builddir, implicit-install-check, acceptable-majors)
+dnl APR_FIND_APR(srcdir, builddir, implicit-install-check, acceptable-majors,
+dnl              detailed-check)
 dnl
 dnl   where srcdir is the location of the bundled APR source directory, or
 dnl   empty if source is not bundled.
@@ -41,6 +40,14 @@ dnl   If multiple versions are specified
 dnl   implicit installed search are used, then the first (leftmost) version
 dnl   in the list that is found will be used.  Currently defaults to [0 1].
 dnl
+dnl   where detailed-check is an M4 macro which sets the apr_acceptable to
+dnl   either "yes" or "no". The macro will be invoked for each installed
+dnl   copy of APR found, with the apr_config variable set appropriately.
+dnl   Only installed copies of APR which are considered acceptable by
+dnl   this macro will be considered found. If no installed copies are
+dnl   considered acceptable by this macro, apr_found will be set to either
+dnl   either "no" or "reconfig".
+dnl
 dnl Sets the following variables on exit:
 dnl
 dnl   apr_found : "yes", "no", "reconfig"
@@ -64,7 +71,7 @@ dnl
 AC_DEFUN([APR_FIND_APR], [
   apr_found="no"
 
-  if test "$ac_cv_emxos2" = "yes"; then
+  if test "$target_os" = "os2-emx"; then
     # Scripts don't pass test -x on OS/2
     TEST_X="test -f"
   else
@@ -91,8 +98,8 @@ AC_DEFUN([APR_FIND_APR], [
 
   AC_MSG_CHECKING(for APR)
   AC_ARG_WITH(apr,
-  [  --with-apr=PATH         prefix for installed APR, path to APR build tree,
-                          or the full path to apr-config],
+  [  --with-apr=PATH         prefix for installed APR or the full path to 
+                             apr-config],
   [
     if test "$withval" = "no" || test "$withval" = "yes"; then
       AC_MSG_ERROR([--with-apr requires a directory or file to be provided])
@@ -103,16 +110,28 @@ AC_DEFUN([APR_FIND_APR], [
       for lookdir in "$withval/bin" "$withval"
       do
         if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then
-          apr_found="yes"
           apr_config="$lookdir/$apr_temp_apr_config_file"
+          ifelse([$5], [], [], [
+          apr_acceptable="yes"
+          $5
+          if test "$apr_acceptable" != "yes"; then
+            AC_MSG_WARN([Found APR in $apr_config, but we think it is 
considered unacceptable])
+            continue
+          fi])
+          apr_found="yes"
           break 2
         fi
       done
     done
 
     if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > 
/dev/null 2>&1 ; then
-      apr_found="yes"
       apr_config="$withval"
+      ifelse([$5], [], [apr_found="yes"], [
+          apr_acceptable="yes"
+          $5
+          if test "$apr_acceptable" = "yes"; then
+                apr_found="yes"
+          fi])
     fi
 
     dnl if --with-apr is used, it is a fatal error for its argument
@@ -121,9 +140,43 @@ AC_DEFUN([APR_FIND_APR], [
       AC_MSG_ERROR([the --with-apr parameter is incorrect. It must specify an 
install prefix, a build directory, or an apr-config file.])
     fi
   ],[
-    dnl if we have a bundled source directory, use it
-    if test -d "$1"; then
-      apr_temp_abs_srcdir="`cd $1 && pwd`"
+    dnl If we allow installed copies, check those before using bundled copy.
+    if test -n "$3" && test "$3" = "1"; then
+      for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
+      do
+        if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
+          apr_config="$apr_temp_apr_config_file"
+          ifelse([$5], [], [], [
+          apr_acceptable="yes"
+          $5
+          if test "$apr_acceptable" != "yes"; then
+            AC_MSG_WARN([skipped APR at $apr_config, version not acceptable])
+            continue
+          fi])
+          apr_found="yes"
+          break
+        else
+          dnl look in some standard places
+          for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
+            if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
+              apr_config="$lookdir/bin/$apr_temp_apr_config_file"
+              ifelse([$5], [], [], [
+              apr_acceptable="yes"
+              $5
+              if test "$apr_acceptable" != "yes"; then
+                AC_MSG_WARN([skipped APR at $apr_config, version not 
acceptable])
+                continue
+              fi])
+              apr_found="yes"
+              break 2
+            fi
+          done
+        fi
+      done
+    fi
+    dnl if we have not found anything yet and have bundled source, use that
+    if test "$apr_found" = "no" && test -d "$1"; then
+      apr_temp_abs_srcdir="`cd \"$1\" && pwd`"
       apr_found="reconfig"
       apr_bundled_major="`sed -n 
'/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' 
\"$1/include/apr_version.h\"`"
       case $apr_bundled_major in
@@ -143,25 +196,6 @@ AC_DEFUN([APR_FIND_APR], [
         apr_config="$1/$apr_temp_apr_config_file"
       fi
     fi
-    if test "$apr_found" = "no" && test -n "$3" && test "$3" = "1"; then
-      for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config
-      do
-        if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then
-          apr_found="yes"
-          apr_config="$apr_temp_apr_config_file"
-          break
-        else
-          dnl look in some standard places (apparently not in builtin/default)
-          for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do
-            if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then
-              apr_found="yes"
-              apr_config="$lookdir/bin/$apr_temp_apr_config_file"
-              break 2
-            fi
-          done
-        fi
-      done
-    fi
   ])
 
   AC_MSG_RESULT($apr_found)

Modified: subversion/trunk/build/ac-macros/find_apu.m4
URL: 
http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/find_apu.m4?rev=1824033&r1=1824032&r2=1824033&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/find_apu.m4 (original)
+++ subversion/trunk/build/ac-macros/find_apu.m4 Mon Feb 12 17:06:07 2018
@@ -1,21 +1,19 @@
-dnl ===================================================================
-dnl   Licensed to the Apache Software Foundation (ASF) under one
-dnl   or more contributor license agreements.  See the NOTICE file
-dnl   distributed with this work for additional information
-dnl   regarding copyright ownership.  The ASF licenses this file
-dnl   to you under the Apache License, Version 2.0 (the
-dnl   "License"); you may not use this file except in compliance
-dnl   with the License.  You may obtain a copy of the License at
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
 dnl
 dnl     http://www.apache.org/licenses/LICENSE-2.0
 dnl
-dnl   Unless required by applicable law or agreed to in writing,
-dnl   software distributed under the License is distributed on an
-dnl   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-dnl   KIND, either express or implied.  See the License for the
-dnl   specific language governing permissions and limitations
-dnl   under the License.
-dnl ===================================================================
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
 dnl
 dnl find_apu.m4 : locate the APR-util (APU) include files and libraries
 dnl
@@ -24,7 +22,8 @@ dnl library. It provides a standardized
 dnl embedding APU into the application source, or locating an installed
 dnl copy of APU.
 dnl
-dnl APR_FIND_APU(srcdir, builddir, implicit-install-check, acceptable-majors)
+dnl APR_FIND_APU(srcdir, builddir, implicit-install-check, acceptable-majors,
+dnl              detailed-check)
 dnl
 dnl   where srcdir is the location of the bundled APU source directory, or
 dnl   empty if source is not bundled.
@@ -41,6 +40,14 @@ dnl   If multiple versions are specified
 dnl   implicit installed search are used, then the first (leftmost) version
 dnl   in the list that is found will be used.  Currently defaults to [0 1].
 dnl
+dnl   where detailed-check is an M4 macro which sets the apu_acceptable to
+dnl   either "yes" or "no". The macro will be invoked for each installed
+dnl   copy of APU found, with the apu_config variable set appropriately.
+dnl   Only installed copies of APU which are considered acceptable by
+dnl   this macro will be considered found. If no installed copies are
+dnl   considered acceptable by this macro, apu_found will be set to either
+dnl   either "no" or "reconfig".
+dnl
 dnl Sets the following variables on exit:
 dnl
 dnl   apu_found : "yes", "no", "reconfig"
@@ -73,7 +80,7 @@ dnl
 AC_DEFUN([APR_FIND_APU], [
   apu_found="no"
 
-  if test "$ac_cv_emxos2" = "yes"; then
+  if test "$target_os" = "os2-emx"; then
     # Scripts don't pass test -x on OS/2
     TEST_X="test -f"
   else
@@ -101,8 +108,8 @@ AC_DEFUN([APR_FIND_APU], [
 
   AC_MSG_CHECKING(for APR-util)
   AC_ARG_WITH(apr-util,
-  [  --with-apr-util=PATH    prefix for installed APU, path to APU build tree,
-                          or the full path to apu-config],
+  [  --with-apr-util=PATH    prefix for installed APU or the full path to 
+                             apu-config],
   [
     if test "$withval" = "no" || test "$withval" = "yes"; then
       AC_MSG_ERROR([--with-apr-util requires a directory or file to be 
provided])
@@ -113,16 +120,28 @@ AC_DEFUN([APR_FIND_APU], [
       for lookdir in "$withval/bin" "$withval"
       do
         if $TEST_X "$lookdir/$apu_temp_apu_config_file"; then
-          apu_found="yes"
           apu_config="$lookdir/$apu_temp_apu_config_file"
+          ifelse([$5], [], [], [
+          apu_acceptable="yes"
+          $5
+          if test "$apu_acceptable" != "yes"; then
+            AC_MSG_WARN([Found APU in $apu_config, but it is considered 
unacceptable])
+            continue
+          fi])
+          apu_found="yes"
           break 2
         fi
       done
     done
 
     if test "$apu_found" != "yes" && $TEST_X "$withval" && $withval --help > 
/dev/null 2>&1 ; then
-      apu_found="yes"
       apu_config="$withval"
+      ifelse([$5], [], [apu_found="yes"], [
+          apu_acceptable="yes"
+          $5
+          if test "$apu_acceptable" = "yes"; then
+                apu_found="yes"
+          fi])
     fi
 
     dnl if --with-apr-util is used, it is a fatal error for its argument
@@ -131,9 +150,42 @@ AC_DEFUN([APR_FIND_APU], [
       AC_MSG_ERROR([the --with-apr-util parameter is incorrect. It must 
specify an install prefix, a build directory, or an apu-config file.])
     fi
   ],[
-    dnl if we have a bundled source directory, use it
-    if test -d "$1"; then
-      apu_temp_abs_srcdir="`cd $1 && pwd`"
+    if test -n "$3" && test "$3" = "1"; then
+      for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config
+      do
+        if $apu_temp_apu_config_file --help > /dev/null 2>&1 ; then
+          apu_config="$apu_temp_apu_config_file" 
+          ifelse([$5], [], [], [
+          apu_acceptable="yes"
+          $5
+          if test "$apu_acceptable" != "yes"; then
+            AC_MSG_WARN([skipped APR-util at $apu_config, version not 
acceptable])
+            continue
+          fi])
+          apu_found="yes"
+          break
+        else
+          dnl look in some standard places (apparently not in builtin/default)
+          for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do
+            if $TEST_X "$lookdir/bin/$apu_temp_apu_config_file"; then
+              apu_config="$lookdir/bin/$apu_temp_apu_config_file"
+              ifelse([$5], [], [], [
+              apu_acceptable="yes"
+              $5
+              if test "$apu_acceptable" != "yes"; then
+                AC_MSG_WARN([skipped APR-util at $apu_config, version not 
acceptable])
+                continue
+              fi])
+              apu_found="yes"
+              break 2
+            fi
+          done
+        fi
+      done
+    fi
+    dnl if we have not found anything yet and have bundled source, use that
+    if test "$apu_found" = "no" && test -d "$1"; then
+      apu_temp_abs_srcdir="`cd \"$1\" && pwd`"
       apu_found="reconfig"
       apu_bundled_major="`sed -n 
'/#define.*APU_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' 
\"$1/include/apu_version.h\"`"
       case $apu_bundled_major in
@@ -153,25 +205,6 @@ AC_DEFUN([APR_FIND_APU], [
         apu_config="$1/$apu_temp_apu_config_file"
       fi
     fi
-    if test "$apu_found" = "no" && test -n "$3" && test "$3" = "1"; then
-      for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config
-      do
-        if $apu_temp_apu_config_file --help > /dev/null 2>&1 ; then
-          apu_found="yes"
-          apu_config="$apu_temp_apu_config_file"
-          break
-        else
-          dnl look in some standard places (apparently not in builtin/default)
-          for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do
-            if $TEST_X "$lookdir/bin/$apu_temp_apu_config_file"; then
-              apu_found="yes"
-              apu_config="$lookdir/bin/$apu_temp_apu_config_file"
-              break 2
-            fi
-          done
-        fi
-      done
-    fi
   ])
 
   AC_MSG_RESULT($apu_found)


Reply via email to