aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'bindings')
-rw-r--r--bindings/ruby/defs.h2
-rw-r--r--bindings/ruby/extconf.rb24
2 files changed, 4 insertions, 22 deletions
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index 85d8205e..3f9512ba 100644
--- a/bindings/ruby/defs.h
+++ b/bindings/ruby/defs.h
@@ -21,8 +21,8 @@
#ifndef DEFS_H
#define DEFS_H
+#include <notmuch.h>
#include <ruby.h>
-#include "notmuch.h"
VALUE notmuch_rb_cDatabase;
VALUE notmuch_rb_cDirectory;
diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb
index 933f34a9..7b9750f2 100644
--- a/bindings/ruby/extconf.rb
+++ b/bindings/ruby/extconf.rb
@@ -5,27 +5,9 @@
require 'mkmf'
-NOTDIR = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
-NOTHDR = File.join(NOTDIR, 'notmuch.h')
-NOTLIB = File.join(NOTDIR, 'libnotmuch.a')
-
-unless File.exists? NOTHDR
- $stderr.puts "notmuch.h is missing under #{NOTDIR}"
- exit 1
-end
-
-unless File.exists? NOTLIB
- $stderr.puts "libnotmuch.a is missing under #{NOTDIR}"
- exit 1
-end
-
-# Small hack to build with in-tree version not the installed one.
-# find_header() and friends use standard include/library paths first.
-$stderr.puts "Added -I#{NOTDIR} to $INCFLAGS"
-$INCFLAGS = "-I#{NOTDIR}".quote + " " + $INCFLAGS
-find_header('notmuch.h', NOTDIR)
-
-$LOCAL_LIBS += NOTLIB
+# Notmuch Library
+find_header('notmuch.h', '../../lib')
+find_library('notmuch', 'notmuch_database_create', '../../lib')
# Create Makefile
dir_config('notmuch')