In httpd-2.4, the Allow/Deny/Order directives are in mod_access_compat instead of mod_authz_host, and the Satisfy directive is now also in mod_access_compat instead of core. Also allow running test suite if httpd.conf of the Apache we're building against (which is used to configure t/conf/httpd.conf) doesn't load mod_access_compat.

git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1682286 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/t/api/access2_24.t b/t/api/access2_24.t
index 2091693..3852c04 100644
--- a/t/api/access2_24.t
+++ b/t/api/access2_24.t
@@ -7,8 +7,8 @@
 
 if (have_min_apache_version("2.4.0")) {
 
-plan tests => 6, need need_lwp, need_auth, need_access, 'mod_version.c',
-    'HTML::HeadParser';
+plan tests => 6, need need_lwp, need_auth, need_access, 'mod_access_compat.c',
+    'mod_version.c', 'HTML::HeadParser';
 
 my $location = "/TestAPI__access2";
 
diff --git a/t/filter/TestFilter/both_str_req_proxy.pm b/t/filter/TestFilter/both_str_req_proxy.pm
index 8e15816..ed8ac0e 100644
--- a/t/filter/TestFilter/both_str_req_proxy.pm
+++ b/t/filter/TestFilter/both_str_req_proxy.pm
@@ -62,10 +62,21 @@
 <NoAutoConfig>
     <IfModule mod_proxy.c>
         <Proxy http://@servername@:@port@/*>
-            <IfModule @ACCESS_MODULE@>
-                Order Deny,Allow
-                Deny from all
-                Allow from @servername@
+            <IfModule mod_version.c>
+                <IfVersion < 2.3.0>
+                    <IfModule @ACCESS_MODULE@>
+                        Order Deny,Allow
+                        Deny from all
+                        Allow from @servername@
+                    </IfModule>
+                </IfVersion>
+                <IfVersion > 2.4.1>
+                    <IfModule mod_access_compat.c>
+                        Order Deny,Allow
+                        Deny from all
+                        Allow from @servername@
+                    </IfModule>
+                </IfVersion>
             </IfModule>
         </Proxy>
 
diff --git a/t/filter/both_str_req_proxy.t b/t/filter/both_str_req_proxy.t
index e0cc065..ae91fc7 100644
--- a/t/filter/both_str_req_proxy.t
+++ b/t/filter/both_str_req_proxy.t
@@ -6,8 +6,9 @@
 use Apache::TestRequest;
 use Apache::TestUtil;
 
-plan tests => 1, need need_module(qw(mod_proxy proxy_http.c)),
-    need_access;
+my @modules = qw(mod_proxy proxy_http.c);
+push @modules, 'mod_access_compat.c' if have_min_apache_version("2.4.0");
+plan tests => 1, need need_module(@modules), need_access;
 
 my $data = join ' ', 'A'..'Z', 0..9;
 my $expected = lc $data; # that's what the input filter does
diff --git a/t/modules/proxy.t b/t/modules/proxy.t
index 7d82a55..2f4a53f 100644
--- a/t/modules/proxy.t
+++ b/t/modules/proxy.t
@@ -11,8 +11,9 @@
 
 t_debug("connecting to $url");
 
-plan tests => 1, need need_module(qw(mod_proxy proxy_http.c)),
-    need_access;
+my @modules = qw(mod_proxy proxy_http.c);
+push @modules, 'mod_access_compat' if have_min_apache_version("2.4.0");
+plan tests => 1, need need_module(@modules), need_access;
 
 my $expected = "ok";
 my $received = GET_BODY_ASSERT $url;
diff --git a/t/protocol/TestProtocol/pseudo_http.pm b/t/protocol/TestProtocol/pseudo_http.pm
index 63f6dec..3aede65 100644
--- a/t/protocol/TestProtocol/pseudo_http.pm
+++ b/t/protocol/TestProtocol/pseudo_http.pm
@@ -155,9 +155,19 @@
 
   <Location TestProtocol::pseudo_http>
 
-      <IfModule @ACCESS_MODULE@>
-          Order Deny,Allow
-          Allow from @servername@
+      <IfModule mod_version.c>
+          <IfVersion < 2.3.0>
+              <IfModule @ACCESS_MODULE@>
+                  Order Deny,Allow
+                  Allow from @servername@
+              </IfModule>
+          </IfVersion>
+          <IfVersion > 2.4.1>
+              <IfModule mod_access_compat.c>
+                  Order Deny,Allow
+                  Allow from @servername@
+              </IfModule>
+          </IfVersion>
       </IfModule>
 
       <IfModule @AUTH_MODULE@>
@@ -169,7 +179,16 @@
       AuthName TestProtocol::pseudo_http
       AuthType Basic
       Require user stas
-      Satisfy any
+      <IfModule mod_version.c>
+          <IfVersion < 2.3.0>
+              Satisfy any
+          </IfVersion>
+          <IfVersion > 2.4.1>
+              <IfModule mod_access_compat.c>
+                  Satisfy any
+              </IfModule>
+          </IfVersion>
+      </IfModule>
 
   </Location>
 
diff --git a/t/protocol/pseudo_http.t b/t/protocol/pseudo_http.t
index 80b7e73..586c6ac 100644
--- a/t/protocol/pseudo_http.t
+++ b/t/protocol/pseudo_http.t
@@ -22,7 +22,9 @@
 # blocking socket bug fixed in 2.0.52
 my $ok = $^O !~ /^(Open|Net)BSD$/i || need_min_apache_version('2.0.52');
 
-plan tests => 13, need need_auth, need_access, $ok;
+my @modules = ();
+push @modules, 'mod_access_compat.c' if have_min_apache_version("2.4.0");
+plan tests => 13, need need_auth, need_access, @modules, $ok;
 
 {
     # supply correct credential when prompted for such and ask the
diff --git a/t/response/TestAPI/access2_24.pm b/t/response/TestAPI/access2_24.pm
index ed855cc..b9ab26f 100644
--- a/t/response/TestAPI/access2_24.pm
+++ b/t/response/TestAPI/access2_24.pm
@@ -104,7 +104,7 @@
     PerlResponseHandler Apache::TestHandler::ok1
     SetHandler modperl
 
-    <IfModule @ACCESS_MODULE@>
+    <IfModule mod_access_compat.c>
         # needed to test $r->satisfies
         Allow from All
     </IfModule>
@@ -115,7 +115,9 @@
     <Limit POST>
        Require valid-user
     </Limit>
-    Satisfy All
+    <IfModule mod_access_compat.c>
+        Satisfy All
+    </IfModule>
     <IfModule @AUTH_MODULE@>
         # htpasswd -mbc auth-users goo foo
         # htpasswd -mb auth-users bar mar
diff --git a/t/response/TestModules/proxy.pm b/t/response/TestModules/proxy.pm
index 83e6e6e..178ce69 100644
--- a/t/response/TestModules/proxy.pm
+++ b/t/response/TestModules/proxy.pm
@@ -47,10 +47,21 @@
   <VirtualHost TestModules::proxy>
     <IfModule mod_proxy.c>
         <Proxy http://@servername@:@port@/*>
-            <IfModule @ACCESS_MODULE@>
-                Order Deny,Allow
-                Deny from all
-                Allow from @servername@
+            <IfModule mod_version.c>
+                <IfVersion < 2.3.0>
+                    <IfModule @ACCESS_MODULE@>
+                        Order Deny,Allow
+                        Deny from all
+                        Allow from @servername@
+                    </IfModule>
+                </IfVersion>
+                <IfVersion > 2.4.1>
+                    <IfModule mod_access_compat.c>
+                        Order Deny,Allow
+                        Deny from all
+                        Allow from @servername@
+                    </IfModule>
+                </IfVersion>
             </IfModule>
         </Proxy>