GNOME Bugzilla – Bug 668572
glib_cv_g_atomic_lock_free config.cache setting not honored by configure
Last modified: 2012-01-25 04:40:47 UTC
When the glib_cv_g_atomic_lock_free setting is forced by config.cache or by being set as an environment variable before doing ./configure, it's not recognized and the check is always done. Consequently, that setting can't be forced when compiling for some specific hardware configuration.
Created attachment 205969 [details] [review] Proposed patch I'm attaching a patch to fix the bug
There must surely be some better way to deal with this problem. I'm against ad-hoc additions of these tests around a small number of our checks just because those ones are sometimes needed to be overridden by cross-compilers (and have been reported to us). I'm similarly against adding this sort of test to every single check.
Yes, the better way is called AC_CACHE_CHECK()
Created attachment 205996 [details] [review] New patch using AC_CACHE_CHECK Thanks for the suggestion Colin. Ryan, what do you think about this new patch?
Review of attachment 205996 [details] [review]: ::: configure.ac @@ +2340,3 @@ + [glib_cv_g_atomic_lock_free=yes], + [glib_cv_g_atomic_lock_free=no]) + AC_MSG_RESULT($glib_cv_g_atomic_lock_free)]) AC_CACHE_CHECK runs AC_MSG_RESULT for you - you should be seeing double "...yes...yes" right? Just look at the other instances of AC_CACHE_CHECK() that exist in configure.ac now.
Created attachment 206000 [details] [review] New patch You're right about the double "yes". Didn't notice that AC_CACHE_CHECK already printed the result. Now it's done using the same pattern as in "Check for nl_langinfo and CODESET".
Review of attachment 206000 [details] [review]: Looks good, thanks.
The following fix has been pushed: aa95853 Honor the glib_cv_g_atomic_lock_free env var in configure
Created attachment 206052 [details] [review] Honor the glib_cv_g_atomic_lock_free env var in configure This fixes bug: