common/autoconf/basics.m4

changeset 598
db46b1c27a93
parent 562
14d7ebe42c8d
child 670
3b8ffb80db0f
     1.1 --- a/common/autoconf/basics.m4	Fri Jan 18 11:31:33 2013 -0800
     1.2 +++ b/common/autoconf/basics.m4	Mon Jan 28 14:23:20 2013 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  #
     1.5 -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 +# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8  #
     1.9  # This code is free software; you can redistribute it and/or modify it
    1.10 @@ -234,7 +234,9 @@
    1.11  BASIC_REQUIRE_PROG(CAT, cat)
    1.12  BASIC_REQUIRE_PROG(CHMOD, chmod)
    1.13  BASIC_REQUIRE_PROG(CMP, cmp)
    1.14 +BASIC_REQUIRE_PROG(COMM, comm)
    1.15  BASIC_REQUIRE_PROG(CP, cp)
    1.16 +BASIC_REQUIRE_PROG(CPIO, cpio)
    1.17  BASIC_REQUIRE_PROG(CUT, cut)
    1.18  BASIC_REQUIRE_PROG(DATE, date)
    1.19  BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
    1.20 @@ -633,6 +635,18 @@
    1.21    fi
    1.22  ])
    1.23  
    1.24 +# Check that source files have basic read permissions set. This might
    1.25 +# not be the case in cygwin in certain conditions.
    1.26 +AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
    1.27 +[
    1.28 +  if test x"$OPENJDK_BUILD_OS" = xwindows; then
    1.29 +    file_to_test="$SRC_ROOT/LICENSE"
    1.30 +    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
    1.31 +      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.32 +    fi
    1.33 +  fi
    1.34 +])
    1.35 +
    1.36  AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
    1.37  [
    1.38  
    1.39 @@ -642,6 +656,8 @@
    1.40    [OUTPUT_DIR_IS_LOCAL="no"])
    1.41  AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
    1.42  
    1.43 +BASIC_CHECK_SRC_PERMS
    1.44 +
    1.45  # Check if the user has any old-style ALT_ variables set.
    1.46  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
    1.47  

mercurial