summaryrefslogtreecommitdiff
path: root/m4/ax_find_hamcrest.m4
diff options
context:
space:
mode:
authorSveinung Kvilhaugsvik <sveinung84@users.sourceforge.net>2013-10-02 20:53:17 +0200
committerPeter Simons <simons@cryp.to>2013-10-03 19:06:57 +0200
commit2d6f98e52960ebcd27e18520a26774e382903af2 (patch)
tree8581d0591eff04d68f833104f337b0b28495e5ae /m4/ax_find_hamcrest.m4
parente97967395fa35274e19bd69b7f32b6e51ffc0721 (diff)
downloadautoconf-archive-2d6f98e52960ebcd27e18520a26774e382903af2.tar.gz
Add support for finding the jars of JUnit and Hamcrest.
If JUnit don't include its dependency Hamcrest it will look for it.
Diffstat (limited to 'm4/ax_find_hamcrest.m4')
-rw-r--r--m4/ax_find_hamcrest.m439
1 files changed, 39 insertions, 0 deletions
diff --git a/m4/ax_find_hamcrest.m4 b/m4/ax_find_hamcrest.m4
new file mode 100644
index 0000000..0a87f6f
--- /dev/null
+++ b/m4/ax_find_hamcrest.m4
@@ -0,0 +1,39 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_find_hamcrest.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_FIND_HAMCREST
+#
+# DESCRIPTION
+#
+# AX_FIND_HAMCREST will look for the Hamcrest java library. When found its
+# path will be put in HAMCREST_CPF as a classpath fragment.
+#
+# To override the location define HAMCREST_JAR to the wanted path
+#
+# LICENSE
+#
+# Copyright (c) 2013 Sveinung Kvilhaugsvik <sveinung84@users.sourceforge.net>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AC_ARG_VAR(HAMCREST_JAR,
+ [the location of the Hamcrest Matcher java library])
+
+AC_DEFUN([AX_FIND_HAMCREST], [
+ AC_CACHE_VAL(ax_cv_hamcrest_cpf, [
+ AS_IF([test x"$HAMCREST_JAR" != x],
+ [ax_cv_hamcrest_cpf="$HAMCREST_JAR$PATH_SEPARATOR"], [
+ AX_XTRA_CLASSPATH(ax_cv_hamcrest_cpf, org.hamcrest.Matcher,
+ [hamcrest-core-1.3.jar hamcrest-core.jar])])])
+
+ AS_IF([test x"$ax_cv_hamcrest_cpf" != x],
+ [AC_SUBST(HAMCREST_CPF, $ax_cv_hamcrest_cpf)],
+ AC_MSG_WARN([Hamcrest Matcher not found]))])