Something test-dev has kicked around that we should pick back up...

>Date: Tue, 29 Jul 2003 09:44:45 -0500 (CDT)
>From: Randy Kobes <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>
>I've been looking at getting apxs for Win32 working on Apache 2.
>There's a number of changes needed due to the current reliance on
>libtool, so initially I've tried just a pure Win32 version - if
>anyone wants to try it, I've put up two files - Configure.apxs
>and apxs.in - at http://theoryx5.uwinnipeg.ca/. Running
>   C:\Some\Path> perl Configure.apxs
>(in the same directory as apxs.in) will guess at your Apache2
>directory (a --with-apache2=... option can be specified to tell
>it explicitly), and then an apxs.bat will be created under
>C:\Path\to\Apache2\bin\, along with the associated
>C:\Path\to\Apache2\build\config_vars.mk.
>
>I've tried using this for the c-modules tests of perl-framework,
>and it seems to work OK, with the following diff applied to
>a couple of files under perl-framework/Apache-Test/lib/Apache:
>
>===========================================================
>Index: TestConfig.pm
>===================================================================
>RCS file: 
>/home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
>retrieving revision 1.165
>diff -u -r1.165 TestConfig.pm
>--- TestConfig.pm       7 Jul 2003 18:42:29 -0000       1.165
>+++ TestConfig.pm       29 Jul 2003 05:51:22 -0000
>@@ -283,7 +283,7 @@
>     $self->{APXS} = $self->default_apxs;
>
>     return unless $self->{APXS};
>-
>+    $self->{APXS} =~ s !/!\\!g if WIN32;
>     my $vars = $self->{vars};
>
>     $vars->{bindir}   ||= $self->apxs('BINDIR', 1);
>Index: TestConfigC.pm
>===================================================================
>RCS file: 
>/home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigC.pm,v
>retrieving revision 1.20
>diff -u -r1.20 TestConfigC.pm
>--- TestConfigC.pm      31 Mar 2003 06:58:40 -0000      1.20
>+++ TestConfigC.pm      29 Jul 2003 05:51:22 -0000
>@@ -76,7 +76,8 @@
> EOF
> }
>
>-my %lib_dir = (1 => "", 2 => ".libs/");
>+my %lib_dir = Apache::TestConfig::WIN32 ? (1 => "", 2 => "") :
>+    (1 => "", 2 => ".libs/");
>
> sub cmodules_build_so {
>     my($self, $name) = @_;
>@@ -135,6 +136,9 @@
>
>     my $lib = $self->cmodules_build_so($name);
>
>+    my $extras;
>+    $extras = ' -llibhttpd -p ' if Apache::TestConfig::WIN32;
>+
>     my $fh = Symbol::gensym();
>     open $fh, ">$makefile" or die "open $makefile: $!";
>
>@@ -143,7 +147,7 @@
> all: $lib
>
> $lib: $name.c
>-       \$(APXS) $dversion -I$self->{cmodules_dir} -c $name.c
>+       \$(APXS) $dversion -I$self->{cmodules_dir} $extras -c $name.c
>
> clean:
>        -rm -rf $name.o $name.lo $name.slo $name.la .libs
>===================================================================
>(there's a failure in building one of the tests due to a
>missing random-ish function). The tests were configured as
>  C:\perl-framework> Perl Makefile.PL -apxs C:\Apache2\bin\apxs
>        -httpd C:\Apache2\bin\Apache.exe
>The reason for specifying both -apxs and -httpd is related to the
>current Apache-Test using the fact that the apxs variable TARGET
>specifies the name of the httpd binary (httpd). On Win32 the
>binary is Apache.exe, but changing the value of TARGET on Win32
>would break assumptions elsewhere that the Apache configuration
>file (httpd.conf on Win32 as well) is TARGET.conf. How to handle
>this better should be looked at.
>
>Merging this Win32 apxs.in and the one in the httpd sources would
>possible, if that was desired.
>
>-- 
>best regards,
>randy kobes


Reply via email to