I'm (finally) committing this on David's behalf. It's a trivial patch so doesn't need a copyright assignment in place (as agreed with Mark).
2008-02-21 David Walluck <[EMAIL PROTECTED]> PR classpath/27204: * m4/acinclude.m4: (REGEN_WITH_JAY): Handle 'yes' as a default, not a directory and give more user-friendly output. -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net
Index: m4/acinclude.m4 =================================================================== RCS file: /sources/classpath/classpath/m4/acinclude.m4,v retrieving revision 1.33 diff -u -r1.33 acinclude.m4 --- m4/acinclude.m4 21 Feb 2008 10:50:08 -0000 1.33 +++ m4/acinclude.m4 21 Feb 2008 13:29:49 -0000 @@ -153,25 +153,41 @@ AC_DEFUN([REGEN_WITH_JAY], [ AC_ARG_WITH([jay], - [AS_HELP_STRING(--with-jay,Regenerate the parsers with jay must be given the path to the jay executable)], + [AS_HELP_STRING(--with-jay[=DIR|PATH],Regenerate the parsers with jay)], [ - if test -d "${withval}"; then + AC_MSG_CHECKING([whether to regenerate parsers with jay]) + JAY_FOUND=no + JAY_DIR_PATH= + if test "x${withval}" = xno; then + AC_MSG_RESULT(no) + elif test "x${withval}" = xyes; then + AC_MSG_RESULT(yes) + JAY_DIR_PATH="/usr/share/jay" + elif test -d "${withval}"; then + AC_MSG_RESULT(yes) JAY_DIR_PATH="${withval}" - AC_PATH_PROG(JAY, jay, "no", ${JAY_DIR_PATH}) - if test "x${JAY}" = xno; then - AC_MSG_ERROR("jay executable not found"); - fi - else + elif test -f "${withval}"; then + AC_MSG_RESULT(yes) JAY_DIR_PATH=`dirname "${withval}"` JAY="${withval}" - AC_SUBST(JAY) + else + AC_MSG_ERROR(jay not found at ${withval}) + fi + + if test "x${JAY_DIR_PATH}" != x; then + AC_PATH_PROG(JAY, jay, "no", ${JAY_DIR_PATH}:${PATH}) + if test "x${JAY}" = xno; then + AC_MSG_ERROR(jay executable not found); + fi + JAY_SKELETON="${JAY_DIR_PATH}/skeleton" + AC_CHECK_FILE(${JAY_SKELETON}, AC_SUBST(JAY_SKELETON), + AC_MSG_ERROR(Expected skeleton file in ${JAY_DIR_PATH})) + JAY_FOUND=yes fi - JAY_SKELETON="${JAY_DIR_PATH}/skeleton" - AC_CHECK_FILE(${JAY_SKELETON}, AC_SUBST(JAY_SKELETON), - AC_MSG_ERROR("Expected skeleton file in `dirname ${withval}`")) - JAY_FOUND=yes ], [ + AC_MSG_CHECKING([whether to regenerate parsers with jay]) + AC_MSG_RESULT(no) JAY_FOUND=no ]) AM_CONDITIONAL(REGEN_PARSERS, test "x${JAY_FOUND}" = xyes)