1 # |
1 # |
2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # |
4 # |
5 # This code is free software; you can redistribute it and/or modify it |
5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as |
6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. Oracle designates this |
7 # published by the Free Software Foundation. Oracle designates this |
232 BASIC_REQUIRE_PROG(BASENAME, basename) |
232 BASIC_REQUIRE_PROG(BASENAME, basename) |
233 BASIC_REQUIRE_PROG(BASH, bash) |
233 BASIC_REQUIRE_PROG(BASH, bash) |
234 BASIC_REQUIRE_PROG(CAT, cat) |
234 BASIC_REQUIRE_PROG(CAT, cat) |
235 BASIC_REQUIRE_PROG(CHMOD, chmod) |
235 BASIC_REQUIRE_PROG(CHMOD, chmod) |
236 BASIC_REQUIRE_PROG(CMP, cmp) |
236 BASIC_REQUIRE_PROG(CMP, cmp) |
|
237 BASIC_REQUIRE_PROG(COMM, comm) |
237 BASIC_REQUIRE_PROG(CP, cp) |
238 BASIC_REQUIRE_PROG(CP, cp) |
|
239 BASIC_REQUIRE_PROG(CPIO, cpio) |
238 BASIC_REQUIRE_PROG(CUT, cut) |
240 BASIC_REQUIRE_PROG(CUT, cut) |
239 BASIC_REQUIRE_PROG(DATE, date) |
241 BASIC_REQUIRE_PROG(DATE, date) |
240 BASIC_REQUIRE_PROG(DIFF, [gdiff diff]) |
242 BASIC_REQUIRE_PROG(DIFF, [gdiff diff]) |
241 BASIC_REQUIRE_PROG(DIRNAME, dirname) |
243 BASIC_REQUIRE_PROG(DIRNAME, dirname) |
242 BASIC_REQUIRE_PROG(ECHO, echo) |
244 BASIC_REQUIRE_PROG(ECHO, echo) |
631 $3 |
633 $3 |
632 fi |
634 fi |
633 fi |
635 fi |
634 ]) |
636 ]) |
635 |
637 |
|
638 # Check that source files have basic read permissions set. This might |
|
639 # not be the case in cygwin in certain conditions. |
|
640 AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS], |
|
641 [ |
|
642 if test x"$OPENJDK_BUILD_OS" = xwindows; then |
|
643 file_to_test="$SRC_ROOT/LICENSE" |
|
644 if test `$STAT -c '%a' "$file_to_test"` -lt 400; then |
|
645 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.]) |
|
646 fi |
|
647 fi |
|
648 ]) |
|
649 |
636 AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], |
650 AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], |
637 [ |
651 [ |
638 |
652 |
639 AC_MSG_CHECKING([if build directory is on local disk]) |
653 AC_MSG_CHECKING([if build directory is on local disk]) |
640 BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT, |
654 BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT, |
641 [OUTPUT_DIR_IS_LOCAL="yes"], |
655 [OUTPUT_DIR_IS_LOCAL="yes"], |
642 [OUTPUT_DIR_IS_LOCAL="no"]) |
656 [OUTPUT_DIR_IS_LOCAL="no"]) |
643 AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL) |
657 AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL) |
|
658 |
|
659 BASIC_CHECK_SRC_PERMS |
644 |
660 |
645 # Check if the user has any old-style ALT_ variables set. |
661 # Check if the user has any old-style ALT_ variables set. |
646 FOUND_ALT_VARIABLES=`env | grep ^ALT_` |
662 FOUND_ALT_VARIABLES=`env | grep ^ALT_` |
647 |
663 |
648 # Before generating output files, test if they exist. If they do, this is a reconfigure. |
664 # Before generating output files, test if they exist. If they do, this is a reconfigure. |