httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [apreq-2] passing arguments to apxs via Apache::Test
Date Mon, 19 May 2003 03:44:05 GMT
Joe Schaefer wrote:
> I'd like to use Apache::Test* for testing the 
> apreq-2 filter independently of the perl glue,
> and am planning to put such tests into env/t. 
> 
> The first problem I keep running into is that
> I don't know how to get Apache::Test to pass
> arguments (like -I, -L -l, etc) to apxs before
> it compiles my c-modules in env/c-modules.
> These arguments are really a necessity in order
> to link the c-modules against the (uninstalled)
> apreq-2 library, which is built in src/.libs.
> 
> I doubt what follows is the recommended approach, but
> the workaround I came up with was to do something like
> 
>   % perl Makefile.PL -apxs '"path/to/apxs -I../../src ..."'

> which works if Apache/TestMM.pm and Apache/TestRun.pm
> are patched as below.  Does anyone have of a better way
> to do this?  

Does using env vars help?

% CCFLAGS="-I../../src ..." perl Makefile.PL -apxs path/to/apxs

> Maybe I should just write a custom Makefile for
> the env/c-modules directory?
> 
> Anyways, here's the patch for httpd-test:

that will break other code, since the usage is:

     while (my($key, $val) = each %Apache::TestConfig::Argv) {

> -        $body .= "\n\%Apache::TestConfig::Argv = qw(@Apache::TestMM::Argv);\n";
> +        local $" = '","';
> +        $body .= qq{\n\%Apache::TestConfig::Argv = ("@Apache::TestMM::Argv");\n};

This feature is only relevant for cmodules_write_makefile in 
Apache/TestConfigC.pm, isn't it? so an immediate workaround would be to 
override this function.

Then we can think of how to make the original function accept these 
customizations, via arguments. Originally I thought that we could just add a 
new option: -apxs_args, but I don't think it's a good idea, since it may break 
other usages unrelated to the build of c-modules. So may be something like 
c_modules_apxs_args will be a better idea.

Also, I remember that apxs doesn't work on winFU. If that's true how do these 
things are going to work these?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message