Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: location of pcre.h



>
> On my RedHat 7.0 system, pcre.h is in /usr/include/pcre, not
> /usr/include or any other standard include path, so compilation of
> Src/Modules/pcre.c fails unless I change the
>
>   #include <pcre.h>
>
> to
>
>   #include <pcre/pcre.h>
>
> Obviously this needs a more general fix, but I'm not sure how to do
> it.
>

Do they have anything else in /usr/include/pcre? Else I'd call this broken
(yet another thing in 7.0).


Obvious fix is to check for both pcre.h and pcre/pcre.h and take whatever
exists

#ifdef HAVE_PCRE_H
#include <pcre.h>
#else
#ifdef HAVE_PCRE_PCRE_H - ick!
#include <pcre/pcre.h>
#else
#error pcre not found
#endif
#endif

Additionally, pcre should be compiled conditionally only if prerequisites
are found (compare termcap.mdd or terminfo.mdd).

-andrej



Messages sorted by: Reverse Date, Date, Thread, Author