Skip to content

Commit

Permalink
Include libssh and libcurl in compilation if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
viraptor committed Jan 8, 2024
1 parent 17e587a commit 237defc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ext/exiv2/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,23 @@
pkg_config("exiv2")
end
have_library("exiv2")

# Some extensions are optional in versions <= 0.27 and also don't exist in
# versions >= 0.28.
# Check if they're enabled in the existing exiv2 headers
# configuration and include the relevant libraries.
if have_macro("EXV_USE_SSH", "exiv2/exv_conf.h")
if dir_config("libssh") == [nil, nil]
pkg_config("libssh")
end
have_library("libssh")
end

if have_macro("EXV_USE_CURL", "exiv2/exv_conf.h")
if dir_config("libcurl") == [nil, nil]
pkg_config("libcurl")
end
have_library("libcurl")
end

create_makefile("exiv2/exiv2")

0 comments on commit 237defc

Please sign in to comment.