After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 421607 - CFLAGS/LDFLAGS should be used along with PCRE_CFLAGS/PCRE_LIBS
CFLAGS/LDFLAGS should be used along with PCRE_CFLAGS/PCRE_LIBS
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.13.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2007-03-22 19:43 UTC by Paul Jarc
Modified: 2007-04-11 12:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use CFLAGS/LDFLAGS as well as PCRE_CFLAGS/PCRE_LDFLAGS (579 bytes, patch)
2007-03-22 19:52 UTC, Paul Jarc
committed Details | Review

Description Paul Jarc 2007-03-22 19:43:17 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:
Comment 1 Paul Jarc 2007-03-22 19:52:57 UTC
Created attachment 85132 [details] [review]
use CFLAGS/LDFLAGS as well as PCRE_CFLAGS/PCRE_LDFLAGS
Comment 2 Matthias Clasen 2007-04-11 12:43:13 UTC
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)