GNOME Bugzilla – Bug 300435
e-d-s fails to compile from CVS using pkg-config >= 0.16's pkg.m4
Last modified: 2005-04-20 03:35:57 UTC
Please describe the problem: The PKG_CHECK_MODULES() macro distributed with the new releases of pkg-config is set up to cache pkg-config results between runs, based on the variable prefix passed as the first argument. The EVO_SET_COMPILE_FLAGS() macro always passes "EVOLUTION" as the variable prefix, which triggers the incorrect return of cached values. Steps to reproduce: 1. install pkg-config >= 0.16 (the newest release is 0.17.1) 2. check out evolution-data-server from CVS and run autogen.sh 3. build evolution Actual results: build fails, because the various *_CFLAGS and *_LIBS variables are set wrong. Expected results: build succeeds. Does this happen every time? yes Other information: I'll attach a patch that fixes the problem. The patch works for both new and old pkg-config PKG_CHECK_MODULES() macros, and gives slightly more useful configure output (it doesn't print "checking for EVOLUTION_CFLAGS ..." lots of times ...)
Created attachment 45199 [details] [review] e-d-s-new-pkgconfig.patch The attached patch fixes the EVO_SET_COMPILE_FLAGS() macro to pass through the desired variable prefix to PKG_CHECK_MODULES(). This fixes the compile problems for me with pkg-config-0.17.1, and should cause no problem on pkg-config <= 0.15.
Thanks James. I tried the patch is fixed the compile problem with e-d-s.
*** Bug 301041 has been marked as a duplicate of this bug. ***
JP: does this patch look okay for you? I can apply it if you think it's okay. I am quite confident that the change is correct :)
Looks good. Please commit with appropriate ChangeLog entry.
Checked into the gnome-2-10 and HEAD branches.