centos – Compile ModSecurity 3.3 with YAJL

anyone could help? I’m stucked on this.

I already compiled ModSecurity 3.3 on this machine (followed this instructions: https://www.nginx.com/blog/compiling-and-installing-modsecurity-for-open-source-nginx/). Now I’m trying to compile with YAJL (Yet Another JSON Library) to be able to log in JSON format.

I installed yajl and yajl-devel packages with yum. My system is a CentOS Linux release 7.8.2003 (Core).

Some detail about the system and YAJL files present:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/include:/usr/lib64

(root@nginx ModSecurity)# ls /usr/lib64 | grep yajl
libyajl.so
libyajl.so.2
libyajl.so.2.0.4

(root@nginx ModSecurity)# ls /usr/include/yajl/ | grep yajl
yajl_common.h
yajl_gen.h
yajl_parse.h
yajl_tree.h
yajl_version.h```



Output of two variations of ./configure --with-yajl:

```(root@nginx ModSecurity)# ./configure --with-yajl=/usr/include/yajl/
.... output ommited ....
configure: YAJL headers found at: /usr/include/yajl/
configure: error: YAJL was explicitly referenced but it was not found
.... output ommited ....
 

(root@nginx ModSecurity)# ./configure --with-yajl=/usr/lib64/
.... output ommited ....
configure: YAJL library found at: /usr/lib64///libyajl.so
configure: error: YAJL was explicitly referenced but it was not found
.... output ommited ....