summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2018-08-16 16:37:50 +0200
committerDavid Disseldorp <ddiss@suse.de>2018-08-16 16:38:40 +0200
commit0290c589836641ad7bb39a97e45dfcf3d8603f23 (patch)
treec95ff196eb207e719cf10f419b0e922a4726b9a3 /configure
parent35e2d88fad2151f272af60babb5e6c98922d0bcd (diff)
downloadfio-0290c589836641ad7bb39a97e45dfcf3d8603f23.tar.gz
fio-0290c589836641ad7bb39a97e45dfcf3d8603f23.tar.bz2
configure: use pkg-config to detect libcurl & openssl
Signed-off-by: David Disseldorp <ddiss@suse.de>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 6 insertions, 21 deletions
diff --git a/configure b/configure
index 103ea945..97bc35e9 100755
--- a/configure
+++ b/configure
@@ -1573,27 +1573,12 @@ print_config "IPv6 helpers" "$ipv6"
if test "$http" != "yes" ; then
http="no"
fi
-cat > $TMPC << EOF
-#include <curl/curl.h>
-#include <openssl/hmac.h>
-
-int main(int argc, char **argv)
-{
- CURL *curl;
- HMAC_CTX *ctx;
-
- curl = curl_easy_init();
- curl_easy_cleanup(curl);
-
- ctx = HMAC_CTX_new();
- HMAC_CTX_reset(ctx);
- HMAC_CTX_free(ctx);
- return 0;
-}
-EOF
-if test "$disable_http" != "yes" && compile_prog "" "-lcurl -lssl -lcrypto" "curl"; then
- LIBS="-lcurl -lssl -lcrypto $LIBS"
- http="yes"
+if test "$disable_http" != "yes" && $(pkg-config --exists libcurl openssl); then
+ # http engine currently requires opaque HMAC_CTX present in openssl >= 1.1
+ if $(pkg-config --atleast-version=1.1.0 openssl); then
+ LIBS="$(pkg-config --libs libcurl openssl) $LIBS"
+ http="yes"
+ fi
fi
print_config "http engine" "$http"