SRV lookup library

This uses the ADNS library, if available. Otherwise, the host program.

I anticipate that cabal users won't easily get hsdns installed, since
it's a Haskell binding to a C library. And using host is just fine, as
long as the system has it.
This commit is contained in:
Joey Hess 2012-10-25 17:54:00 -04:00
parent c23c942c2c
commit a0bdb2bb00
2 changed files with 8 additions and 0 deletions

View file

@ -27,6 +27,7 @@ tests =
, TestCase "bup" $ testCmd "bup" "bup --version >/dev/null"
, TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null"
, TestCase "lsof" $ testCmd "lsof" "lsof -v >/dev/null 2>&1"
, TestCase "host" $ testCmd "host" "host localhost >/dev/null 2>&1"
, TestCase "ssh connection caching" getSshConnectionCaching
] ++ shaTestCases
[ (1, "da39a3ee5e6b4b0d3255bfef95601890afd80709")

View file

@ -46,6 +46,9 @@ Flag Pairing
Flag XMPP
Description: Enable notifications using XMPP
Flag Adns
Description: Enable the ADNS library for DNS lookup
Executable git-annex
Main-Is: git-annex.hs
Build-Depends: MissingH, hslogger, directory, filepath,
@ -98,6 +101,10 @@ Executable git-annex
Build-Depends: network-protocol-xmpp
CPP-Options: -DWITH_XMPP
if flag(XMPP) && flag(Assistant) && flag(Adns)
Build-Depends: hsdns
CPP-Options: -DWITH_ADNS
Test-Suite test
Type: exitcode-stdio-1.0
Main-Is: test.hs