The autoconfigure tests for IPv6 relies on C-library internals, and it currently fails for musl c-library based linux. For Alpine Linux bug report see http://bugs.alpinelinux.org/issues/3158.
A better test (and non-OS dependent) would be to try creating AF_INET6 socket, if it succeeds, then IPv6 is supported.
http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/crypto/dist/ipsec-tools/configure.ac (and search for --disable-ipv6)
Created attachment 13546 [details]
Proposed patch to fix the issue
Please find attached a proposal patch following Timo's suggestion: I replace the long specific C library detection (which in our case forgot musl's users) by a single feature test that all C libraries have to implement in order to have a compiling rsync with IPv6 support.
After applying this patch, I was able to compile an IPv6 ready rsync with musl, while keeping the same behaviour with the glibc under Linux. This should be tested against others libc I don't have access to.