Don't link libnotmuch if libutil isn't linked in properly.
authorTom Prince <tom.prince@ualberta.net>
Sun, 13 Nov 2011 16:34:42 +0000 (11:34 -0500)
committerDavid Bremner <bremner@debian.org>
Sat, 19 Nov 2011 19:18:05 +0000 (15:18 -0400)
For some reason, on my machine, the link is picking up
/usr/lib/libutil.so instead of util/libutil.a. This causes there to be
undefined symbols in libnotmuch, making it unuseable. This patch causes
the link to fail instead.

lib/Makefile.local

index 57dca702f116a0bdfdb5e171fb008f6503db7ec7..54c4dea4560b422f39a47cc5304b6de0b1a0484d 100644 (file)
@@ -30,7 +30,7 @@ LIBRARY_SUFFIX = so
 LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX)
 SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
 LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
-LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME)
+LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME) -Wl,--no-undefined
 ifeq ($(LIBDIR_IN_LDCONFIG),1)
 ifeq ($(DESTDIR),)
 LIBRARY_INSTALL_POST_COMMAND=ldconfig