OS X 10.6.8 has a built-in library named libutil.dylib and a version of ld that picks that up instead of util/libutil.a. We now use an absolute path to util/libutil.a, so that notmuch can be built successfully on 10.6.8. --- Makefile.local | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.local b/Makefile.local index 61a9c4c..c82b43a 100644 --- a/Makefile.local +++ b/Makefile.local @@ -43,10 +43,16 @@ GPG_FILE=$(SHA1_FILE).asc PV_FILE=bindings/python/notmuch/version.py +# Mac OS X 10.6 has a built-in libutil.dylib that prevents ld from +# picking up notmuch's libutil.a. The best way to prefer our local +# libutil.a is to specify it via absolute path, which should work on +# all supported OSes. +LIBUTIL_PATH=${srcdir}/util/libutil.a + # Smash together user's values with our extra values FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS) FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CONFIGURE_CXXFLAGS) -FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch +FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) $(LIBUTIL_PATH) -Llib -lnotmuch -Wl,-t ifeq ($(LIBDIR_IN_LDCONFIG),0) FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS) endif -- 1.8.1.3