From 8543d9add4c717987ce4b8bbd44b285b4963c125 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 17 Mar 2011 11:57:03 -0400 Subject: [PATCH] check for curl in configure, thanks Jimmy --- configure.hs | 1 + doc/bugs/check_for_curl_in_configure.hs.mdwn | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/configure.hs b/configure.hs index 772ba54899..f5c2956488 100644 --- a/configure.hs +++ b/configure.hs @@ -13,6 +13,7 @@ tests = [ , TestCase "uuid generator" $ selectCmd "uuid" ["uuid", "uuidgen"] , TestCase "xargs -0" $ requireCmd "xargs_0" "xargs -0 /dev/null" + , TestCase "curl" $ testCmd "curl" "curl --version >/dev/null" , TestCase "unicode FilePath support" $ unicodeFilePath ] ++ shaTestCases [1, 256, 512, 224, 384] diff --git a/doc/bugs/check_for_curl_in_configure.hs.mdwn b/doc/bugs/check_for_curl_in_configure.hs.mdwn index ee24769ce7..18edabe5e0 100644 --- a/doc/bugs/check_for_curl_in_configure.hs.mdwn +++ b/doc/bugs/check_for_curl_in_configure.hs.mdwn @@ -14,8 +14,21 @@ index 772ba54..1a563e0 100644 ] ++ shaTestCases [1, 256, 512, 224, 384] +> Well, curl is an optional extra, so requireCmd is too strong. Changed +> to testCmd and applied, thank you! +> +> I thought about actually *using* the resulting SysConfig.curl +> to disable the URL backend if False.. but probably it's better +> to just let it fail if curl is not available. Although, if we wanted +> to add a check for wget or something and use it when curl was not +> available, that might be worth doing. --[[Joey]] + also in Backend/URL.hs is it worth making a minor change to the way curl is called (I'm not sure if the following is correct or not) +> It's correct, typewise, but I don't see any real reason to bother +> with the change. But I do appreciate patches, which have been rare +> so far, probaby because of Haskell.. :) --[[Joey]] +
 diff --git a/Backend/URL.hs b/Backend/URL.hs
 index 29dc8fe..4afcf86 100644