So just test with `AC_CHECK_LIB`?
Yes, if you don't have pkg-config then you'll need to use AC_CHECK_LIB.
Also, is the issue from your other comment properly addressed?
I don't know which comment you're referring to exactly, but you don't need the header and soname checks in the C code either.