Author: aff
Date: Mon Nov 10 02:46:39 2008
New Revision: 12059
Modified:
PHP-Sandwich/trunk/Makefile.PL
Log:
Use environment variable 'PHP_PREFIX' instead of @ARGV, thanks to
David E. Wheeler.
Added pod section TROUBLESHOOTING.
Modified: PHP-Sandwich/trunk/Makefile.PL
==============================================================================
--- PHP-Sandwich/trunk/Makefile.PL (original)
+++ PHP-Sandwich/trunk/Makefile.PL Mon Nov 10 02:46:39 2008
@@ -68,7 +68,7 @@
# Get prefix. Use script argument as prefix, otherwise use value from
# 'php-config'
-my $prefix = shift @ARGV || ($conf{prefix});
+my $prefix = $ENV{PHP_PREFIX} || ($conf{prefix});
die "Failed to find php prefix" if (!defined($prefix) or !-d $prefix);
print "using prefix $prefix\n";
@@ -121,12 +121,17 @@
=head1 SYNOPSIS
- perl Makefile.PL [prefix]
+ # Set PHP_PREFIX (optional)
+ PHP_PREFIX=/usr/local
+ # Create makefile
+ perl Makefile.PL
+
=head1 OPTIONS
- prefix - directory root for PHP install, e.g. /usr/local or
- C:\\Program Files\\PHP
+Valid environment variables are
+
+ PHP_PREFIX
=head1 DESCRIPTION
@@ -139,7 +144,21 @@
PHP::Interpreter works with PHP5 only.
This script will perform header files check if module I<File::Find> is
-installed
+installed.
+
+=head1 TROUBLESHOOTING
+
+=head2 PHP5 LIBRARIES NOT FOUND
+
+If the php5 libraries cannot be found, then the install will not
+work:
+
+ Note (probably harmless): No library found for -lphp5
+
+You can resolve this problem by setting I<PHP_PREFIX> to the root
+directory of you PHP install. Do also make sure that your install of
+PHP is supported by this version of PHP::Interpreter (see the README
+file).
=head1 SEE ALSO
Thread Next