X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fruby%2Fextconf.rb;h=ddaa6841e5ff2d507c65501f6d81dd00f9e942fe;hb=7e6e23c36e290d4b22b0449766a6ef2107f1ef6c;hp=6160db26e2ea10286fb16065c2c030ea90a0c07e;hpb=8c3d19313e590590db3ecfe0fb7177f4f6aee023;p=notmuch diff --git a/bindings/ruby/extconf.rb b/bindings/ruby/extconf.rb index 6160db26..ddaa6841 100644 --- a/bindings/ruby/extconf.rb +++ b/bindings/ruby/extconf.rb @@ -10,22 +10,16 @@ dir = File.join('..', '..', 'lib') # includes $INCFLAGS = "-I#{dir} #{$INCFLAGS}" -# make sure there are no undefined symbols -$LDFLAGS += ' -Wl,--no-undefined' - -def have_local_library(lib, path, func, headers = nil) - checking_for checking_message(func, lib) do - lib = File.join(path, lib) - if try_func(func, lib, headers) - $LOCAL_LIBS += lib - end - end +if ENV['EXTRA_LDFLAGS'] + $LDFLAGS += " " + ENV['EXTRA_LDFLAGS'] end -if not have_local_library('libnotmuch.so', dir, 'notmuch_database_create', 'notmuch.h') +if not ENV['LIBNOTMUCH'] exit 1 end +$LOCAL_LIBS += ENV['LIBNOTMUCH'] + # Create Makefile dir_config('notmuch') create_makefile('notmuch')