On Thu, 28 Jun 2007, John Jetmore wrote:

> I think 4.68-PH/13 is causing me build errors on a machine that does not 
> have PCRE installed outside of the version included in exim.  Compilation 
> gives this error:
> 
> gcc pcre_maketables.c
> In file included from pcre_maketables.c:50:
> pcre_internal.h:239:18: pcre.h: No such file or directory

Hmm. I thought I fixed that by adding an explicit -I. to each compile 
step in the src/pcre/Makefile. It fixed a problem for me, but I was
hacking without thinking hard enough, perhaps.

> This patch fixes it:
> --- pcre_internal.h.dist        2007-06-28 09:05:39.000000000 -0500
> +++ pcre_internal.h     2007-06-28 09:06:37.000000000 -0500
> @@ -236,7 +236,7 @@
>   /* Include the public PCRE header and the definitions of UCP character 
> property values. */
> 
> -#include <pcre.h>
> +#include "pcre.h"
>   #include "ucp.h"
> 
>   /* When compiling for use with the Virtual Pascal compiler, these functions
> 
> ...which is all well and good except I see in the cvs diff for PH/13 that 
> it had previously been "pcre.h" and was changed to <pcre.h> for 7.0->7.2. 
> I assume it's an oversight, but you never know...

Somebody wanted this done when we changed over to automake for building 
PCRE. However, I cannot now find the reason/reference. I must say, using 
<pcre.h> does not seem right to me at all, either in Exim or in PCRE 
itself.... Aha! Found the reference:

* Use #include<> instead of #include"" for pcre.h. The latter causes the 
  compiler to look in the same directory as the calling file (ignoring any 
  -I... directives, even), which is trouble if the calling file is in 
  $(srcdir) and pcre.h is in $(builddir). (At least this was the case in 
  Visual Studio.)   

Don't know why I was taken in by that. It is obviously wrong, isn't it?
I think the change was made while in the throes of the 7.0->7.1
building rebuild.

I'll patch Exim, and also make the change in the next PCRE release too.
(There may indeed by a srcdir/builddir problem, but it's not right to 
use <pcre.h>, which gets the installed copy, which might be wrong. If 
there is a problem, it must be solved another way.)

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to