On Mon, 26 Apr 2004, Stas Bekman wrote:
But isn't apxs.bat is a custom script made by Randy? May be it doesn't include those flags?
That's right - I didn't put anything into EXTRA_CPPFLAGS, so it just comes back as an empty string. Should this be considered (by mod_perl) as an "error"? Or should apxs put something into EXTRA_CPPFLAGS, to handle this context?
It's an error, since apxs tells mod_perl that such flag doesn't exist, which indicates that something is wrong. I think apxs.bat should at least support those flags, but return an empty string, if you think they have nothing to return.
mod_perl didn't invent those flags, it's the apxs that provides them. I don't know how did you port apxs to win32, but I'd think that you need to look at apxs to figure out the answer what should be in them. But ideally apxs.bat should support all the same flags that apxs supports. Otherwise the code relying on apxs can't be portable.
But the port of apxs that I did does have an EXTRA_CPPFLAGS, it's just that apxs -q EXTRA_CPPFLAGS returns nothing. That's to be compared to, eg, apxs -q FOO_BAR which gives an apxs error.
Yes, sorry Randy, you are right, it's the apxs() sub problem. It always expects some value, and considers the empty value as a an error.
May be this is a safe change:
Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.160
diff -u -r1.160 Build.pm
--- lib/Apache/Build.pm 5 Apr 2004 21:45:08 -0000 1.160
+++ lib/Apache/Build.pm 26 Apr 2004 18:19:43 -0000
@@ -168,13 +168,13 @@
chomp $val if defined $val; # apxs post-2.0.40 adds a new line unless ($val) {
- error "'$apxs @_' failed:";
-
+ # do we have an error or it's just an empty value?
if (my $error = qx($apxs @_ 2>&1)) {
+ error "'$apxs @_' failed:";
error $error;
}
else {
- error 'unknown error';
+ $val = '';
}
}__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
