Apache ./configure can't find pcre-config script

I'm trying to install Apache on Red Hat. It's a system I don't have full control over (my sysadmins have given me a directory to work in). So I've downloaded, configured, and installed APR, APR-Util, and PCRE, in addition to Apache 2.4.7.

I ran the following for APR:

./configure --prefix=/u01/app/apache/apr/
make
make install

Received the warning to remember to run

libtool --finish /usr/local/apr/lib

I changed that to

libtool --finish /u01/app/apache/apr/lib/

and it said it installed the Libraries in that location

Similarly, for APR-Util, ran:

./configure --prefix=/u01/app/apache/apr-util/ --with-apr=/u01/app/apache/apr/bin
make
make install

Told me the Libraries were installed in /u01/app/apache/apr-util//lib

Next, PCRE:

./configure --prefix=/u01/app/apache/pcre/ --with-apr=/u01/app/apache/apr/bin --with-apr-util=/u01/app/apache/apr-util/bin
make
make install

So far, no problems. Now I try to configure apache

./configure --prefix=/u01/app/apache/apache247/ --with-apr=/u01/app/apache/apr/bin --with-apr-util=/u01/app/apache/apr-util/bin --with-pcre=/u01/app/apache/pcre/bin

It finds APR and APR-Util, but of course, I get the error "Did not find pcre-config script at /u01/app/apache/pcre/bin". Why, I don't know, as the file is there at that location. What am I doing wrong? Thanks!


Solution 1:

I solved it by specifying the full path to the pcre-config file. In other words, instead of:

--with-pcre=/u01/app/apache/pcre/bin

I did:

--with-pcre=/u01/app/apache/pcre/bin/pcre-config