This part of the configure script actually comes from the included m4/ax_enable_builddir.m4; libffi 3.0.9 didn't have that file. I'll report the problem to the ​libffi-discuss mailing list, but we may also need to report it to the developers of ​ax_enable_builddir.m4.