faqts : Computers : Programming : Languages : PHP : Installation and Setup

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

20 of 21 people (95%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

The ./configure script says it can't find some optional .h files even tho i provided the correct path

Jun 16th, 2000 12:30
matt wilkie, Ryan Armanasco,


One bad thing about the PHP ./configure script is that it assumes 
partial directory names for include header files.

I was trying to compile PHP as an Apache module with IMAP.

./configure --with-imap={directory} --with-apache={directory}

It kept refusing to find httpd.h and a few others even tho I supplied 
the correct directory

I noticed that the script adds /lib/ to the end of the imap directory 
you supply and adds /apache/ to the end of the apache one.  This is a 
false assumption in almost every case I have seen.

I searched the configure script to find the lines i was interested in 
to 
see what it was adding to the end of them:

grep "apache" configure

this returned amoungst other things this:

 APACHE_INCLUDE=-"I$withval/apache -I$withval/ssl/include"

showing that it adds /apache to whatever directory you supply.
in my case i made a symlink to the real location of the files:

ln -s /usr/include/apache-1.3/ /usr/local/lib/apache

the above is an example - the /usr/include/apache-1.3 is where my 
httpd.h etc files were REALLY kept /usr/local/lib/apache is where i 
wanted the configure script to think they were, so the command line i 
passed configure had

--with-apache=/usr/local/lib    

because it adds apache to the end for you.

A lot of other options suffer this small annoyance, searching for the 
paths it appends will help you trick it and get some success :)
==================================================================
Also see this entry: 
Do I have to pass a parameter to --with-mysql when configuring?
http://www.faqts.com/knowledge-base/view.phtml/aid/455/fid/34