summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2008-06-27 00:18:36 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2008-06-27 00:18:36 +0000
commitd6e4f9fb2457086bac87975672c0c11f2d88f67f (patch)
tree3aa87b047cd3ff8fb7e79056d5c3c220486acde3 /m4
parent1b56c841903c989e75d6878c07524b7970fba65c (diff)
downloadclasspath-d6e4f9fb2457086bac87975672c0c11f2d88f67f.tar.gz
Generalise --with-fastjar to --with-jar and allow it to be turned off.
2008-06-27 Andrew John Hughes <gnu_andrew@member.fsf.org> PR classpath/36637: * examples/Makefile.am, * lib/Makefile.am: Use new conditional and $(JAR). * m4/acinclude.m4: Replace --with-fastjar with a general --with-jar check that can be turned off. * tools/Makefile.am: Use new conditional and $(JAR).
Diffstat (limited to 'm4')
-rw-r--r--m4/acinclude.m447
1 files changed, 37 insertions, 10 deletions
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index 1161f524c..7990e6360 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -55,18 +55,45 @@ dnl -----------------------------------------------------------
AC_DEFUN([CLASSPATH_WITH_GLIBJ],
[
AC_PATH_PROG(ZIP, zip)
- AC_ARG_WITH([fastjar],
- [AS_HELP_STRING([--with-fastjar=PATH], [define to use a fastjar style tool])],
+
+ AC_MSG_CHECKING(for a jar-like tool)
+ AC_ARG_WITH([jar],
+ [AS_HELP_STRING([--with-jar=PATH], [define to use a jar style tool])],
[
- AC_MSG_CHECKING([for user supplied fastjar])
- FASTJAR=${withval}
- AC_MSG_RESULT([${FASTJAR}])
- ],
- [AC_PATH_PROGS([FASTJAR], [fastjar gjar jar])])
-dnl We disable ZIP by default if we find fastjar.
- if test x"${FASTJAR}" != x; then
- ZIP=""
+ case "${withval}" in
+ yes)
+ JAR=yes
+ ;;
+ no)
+ JAR=no
+ AC_MSG_RESULT(${JAR})
+ ;;
+ *)
+ if test -f "${withval}"; then
+ JAR="${withval}"
+ AC_MSG_RESULT(${JAR})
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([The jar tool ${withval} was not found.])
+ fi
+ ;;
+ esac
+ ],
+ [
+ JAR=yes
+ ])
+ if test x"${JAR}" = "xyes"; then
+ AC_MSG_RESULT([trying fastjar, gjar and jar])
+ AC_PATH_PROGS([JAR], [fastjar gjar jar])
+ if test x"${RHINO_JAR}" = "xyes"; then
+ AC_MSG_RESULT([not found])
+ fi
+ fi
+ if test x"${JAR}" = "xno" && test x"${ZIP}" = ""; then
+ AC_MSG_ERROR([No zip or jar tool found.])
fi
+ AM_CONDITIONAL(WITH_JAR, test x"${JAR}" != "xno" && test x"${JAR}" != "xyes")
+ AC_SUBST(JAR)
AC_ARG_WITH([glibj],
[AS_HELP_STRING([--with-glibj],[define what to install (zip|flat|both|none|build) [default=zip]])],