Re: [pcre-dev] Kudos on PCRE 7.2...

Pàgina inicial
Delete this message
Autor: Philip Hazel
Data:  
A: Robert Roessler
CC: pcre-dev
Assumpte: Re: [pcre-dev] Kudos on PCRE 7.2...
On Thu, 30 Aug 2007, Robert Roessler wrote:

> Certainly, anything which made Mr Philip's life easier in terms of maintenance
> and distribution would automatically have something in its favor,


[I'm somewhat amused to be addressed as "Mr Philip". Philip is my first
name; "Mr Hazel" would me more more accurate, though "Dr Hazel" is also
reasonable, as I have a PhD. But I'm quite happy to be called "Philip".]

I obviously wasn't thinking straight when I allowed the #if HAVE_CONFIG_H
thing, because now that I think about it, it is going to trip *me* up
sometime in the future.

The source of Exim (www.exim.org) imports a copy of the PCRE source
files. This goes back to the early days, when PCRE was new and not
likely to be found. One of these days it should be changed to use an
installed version of the library, but that hasn't happened yet. I just
copy in the lastest PCRE sources from time to time.

I now realize that if I copy the latest (7.3) PCRE source files into
the Exim source tree and try to compile, it won't work, because
HAVE_CONFIG_H is not defined.

I understand Daniel's point about people who want to configure using
-Dwhatever instead of config.h, but perhaps the #ifdef is defaulted the
wrong way round. It would be easier (and backwards compatible with
earlier releases) if instead PCRE used #ifndef NO_CONFIG_H instead.
After all, if somebody is using a slew of -Dwhatever, adding one more
shouldn't make much difference.

I am slightly tempted, therefore, to propose the following changes:

(1) Change from HAVE_CONFIG_H to NO_CONFIG_H.
(2) Change from <config.h> to "config.h".
(3) Make sure it's all documented.

However, I realize that HAVE_CONFIG_H is widely used in other software,
so this is a cultural problem. Sigh. It seems to be part of the automake
conventions, as it is apparently generated in the Makefile without being
explicitly asked for. (It's in "configure", but not "configure.ac".)

Philip

--
Philip Hazel, University of Cambridge Computing Service.