When we build rsync on darwin 10.3, it's linked with -lresolv which is
/usr/lib/libresolv.dylib. However, it's not really necessary because rsync
will still link and run if -lresolv is not used. The only reason I noticed
this is that we sometimes take the 10.3 compiled binaries and run them on a 10.2
system. Since 10.2 doesn't have this library, the binary won't run there - but
it will if libresolv is not used.
The configure test is:
checking for inet_ntop in -lresolv... yes
I'm guessing that it's adding -lresolv if this check passes, even if -lresolv is
not really needed to find the symbol.
This is probably a minor issue, but it seems like it would cleaner to not have
rsync depending on a library that it doesn't really need.
I changed the AC_CHECK_LIB() macro to AC_SEARCH_LIBS() so that libresolv will not get included if it is not needed. (This got rid of the need for libresolv on Linux, and I'll be checking the build farm to make sure that this doesn't cause a problem on other OSes.)