The fix is to set CONFIG_SHELL ahead of calling the autoconf script.
Thanks to Dean Long for finding out the issue and testing the patch with dash.
Bug: https://bugs.openjdk.java.net/browse/JDK-8069057WebRev: http://cr.openjdk.java.net/~ihse/JDK-8069057-enforce-bash-in-configure/webrev.01
/Magnus