Skip to content

Commit

Permalink
Abort extconf when required headers or libraries are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
eagletmt committed Feb 6, 2016
1 parent 5f394fa commit d1b1af0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ext/libssh_ruby/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@
$CFLAGS << ' -Wall -W'
end

have_header('libssh/libssh.h')
have_library('ssh')
have_library('ssh_threads')
unless have_header('libssh/libssh.h')
abort 'Cannot find libssh/libssh.h'
end
unless have_library('ssh')
abort 'Cannot find libssh'
end
unless have_library('ssh_threads')
abort 'Cannot find libssh_threads'
end

have_const('SSH_KEYTYPE_ED25519', 'libssh/libssh.h')

create_makefile('libssh/libssh_ruby')

0 comments on commit d1b1af0

Please sign in to comment.