summaryrefslogtreecommitdiff
path: root/m4/ax_find_scala_stdlib.m4
diff options
context:
space:
mode:
authorSveinung Kvilhaugsvik <sveinung84@users.sourceforge.net>2013-10-03 20:43:41 +0200
committerPeter Simons <simons@cryp.to>2013-10-19 12:00:35 +0200
commitbfae2bf117875fcc729436b0e46aac47adb5bcfd (patch)
tree8686644f9da2581d953b46db0e42a7b5f7a459ff /m4/ax_find_scala_stdlib.m4
parent1865640200f75cefd8f9251bbf23e4eb1948dc88 (diff)
downloadautoconf-archive-bfae2bf117875fcc729436b0e46aac47adb5bcfd.tar.gz
AX_FIND_SCALA_STDLIB: add support for finding the jar containing the Scala Standard Library
Diffstat (limited to 'm4/ax_find_scala_stdlib.m4')
-rw-r--r--m4/ax_find_scala_stdlib.m439
1 files changed, 39 insertions, 0 deletions
diff --git a/m4/ax_find_scala_stdlib.m4 b/m4/ax_find_scala_stdlib.m4
new file mode 100644
index 0000000..e79df24
--- /dev/null
+++ b/m4/ax_find_scala_stdlib.m4
@@ -0,0 +1,39 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_find_scala_stdlib.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_FIND_SCALA_STDLIB
+#
+# DESCRIPTION
+#
+# AX_FIND_SCALA_STDLIB will look for the Scala Standard Library. When
+# found its path will be put in SCALA_STDLIB_CPF as a classpath fragment.
+#
+# To override the location define SCALA_STDLIB 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 1
+
+AC_ARG_VAR(SCALA_STDLIB, [path to the Scala Standard Library])
+
+AC_DEFUN([AX_FIND_SCALA_STDLIB], [
+ AC_CACHE_VAL(ax_cv_scala_libray, [
+ AS_IF([test x"$SCALA_STDLIB" != x],
+ [ax_cv_scala_stdlib_cpf="$SCALA_STDLIB$PATH_SEPARATOR"],
+ [AX_XTRA_CLASSPATH(ax_cv_scala_stdlib_cpf,
+ scala.collection.immutable.List, scala-library.jar)])])
+
+ AS_IF([test x"$ax_cv_scala_stdlib_cpf" != x], [
+ AC_MSG_NOTICE([Scala Standard Library found $ax_cv_scala_stdlib_cpf])
+ AC_SUBST(SCALA_STDLIB_CPF, $ax_cv_scala_stdlib_cpf)
+ ], AC_MSG_WARN([Scala Standard Library not found]))])