The test for jni.h is a regular AC_CHECK_HEADERS() call. Assuming a recent autoconf, there should be two tests "checking jni.h usability" and "checking jni.h presence" first. What are the results of those?
Is your pkgsrc recipe available somewhere so that I can try it?