GNOME Bugzilla – Bug 708561
Cannot build libgweather on FreeBSD because of lacking _NL_MEASUREMENT_MEASUREMENT
Last modified: 2013-10-16 17:43:45 UTC
I found the use of the _NL_MEASUREMENT_MEASUREMENT constant is started in this bug report: https://bugzilla.gnome.org/show_bug.cgi?id=695873 However, this constant may not be defined on every systems. I found there is a check on this constant in GTK+ configure.ac. Should libgweather add a check for it?
And what do we do if the constant is not there?
GTK+ fallback to metric if _NL_MEASUREMENT_MEASUREMENT does not exist. I found the code in the function _gtk_print_get_default_user_units at gtk/gtkcustompaperunixdialog.c.
Uhm, to be honest I'm not personally interested in FreeBSD support, but I will happily accept a patch, if you can provide one. Thank you very much!
I found there is an old but similar bug report for gweather(gnome-applets): https://bugzilla.gnome.org/show_bug.cgi?id=148049 It just fallback to metric if _NL_MEASUREMENT_MEASUREMENT does not exist, which is the same as GTK+. However, _NL_MEASUREMENT_MEASUREMENT may be an enum, so we should use configure.ac to check it instead of #ifdef.
FWIW, OpenBSD is also lacking _NL_MEASUREMENT_MEASUREMENT.
NetBSD does not have _NL_MEASUREMENT_MEASUREMENT, too.
Created attachment 255844 [details] [review] Add fallback in case _NL_MEASUREMENT_NL_MEASUREMENT_MEASUREMENT
Attached a patch with the solution used in GTK+
Review of attachment 255844 [details] [review]: Looks fine to me. Needs a string freeze approval.
Thanks, this works fine on OpenBSD.
Comment on attachment 255844 [details] [review] Add fallback in case _NL_MEASUREMENT_NL_MEASUREMENT_MEASUREMENT commit 1105cf3c5021f129fbfa090cb843fbd3e70c54f5