Permalink
Browse files

passenger-install-apache2-module: do not unnecessarily donwload PCRE;…

… mimic Nginx's PCRE autodetection routines.
  • Loading branch information...
1 parent 9e62b29 commit 9ff0e2ac853d62228bfc9404e621c7e6d6166bb2 @FooBarWidget FooBarWidget committed Aug 24, 2009
Showing with 9 additions and 1 deletion.
  1. +5 −0 NEWS
  2. +4 −1 bin/passenger-install-nginx-module
View
5 NEWS
@@ -56,6 +56,11 @@ Release 2.2.5
Nginx configure script when --auto-download is given. This has been
fixed: bug #349.
+ * [Nginx] Fixed unnecessary download of PCRE
+ The installer now checks whether PCRE is installed in /opt/local (e.g.
+ MacPorts) as well before concluding that it isn't installed and going ahead
+ with downloading PCRE.
+
* Fixed STDERR capturing
While spawning an application, Phusion Passenger captures any output written
to STDERR so that it can show them later if the application failed to start.
@@ -396,7 +396,10 @@ private
f.puts("#include <pcre.h>")
end
Dir.chdir('/tmp') do
- system("(gcc -c passenger-check.c) >/dev/null 2>/dev/null")
+ # Nginx checks for PCRE in multiple places...
+ system("(gcc -I/usr/local/include -I/usr/include/pcre " <<
+ "-I/usr/pkg/include -I/opt/local/include " <<
+ "-c passenger-check.c) >/dev/null 2>/dev/null")
end
ensure
File.unlink('/tmp/passenger-check.c') rescue nil

0 comments on commit 9ff0e2a

Please sign in to comment.