GNOME Bugzilla – Bug 123477
CFLAGS/CPPFLAGS/LDFLAGS in gar.conf.mk don't have desired effect
Last modified: 2005-07-05 18:34:43 UTC
The following lines in gar.conf.mk don't have the desired effect: CPPFLAGS += -I$(DESTDIR)$(includedir) -I$(DESTDIR)/usr/X11R6/include CFLAGS += -I$(DESTDIR)$(includedir) -I$(DESTDIR)/usr/X11R6/include -L$(DESTDIR)$ (libdir) -L$(DESTDIR)/usr/X11R6/lib LDFLAGS += -L$(DESTDIR)$(libdir) -L$(DESTDIR)/usr/X11R6/lib There is a big fat warning about 5 lines before that say DESTDIR isn't defined until install time, which is correct. The result is that -I/usr/X11R6/include and -L/usr/X11R6/lib get added to the search order, when they shouldn't be, which will screw up some software (most notably expat on darwin) that adds the current build directory after the LDFLAGS or CFLAGS included search paths. This also effects the PKG_CONFIG_PATH and the PATH/LD_LIBRARY_PATH settings. Here are more sane settings that don't effect the search path adversely, but have the intended results: # allow us to link to libraries we installed CPPFLAGS += -I$(includedir) CFLAGS += -I$(includedir) -L$(libdir) LDFLAGS += -L$(libdir) # allow us to use programs we just built PATH := $(bindir):$(sbindir):$(PATH) LD_LIBRARY_PATH := $(libdir):$(LD_LIBRARY_PATH) # This is for foo-config chaos PKG_CONFIG_PATH=$(libdir)/pkgconfig:/usr/lib/pkgconfig
Mass re-assign
This is now the default behaviour in the Unstable GARNOME branch since the 2.9.0 release. If nobody complains too loudly, the Stable branch will have the same behaviour as of 2.10.
No complaints obviously. The proposed solution works in stable and unstable branches for quite some time. Closing FIXED.