develooper Front page | | Postings from November 2008

Re: [svn:PHP-Sandwich] r12056 - PHP-Sandwich/trunk

Thread Previous | Thread Next
David E. Wheeler
November 9, 2008 15:04
Re: [svn:PHP-Sandwich] r12056 - PHP-Sandwich/trunk
Message ID:
On Nov 7, 2008, at 12:22 AM, wrote:

> +# Get prefix. Use script argument as prefix, otherwise use value from
> +# 'php-config'
> +my $prefix = shift @ARGV || ($conf{prefix});
> +die "Failed to find php prefix" if (!defined($prefix) or !-d  
> $prefix);
> +print "using prefix $prefix\n";

I don't think that this is the way to do it, because  
ExtUtils::MakeMaker supports other options to be passed on the command- 
line, like LDFLAGS and LIB. This gets in the way of that by  
potentially shifting off such commands. For example, when I go to  
build on Mac OS X, I have to tell EU::MM where to find

   % perl Makefile.PL LIBS=-L/usr/libexec/apache2
   using php version 5.2.6
   Failed to find php prefix at Makefile.PL line 72.

I should not get that error, but I do, because $prefix is populated  
with "LIBS=-L/usr/libexec/apache2", and it should not be. I think that  
a better approach would be to use environment variables, such as  
DBD::Pg does.

That way you stay out of the way of EU::MM processing. So then users  
would be able to do something like this:

   % PHPHOME=/path/to/php perl Makefile.PL LIBS=-L/usr/libexec/apache2



Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About