Add support for the Solaris platform
authorTomas Carnecky <tom@dbservice.com>
Fri, 30 Apr 2010 19:00:24 +0000 (21:00 +0200)
committerCarl Worth <cworth@cworth.org>
Fri, 4 Jun 2010 01:17:03 +0000 (18:17 -0700)
Like on Mac OS X, the linker doesn't automatically resolve dependencies.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
configure
lib/Makefile.local

index fd189093749e72e0c372f9c6f2ff27f8bb0b303b..40538e14eec0f3aa9263eeb4b0d1b84282837429 100755 (executable)
--- a/configure
+++ b/configure
@@ -258,15 +258,26 @@ else
     have_emacs=0
 fi
 
-printf "Checking for Mac OS X (for shared library)... "
+printf "Checking which platform we are on... "
 if [ `uname` = "Darwin" ] ; then
-    printf "Yes.\n"
-    mac_os_x=1
+    printf "Mac OS X.\n"
+    platform=MACOSX
     linker_resolves_library_dependencies=0
-else
-    printf "No.\n"
-    mac_os_x=0
+elif [ `uname` = "SunOS" ] ; then
+    printf "Solaris.\n"
+    platform=SOLARIS
+    linker_resolves_library_dependencies=0
+elif [ `uname` = "Linux" ] ; then
+    printf "Linux\n"
+    platform=LINUX
     linker_resolves_library_dependencies=1
+else
+    printf "Unknown.\n"
+    cat <<EOF
+
+*** Warning: Unknown platform. Notmuch might or might not build correctly.
+
+EOF
 fi
 
 if [ $errors -gt 0 ]; then
@@ -437,9 +448,8 @@ HAVE_GETLINE = ${have_getline}
 # build its own version)
 HAVE_STRCASESTR = ${have_strcasestr}
 
-# Whether we are building on OS X.  This will affect how we build the
-# shared library.
-MAC_OS_X = ${mac_os_x}
+# Supported platforms (so far) are: LINUX, MACOSX, SOLARIS
+PLATFORM = ${platform}
 
 # Whether the linker will automatically resolve the dependency of one
 # library on another (if not, then linking a binary requires linking
index 0cc1d39fab79ac5353620b8a9791df169bdedc47..62f23169c27aa2bfc5f28b0da83dc038b56332aa 100644 (file)
@@ -22,7 +22,7 @@ LIBNOTMUCH_VERSION_MINOR = 1
 # simply compatible changes to the implementation).
 LIBNOTMUCH_VERSION_RELEASE = 0
 
-ifeq ($(MAC_OS_X),1)
+ifeq ($(PLATFORM),MACOSX)
 LIBRARY_SUFFIX = dylib
 # On OS X, library version numbers go before suffix.
 LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX)