GNOME Bugzilla – Bug 421607
CFLAGS/LDFLAGS should be used along with PCRE_CFLAGS/PCRE_LIBS
Last modified: 2007-04-11 12:43:13 UTC
Please describe the problem: When building things that use pcre, PCRE_CFLAGS/PCRE_LIBS should be used *in addition to* CFLAGS/LDFLAGS, not instead of them. I have pcre installed in an unusual place, so I set CFLAGS and LDFLAGS when building glib to let it find pcre. But glib's ./configure fails at "checking for Unicode support in PCRE", because it discards CFLAGS/LDFLAGS in favor of PCRE_CFLAGS/PCRE_LIBS. Those variables, set from pkg-config, have almost everything needed to find pcre, but are missing the -R flag for the runtime linker. I included the -R flag in LDFLAGS, but that doesn't help when my LDFLAGS is ignored. Steps to reproduce: 1. Install pcre in a non-default prefix. 2. Build glib with --with-pcre=system. Actual results: configure thinks pcre doesn't have Unicode support because the link fails. Expected results: configure should find pcre, since I gave the necessary flags in CFLAGS/LDFLAGS. Does this happen every time? Yes Other information:
Created attachment 85132 [details] [review] use CFLAGS/LDFLAGS as well as PCRE_CFLAGS/PCRE_LDFLAGS
2007-04-11 Matthias Clasen <mclasen@redhat.com> * configure.in: Use CFLAGS/LDFLAGS in addition to PCRE_CFLAGS/PCRE_LIBS when checking system PCRE. (#421607, Paul Jarc)