The APR fix just handles macOS w/ Xcode9 or clang 5.0.0. -Werror can be set "externally" and whether or not we should actually die is debatable. But considering that AC_CHECK_LIB will never use function prototypes, the long term solution may be to simply never use that.
I'm +0 on removing the check for APRs but we need to document this behavior someplace since it can easily cause unrepeatable builds.