aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2012-10-24 17:43:28 -0400
committerGravatar David Bremner <bremner@debian.org>2012-10-27 09:35:47 -0300
commitb04c062aee50f456f46bf7f31641384010780791 (patch)
tree821ef65f1cddb5847665f1a6a0b5192efc45f21e
parent0a4663ff43c563ebe25234afb0ae012bc2c42959 (diff)
Support OpenBSD
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>
-rwxr-xr-xconfigure6
-rw-r--r--lib/Makefile.local3
2 files changed, 8 insertions, 1 deletions
diff --git a/configure b/configure
index acb90a8c..232d8477 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 8a9aa28a..34e998f8 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