* [PATCH] Support OpenBSD
@ 2012-10-24 21:43 Austin Clements
2012-10-25 18:42 ` Ethan Glasser-Camp
2012-10-27 12:47 ` David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: Austin Clements @ 2012-10-24 21:43 UTC (permalink / raw)
To: notmuch; +Cc: ccutler
OpenBSD's build flags are identical to FreeBSD, except that libraries
need to be explicitly linked against libc. No code changes are
necessary.
From: Cody Cutler <ccutler@csail.mit.edu>
---
configure | 6 +++++-
lib/Makefile.local | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index acb90a8..232d847 100755
--- a/configure
+++ b/configure
@@ -378,6 +378,10 @@ elif [ $uname = "FreeBSD" ] ; then
printf "FreeBSD.\n"
platform=FREEBSD
linker_resolves_library_dependencies=0
+elif [ $uname = "OpenBSD" ] ; then
+ printf "OpenBSD.\n"
+ platform=OPENBSD
+ linker_resolves_library_dependencies=0
elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then
printf "$uname\n"
platform="$uname"
@@ -667,7 +671,7 @@ HAVE_GETLINE = ${have_getline}
# build its own version)
HAVE_STRCASESTR = ${have_strcasestr}
-# Supported platforms (so far) are: LINUX, MACOSX, SOLARIS, FREEBSD
+# Supported platforms (so far) are: LINUX, MACOSX, SOLARIS, FREEBSD, OPENBSD
PLATFORM = ${platform}
# Whether the linker will automatically resolve the dependency of one
diff --git a/lib/Makefile.local b/lib/Makefile.local
index 8a9aa28..34e998f 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -31,6 +31,9 @@ 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) -Wl,--no-undefined
+ifeq ($(PLATFORM),OPENBSD)
+LIBRARY_LINK_FLAG += -lc
+endif
ifeq ($(LIBDIR_IN_LDCONFIG),1)
ifeq ($(DESTDIR),)
LIBRARY_INSTALL_POST_COMMAND=ldconfig
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-27 12:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-24 21:43 [PATCH] Support OpenBSD Austin Clements
2012-10-25 18:42 ` Ethan Glasser-Camp
2012-10-27 12:47 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).