You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Randy Kobes <ra...@theoryx5.uwinnipeg.ca> on 2001/07/09 08:27:51 UTC

ModuleConfig on Win32

Hi,
    I've attached a diff for Win32 against the current cvs 
mod_perl that does three things ....

- enables ModuleConfig on Win32: this required adding
the ModuleConfig.c to mod_perl.dsp, as well as adding 
perl_call_handler and perl_get_startup_pool to mod_perl.def.
I tested this out with a relatively simple module, for
which it worked fine.

- copies the Apache and mod_perl header files into the
Perl tree, so that Apache::src can be used on Win32. 
This works only when building mod_perl by giving APACHE_SRC
to 'perl Makefile.PL'. By defining $APACHE_SRC through this
in the top-level Makefile.PL, most of what needs to be done
is already there, except for the mod_perl header files.
The modules/src test is then also enabled for Win32.

- defines the hooks so that the internal/stacked test can be
run. This was done by defining $EVERYTHING in the top-level
Makefile.PL (if APACHE_SRC is given), but disabling PERL_SSI
and PERL_SECTIONS. I'm not sure this is the right thing to 
do for Win32, but ... Enabling the test then also involves some 
changes to t/conf/httpd.conf-win32 to require docs/stacked.pl 
and to set the <Location> used in the test.

All tests passed with perl-5.6.1 (compiled with ActivePerl
compile-time flags) using Apache_1.3.20. 

I was looking at these because, first of all, wanting to see 
if ModuleConfig works on Win32, and also because in
building mod_perl-2.0 for Win32 it seems better not to
have so many if ($Is_Win32) exceptions - the above
is closer in spirit to the Unix build. For these I guess
it would be nice to get some experience and work out 
the bugs in a stable environment ...

best regards,
randy


Re: ModuleConfig on Win32

Posted by Doug MacEachern <do...@covalent.net>.
On Tue, 10 Jul 2001, Randy Kobes wrote:
 
> thanks ... could I bother you for a couple more
> small changes? In enabling the Apache::src test,
> I didn't check properly that it would be skipped if
> mod_perl.so was built thru Visual Studio - this diff:

sure thing, that's in, thanks.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: ModuleConfig on Win32

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
----- Original Message ----- 
From: "Doug MacEachern" <do...@covalent.net>
To: "Randy Kobes" <ra...@theoryx5.uwinnipeg.ca>
Cc: <de...@perl.apache.org>
Sent: Monday, July 09, 2001 10:06 AM
Subject: Re: ModuleConfig on Win32


> On Mon, 9 Jul 2001, Randy Kobes wrote:
> 
> > Hi,
> >     I've attached a diff for Win32 against the current cvs 
> > mod_perl that does three things ....
> 
> cool, thanks randy, applied to cvs.

thanks ... could I bother you for a couple more
small changes? In enabling the Apache::src test,
I didn't check properly that it would be skipped if
mod_perl.so was built thru Visual Studio - this diff:
*************************************************************************
Index: src.t
===================================================================
RCS file: /home/cvspublic/modperl/t/modules/src.t,v
retrieving revision 1.3
diff -u -r1.3 src.t
--- src.t 2001/07/09 15:03:25 1.3
+++ src.t 2001/07/10 05:49:36
@@ -5,7 +5,7 @@
 
 my $i = 0;
 
-# skip_test if WIN32;
+skip_test if (WIN32 and !Apache::src->mmn_eq);
 
 print "1..6\n";
 
*************************************************************************
corrects that - t/modules/src.t is skipped on Win32
if mod_perl.so is built with Visual Studio, and is run
successfully if the build is done with specifying APACHE_SRC
at the 'perl Makefile.PL' stage. The second tweak is
to the top-level Makefile.PL:
*************************************************************************
Index: Makefile.PL
===================================================================
RCS file: /home/cvspublic/modperl/Makefile.PL,v
retrieving revision 1.191
diff -u -r1.191 Makefile.PL
--- Makefile.PL 2001/07/09 15:03:06 1.191
+++ Makefile.PL 2001/07/10 06:29:04
@@ -358,8 +358,9 @@
 if ($vcpp and $win32_args{APACHE_SRC}) {
   $EVERYTHING = 1;
   my $fixed_apsrc = win32_fix_path($win32_args{APACHE_SRC}); 
-  $APACHE_SRC =  -d "$fixed_apsrc/include" ?
-    $fixed_apsrc  : $fixed_apsrc . '/src';
+  $APACHE_SRC =  -d "$fixed_apsrc/include" ? $fixed_apsrc  : 
+    (-d "$fixed_apsrc/src/include" ? $fixed_apsrc . '/src' :
+     die "Cannot find the Apache include directory under $fixed_apsrc");
   $win32_auto = 1;
 }
  
*************************************************************************
which confirms early on that if APACHE_SRC is specified that
the Apache include/ directory can be found. With the way I had
it before, if an APACHE_SRC was given that didn't have an
include/ directory, the build would die saying that Apache 1.3
was needed, which is confusing if someone had simply
mistyped a value for APACHE_SRC.

best regards,
randy



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: ModuleConfig on Win32

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 9 Jul 2001, Randy Kobes wrote:

> Hi,
>     I've attached a diff for Win32 against the current cvs 
> mod_perl that does three things ....

cool, thanks randy, applied to cvs.
 
> I was looking at these because, first of all, wanting to see 
> if ModuleConfig works on Win32, and also because in
> building mod_perl-2.0 for Win32 it seems better not to
> have so many if ($Is_Win32) exceptions - the above
> is closer in spirit to the Unix build. For these I guess
> it would be nice to get some experience and work out 
> the bugs in a stable environment ...

should be much easier to port the 2.0 build system to win32 and easier to
maintain.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org