1.1 --- a/common/autoconf/basics.m4 Wed Dec 26 14:23:27 2012 -0800 1.2 +++ b/common/autoconf/basics.m4 Thu Dec 27 20:15:22 2012 +0100 1.3 @@ -633,6 +633,18 @@ 1.4 fi 1.5 ]) 1.6 1.7 +# Check that source files have basic read permissions set. This might 1.8 +# not be the case in cygwin in certain conditions. 1.9 +AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS], 1.10 +[ 1.11 + if test x"$OPENJDK_BUILD_OS" = xwindows; then 1.12 + file_to_test="$SRC_ROOT/LICENSE" 1.13 + if test `$STAT -c '%a' "$file_to_test"` -lt 400; then 1.14 + 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.]) 1.15 + fi 1.16 + fi 1.17 +]) 1.18 + 1.19 AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], 1.20 [ 1.21 1.22 @@ -642,6 +654,8 @@ 1.23 [OUTPUT_DIR_IS_LOCAL="no"]) 1.24 AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL) 1.25 1.26 +BASIC_CHECK_SRC_PERMS 1.27 + 1.28 # Check if the user has any old-style ALT_ variables set. 1.29 FOUND_ALT_VARIABLES=`env | grep ^ALT_` 1.30