]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/ruby/extconf.rb
python/doc: fix link to notmuch-config manpage
[notmuch] / bindings / ruby / extconf.rb
index 933f34a98db3e57d940bd39f68302843b6aa3d77..ba97670ffb751977cfca922f457e702b20d464fe 100644 (file)
@@ -5,27 +5,14 @@
 
 require 'mkmf'
 
-NOTDIR = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
-NOTHDR = File.join(NOTDIR, 'notmuch.h')
-NOTLIB = File.join(NOTDIR, 'libnotmuch.a')
+$INCFLAGS = "#{ENV['EXTRA_INCFLAGS']} #{$INCFLAGS}"
+$LDFLAGS = "#{ENV['EXTRA_LDFLAGS']} #{$LDFLAGS}"
 
-unless File.exists? NOTHDR
-  $stderr.puts "notmuch.h is missing under #{NOTDIR}"
+if not ENV['LIBNOTMUCH']
   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
+$LOCAL_LIBS = ENV['LIBNOTMUCH']
 
 # Create Makefile
 dir_config('notmuch')