See AC_TRY_COMPILE. If we test all 3 cases (both functions, both calling styles of the 2nd function) then we know for sure which way will build, and we don't have to use arbitrary OS tests.

If you need help with the above, I can lend a hand.