cvs commit: modperl-2.0/t/response/TestApache conftree.pm
dougm 01/04/03 10:01:48 Added: t/response/TestApache conftree.pm Log: add some tests for ap_conftree Revision ChangesPath 1.1 modperl-2.0/t/response/TestApache/conftree.pm Index: conftree.pm === package TestApache::conftree; use strict; use warnings FATAL = 'all'; use Apache::Test; use Apache::TestConfig (); use Apache::Directive (); sub handler { my $r = shift; my $cfg = Apache::TestConfig-thaw; plan $r, tests = 7; ok $cfg; my $vars = $cfg-{vars}; ok $vars; my $tree = Apache::Directive-conftree; ok $tree; my $port = find_config_val($tree, 'Listen'); ok $port; ok $port == $vars-{port}; my $serverroot = find_config_val($tree, 'ServerRoot'); ok $serverroot; ok $serverroot eq qq("$vars-{serverroot}"); 0; } sub find_config_val { my($tree, $directive) = @_; while ($tree) { if ($directive eq $tree-directive) { return $tree-args; } if (my $kid = $tree-first_child) { $tree = $kid; } elsif (my $next = $tree-next) { $tree = $next; } else { if (my $parent = $tree-parent) { $tree = $parent-next; } else { $tree = undef; } } } } 1;
cvs commit: modperl-2.0/lib/Apache Build.pm
dougm 01/04/03 22:27:59 Modified:.Makefile.PL lib/Apache Build.pm Log: do a better job of finding ap_release.h to parse the server version and give more diagnostics if it fails Revision ChangesPath 1.31 +6 -0 modperl-2.0/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl-2.0/Makefile.PL,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- Makefile.PL 2001/04/02 09:17:40 1.30 +++ Makefile.PL 2001/04/04 05:27:59 1.31 @@ -52,6 +52,12 @@ } my $httpd_version = $build-httpd_version; +unless ($httpd_version) { +$build-phat_warn(EOF); +Unable to determine server version, attempting to continue.. +EOF +$httpd_version = 'unknown'; +} printf "Configuring Apache/%s mod_perl/%s Perl/v%vd\n", $httpd_version, $VERSION, $^V; 1.40 +11 -9 modperl-2.0/lib/Apache/Build.pm Index: Build.pm === RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- Build.pm 2001/04/02 07:37:36 1.39 +++ Build.pm 2001/04/04 05:27:59 1.40 @@ -418,11 +418,13 @@ } } -unless ($dir and -d $dir) { -for (@INC) { -last if -d ($dir = "$_/auto/Apache/include"); -} -} +# we not longer install Apache headers, so dont bother looking in @INC +# might end up finding 1.x headers anyhow +#unless ($dir and -d $dir) { +#for (@INC) { +#last if -d ($dir = "$_/auto/Apache/include"); +#} +#} return $self-{dir} = $dir; } @@ -450,16 +452,16 @@ sub ap_includedir { my($self, $d) = @_; -$d ||= $self-dir; - return $self-{ap_includedir} if $self-{ap_includedir} and -d $self-{ap_includedir}; + +$d ||= $self-apxs('-q' = 'INCLUDEDIR') || $self-dir; -if (-e "$d/include/httpd.h") { +if (-e "$d/include/ap_release.h") { return $self-{ap_includedir} = "$d/include"; } -$self-{ap_includedir} = $self-apxs('-q' = 'INCLUDEDIR'); +$self-{ap_includedir} = $d; } #--- parsing apache *.h files ---
cvs commit: modperl-2.0/pod modperl_dev.pod
dougm 01/04/03 22:41:07 Modified:lib/ModPerl BuildOptions.pm MM.pm pod modperl_dev.pod Log: build extensions dynamic by default Revision ChangesPath 1.7 +1 -1 modperl-2.0/lib/ModPerl/BuildOptions.pm Index: BuildOptions.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- BuildOptions.pm 2001/03/26 16:17:06 1.6 +++ BuildOptions.pm 2001/04/04 05:41:06 1.7 @@ -143,7 +143,7 @@ INST_APACHE2 Install *.pm relative to Apache2/ directory PROMPT_DEFAULT Accept default value for all would-be prompts OPTIONS_FILE Read options from given file -DYNAMIC Build Apache::*.xs as dynamic extensions +STATIC_EXTS Build Apache::*.xs as static extensions APXSPath to apxs XS_GLUE_DIR Directories containing extension glue INCLUDE_DIR Add directories to search for header files 1.8 +1 -1 modperl-2.0/lib/ModPerl/MM.pm Index: MM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- MM.pm 2001/03/04 18:43:09 1.7 +++ MM.pm 2001/04/04 05:41:06 1.8 @@ -98,7 +98,7 @@ #they are, unlike 1.xx where *.xs live in src/modules/perl #and are copied to subdir/ if DYNAMIC=1 -unless ($build-{MP_DYNAMIC}) { +if ($build-{MP_STATIC_EXTS}) { #skip .xs - .so if we are linking static my $name = $self-{NAME}; unless ($always_dynamic{$name}) { 1.12 +2 -2 modperl-2.0/pod/modperl_dev.pod Index: modperl_dev.pod === RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- modperl_dev.pod 2001/04/04 04:11:44 1.11 +++ modperl_dev.pod 2001/04/04 05:41:07 1.12 @@ -55,9 +55,9 @@ Build mod_perl as a DSO -=item MP_DYNAMIC +=item MP_STATIC_EXTS -Build Apache::*.xs as dynamic extensions +Build Apache::*.xs as static extensions =item MP_USE_GTOP