GNOME Bugzilla – Bug 674172
glib-2.32.1 misdetects GNUstep as Cocoa
Last modified: 2012-04-20 19:55:04 UTC
(as reported downstream at https://bugs.gentoo.org/show_bug.cgi?id=411981 and https://bugs.gentoo.org/show_bug.cgi?id=412011) glib-2.32.1's configure assumes that the presence of the Foundation/Foundation.h header means that the system is OSX with Cocoa, and adds "-framework Foundation" to LDFLAGS. However, gnustep-base also installs the same header, and "-framework Foundation" in LDFLAGS leads to linking failure on Linux. One simple solution is to check for the presence of GNUstep-specific macros, such as GNUSTEP_BASE_VERSION, that presumably are not defined in Cocoa's Foundation.h.
Created attachment 212114 [details] [review] proposed patch
I wonder what the consequences are for Macs that also have GNUstep installed. Maybe we could try a check for Cocoa.h instead of Foundation.h? It would more accurately reflect what we're trying to test for as well... I'll try both tonight.
I changed the header check to Cocoa.h, but still reviewed and applied the patch, because Cocoa.h is also present in GNUstep.
(In reply to comment #3) > I changed the header check to Cocoa.h, but still reviewed and applied the > patch, because Cocoa.h is also present in GNUstep. Thanks, marking bug as fixed then.
Could you please also apply the patch to glib-2-32 branch?
Applied, thanks.