From: Ludovic LANGE <ll-notmuchmail@lange.nom.fr>
To: notmuch@notmuchmail.org
Subject: [PATCH] ruby: allow bindings to compile on Mac OS X
Date: Sun, 16 Nov 2014 21:48:26 +0100 [thread overview]
Message-ID: <1416170906-23415-1-git-send-email-ll-notmuchmail@lange.nom.fr> (raw)
On OS X, the library ends with .dylib (instead of .so). I also added
the .dll handling in any case.
Also, the flags '-Wl,--no-undefined' seems not accepted, so I excluded
them on OS X (only)
---
bindings/ruby/extconf.rb | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb
index 6160db2..f9a7159 100644
--- a/bindings/ruby/extconf.rb
+++ b/bindings/ruby/extconf.rb
@@ -11,7 +11,9 @@ dir = File.join('..', '..', 'lib')
$INCFLAGS = "-I#{dir} #{$INCFLAGS}"
# make sure there are no undefined symbols
-$LDFLAGS += ' -Wl,--no-undefined'
+if CONFIG["arch"] !~ /darwin/
+ $LDFLAGS += " -Wl,--no-undefined"
+end
def have_local_library(lib, path, func, headers = nil)
checking_for checking_message(func, lib) do
@@ -22,9 +24,9 @@ def have_local_library(lib, path, func, headers = nil)
end
end
-if not have_local_library('libnotmuch.so', dir, 'notmuch_database_create', 'notmuch.h')
- exit 1
-end
+['so', 'dylib', 'dll'].detect(lambda { print "Local library notmuch seems absent\n"; exit }) { |ext|
+ have_local_library("libnotmuch.#{ext}", dir, 'notmuch_database_create', 'notmuch.h')
+}
# Create Makefile
dir_config('notmuch')
--
1.8.0
next reply other threads:[~2014-11-16 20:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-16 20:48 Ludovic LANGE [this message]
2014-12-31 21:19 ` [PATCH] ruby: allow bindings to compile on Mac OS X David Bremner
2015-01-01 12:22 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1416170906-23415-1-git-send-email-ll-notmuchmail@lange.nom.fr \
--to=ll-notmuchmail@lange.nom.fr \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).