To fix an old (and probably no longer manifest) build bug, this commit
adds the ability to detect an 8-bit libpcre2 with pkg-config in
addition to the other methods of specifying/detecting it. The
intention is that pkg-config will be used only in the default case,
where pcre support is detected automatically; that is, NOT in either
of these cases:
* --with-pcre=<path> is given
* --with-pcre=no is given
The code in pcre.m4 was modified minimally so that --with-pcre=yes
(the default) tries pkg-config first, and then falls back to whatever
it used to do. If pkg-config can find the library, we add PCRE_LIBS
to the LIBS variable and we're done. Otherwise, the old behavior is
retained.
ClamAV-bug: https://bugzilla.clamav.net/show_bug.cgi?id=12484
Gentoo-bug: https://bugs.gentoo.org/567680
This commit also collects the preprocessor flags obtained from
pkg-config.
When libpcre2 is found using pkg-config, we now say that explicitly,
and include its PCRE_LIBS and PCRE_CFLAGS in the output.
pull/136/head
Michael Orlitzky5 years agocommitted byMicah Snyder (micasnyd)