# Use pcre-config to set ngx\_feature\_path and ngx\_feature\_libs

**URL:** <https://www.ruby-forum.com/t/use-pcre-config-to-set-ngx-feature-path-and-ngx-feature-libs/225464>\
**Category:** NGINX\
**Created:** [January 9, 2013, 4:49pm UTC](https://www.ruby-forum.com/t/use-pcre-config-to-set-ngx-feature-path-and-ngx-feature-libs/225464 "2013-01-09T16:49:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [January 9, 2013, 4:49pm UTC](https://www.ruby-forum.com/t/use-pcre-config-to-set-ngx-feature-path-and-ngx-feature-libs/225464/1 "2013-01-09T16:49:08Z")

</div>

Hi, there.

Here is a patch for using pcre-config to set ngx\_feature\_path and  
ngx\_feature\_libs.  
I need this since I would like to use pcre 8.32 built from source and  
installed in /opt/lib64/libpcre.so.1.

Could you review this patch?  
Thanks

---

<div class="post-metadata">

**Author:** ![Hiroaki\_Nakamura](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e480ec/32.png) [@Hiroaki\_Nakamura](https://www.ruby-forum.com/u/Hiroaki_Nakamura)\
**Post date:** [January 9, 2013, 5:24pm UTC](https://www.ruby-forum.com/t/use-pcre-config-to-set-ngx-feature-path-and-ngx-feature-libs/225464/2 "2013-01-09T17:24:48Z")

</div>

Hello!

On Thu, Jan 10, 2013 at 12:48:38AM +0900, Hiroaki Nakamura wrote:

> –  
> )Hiroaki Nakamura) [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> - 
> 
> ```
> ngx_feature_libs="`pcre-config --libs`"
> 
> ```
> 
> - 
> - 
> 
> ```
> . auto/feature
> 
> ```
> 
> - 
> 
> ```
> fi
> 
> ```
> 
> - 
> - 
> 
> ```
> if [$ngx_found = no]; then
> 
> ```
> 
> - 
> 
> ```
> # FreeBSD port
> 
> ngx_feature="PCRE library in /usr/local/"
> 
> ```

I don’t think that “`pcre-config --prefix`/include” is a good  
aproach.

Have you considered just using

./configure --with-cc-opt=“-I/path/to/include”  
–with-ld-opt=“-L/path/to/lib” …

?

–  
Maxim D.

> **[F5 NGINX: Built for cloud-native apps. Ready for AI traffic.](https://www.f5.com/products/nginx)**
>
> Deliver modern applications with NGINX. Explore high-performance load balancing, API gateways, and web server solutions trusted by top global enterprises.

---

<div class="post-metadata">

**Author:** ![Hiroaki\_Nakamura](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e480ec/32.png) [@Hiroaki\_Nakamura](https://www.ruby-forum.com/u/Hiroaki_Nakamura)\
**Post date:** [January 9, 2013, 5:47pm UTC](https://www.ruby-forum.com/t/use-pcre-config-to-set-ngx-feature-path-and-ngx-feature-libs/225464/3 "2013-01-09T17:47:01Z")

</div>

Hi!

In my case  
./configure --with-pcre-jit --with-cc-opt=“-I/opt/include”  
–with-ld-opt=“-L/opt/lib64 -lpcre”  
does it!

Now it is properly configured without my patch. I get the following  
output.

Configuration summary

- using system PCRE library

Thank you very much for your help.

2013/1/10 Maxim D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > ```
> > if [$ngx_found = no]; then
> > 
> > ```
> > 
> > - 
> > 
> > ```
> > if [$ngx_found = no]; then
> > 
> > ```
> 
> ./configure --with-cc-opt=“-I/path/to/include” --with-ld-opt=“-L/path/to/lib”  
> …  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)  
> –  
> )Hiroaki Nakamura) [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
