summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2008-02-21 13:36:15 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2008-02-21 13:36:15 +0000
commit7318bc6437df15840846e566e911c7150a9178c0 (patch)
treeacc78371438ff42634a9977db35534cd7afdf698
parent1821fe846af2d215082094bed4be60b187d3bbb7 (diff)
downloadclasspath-7318bc6437df15840846e566e911c7150a9178c0.tar.gz
2008-02-21 David Walluck <david@jpackage.org>
PR classpath/27204: * m4/acinclude.m4: (REGEN_WITH_JAY): Handle 'yes' as a default, not a directory and give more user-friendly output.
-rw-r--r--ChangeLog7
-rw-r--r--m4/acinclude.m440
2 files changed, 35 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index ab1015906..23636dc37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-02-21 David Walluck <david@jpackage.org>
+
+ PR classpath/27204:
+ * m4/acinclude.m4:
+ (REGEN_WITH_JAY): Handle 'yes' as a default,
+ not a directory and give more user-friendly output.
+
2008-02-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* gnu/java/util/regex/REException.java:
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index 663cd850b..fa2bbe016 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -153,25 +153,41 @@ dnl -----------------------------------------------------------
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)