Lines 5-31
Link Here
|
5 |
|
5 |
|
6 |
require 'mkmf' |
6 |
require 'mkmf' |
7 |
|
7 |
|
8 |
dir = File.join('..', '..', 'lib') |
|
|
9 |
|
10 |
# includes |
11 |
$INCFLAGS = "-I#{dir} #{$INCFLAGS}" |
12 |
|
13 |
# make sure there are no undefined symbols |
8 |
# make sure there are no undefined symbols |
14 |
$LDFLAGS += ' -Wl,--no-undefined' |
9 |
$LDFLAGS += ' -Wl,--no-undefined -lnotmuch' |
15 |
|
10 |
|
16 |
def have_local_library(lib, path, func, headers = nil) |
|
|
17 |
checking_for checking_message(func, lib) do |
18 |
lib = File.join(path, lib) |
19 |
if try_func(func, lib, headers) |
20 |
$LOCAL_LIBS += lib |
21 |
end |
22 |
end |
23 |
end |
24 |
|
25 |
if not have_local_library('libnotmuch.so', dir, 'notmuch_database_create', 'notmuch.h') |
26 |
exit 1 |
27 |
end |
28 |
|
29 |
# Create Makefile |
11 |
# Create Makefile |
30 |
dir_config('notmuch') |
12 |
dir_config('notmuch') |
31 |
create_makefile('notmuch') |
13 |
create_makefile('notmuch') |