--- a/common/autoconf/configure Tue Dec 08 10:11:28 2015 +0530
+++ b/common/autoconf/configure Wed Dec 09 11:44:40 2015 +0100
@@ -257,10 +257,14 @@
# Now transfer control to the script generated by autoconf. This is where the
# main work is done.
+RCDIR=`mktemp -dt jdk-build-configure.tmp.XXXXXX` || exit $?
+trap "rm -rf \"$RCDIR\"" EXIT
conf_logfile=./configure.log
-(exec 3>&1 ; (. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) | tee -a $conf_logfile 1>&2 ; exec 3>&-) | tee -a $conf_logfile
+(exec 3>&1 ; ((. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) \
+ ; echo $? > "$RCDIR/rc" ) \
+ | tee -a $conf_logfile 1>&2 ; exec 3>&-) | tee -a $conf_logfile
-conf_result_code=$?
+conf_result_code=`cat "$RCDIR/rc"`
###
### Post-processing
###