diff -r 105a25ffa4a4 -r 77f062a41850 common/autoconf/basics.m4 --- a/common/autoconf/basics.m4 Wed Dec 26 14:23:27 2012 -0800 +++ b/common/autoconf/basics.m4 Thu Dec 27 20:15:22 2012 +0100 @@ -633,6 +633,18 @@ fi ]) +# Check that source files have basic read permissions set. This might +# not be the case in cygwin in certain conditions. +AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS], +[ + if test x"$OPENJDK_BUILD_OS" = xwindows; then + file_to_test="$SRC_ROOT/LICENSE" + if test `$STAT -c '%a' "$file_to_test"` -lt 400; then + AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.]) + fi + fi +]) + AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], [ @@ -642,6 +654,8 @@ [OUTPUT_DIR_IS_LOCAL="no"]) AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL) +BASIC_CHECK_SRC_PERMS + # Check if the user has any old-style ALT_ variables set. FOUND_ALT_VARIABLES=`env | grep ^ALT_`