[PATCH] Fix PCRE detection on OSX.

Tom van der Woerdt info at tvdw.eu
Fri Dec 7 23:04:20 UTC 2012

I'm no nginx developer, but I have to agree with Piotr on this one. The 
./configure command is supposed to check for any system problems and 
determine the proper build configuration or error if that's not 
possible. Anything that could cause the `make` command to fail should be 
checked in the configuration script.

While it's obviously the OS at fault in this case, it is improper 
behavior for the configuration script to succeed if the actual 
compilation will fail.

That said, I believe that the patch is not ideal. Assuming that PCRE is 
not installed when building on Mac is bad behavior. Ideally the 
configuration script would check for the presence of the library. But 
until that is implemented (if ever), this patch is probably the best 


Op 12/7/12 11:52 PM, Piotr Sikora schreef:
> Hey Ruslan,
>> OS X is known to be broken in that respect.
> Yes, it is, which makes this a known problem with an easy fix.
>> That's why MacPorts
>> installs stuff into /opt/local by default, instead of /usr/local.
>> https://trac.macports.org/wiki/FAQ#defaultprefix
>> https://trac.macports.org/wiki/FAQ#usrlocal
> I know, I'm using MacPorts... But enough people was hit by this
> problem that I've decided to "fix" it.
>> But why should nginx care to "fix" this?
>> I think
>>      configure --with-cc-opt="-L/usr/local/lib -I/usr/local/include"
>> should help survive with broken build tools even if you install
>> your stuff into /usr/local.
> Except that nginx's ./configure (called without additional options)
> decides that it "found" PCRE and that it doesn't need any additional
> arguments in order to compile properly.
> Anyway, do you see anything wrong with this patch or is it simply
> "it's not our problem" reasoning?
> Best regards,
> Piotr Sikora
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel

More information about the nginx-devel mailing list