summaryrefslogtreecommitdiff
path: root/m4/ax_prog_jar.m4
diff options
context:
space:
mode:
authorLeo Davis <ldavis@speechfxinc.com>2014-01-17 17:01:19 -0700
committerPeter Simons <simons@cryp.to>2014-02-07 11:40:26 +0100
commitac70b5804f193fcc56f2f5ef9398ea6e90453100 (patch)
treed258f1aabcd999853fe42f7196b8de63b707e80a /m4/ax_prog_jar.m4
parent9b14c6f405df342c2e37e43a05886efd8ec2f6b6 (diff)
downloadautoconf-archive-ac70b5804f193fcc56f2f5ef9398ea6e90453100.tar.gz
M4sugar and M4sh added to AX_PROG_JAR, AX_PROG_JAVA, AX_PROG_JAVAC, and AX_PROG_JAVADOC. Also fixed a path discrepancy with AX_JAVA_OPTIONS.
The discrepancy is AX_JAVA_OPTIONS sets up a variable JAVAPREFIX which is described to the user as the "prefix where the Java runtime is installed". Unfortunately, that directory doesn't contain any executables, but $JAVAPREFIX/bin does. This incorrect path was passed in the value-if-not-found parameter of AC_CHECK_PROGS which is incorrect. I fixed the path and pass it in to the path parameter.
Diffstat (limited to 'm4/ax_prog_jar.m4')
-rw-r--r--m4/ax_prog_jar.m411
1 files changed, 4 insertions, 7 deletions
diff --git a/m4/ax_prog_jar.m4 b/m4/ax_prog_jar.m4
index 776e804..3c60fca 100644
--- a/m4/ax_prog_jar.m4
+++ b/m4/ax_prog_jar.m4
@@ -37,16 +37,13 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 6
+#serial 7
AU_ALIAS([AC_PROG_JAR], [AX_PROG_JAR])
AC_DEFUN([AX_PROG_JAR],[
-AC_REQUIRE([AC_EXEEXT])dnl
-if test "x$JAVAPREFIX" = x; then
- test "x$JAR" = x && AC_CHECK_PROGS(JAR, jar$EXEEXT)
-else
- test "x$JAR" = x && AC_CHECK_PROGS(JAR, jar, $JAVAPREFIX)
-fi
+AS_IF([test "x$JAVAPREFIX" = x],
+ [test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar])],
+ [test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar], [], [$JAVAPREFIX/bin])])
test "x$JAR" = x && AC_MSG_ERROR([no acceptable jar program found in \$PATH])
AC_PROVIDE([$0])dnl
])